From 1f608b1c21ad313cd797f6278311c9ba39aefca4 Mon Sep 17 00:00:00 2001 From: Chris Date: Tue, 11 Jun 2019 12:29:32 +0100 Subject: [PATCH] Update composer dependencies --- composer.lock | 1262 +- vendor/clue/stream-filter/.travis.yml | 1 + vendor/clue/stream-filter/CHANGELOG.md | 9 + vendor/clue/stream-filter/README.md | 24 +- vendor/clue/stream-filter/composer.json | 2 +- .../stream-filter/src/functions_include.php | 5 + vendor/clue/stream-filter/tests/FunTest.php | 17 + vendor/composer/ClassLoader.php | 4 +- vendor/composer/LICENSE | 69 +- vendor/composer/autoload_classmap.php | 286 +- vendor/composer/autoload_files.php | 15 +- vendor/composer/autoload_namespaces.php | 2 +- vendor/composer/autoload_psr4.php | 15 +- vendor/composer/autoload_static.php | 367 +- vendor/composer/installed.json | 5509 ++++--- .../instantiator/.doctrine-project.json | 26 + vendor/doctrine/instantiator/CONTRIBUTING.md | 2 +- vendor/doctrine/instantiator/README.md | 1 - vendor/doctrine/instantiator/composer.json | 10 +- .../doctrine/instantiator/docs/en/index.rst | 68 + .../doctrine/instantiator/docs/en/sidebar.rst | 4 + vendor/doctrine/instantiator/phpbench.json | 4 + vendor/doctrine/instantiator/phpcs.xml.dist | 35 + .../doctrine/instantiator/phpstan.neon.dist | 19 + .../Exception/ExceptionInterface.php | 23 +- .../Exception/InvalidArgumentException.php | 23 +- .../Exception/UnexpectedValueException.php | 20 +- .../Doctrine/Instantiator/Instantiator.php | 76 +- .../Instantiator/InstantiatorInterface.php | 23 +- vendor/doctrine/lexer/.doctrine-project.json | 17 + vendor/doctrine/lexer/.github/FUNDING.yml | 3 + vendor/doctrine/lexer/.gitignore | 2 + vendor/doctrine/lexer/LICENSE | 2 +- vendor/doctrine/lexer/README.md | 2 + vendor/doctrine/lexer/composer.json | 20 +- vendor/doctrine/lexer/docs/en/dql-parser.rst | 294 + vendor/doctrine/lexer/docs/en/index.rst | 53 + vendor/doctrine/lexer/docs/en/sidebar.rst | 6 + .../lexer/docs/en/simple-parser-example.rst | 102 + .../Doctrine/Common/Lexer/AbstractLexer.php | 7 +- vendor/doctrine/lexer/phpunit.xml.dist | 26 + .../Common/Lexer/AbstractLexerTest.php | 268 + .../Doctrine/Common/Lexer/ConcreteLexer.php | 49 + .../cron-expression/CHANGELOG.md | 10 + .../dragonmantank/cron-expression/README.md | 11 +- .../cron-expression/composer.json | 9 +- .../src/Cron/AbstractField.php | 12 +- .../src/Cron/CronExpression.php | 74 +- .../src/Cron/DayOfMonthField.php | 26 +- .../src/Cron/DayOfWeekField.php | 48 +- .../cron-expression/src/Cron/FieldFactory.php | 2 +- .../src/Cron/FieldInterface.php | 15 +- .../cron-expression/src/Cron/HoursField.php | 46 +- .../cron-expression/src/Cron/MinutesField.php | 39 +- .../cron-expression/src/Cron/MonthField.php | 35 +- .../tests/Cron/CronExpressionTest.php | 26 + .../tests/Cron/DayOfMonthFieldTest.php | 13 + .../tests/Cron/DayOfWeekFieldTest.php | 25 + .../tests/Cron/HoursFieldTest.php | 24 +- .../tests/Cron/MinutesFieldTest.php | 22 + .../tests/Cron/MonthFieldTest.php | 22 + .../EmailValidator/EmailLexer.php | 6 +- .../EmailValidator/EmailParser.php | 2 +- .../EmailValidator/EmailValidator.php | 2 +- .../Exception/ExpectingQPair.php | 2 +- .../EmailValidator/Exception/NoDNSRecord.php | 2 - .../EmailValidator/Parser/Parser.php | 4 +- vendor/egulias/email-validator/README.md | 4 +- vendor/erusev/parsedown/Parsedown.php | 18 +- vendor/graham-campbell/cache-plugin/LICENSE | 4 +- .../cache-plugin/composer.json | 8 +- .../cache-plugin/src/CachePlugin.php | 5 +- vendor/graham-campbell/github/LICENSE | 2 +- vendor/graham-campbell/github/composer.json | 14 +- vendor/graham-campbell/manager/LICENSE | 2 +- vendor/graham-campbell/manager/composer.json | 8 +- vendor/knplabs/github-api/CHANGELOG.md | 22 + vendor/knplabs/github-api/README.md | 4 +- vendor/knplabs/github-api/composer.json | 2 +- .../github-api/lib/Github/Api/AbstractApi.php | 4 +- .../lib/Github/Api/AcceptHeaderTrait.php | 2 +- .../lib/Github/Api/Authorizations.php | 22 +- .../lib/Github/Api/CurrentUser/Emails.php | 4 +- .../lib/Github/Api/CurrentUser/Starring.php | 21 + .../github-api/lib/Github/Api/Gists.php | 2 +- .../lib/Github/Api/Issue/Events.php | 6 +- .../lib/Github/Api/Issue/Labels.php | 14 +- .../lib/Github/Api/Issue/Milestones.php | 2 +- .../lib/Github/Api/Miscellaneous/Licenses.php | 34 + .../lib/Github/Api/Organization.php | 6 +- .../lib/Github/Api/Organization/Hooks.php | 4 +- .../github-api/lib/Github/Api/PullRequest.php | 2 +- .../lib/Github/Api/PullRequest/Comments.php | 4 +- .../github-api/lib/Github/Api/RateLimit.php | 75 +- .../Api/RateLimit/RateLimitResource.php | 73 + .../github-api/lib/Github/Api/Repo.php | 5 +- .../Github/Api/Repository/Collaborators.php | 32 +- .../lib/Github/Api/Repository/Contents.php | 6 +- .../lib/Github/Api/Repository/Releases.php | 10 +- .../knplabs/github-api/lib/Github/Client.php | 13 +- .../lib/Github/HttpClient/Builder.php | 5 +- .../HttpClient/Message/ResponseMediator.php | 2 +- .../Plugin/GithubExceptionThrower.php | 27 +- vendor/kylekatarnls/update-helper/LICENSE | 22 + .../kylekatarnls/update-helper/composer.json | 43 + .../src/UpdateHelper/ComposerPlugin.php | 37 + .../src/UpdateHelper/UpdateHelper.php | 349 + .../UpdateHelper/UpdateHelperInterface.php | 8 + vendor/laravel/framework/composer.json | 4 +- .../src/Illuminate/Auth/AuthManager.php | 4 +- .../framework/src/Illuminate/Auth/LICENSE.md | 21 + .../Middleware/AuthenticateWithBasicAuth.php | 6 +- .../Auth/Notifications/ResetPassword.php | 1 + .../Broadcasting/BroadcastController.php | 4 + .../src/Illuminate/Broadcasting/LICENSE.md | 21 + .../framework/src/Illuminate/Bus/LICENSE.md | 21 + .../src/Illuminate/Cache/CacheManager.php | 20 +- .../framework/src/Illuminate/Cache/LICENSE.md | 21 + .../src/Illuminate/Cache/TaggedCache.php | 10 + .../src/Illuminate/Config/LICENSE.md | 21 + .../src/Illuminate/Console/Command.php | 2 +- .../src/Illuminate/Console/LICENSE.md | 21 + .../src/Illuminate/Container/LICENSE.md | 21 + .../Contracts/Foundation/Application.php | 4 +- .../src/Illuminate/Contracts/LICENSE.md | 21 + .../src/Illuminate/Contracts/Mail/Mailer.php | 2 +- .../src/Illuminate/Contracts/Queue/Job.php | 2 + .../src/Illuminate/Cookie/LICENSE.md | 21 + .../Database/Concerns/BuildsQueries.php | 2 +- .../Console/Migrations/StatusCommand.php | 2 +- .../Database/DetectsLostConnections.php | 2 +- .../Illuminate/Database/Eloquent/Builder.php | 24 +- .../Database/Eloquent/Collection.php | 4 +- .../Database/Eloquent/Concerns/HasEvents.php | 21 + .../Eloquent/HigherOrderBuilderProxy.php | 49 + .../Illuminate/Database/Eloquent/Model.php | 8 +- .../Eloquent/Relations/BelongsToMany.php | 2 +- .../Eloquent/Relations/Concerns/AsPivot.php | 2 +- .../Eloquent/Relations/HasOneOrMany.php | 4 +- .../src/Illuminate/Database/LICENSE.md | 21 + .../src/Illuminate/Database/Query/Builder.php | 8 +- .../Query/Grammars/PostgresGrammar.php | 53 + .../Query/Grammars/SqlServerGrammar.php | 10 - .../Illuminate/Database/Schema/Blueprint.php | 12 + .../Database/Schema/ColumnDefinition.php | 3 +- .../Database/Schema/Grammars/Grammar.php | 14 + .../Database/Schema/Grammars/MySqlGrammar.php | 14 + .../Schema/Grammars/SqlServerGrammar.php | 31 +- .../src/Illuminate/Encryption/LICENSE.md | 21 + .../src/Illuminate/Events/LICENSE.md | 21 + .../src/Illuminate/Filesystem/LICENSE.md | 21 + .../src/Illuminate/Foundation/Application.php | 52 +- .../Foundation/Console/Presets/None.php | 2 +- .../Foundation/Console/Presets/React.php | 2 +- .../Foundation/Console/Presets/Vue.php | 2 +- .../Console/Presets/vue-stubs/app.js | 15 +- .../Foundation/Console/stubs/provider.stub | 20 +- .../Foundation/Console/stubs/test.stub | 6 +- .../Foundation/Console/stubs/unit-test.stub | 2 +- .../Foundation/Exceptions/Handler.php | 4 +- .../views/illustrated-layout.blade.php | 2 +- .../Foundation/Testing/RefreshDatabase.php | 6 +- .../Foundation/Testing/TestResponse.php | 31 +- .../src/Illuminate/Hashing/LICENSE.md | 21 + .../framework/src/Illuminate/Http/LICENSE.md | 21 + .../Illuminate/Http/Resources/MergeValue.php | 2 +- .../src/Illuminate/Http/ResponseTrait.php | 10 + .../framework/src/Illuminate/Log/LICENSE.md | 21 + .../src/Illuminate/Log/LogManager.php | 5 + .../framework/src/Illuminate/Mail/LICENSE.md | 21 + .../framework/src/Illuminate/Mail/Mailer.php | 26 +- .../src/Illuminate/Notifications/LICENSE.md | 21 + .../Pagination/AbstractPaginator.php | 17 + .../src/Illuminate/Pagination/LICENSE.md | 21 + .../Pagination/LengthAwarePaginator.php | 2 + .../src/Illuminate/Pagination/Paginator.php | 2 + .../src/Illuminate/Pipeline/LICENSE.md | 21 + .../src/Illuminate/Pipeline/Pipeline.php | 14 +- .../src/Illuminate/Queue/BeanstalkdQueue.php | 7 +- .../Queue/Connectors/BeanstalkdConnector.php | 12 +- .../framework/src/Illuminate/Queue/LICENSE.md | 21 + .../src/Illuminate/Queue/composer.json | 2 +- .../framework/src/Illuminate/Redis/LICENSE.md | 21 + .../src/Illuminate/Routing/LICENSE.md | 21 + .../src/Illuminate/Session/LICENSE.md | 21 + .../src/Illuminate/Support/Collection.php | 3 +- .../src/Illuminate/Support/Facades/URL.php | 4 +- .../src/Illuminate/Support/LICENSE.md | 21 + .../Support/Testing/Fakes/EventFake.php | 2 +- .../Support/Testing/Fakes/MailFake.php | 2 +- .../src/Illuminate/Translation/LICENSE.md | 21 + .../src/Illuminate/Translation/Translator.php | 4 + .../Concerns/ReplacesAttributes.php | 4 +- .../src/Illuminate/Validation/Factory.php | 14 +- .../src/Illuminate/Validation/LICENSE.md | 21 + .../src/Illuminate/Validation/Validator.php | 18 +- .../framework/src/Illuminate/View/LICENSE.md | 21 + vendor/lcobucci/jwt/.gitignore | 5 +- vendor/lcobucci/jwt/.travis.yml | 9 +- vendor/lcobucci/jwt/README.md | 119 +- vendor/lcobucci/jwt/composer.json | 13 +- vendor/lcobucci/jwt/composer.lock | 1898 --- vendor/lcobucci/jwt/phpunit.xml.dist | 18 +- vendor/lcobucci/jwt/src/Builder.php | 281 +- vendor/lcobucci/jwt/src/Claim/Basic.php | 2 + vendor/lcobucci/jwt/src/Claim/EqualsTo.php | 2 + vendor/lcobucci/jwt/src/Claim/Factory.php | 2 + .../jwt/src/Claim/GreaterOrEqualsTo.php | 2 + .../jwt/src/Claim/LesserOrEqualsTo.php | 2 + vendor/lcobucci/jwt/src/Claim/Validatable.php | 2 + vendor/lcobucci/jwt/src/Signer/BaseSigner.php | 2 + vendor/lcobucci/jwt/src/Signer/Ecdsa.php | 134 +- .../jwt/src/Signer/Ecdsa/KeyParser.php | 104 - .../Signer/Ecdsa/MultibyteStringConverter.php | 134 + .../lcobucci/jwt/src/Signer/Ecdsa/Sha256.php | 2 +- .../lcobucci/jwt/src/Signer/Ecdsa/Sha384.php | 2 +- .../lcobucci/jwt/src/Signer/Ecdsa/Sha512.php | 2 +- .../src/Signer/Ecdsa/SignatureConverter.php | 38 + vendor/lcobucci/jwt/src/Signer/Key.php | 2 +- vendor/lcobucci/jwt/src/Signer/OpenSSL.php | 115 + vendor/lcobucci/jwt/src/Signer/Rsa.php | 64 +- vendor/lcobucci/jwt/src/ValidationData.php | 27 +- .../jwt/test/functional/EcdsaTokenTest.php | 36 +- .../jwt/test/functional/HmacTokenTest.php | 2 +- .../jwt/test/functional/RFC6978VectorTest.php | 154 + .../jwt/test/functional/RsaTokenTest.php | 48 +- .../jwt/test/functional/UnsignedTokenTest.php | 26 +- vendor/lcobucci/jwt/test/unit/BuilderTest.php | 300 +- .../jwt/test/unit/Claim/BasicTest.php | 2 +- .../jwt/test/unit/Claim/EqualsToTest.php | 5 +- .../jwt/test/unit/Claim/FactoryTest.php | 2 +- .../test/unit/Claim/GreaterOrEqualsToTest.php | 6 +- .../test/unit/Claim/LesserOrEqualsToTest.php | 6 +- vendor/lcobucci/jwt/test/unit/ParserTest.php | 8 +- .../jwt/test/unit/Parsing/DecoderTest.php | 2 +- .../jwt/test/unit/Parsing/EncoderTest.php | 2 +- .../lcobucci/jwt/test/unit/SignatureTest.php | 4 +- .../jwt/test/unit/Signer/BaseSignerTest.php | 2 +- .../test/unit/Signer/Ecdsa/KeyParserTest.php | 178 - .../Ecdsa/MultibyteStringConverterTest.php | 127 + .../jwt/test/unit/Signer/Ecdsa/Sha256Test.php | 14 +- .../jwt/test/unit/Signer/Ecdsa/Sha384Test.php | 14 +- .../jwt/test/unit/Signer/Ecdsa/Sha512Test.php | 14 +- .../jwt/test/unit/Signer/EcdsaTest.php | 188 +- .../jwt/test/unit/Signer/Hmac/Sha256Test.php | 2 +- .../jwt/test/unit/Signer/Hmac/Sha384Test.php | 2 +- .../jwt/test/unit/Signer/Hmac/Sha512Test.php | 2 +- .../jwt/test/unit/Signer/HmacTest.php | 2 +- .../lcobucci/jwt/test/unit/Signer/KeyTest.php | 2 +- .../jwt/test/unit/Signer/KeychainTest.php | 2 +- .../jwt/test/unit/Signer/Rsa/Sha256Test.php | 2 +- .../jwt/test/unit/Signer/Rsa/Sha384Test.php | 2 +- .../jwt/test/unit/Signer/Rsa/Sha512Test.php | 2 +- .../lcobucci/jwt/test/unit/Signer/RsaTest.php | 188 + vendor/lcobucci/jwt/test/unit/TokenTest.php | 85 +- .../jwt/test/unit/ValidationDataTest.php | 66 +- vendor/league/flysystem/LICENSE | 2 +- .../src/Adapter/AbstractFtpAdapter.php | 69 +- vendor/league/flysystem/src/Adapter/Ftp.php | 5 +- vendor/league/flysystem/src/Adapter/Local.php | 3 +- vendor/league/flysystem/src/Filesystem.php | 3 +- .../src/Util/ContentListingFormatter.php | 28 +- vendor/league/flysystem/src/Util/MimeType.php | 2 +- vendor/mockery/mockery/.gitignore | 1 + vendor/mockery/mockery/CHANGELOG.md | 9 +- vendor/mockery/mockery/README.md | 2 +- vendor/mockery/mockery/composer.json | 2 +- .../docs/getting_started/simple_example.rst | 2 +- .../docs/reference/creating_test_doubles.rst | 2 +- .../mockery/docs/reference/expectations.rst | 2 +- vendor/mockery/mockery/library/Mockery.php | 8 +- .../Phpunit/Legacy/TestListenerTrait.php | 2 +- .../Phpunit/MockeryPHPUnitIntegration.php | 10 +- ...onAssertPostConditionsForV7AndPrevious.php | 29 + ...itIntegrationAssertPostConditionsForV8.php | 31 + .../Adapter/Phpunit/MockeryTestCase.php | 15 +- .../MockeryTestCaseSetUpForV7AndPrevious.php | 36 + .../Phpunit/MockeryTestCaseSetUpForV8.php | 38 + .../library/Mockery/Generator/Method.php | 17 +- .../StringManipulation/Pass/ClassPass.php | 6 + .../mockery/mockery/library/Mockery/Mock.php | 12 +- .../mockery/library/Mockery/MockInterface.php | 6 +- vendor/mockery/mockery/library/helpers.php | 1 - vendor/mockery/mockery/phpunit.xml.dist | 2 + .../Adapter/Phpunit/TestListenerTest.php | 6 +- .../mockery/tests/Mockery/AdhocTest.php | 4 +- .../mockery/tests/Mockery/ContainerTest.php | 83 +- .../tests/Mockery/DemeterChainTest.php | 4 +- .../mockery/tests/Mockery/ExpectationTest.php | 306 +- .../Fixtures/MethodWithHHVMReturnType.php | 4 +- .../Generator/MockConfigurationTest.php | 2 +- .../Pass/CallTypeHintPassTest.php | 4 +- .../Pass/ClassNamePassTest.php | 18 +- .../StringManipulation/Pass/ClassPassTest.php | 59 + .../Pass/ConstantsPassTest.php | 2 +- .../Pass/InstanceMockPassTest.php | 6 +- .../Pass/InterfacePassTest.php | 2 +- .../tests/Mockery/GlobalHelpersTest.php | 8 +- .../tests/Mockery/HamcrestExpectationTest.php | 12 +- .../Mockery/Matcher/PHPUnitConstraintTest.php | 6 +- .../Mockery/MockClassWithFinalWakeupTest.php | 4 +- .../MockClassWithMethodOverloadingTest.php | 5 +- .../mockery/tests/Mockery/MockTest.php | 30 +- .../tests/Mockery/MockingHHVMMethodsTest.php | 4 +- .../Mockery/MockingNullableMethodsTest.php | 12 +- ...kingStaticMethodsCalledObjectStyleTest.php | 66 + .../tests/Mockery/MockingVoidMethodsTest.php | 2 +- .../mockery/tests/Mockery/NamedMockTest.php | 4 +- .../Mockery/WithFormatterExpectationTest.php | 9 +- .../Pass/MagicMethodTypeHintsPassTest.php | 46 +- .../MockingParameterAndReturnTypesTest.php | 4 +- .../deep-copy/src/DeepCopy/DeepCopy.php | 8 + vendor/nesbot/carbon/bin/upgrade-carbon | 34 + vendor/nesbot/carbon/bin/upgrade-carbon.bat | 4 + vendor/nesbot/carbon/composer.json | 17 +- vendor/nesbot/carbon/src/Carbon/Carbon.php | 2 +- vendor/nesbot/carbon/src/Carbon/Upgrade.php | 150 + vendor/nexmo/client/composer.json | 2 +- .../nexmo/client/examples/fetch_recording.php | 12 - vendor/nexmo/client/examples/send.php | 72 - vendor/nexmo/client/src/Account/Client.php | 72 + vendor/nexmo/client/src/Account/Config.php | 91 + .../client/src/Application/Application.php | 153 +- .../nexmo/client/src/Application/Client.php | 142 +- .../client/src/Application/MessagesConfig.php | 34 + .../client/src/Application/RtcConfig.php | 33 + .../client/src/Application/VbcConfig.php | 26 + vendor/nexmo/client/src/Call/Call.php | 5 + vendor/nexmo/client/src/Client.php | 4 +- vendor/nexmo/client/src/Client/Signature.php | 11 +- .../src/Entity/ModernCollectionTrait.php | 252 + vendor/nexmo/client/src/Message/Client.php | 31 + vendor/nexmo/client/src/Message/Shortcode.php | 78 + .../client/src/Message/Shortcode/Alert.php | 15 + .../src/Message/Shortcode/Marketing.php | 15 + .../src/Message/Shortcode/TwoFactor.php | 15 + vendor/nikic/php-parser/.travis.yml | 3 +- vendor/nikic/php-parser/CHANGELOG.md | 28 +- vendor/nikic/php-parser/bin/php-parse | 27 +- vendor/nikic/php-parser/composer.json | 5 + vendor/nikic/php-parser/grammar/php5.y | 10 +- vendor/nikic/php-parser/grammar/php7.y | 16 +- .../php-parser/grammar/rebuildParsers.php | 18 +- vendor/nikic/php-parser/grammar/tokens.y | 3 +- .../lib/PhpParser/BuilderFactory.php | 3 +- .../nikic/php-parser/lib/PhpParser/Lexer.php | 39 +- .../lib/PhpParser/Lexer/Emulative.php | 107 +- .../CoaleseEqualTokenEmulator.php | 54 + .../Lexer/TokenEmulator/FnTokenEmulator.php | 66 + .../TokenEmulator/TokenEmulatorInterface.php | 17 + .../php-parser/lib/PhpParser/Node/Arg.php | 2 +- .../php-parser/lib/PhpParser/Node/Const_.php | 2 +- .../lib/PhpParser/Node/Expr/ArrayDimFetch.php | 2 +- .../lib/PhpParser/Node/Expr/ArrayItem.php | 11 +- .../lib/PhpParser/Node/Expr/Array_.php | 2 +- .../lib/PhpParser/Node/Expr/ArrowFunction.php | 71 + .../lib/PhpParser/Node/Expr/Assign.php | 2 +- .../lib/PhpParser/Node/Expr/AssignOp.php | 2 +- .../PhpParser/Node/Expr/AssignOp/Coalesce.php | 12 + .../lib/PhpParser/Node/Expr/AssignRef.php | 2 +- .../lib/PhpParser/Node/Expr/BinaryOp.php | 2 +- .../lib/PhpParser/Node/Expr/BitwiseNot.php | 2 +- .../lib/PhpParser/Node/Expr/BooleanNot.php | 2 +- .../lib/PhpParser/Node/Expr/Cast.php | 2 +- .../PhpParser/Node/Expr/ClassConstFetch.php | 2 +- .../lib/PhpParser/Node/Expr/Clone_.php | 2 +- .../lib/PhpParser/Node/Expr/Closure.php | 2 +- .../lib/PhpParser/Node/Expr/ClosureUse.php | 2 +- .../lib/PhpParser/Node/Expr/ConstFetch.php | 2 +- .../lib/PhpParser/Node/Expr/Empty_.php | 2 +- .../lib/PhpParser/Node/Expr/Error.php | 2 +- .../lib/PhpParser/Node/Expr/ErrorSuppress.php | 2 +- .../lib/PhpParser/Node/Expr/Eval_.php | 2 +- .../lib/PhpParser/Node/Expr/Exit_.php | 2 +- .../lib/PhpParser/Node/Expr/FuncCall.php | 2 +- .../lib/PhpParser/Node/Expr/Include_.php | 2 +- .../lib/PhpParser/Node/Expr/Instanceof_.php | 2 +- .../lib/PhpParser/Node/Expr/Isset_.php | 2 +- .../lib/PhpParser/Node/Expr/List_.php | 2 +- .../lib/PhpParser/Node/Expr/MethodCall.php | 2 +- .../lib/PhpParser/Node/Expr/New_.php | 2 +- .../lib/PhpParser/Node/Expr/PostDec.php | 2 +- .../lib/PhpParser/Node/Expr/PostInc.php | 2 +- .../lib/PhpParser/Node/Expr/PreDec.php | 2 +- .../lib/PhpParser/Node/Expr/PreInc.php | 2 +- .../lib/PhpParser/Node/Expr/Print_.php | 2 +- .../lib/PhpParser/Node/Expr/PropertyFetch.php | 2 +- .../lib/PhpParser/Node/Expr/ShellExec.php | 2 +- .../lib/PhpParser/Node/Expr/StaticCall.php | 2 +- .../Node/Expr/StaticPropertyFetch.php | 2 +- .../lib/PhpParser/Node/Expr/Ternary.php | 2 +- .../lib/PhpParser/Node/Expr/UnaryMinus.php | 2 +- .../lib/PhpParser/Node/Expr/UnaryPlus.php | 2 +- .../lib/PhpParser/Node/Expr/Variable.php | 2 +- .../lib/PhpParser/Node/Expr/YieldFrom.php | 2 +- .../lib/PhpParser/Node/Expr/Yield_.php | 2 +- .../lib/PhpParser/Node/Identifier.php | 2 +- .../php-parser/lib/PhpParser/Node/Name.php | 8 +- .../lib/PhpParser/Node/NullableType.php | 2 +- .../php-parser/lib/PhpParser/Node/Param.php | 2 +- .../lib/PhpParser/Node/Scalar/DNumber.php | 2 +- .../lib/PhpParser/Node/Scalar/Encapsed.php | 2 +- .../Node/Scalar/EncapsedStringPart.php | 2 +- .../lib/PhpParser/Node/Scalar/LNumber.php | 2 +- .../lib/PhpParser/Node/Scalar/MagicConst.php | 2 +- .../lib/PhpParser/Node/Scalar/String_.php | 2 +- .../lib/PhpParser/Node/Stmt/Break_.php | 2 +- .../lib/PhpParser/Node/Stmt/Case_.php | 2 +- .../lib/PhpParser/Node/Stmt/Catch_.php | 2 +- .../lib/PhpParser/Node/Stmt/ClassConst.php | 2 +- .../lib/PhpParser/Node/Stmt/ClassMethod.php | 2 +- .../lib/PhpParser/Node/Stmt/Class_.php | 2 +- .../lib/PhpParser/Node/Stmt/Const_.php | 2 +- .../lib/PhpParser/Node/Stmt/Continue_.php | 2 +- .../PhpParser/Node/Stmt/DeclareDeclare.php | 2 +- .../lib/PhpParser/Node/Stmt/Declare_.php | 2 +- .../lib/PhpParser/Node/Stmt/Do_.php | 2 +- .../lib/PhpParser/Node/Stmt/Echo_.php | 2 +- .../lib/PhpParser/Node/Stmt/ElseIf_.php | 2 +- .../lib/PhpParser/Node/Stmt/Else_.php | 2 +- .../lib/PhpParser/Node/Stmt/Expression.php | 2 +- .../lib/PhpParser/Node/Stmt/Finally_.php | 2 +- .../lib/PhpParser/Node/Stmt/For_.php | 2 +- .../lib/PhpParser/Node/Stmt/Foreach_.php | 2 +- .../lib/PhpParser/Node/Stmt/Function_.php | 2 +- .../lib/PhpParser/Node/Stmt/Global_.php | 2 +- .../lib/PhpParser/Node/Stmt/Goto_.php | 2 +- .../lib/PhpParser/Node/Stmt/GroupUse.php | 2 +- .../lib/PhpParser/Node/Stmt/HaltCompiler.php | 2 +- .../lib/PhpParser/Node/Stmt/If_.php | 2 +- .../lib/PhpParser/Node/Stmt/InlineHTML.php | 2 +- .../lib/PhpParser/Node/Stmt/Interface_.php | 2 +- .../lib/PhpParser/Node/Stmt/Label.php | 2 +- .../lib/PhpParser/Node/Stmt/Namespace_.php | 2 +- .../lib/PhpParser/Node/Stmt/Property.php | 2 +- .../PhpParser/Node/Stmt/PropertyProperty.php | 2 +- .../lib/PhpParser/Node/Stmt/Return_.php | 2 +- .../lib/PhpParser/Node/Stmt/StaticVar.php | 2 +- .../lib/PhpParser/Node/Stmt/Static_.php | 2 +- .../lib/PhpParser/Node/Stmt/Switch_.php | 2 +- .../lib/PhpParser/Node/Stmt/Throw_.php | 2 +- .../lib/PhpParser/Node/Stmt/TraitUse.php | 2 +- .../Node/Stmt/TraitUseAdaptation/Alias.php | 2 +- .../Stmt/TraitUseAdaptation/Precedence.php | 2 +- .../lib/PhpParser/Node/Stmt/Trait_.php | 2 +- .../lib/PhpParser/Node/Stmt/TryCatch.php | 2 +- .../lib/PhpParser/Node/Stmt/Unset_.php | 2 +- .../lib/PhpParser/Node/Stmt/UseUse.php | 2 +- .../lib/PhpParser/Node/Stmt/Use_.php | 2 +- .../lib/PhpParser/Node/Stmt/While_.php | 2 +- .../php-parser/lib/PhpParser/NodeAbstract.php | 8 +- .../PhpParser/NodeVisitor/NameResolver.php | 1 - .../php-parser/lib/PhpParser/Parser/Php5.php | 2900 ++-- .../php-parser/lib/PhpParser/Parser/Php7.php | 2414 +-- .../lib/PhpParser/Parser/Tokens.php | 224 +- .../lib/PhpParser/ParserAbstract.php | 20 + .../lib/PhpParser/PrettyPrinter/Standard.php | 17 +- .../lib/PhpParser/PrettyPrinterAbstract.php | 102 +- .../test/PhpParser/Builder/ClassTest.php | 3 +- .../test/PhpParser/Builder/FunctionTest.php | 3 +- .../test/PhpParser/Builder/InterfaceTest.php | 3 +- .../test/PhpParser/Builder/MethodTest.php | 3 +- .../test/PhpParser/Builder/NamespaceTest.php | 3 +- .../test/PhpParser/Builder/ParamTest.php | 3 +- .../test/PhpParser/Builder/PropertyTest.php | 3 +- .../test/PhpParser/Builder/TraitTest.php | 3 +- .../Builder/TraitUseAdaptationTest.php | 5 +- .../test/PhpParser/Builder/TraitUseTest.php | 5 +- .../test/PhpParser/Builder/UseTest.php | 5 +- .../test/PhpParser/BuilderFactoryTest.php | 5 +- .../test/PhpParser/CodeParsingTest.php | 6 +- .../test/PhpParser/CodeTestAbstract.php | 6 +- .../php-parser/test/PhpParser/CommentTest.php | 4 +- .../test/PhpParser/ConstExprEvaluatorTest.php | 3 +- .../PhpParser/ErrorHandler/CollectingTest.php | 3 +- .../PhpParser/ErrorHandler/ThrowingTest.php | 3 +- .../php-parser/test/PhpParser/ErrorTest.php | 4 +- .../test/PhpParser/Internal/DifferTest.php | 4 +- .../test/PhpParser/JsonDecoderTest.php | 4 +- .../test/PhpParser/Lexer/EmulativeTest.php | 25 +- .../php-parser/test/PhpParser/LexerTest.php | 3 +- .../test/PhpParser/NameContextTest.php | 3 +- .../test/PhpParser/Node/IdentifierTest.php | 4 +- .../test/PhpParser/Node/NameTest.php | 4 +- .../PhpParser/Node/Scalar/MagicConstTest.php | 4 +- .../test/PhpParser/Node/Scalar/StringTest.php | 4 +- .../PhpParser/Node/Stmt/ClassConstTest.php | 4 +- .../PhpParser/Node/Stmt/ClassMethodTest.php | 3 +- .../test/PhpParser/Node/Stmt/ClassTest.php | 4 +- .../PhpParser/Node/Stmt/InterfaceTest.php | 3 +- .../test/PhpParser/Node/Stmt/PropertyTest.php | 4 +- .../test/PhpParser/NodeAbstractTest.php | 4 +- .../test/PhpParser/NodeDumperTest.php | 5 +- .../test/PhpParser/NodeFinderTest.php | 3 +- .../test/PhpParser/NodeTraverserTest.php | 40 +- .../NodeVisitor/FindingVisitorTest.php | 3 +- .../NodeVisitor/FirstFindingVisitorTest.php | 3 +- .../NodeVisitor/NameResolverTest.php | 15 +- .../test/PhpParser/Parser/MultipleTest.php | 6 +- .../test/PhpParser/Parser/Php5Test.php | 2 - .../test/PhpParser/Parser/Php7Test.php | 2 - .../test/PhpParser/ParserFactoryTest.php | 3 +- .../php-parser/test/PhpParser/ParserTest.php | 3 +- .../test/PhpParser/PrettyPrinterTest.php | 2 - .../code/formatPreservation/array_spread.test | 29 + .../formatPreservation/arrow_function.test | 97 + .../emptyListInsertion.test | 110 + .../formatPreservation/listInsertion.test | 5 +- .../code/parser/errorHandling/recovery.test | 6 + .../test/code/parser/expr/arrayDef.test | 12 + .../code/parser/expr/arrayDestructuring.test | 12 + .../test/code/parser/expr/arraySpread.test | 432 + .../test/code/parser/expr/arrow_function.test | 145 + .../test/code/parser/expr/assign.test | 82 +- .../test/code/parser/expr/constant_expr.test | 3 + .../expr/fetchAndCall/constantDeref.test | 12 + .../test/code/parser/expr/issetAndEmpty.test | 3 + .../test/code/parser/expr/listReferences.test | 4 + .../test/code/parser/expr/listWithKeys.test | 5 + .../code/parser/expr/uvs/indirectCall.test | 4 + .../test/code/parser/expr/uvs/isset.test | 3 + .../test/code/parser/expr/uvs/misc.test | 2 + .../test/code/parser/exprStmtMode.test | 57 - .../test/code/parser/nopPositions.test | 13 + .../code/parser/scalar/flexibleDocString.test | 2 + .../parser/stmt/function/defaultValues.test | 3 + .../stmt/generator/yieldPrecedence.test | 3 + .../test/code/parser/stmt/loop/foreach.test | 4 + .../code/prettyPrinter/expr/arraySpread.test | 8 + .../prettyPrinter/expr/arrow_function.test | 18 + .../code/prettyPrinter/expr/operators.test | 3 +- .../nikic/php-parser/test_old/run-php-src.sh | 4 +- vendor/opis/closure/CHANGELOG.md | 19 + vendor/opis/closure/LICENSE | 2 +- vendor/opis/closure/README.md | 2 +- vendor/opis/closure/autoload.php | 2 +- vendor/opis/closure/composer.json | 4 +- vendor/opis/closure/functions.php | 2 +- vendor/opis/closure/src/Analyzer.php | 2 +- vendor/opis/closure/src/ClosureContext.php | 2 +- vendor/opis/closure/src/ClosureScope.php | 2 +- vendor/opis/closure/src/ClosureStream.php | 2 +- vendor/opis/closure/src/ISecurityProvider.php | 2 +- vendor/opis/closure/src/ReflectionClosure.php | 2 +- vendor/opis/closure/src/SecurityException.php | 2 +- vendor/opis/closure/src/SecurityProvider.php | 2 +- vendor/opis/closure/src/SelfReference.php | 2 +- .../opis/closure/src/SerializableClosure.php | 52 +- vendor/php-http/cache-plugin/CHANGELOG.md | 7 + vendor/php-http/cache-plugin/composer.json | 8 +- .../Cache/Listener/AddHeaderCacheListener.php | 42 + .../src/Cache/Listener/CacheListener.php | 30 + .../php-http/cache-plugin/src/CachePlugin.php | 50 +- vendor/php-http/client-common/CHANGELOG.md | 6 + .../client-common/src/HttpClientPool.php | 3 +- .../client-common/src/HttpClientPoolItem.php | 3 +- .../client-common/src/HttpClientRouter.php | 5 +- .../client-common/src/PluginClient.php | 6 +- vendor/php-http/discovery/CHANGELOG.md | 15 + vendor/php-http/discovery/README.md | 2 +- vendor/php-http/discovery/composer.json | 5 +- .../php-http/discovery/src/ClassDiscovery.php | 1 + .../Exception/NoCandidateFoundException.php | 15 +- .../discovery/src/MessageFactoryDiscovery.php | 2 + .../discovery/src/Psr17FactoryDiscovery.php | 124 + .../discovery/src/Psr18ClientDiscovery.php | 36 + .../src/Strategy/CommonClassesStrategy.php | 20 + .../Strategy/CommonPsr17ClassesStrategy.php | 81 + .../src/Strategy/MockClientStrategy.php | 11 +- .../discovery/src/StreamFactoryDiscovery.php | 2 + .../discovery/src/UriFactoryDiscovery.php | 2 + .../src/DocBlock/Tags/Generic.php | 2 +- .../phpunit/phpunit/.github/CONTRIBUTING.md | 2 +- vendor/phpunit/phpunit/.php_cs.dist | 2 +- vendor/phpunit/phpunit/.travis.yml | 3 - vendor/phpunit/phpunit/ChangeLog-5.7.md | 242 - vendor/phpunit/phpunit/ChangeLog-6.5.md | 13 + vendor/phpunit/phpunit/LICENSE | 2 +- vendor/phpunit/phpunit/build.xml | 16 +- vendor/phpunit/phpunit/phive.xml | 4 +- .../src/Framework/Constraint/IsEqual.php | 2 +- vendor/phpunit/phpunit/src/Runner/Version.php | 2 +- vendor/phpunit/phpunit/src/Util/Test.php | 2 +- .../phpunit/tests/_files/RequirementsTest.php | 12 +- .../tests/unit/Framework/TestCaseTest.php | 4 +- .../phpunit/tests/unit/Util/TestTest.php | 8 +- vendor/psr/http-factory/.gitignore | 2 + vendor/psr/http-factory/.pullapprove.yml | 7 + vendor/psr/http-factory/LICENSE | 21 + vendor/psr/http-factory/README.md | 10 + vendor/psr/http-factory/composer.json | 35 + .../src/RequestFactoryInterface.php | 18 + .../src/ResponseFactoryInterface.php | 18 + .../src/ServerRequestFactoryInterface.php | 24 + .../src/StreamFactoryInterface.php | 45 + .../src/UploadedFileFactoryInterface.php | 34 + .../http-factory/src/UriFactoryInterface.php | 17 + vendor/swiftmailer/swiftmailer/.travis.yml | 1 + vendor/swiftmailer/swiftmailer/CHANGES | 13 +- vendor/swiftmailer/swiftmailer/composer.json | 9 +- .../swiftmailer/swiftmailer/doc/plugins.rst | 2 +- .../swiftmailer/lib/classes/Swift.php | 2 +- .../AddressEncoder/IdnAddressEncoder.php | 23 +- .../lib/classes/Swift/Attachment.php | 2 +- .../lib/classes/Swift/Mime/MimePart.php | 11 +- .../lib/classes/Swift/Signers/DKIMSigner.php | 4 +- .../Swift/Transport/Esmtp/AuthHandler.php | 2 +- .../Smoke/HtmlWithAttachmentSmokeTest.php | 4 +- .../tests/unit/Swift/Mime/IdGeneratorTest.php | 2 +- .../Esmtp/Auth/NTLMAuthenticatorTest.php | 2 +- vendor/symfony/console/Application.php | 92 +- vendor/symfony/console/CHANGELOG.md | 10 +- vendor/symfony/console/Command/Command.php | 16 +- .../symfony/console/Command/HelpCommand.php | 8 +- .../symfony/console/Command/ListCommand.php | 8 +- .../AddConsoleCommandPass.php | 14 +- .../Descriptor/ApplicationDescription.php | 12 +- .../symfony/console/Descriptor/Descriptor.php | 12 +- .../Descriptor/DescriptorInterface.php | 2 +- .../console/Descriptor/JsonDescriptor.php | 38 +- .../console/Descriptor/MarkdownDescriptor.php | 14 +- .../console/Descriptor/TextDescriptor.php | 26 +- .../console/Descriptor/XmlDescriptor.php | 16 +- .../console/EventListener/ErrorListener.php | 18 +- .../Exception/CommandNotFoundException.php | 4 +- .../console/Formatter/OutputFormatter.php | 18 +- .../Formatter/OutputFormatterStyle.php | 92 +- .../Formatter/OutputFormatterStyleStack.php | 2 +- .../console/Helper/DebugFormatterHelper.php | 6 +- .../console/Helper/DescriptorHelper.php | 8 +- vendor/symfony/console/Helper/Dumper.php | 64 + .../console/Helper/FormatterHelper.php | 6 +- vendor/symfony/console/Helper/Helper.php | 22 +- vendor/symfony/console/Helper/HelperSet.php | 4 +- .../symfony/console/Helper/ProcessHelper.php | 6 +- vendor/symfony/console/Helper/ProgressBar.php | 57 +- .../console/Helper/ProgressIndicator.php | 16 +- .../symfony/console/Helper/QuestionHelper.php | 95 +- vendor/symfony/console/Helper/Table.php | 71 +- vendor/symfony/console/Helper/TableCell.php | 6 +- .../symfony/console/Helper/TableSeparator.php | 2 +- vendor/symfony/console/Helper/TableStyle.php | 10 +- vendor/symfony/console/Input/ArgvInput.php | 27 +- vendor/symfony/console/Input/ArrayInput.php | 6 +- vendor/symfony/console/Input/Input.php | 12 +- .../symfony/console/Input/InputArgument.php | 2 +- .../symfony/console/Input/InputDefinition.php | 34 +- vendor/symfony/console/Input/InputOption.php | 6 +- vendor/symfony/console/Input/StringInput.php | 6 +- .../symfony/console/Logger/ConsoleLogger.php | 14 +- .../symfony/console/Output/ConsoleOutput.php | 6 +- .../console/Output/ConsoleSectionOutput.php | 6 +- vendor/symfony/console/Output/Output.php | 2 +- .../console/Question/ChoiceQuestion.php | 6 +- .../console/Question/ConfirmationQuestion.php | 2 +- vendor/symfony/console/Question/Question.php | 45 +- vendor/symfony/console/Style/SymfonyStyle.php | 20 +- vendor/symfony/console/Terminal.php | 22 +- .../console/Tester/ApplicationTester.php | 2 +- .../symfony/console/Tester/CommandTester.php | 9 +- vendor/symfony/console/Tester/TesterTrait.php | 8 +- .../symfony/console/Tests/ApplicationTest.php | 339 +- .../console/Tests/Command/CommandTest.php | 58 +- .../console/Tests/Command/HelpCommandTest.php | 10 +- .../console/Tests/Command/ListCommandTest.php | 12 +- .../Tests/Command/LockableTraitTest.php | 10 +- .../ContainerCommandLoaderTest.php | 16 +- .../FactoryCommandLoaderTest.php | 16 +- .../AddConsoleCommandPassTest.php | 32 +- .../Descriptor/AbstractDescriptorTest.php | 8 +- .../Tests/Descriptor/JsonDescriptorTest.php | 4 +- .../Descriptor/MarkdownDescriptorTest.php | 4 +- .../Tests/Descriptor/ObjectsProvider.php | 34 +- .../Tests/Descriptor/TextDescriptorTest.php | 6 +- .../Tests/EventListener/ErrorListenerTest.php | 28 +- .../Tests/Fixtures/DescriptorCommand1.php | 2 +- .../Tests/Fixtures/DescriptorCommand4.php | 2 +- .../console/Tests/Fixtures/DummyOutput.php | 2 +- .../console/Tests/Fixtures/Foo1Command.php | 2 +- .../console/Tests/Fixtures/Foo2Command.php | 2 +- .../console/Tests/Fixtures/FooCommand.php | 2 +- .../console/Tests/Fixtures/FooOptCommand.php | 2 +- .../Fixtures/FooSubnamespaced1Command.php | 2 +- .../Fixtures/FooSubnamespaced2Command.php | 2 +- .../Style/SymfonyStyle/command/command_4.php | 4 +- .../command/command_4_with_iterators.php | 4 +- .../Style/SymfonyStyle/command/command_5.php | 16 +- .../Style/SymfonyStyle/command/command_6.php | 4 +- .../Style/SymfonyStyle/command/command_7.php | 2 +- .../Style/SymfonyStyle/command/command_8.php | 20 +- .../Style/SymfonyStyle/command/command_9.php | 2 +- ...hp => TestAmbiguousCommandRegistering.php} | 10 +- ...p => TestAmbiguousCommandRegistering2.php} | 8 +- .../console/Tests/Fixtures/TestCommand.php | 2 +- .../Formatter/OutputFormatterStyleTest.php | 27 +- .../Tests/Formatter/OutputFormatterTest.php | 94 +- .../Helper/AbstractQuestionHelperTest.php | 2 +- .../Tests/Helper/DumperNativeFallbackTest.php | 58 + .../console/Tests/Helper/DumperTest.php | 58 + .../Tests/Helper/FormatterHelperTest.php | 2 +- .../console/Tests/Helper/HelperSetTest.php | 10 +- .../console/Tests/Helper/HelperTest.php | 44 +- .../Tests/Helper/ProcessHelperTest.php | 42 +- .../console/Tests/Helper/ProgressBarTest.php | 64 +- .../Tests/Helper/ProgressIndicatorTest.php | 16 +- .../Tests/Helper/QuestionHelperTest.php | 294 +- .../Helper/SymfonyQuestionHelperTest.php | 22 +- .../console/Tests/Helper/TableTest.php | 634 +- .../console/Tests/Input/ArgvInputTest.php | 468 +- .../console/Tests/Input/ArrayInputTest.php | 134 +- .../console/Tests/Input/InputArgumentTest.php | 4 +- .../Tests/Input/InputDefinitionTest.php | 132 +- .../console/Tests/Input/InputOptionTest.php | 8 +- .../symfony/console/Tests/Input/InputTest.php | 50 +- .../console/Tests/Input/StringInputTest.php | 56 +- .../Tests/Logger/ConsoleLoggerTest.php | 92 +- .../Tests/Output/ConsoleSectionOutputTest.php | 18 +- .../console/Tests/Output/OutputTest.php | 26 +- .../Question/ConfirmationQuestionTest.php | 62 + .../console/Tests/Question/QuestionTest.php | 304 + .../console/Tests/Style/SymfonyStyleTest.php | 8 +- vendor/symfony/console/Tests/TerminalTest.php | 15 + .../Tests/Tester/ApplicationTesterTest.php | 10 +- .../Tests/Tester/CommandTesterTest.php | 76 +- vendor/symfony/console/composer.json | 16 +- vendor/symfony/contracts/CHANGELOG.md | 12 - .../contracts/Cache/CacheInterface.php | 57 - vendor/symfony/contracts/Cache/CacheTrait.php | 71 - .../contracts/Cache/CallbackInterface.php | 30 - .../symfony/contracts/Cache/ItemInterface.php | 60 - .../Cache/TagAwareCacheInterface.php | 38 - vendor/symfony/contracts/README.md | 70 - .../contracts/Tests/Cache/CacheTraitTest.php | 165 - .../Service/ServiceSubscriberTraitTest.php | 65 - vendor/symfony/contracts/composer.json | 44 - .../css-selector/Node/FunctionNode.php | 2 +- .../Parser/Handler/StringHandler.php | 2 +- vendor/symfony/css-selector/Parser/Parser.php | 66 +- .../Parser/Shortcut/ClassParser.php | 6 +- .../Parser/Shortcut/ElementParser.php | 4 +- .../Parser/Shortcut/EmptyStringParser.php | 4 +- .../Parser/Shortcut/HashParser.php | 6 +- vendor/symfony/css-selector/Parser/Token.php | 2 +- .../css-selector/Parser/TokenStream.php | 6 +- .../Parser/Tokenizer/Tokenizer.php | 4 +- .../Tests/CssSelectorConverterTest.php | 34 +- .../Tests/Node/AttributeNodeTest.php | 22 +- .../css-selector/Tests/Node/ClassNodeTest.php | 14 +- .../Tests/Node/CombinedSelectorNodeTest.php | 18 +- .../Tests/Node/ElementNodeTest.php | 20 +- .../Tests/Node/FunctionNodeTest.php | 28 +- .../css-selector/Tests/Node/HashNodeTest.php | 14 +- .../Tests/Node/NegationNodeTest.php | 12 +- .../Tests/Node/PseudoNodeTest.php | 12 +- .../Tests/Node/SelectorNodeTest.php | 16 +- .../Tests/Node/SpecificityTest.php | 38 +- .../Parser/Handler/AbstractHandlerTest.php | 2 +- .../Parser/Handler/CommentHandlerTest.php | 18 +- .../Tests/Parser/Handler/HashHandlerTest.php | 26 +- .../Parser/Handler/IdentifierHandlerTest.php | 28 +- .../Parser/Handler/NumberHandlerTest.php | 30 +- .../Parser/Handler/StringHandlerTest.php | 28 +- .../Parser/Handler/WhitespaceHandlerTest.php | 24 +- .../css-selector/Tests/Parser/ParserTest.php | 272 +- .../css-selector/Tests/Parser/ReaderTest.php | 4 +- .../Tests/Parser/Shortcut/ClassParserTest.php | 14 +- .../Parser/Shortcut/ElementParserTest.php | 12 +- .../Tests/Parser/Shortcut/HashParserTest.php | 14 +- .../Tests/Parser/TokenStreamTest.php | 4 +- .../Tests/XPath/TranslatorTest.php | 519 +- .../XPath/Extension/AbstractExtension.php | 10 +- .../Extension/AttributeMatchingExtension.php | 20 +- .../XPath/Extension/CombinationExtension.php | 12 +- .../XPath/Extension/FunctionExtension.php | 18 +- .../XPath/Extension/HtmlExtension.php | 26 +- .../XPath/Extension/NodeExtension.php | 22 +- .../XPath/Extension/PseudoClassExtension.php | 20 +- .../symfony/css-selector/XPath/Translator.php | 16 +- vendor/symfony/css-selector/composer.json | 2 +- vendor/symfony/debug/BufferingLogger.php | 8 +- vendor/symfony/debug/CHANGELOG.md | 8 + vendor/symfony/debug/Debug.php | 2 +- vendor/symfony/debug/DebugClassLoader.php | 112 +- vendor/symfony/debug/ErrorHandler.php | 105 +- .../debug/Exception/FatalErrorException.php | 2 +- .../debug/Exception/FlattenException.php | 84 +- .../debug/Exception/SilencedErrorContext.php | 6 +- vendor/symfony/debug/ExceptionHandler.php | 43 +- .../ClassNotFoundFatalErrorHandler.php | 22 +- .../UndefinedFunctionFatalErrorHandler.php | 2 +- .../UndefinedMethodFatalErrorHandler.php | 2 +- .../debug/Tests/DebugClassLoaderTest.php | 170 +- .../symfony/debug/Tests/ErrorHandlerTest.php | 183 +- .../Tests/Exception/FlattenExceptionTest.php | 123 +- .../debug/Tests/ExceptionHandlerTest.php | 35 +- .../ClassNotFoundFatalErrorHandlerTest.php | 78 +- ...UndefinedFunctionFatalErrorHandlerTest.php | 36 +- .../UndefinedMethodFatalErrorHandlerTest.php | 36 +- .../Fixtures/DefinitionInEvaluatedCode.php | 11 + .../ErrorHandlerThatUsesThePreviousOne.php | 22 + .../debug/Tests/Fixtures/FinalClasses.php | 85 + .../debug/Tests/Fixtures/FinalMethod.php | 2 + .../InterfaceWithAnnotatedParameters.php | 13 + .../Fixtures/LoggerThatSetAnErrorHandler.php | 15 + .../SubClassWithAnnotatedParameters.php | 8 + .../debug/Tests/Fixtures/ToStringThrower.php | 2 +- .../debug/Tests/Fixtures/VirtualClass.php | 11 + .../Tests/Fixtures/VirtualClassMagicCall.php | 18 + .../debug/Tests/Fixtures/VirtualInterface.php | 34 + .../Tests/Fixtures/VirtualSubInterface.php | 10 + .../{FinalClass.php => VirtualTrait.php} | 4 +- vendor/symfony/debug/Tests/HeaderMock.php | 4 +- .../debug/Tests/phpt/exception_rethrown.phpt | 2 +- .../phpt/fatal_with_nested_handlers.phpt | 8 +- vendor/symfony/debug/composer.json | 2 +- .../event-dispatcher-contracts/Event.php | 96 + .../EventDispatcherInterface.php | 58 + .../LICENSE | 2 +- .../event-dispatcher-contracts/README.md | 9 + .../event-dispatcher-contracts/composer.json | 34 + vendor/symfony/event-dispatcher/CHANGELOG.md | 6 + .../Debug/TraceableEventDispatcher.php | 132 +- .../TraceableEventDispatcherInterface.php | 9 +- .../Debug/WrappedListener.php | 27 +- .../RegisterListenersPass.php | 40 +- vendor/symfony/event-dispatcher/Event.php | 28 +- .../event-dispatcher/EventDispatcher.php | 136 +- .../EventDispatcherInterface.php | 17 +- .../EventSubscriberInterface.php | 6 +- .../symfony/event-dispatcher/GenericEvent.php | 6 +- .../ImmutableEventDispatcher.php | 17 +- .../LegacyEventDispatcherProxy.php | 147 + .../event-dispatcher/LegacyEventProxy.php | 62 + .../Tests/AbstractEventDispatcherTest.php | 442 - .../Tests/ChildEventDispatcherTest.php | 26 + .../Debug/TraceableEventDispatcherTest.php | 82 +- .../Tests/Debug/WrappedListenerTest.php | 23 +- .../RegisterListenersPassTest.php | 90 +- .../Tests/EventDispatcherTest.php | 466 +- .../event-dispatcher/Tests/EventTest.php | 2 +- .../Tests/GenericEventTest.php | 22 +- .../Tests/ImmutableEventDispatcherTest.php | 10 +- .../Tests/LegacyEventDispatcherTest.php | 35 + vendor/symfony/event-dispatcher/composer.json | 10 +- vendor/symfony/finder/CHANGELOG.md | 5 + .../symfony/finder/Comparator/Comparator.php | 2 +- .../Exception/DirectoryNotFoundException.php | 19 + vendor/symfony/finder/Finder.php | 81 +- vendor/symfony/finder/Gitignore.php | 107 + vendor/symfony/finder/Glob.php | 2 +- .../finder/Iterator/CustomFilterIterator.php | 2 +- .../Iterator/DateRangeFilterIterator.php | 2 +- .../ExcludeDirectoryFilterIterator.php | 6 +- .../Iterator/MultiplePcreFilterIterator.php | 6 +- .../Iterator/RecursiveDirectoryIterator.php | 2 +- .../Iterator/SizeRangeFilterIterator.php | 2 +- .../finder/Iterator/SortableIterator.php | 7 +- vendor/symfony/finder/SplFileInfo.php | 7 + .../Tests/Comparator/ComparatorTest.php | 6 +- .../Tests/Comparator/DateComparatorTest.php | 18 +- .../Tests/Comparator/NumberComparatorTest.php | 56 +- vendor/symfony/finder/Tests/FinderTest.php | 505 +- vendor/symfony/finder/Tests/GitignoreTest.php | 118 + vendor/symfony/finder/Tests/GlobTest.php | 8 +- .../Iterator/CustomFilterIteratorTest.php | 14 +- .../Iterator/DateRangeFilterIteratorTest.php | 22 +- .../Iterator/DepthRangeFilterIteratorTest.php | 32 +- .../ExcludeDirectoryFilterIteratorTest.php | 25 +- .../Iterator/FileTypeFilterIteratorTest.php | 16 +- .../FilecontentFilterIteratorTest.php | 44 +- .../Iterator/FilenameFilterIteratorTest.php | 18 +- .../finder/Tests/Iterator/Iterator.php | 4 +- .../Tests/Iterator/IteratorTestCase.php | 6 +- .../Tests/Iterator/MockFileListIterator.php | 2 +- .../finder/Tests/Iterator/MockSplFileInfo.php | 4 +- .../MultiplePcreFilterIteratorTest.php | 36 +- .../Tests/Iterator/PathFilterIteratorTest.php | 48 +- .../Tests/Iterator/RealIteratorTestCase.php | 10 +- .../RecursiveDirectoryIteratorTest.php | 6 +- .../Iterator/SizeRangeFilterIteratorTest.php | 10 +- .../Tests/Iterator/SortableIteratorTest.php | 72 +- vendor/symfony/finder/composer.json | 2 +- .../symfony/http-foundation/AcceptHeader.php | 2 +- .../http-foundation/AcceptHeaderItem.php | 4 +- .../http-foundation/BinaryFileResponse.php | 17 +- vendor/symfony/http-foundation/CHANGELOG.md | 15 +- vendor/symfony/http-foundation/Cookie.php | 7 +- .../ExpressionRequestMatcher.php | 4 +- vendor/symfony/http-foundation/File/File.php | 22 +- .../File/MimeType/ExtensionGuesser.php | 8 +- .../MimeType/ExtensionGuesserInterface.php | 4 + .../MimeType/FileBinaryMimeTypeGuesser.php | 5 + .../File/MimeType/FileinfoMimeTypeGuesser.php | 5 + .../MimeType/MimeTypeExtensionGuesser.php | 38 +- .../File/MimeType/MimeTypeGuesser.php | 5 +- .../MimeType/MimeTypeGuesserInterface.php | 3 + .../http-foundation/File/UploadedFile.php | 11 +- vendor/symfony/http-foundation/FileBag.php | 18 +- vendor/symfony/http-foundation/HeaderBag.php | 26 +- .../symfony/http-foundation/HeaderUtils.php | 20 +- vendor/symfony/http-foundation/IpUtils.php | 4 +- .../symfony/http-foundation/JsonResponse.php | 16 +- .../symfony/http-foundation/ParameterBag.php | 16 +- .../http-foundation/RedirectResponse.php | 6 +- vendor/symfony/http-foundation/Request.php | 151 +- .../http-foundation/RequestMatcher.php | 16 +- .../symfony/http-foundation/RequestStack.php | 2 +- vendor/symfony/http-foundation/Response.php | 32 +- .../http-foundation/ResponseHeaderBag.php | 35 +- vendor/symfony/http-foundation/ServerBag.php | 4 +- .../Session/Attribute/AttributeBag.php | 12 +- .../Attribute/NamespacedAttributeBag.php | 12 +- .../Session/Flash/AutoExpireFlashBag.php | 16 +- .../Session/Flash/FlashBag.php | 10 +- .../Session/Flash/FlashBagInterface.php | 12 +- .../http-foundation/Session/Session.php | 2 +- .../http-foundation/Session/SessionUtils.php | 2 +- .../Handler/AbstractSessionHandler.php | 2 +- .../Handler/MemcachedSessionHandler.php | 6 +- .../Storage/Handler/MongoDbSessionHandler.php | 36 +- .../Storage/Handler/PdoSessionHandler.php | 12 +- .../Storage/Handler/RedisSessionHandler.php | 4 +- .../Session/Storage/MetadataBag.php | 2 +- .../Storage/MockArraySessionStorage.php | 10 +- .../Storage/MockFileSessionStorage.php | 4 +- .../Session/Storage/NativeSessionStorage.php | 22 +- .../http-foundation/StreamedResponse.php | 4 +- .../Constraint/RequestAttributeValueSame.php | 54 + .../Constraint/ResponseCookieValueSame.php | 85 + .../Test/Constraint/ResponseHasCookie.php | 77 + .../Test/Constraint/ResponseHasHeader.php | 53 + .../Test/Constraint/ResponseHeaderSame.php | 55 + .../Test/Constraint/ResponseIsRedirected.php | 56 + .../Test/Constraint/ResponseIsSuccessful.php | 56 + .../Constraint/ResponseStatusCodeSame.php | 63 + .../Tests/AcceptHeaderItemTest.php | 54 +- .../Tests/AcceptHeaderTest.php | 70 +- .../Tests/ApacheRequestTest.php | 52 +- .../Tests/BinaryFileResponseTest.php | 85 +- .../http-foundation/Tests/CookieTest.php | 22 +- .../Tests/ExpressionRequestMatcherTest.php | 20 +- .../http-foundation/Tests/File/FileTest.php | 61 +- .../Fixtures/case-sensitive-mime-type.xlsm | Bin 0 -> 4791 bytes .../Tests/File/MimeType/MimeTypeTest.php | 9 +- .../Tests/File/UploadedFileTest.php | 34 +- .../http-foundation/Tests/FileBagTest.php | 110 +- .../http-foundation/Tests/HeaderBagTest.php | 54 +- .../http-foundation/Tests/HeaderUtilsTest.php | 92 +- .../http-foundation/Tests/IpUtilsTest.php | 66 +- .../Tests/JsonResponseTest.php | 44 +- .../Tests/ParameterBagTest.php | 72 +- .../Tests/RedirectResponseTest.php | 8 +- .../Tests/RequestMatcherTest.php | 44 +- .../http-foundation/Tests/RequestTest.php | 844 +- .../Tests/ResponseFunctionalTest.php | 10 +- .../Tests/ResponseHeaderBagTest.php | 66 +- .../http-foundation/Tests/ResponseTest.php | 119 +- .../http-foundation/Tests/ServerBagTest.php | 66 +- .../Session/Attribute/AttributeBagTest.php | 48 +- .../Attribute/NamespacedAttributeBagTest.php | 62 +- .../Session/Flash/AutoExpireFlashBagTest.php | 70 +- .../Tests/Session/Flash/FlashBagTest.php | 64 +- .../Tests/Session/SessionTest.php | 26 +- .../AbstractRedisSessionHandlerTestCase.php | 12 +- .../Handler/AbstractSessionHandlerTest.php | 12 +- .../Handler/Fixtures/with_samesite.php | 4 +- .../Fixtures/with_samesite_and_migration.php | 4 +- .../Handler/MemcachedSessionHandlerTest.php | 24 +- .../Handler/MigratingSessionHandlerTest.php | 28 +- .../Handler/MongoDbSessionHandlerTest.php | 44 +- .../Handler/NativeFileSessionHandlerTest.php | 14 +- .../Handler/NullSessionHandlerTest.php | 2 +- .../Storage/Handler/PdoSessionHandlerTest.php | 42 +- .../PredisClusterSessionHandlerTest.php | 2 +- .../Handler/PredisSessionHandlerTest.php | 2 +- .../Handler/RedisArraySessionHandlerTest.php | 2 +- .../Handler/StrictSessionHandlerTest.php | 2 +- .../Tests/Session/Storage/MetadataBagTest.php | 18 +- .../Storage/MockArraySessionStorageTest.php | 20 +- .../Storage/MockFileSessionStorageTest.php | 2 +- .../Storage/NativeSessionStorageTest.php | 18 +- .../Storage/PhpBridgeSessionStorageTest.php | 4 +- .../Storage/Proxy/SessionHandlerProxyTest.php | 12 +- .../Tests/StreamedResponseTest.php | 6 +- .../RequestAttributeValueSameTest.php | 41 + .../ResponseCookieValueSameTest.php | 44 + .../Test/Constraint/ResponseHasCookieTest.php | 42 + .../Test/Constraint/ResponseHasHeaderTest.php | 39 + .../Constraint/ResponseHeaderSameTest.php | 39 + .../Constraint/ResponseIsRedirectedTest.php | 39 + .../Constraint/ResponseIsSuccessfulTest.php | 39 + .../Constraint/ResponseStatusCodeSameTest.php | 41 + .../http-foundation/Tests/UrlHelperTest.php | 143 + vendor/symfony/http-foundation/UrlHelper.php | 102 + vendor/symfony/http-foundation/composer.json | 3 +- vendor/symfony/http-kernel/CHANGELOG.md | 25 + .../CacheClearer/ChainCacheClearer.php | 2 +- .../CacheClearer/Psr6CacheClearer.php | 4 +- .../CacheWarmer/CacheWarmerAggregate.php | 8 +- vendor/symfony/http-kernel/Client.php | 15 +- .../http-kernel/Config/FileLocator.php | 2 +- .../Controller/ArgumentResolver.php | 8 +- .../NotTaggedControllerValueResolver.php | 81 + .../Controller/ControllerReference.php | 6 +- .../Controller/ControllerResolver.php | 6 +- .../ControllerResolverInterface.php | 2 +- .../ArgumentMetadataFactory.php | 2 +- .../DataCollector/ConfigDataCollector.php | 8 +- .../DataCollector/DataCollector.php | 50 +- .../DataCollector/DumpDataCollector.php | 65 +- .../DataCollector/EventDataCollector.php | 27 +- .../DataCollector/ExceptionDataCollector.php | 6 +- .../DataCollector/LoggerDataCollector.php | 64 +- .../DataCollector/MemoryDataCollector.php | 4 +- .../DataCollector/RequestDataCollector.php | 62 +- .../DataCollector/RouterDataCollector.php | 8 +- .../DataCollector/TimeDataCollector.php | 17 +- .../http-kernel/Debug/FileLinkFormatter.php | 30 +- .../Debug/TraceableEventDispatcher.php | 5 +- .../AddAnnotatedClassesToCachePass.php | 8 +- .../ControllerArgumentValueResolverPass.php | 2 +- .../DependencyInjection/Extension.php | 2 +- .../FragmentRendererPass.php | 2 +- .../LazyLoadingFragmentHandler.php | 6 +- .../MergeExtensionConfigurationPass.php | 2 +- ...RegisterControllerArgumentLocatorsPass.php | 37 +- .../RegisterLocaleAwareServicesPass.php | 58 + .../ResettableServicePass.php | 2 +- .../Event/ControllerArgumentsEvent.php | 28 + .../http-kernel/Event/ControllerEvent.php | 27 + .../http-kernel/Event/ExceptionEvent.php | 29 + .../Event/FilterControllerArgumentsEvent.php | 13 +- .../Event/FilterControllerEvent.php | 10 +- .../http-kernel/Event/FilterResponseEvent.php | 8 +- .../http-kernel/Event/GetResponseEvent.php | 8 +- .../GetResponseForControllerResultEvent.php | 10 +- .../Event/GetResponseForExceptionEvent.php | 14 +- .../http-kernel/Event/PostResponseEvent.php | 7 +- .../http-kernel/Event/RequestEvent.php | 25 + .../http-kernel/Event/ResponseEvent.php | 25 + .../http-kernel/Event/TerminateEvent.php | 24 + .../symfony/http-kernel/Event/ViewEvent.php | 25 + .../EventListener/AbstractSessionListener.php | 14 +- .../AbstractTestSessionListener.php | 14 +- .../AddRequestFormatsListener.php | 4 +- .../EventListener/DebugHandlersListener.php | 50 +- .../DisallowRobotsIndexingListener.php | 43 + .../EventListener/DumpListener.php | 4 +- .../EventListener/ExceptionListener.php | 70 +- .../EventListener/FragmentListener.php | 12 +- .../EventListener/LocaleAwareListener.php | 76 + .../EventListener/LocaleListener.php | 22 +- .../EventListener/ProfilerListener.php | 12 +- .../EventListener/ResponseListener.php | 6 +- .../EventListener/RouterListener.php | 16 +- .../EventListener/SaveSessionListener.php | 6 +- .../EventListener/SessionListener.php | 5 +- .../StreamedResponseListener.php | 8 +- .../EventListener/SurrogateListener.php | 6 +- .../EventListener/TestSessionListener.php | 2 +- .../EventListener/TranslatorListener.php | 12 +- .../EventListener/ValidateRequestListener.php | 12 +- .../Exception/AccessDeniedHttpException.php | 4 +- .../Exception/BadRequestHttpException.php | 4 +- .../Exception/ConflictHttpException.php | 4 +- ...ntrollerDoesNotReturnResponseException.php | 28 +- .../Exception/GoneHttpException.php | 4 +- .../http-kernel/Exception/HttpException.php | 2 +- .../Exception/LengthRequiredHttpException.php | 4 +- .../MethodNotAllowedHttpException.php | 4 +- .../Exception/NotAcceptableHttpException.php | 4 +- .../Exception/NotFoundHttpException.php | 4 +- .../PreconditionFailedHttpException.php | 4 +- .../PreconditionRequiredHttpException.php | 4 +- .../ServiceUnavailableHttpException.php | 4 +- .../TooManyRequestsHttpException.php | 4 +- .../Exception/UnauthorizedHttpException.php | 4 +- .../UnprocessableEntityHttpException.php | 4 +- .../UnsupportedMediaTypeHttpException.php | 4 +- .../AbstractSurrogateFragmentRenderer.php | 2 +- .../http-kernel/Fragment/FragmentHandler.php | 6 +- .../Fragment/FragmentRendererInterface.php | 2 +- .../Fragment/HIncludeFragmentRenderer.php | 8 +- .../Fragment/InlineFragmentRenderer.php | 21 +- .../HttpCache/AbstractSurrogate.php | 12 +- vendor/symfony/http-kernel/HttpCache/Esi.php | 2 +- .../http-kernel/HttpCache/HttpCache.php | 66 +- .../HttpCache/ResponseCacheStrategy.php | 198 +- vendor/symfony/http-kernel/HttpCache/Ssi.php | 2 +- .../symfony/http-kernel/HttpCache/Store.php | 20 +- .../HttpCache/SubRequestHandler.php | 10 +- .../symfony/http-kernel/HttpClientKernel.php | 106 + vendor/symfony/http-kernel/HttpKernel.php | 49 +- .../symfony/http-kernel/HttpKernelBrowser.php | 24 + vendor/symfony/http-kernel/Kernel.php | 111 +- vendor/symfony/http-kernel/KernelEvents.php | 14 +- .../symfony/http-kernel/KernelInterface.php | 2 +- vendor/symfony/http-kernel/Log/Logger.php | 12 +- .../Profiler/FileProfilerStorage.php | 16 +- .../symfony/http-kernel/Profiler/Profile.php | 10 +- .../symfony/http-kernel/Profiler/Profiler.php | 8 +- .../http-kernel/Resources/welcome.html.php | 16 +- .../CacheClearer/ChainCacheClearerTest.php | 2 +- .../CacheClearer/Psr6CacheClearerTest.php | 4 +- .../CacheWarmer/CacheWarmerAggregateTest.php | 8 +- .../Tests/Config/FileLocatorTest.php | 4 +- .../NotTaggedControllerValueResolverTest.php | 117 + .../ServiceValueResolverTest.php | 56 +- .../Tests/Controller/ArgumentResolverTest.php | 78 +- .../ContainerControllerResolverTest.php | 46 +- .../Controller/ControllerResolverTest.php | 50 +- .../ArgumentMetadataFactoryTest.php | 52 +- .../DataCollector/ConfigDataCollectorTest.php | 2 +- .../Tests/DataCollector/DataCollectorTest.php | 2 +- .../DataCollector/DumpDataCollectorTest.php | 30 +- .../DataCollector/LoggerDataCollectorTest.php | 102 +- .../DataCollector/MemoryDataCollectorTest.php | 32 +- .../RequestDataCollectorTest.php | 158 +- .../DataCollector/TimeDataCollectorTest.php | 4 +- .../Tests/Debug/FileLinkFormatterTest.php | 12 - .../Debug/TraceableEventDispatcherTest.php | 23 +- .../AddAnnotatedClassesToCachePassTest.php | 80 +- ...ontrollerArgumentValueResolverPassTest.php | 40 +- .../FragmentRendererPassTest.php | 10 +- .../LazyLoadingFragmentHandlerTest.php | 8 +- .../MergeExtensionConfigurationPassTest.php | 4 +- ...sterControllerArgumentLocatorsPassTest.php | 99 +- .../RegisterLocaleAwareServicesPassTest.php | 59 + ...mptyControllerArgumentLocatorsPassTest.php | 18 +- .../ResettableServicePassTest.php | 22 +- .../ServicesResetterTest.php | 6 +- .../Event/ControllerArgumentsEventTest.php | 17 + ...onEventTest.php => ExceptionEventTest.php} | 6 +- .../FilterControllerArgumentsEventTest.php | 17 - .../AddRequestFormatsListenerTest.php | 15 +- .../DebugHandlersListenerTest.php | 31 +- .../DisallowRobotsIndexingListenerTest.php | 47 + .../Tests/EventListener/DumpListenerTest.php | 4 +- .../EventListener/ExceptionListenerTest.php | 55 +- .../EventListener/FragmentListenerTest.php | 28 +- .../EventListener/LocaleAwareListenerTest.php | 119 + .../EventListener/LocaleListenerTest.php | 38 +- .../EventListener/ProfilerListenerTest.php | 21 +- .../EventListener/ResponseListenerTest.php | 26 +- .../EventListener/RouterListenerTest.php | 58 +- .../EventListener/SaveSessionListenerTest.php | 6 +- .../EventListener/SessionListenerTest.php | 42 +- .../EventListener/SurrogateListenerTest.php | 20 +- .../EventListener/TestSessionListenerTest.php | 50 +- .../EventListener/TranslatorListenerTest.php | 11 +- .../ValidateRequestListenerTest.php | 12 +- .../AccessDeniedHttpExceptionTest.php | 4 +- .../Exception/BadRequestHttpExceptionTest.php | 4 +- .../Exception/ConflictHttpExceptionTest.php | 4 +- .../Tests/Exception/GoneHttpExceptionTest.php | 4 +- .../Tests/Exception/HttpExceptionTest.php | 34 +- .../LengthRequiredHttpExceptionTest.php | 4 +- .../MethodNotAllowedHttpExceptionTest.php | 17 +- .../NotAcceptableHttpExceptionTest.php | 4 +- .../Exception/NotFoundHttpExceptionTest.php | 4 +- .../PreconditionFailedHttpExceptionTest.php | 4 +- .../PreconditionRequiredHttpExceptionTest.php | 4 +- .../ServiceUnavailableHttpExceptionTest.php | 10 +- .../TooManyRequestsHttpExceptionTest.php | 10 +- .../UnauthorizedHttpExceptionTest.php | 11 +- .../UnprocessableEntityHttpExceptionTest.php | 4 +- .../UnsupportedMediaTypeHttpExceptionTest.php | 4 +- .../DataCollector/CloneVarDataCollector.php | 2 +- .../Tests/Fixtures/KernelForTest.php | 2 +- .../Tests/Fixtures/KernelWithoutBundles.php | 2 +- .../http-kernel/Tests/Fixtures/TestClient.php | 4 +- .../Tests/Fixtures/TestEventDispatcher.php | 6 +- .../Fragment/EsiFragmentRendererTest.php | 14 +- .../Tests/Fragment/FragmentHandlerTest.php | 10 +- .../Fragment/HIncludeFragmentRendererTest.php | 45 +- .../Fragment/InlineFragmentRendererTest.php | 76 +- .../Fragment/RoutableFragmentRendererTest.php | 26 +- .../Fragment/SsiFragmentRendererTest.php | 10 +- .../http-kernel/Tests/HttpCache/EsiTest.php | 8 +- .../Tests/HttpCache/HttpCacheTest.php | 386 +- .../Tests/HttpCache/HttpCacheTestCase.php | 20 +- .../HttpCache/ResponseCacheStrategyTest.php | 229 + .../http-kernel/Tests/HttpCache/SsiTest.php | 8 +- .../http-kernel/Tests/HttpCache/StoreTest.php | 50 +- .../Tests/HttpCache/SubRequestHandlerTest.php | 10 +- .../Tests/HttpCache/TestHttpKernel.php | 8 +- .../HttpCache/TestMultipleHttpKernel.php | 10 +- ...ientTest.php => HttpKernelBrowserTest.php} | 40 +- .../http-kernel/Tests/HttpKernelTest.php | 69 +- .../symfony/http-kernel/Tests/KernelTest.php | 105 +- .../http-kernel/Tests/Log/LoggerTest.php | 74 +- vendor/symfony/http-kernel/Tests/Logger.php | 38 +- .../Profiler/FileProfilerStorageTest.php | 6 +- .../Tests/Profiler/ProfilerTest.php | 2 +- .../http-kernel/Tests/TestHttpKernel.php | 4 +- vendor/symfony/http-kernel/UriSigner.php | 6 +- vendor/symfony/http-kernel/composer.json | 17 +- vendor/symfony/{contracts => mime}/.gitignore | 0 vendor/symfony/mime/Address.php | 98 + vendor/symfony/mime/BodyRendererInterface.php | 22 + vendor/symfony/mime/CharacterStream.php | 224 + .../AddMimeTypeGuesserPass.php | 48 + vendor/symfony/mime/Email.php | 589 + .../mime/Encoder/AddressEncoderInterface.php | 30 + .../mime/Encoder/Base64ContentEncoder.php | 50 + vendor/symfony/mime/Encoder/Base64Encoder.php | 43 + .../mime/Encoder/Base64MimeHeaderEncoder.php | 45 + .../mime/Encoder/ContentEncoderInterface.php | 32 + .../mime/Encoder/EightBitContentEncoder.php | 37 + .../symfony/mime/Encoder/EncoderInterface.php | 28 + .../mime/Encoder/IdnAddressEncoder.php | 56 + .../Encoder/MimeHeaderEncoderInterface.php | 25 + .../symfony/mime/Encoder/QpContentEncoder.php | 66 + vendor/symfony/mime/Encoder/QpEncoder.php | 197 + .../mime/Encoder/QpMimeHeaderEncoder.php | 42 + .../symfony/mime/Encoder/Rfc2231Encoder.php | 52 + .../Exception/AddressEncoderException.php | 21 + .../mime/Exception/ExceptionInterface.php | 21 + .../Exception/InvalidArgumentException.php | 21 + .../symfony/mime/Exception/LogicException.php | 21 + .../mime/Exception/RfcComplianceException.php | 21 + .../mime/Exception/RuntimeException.php | 21 + .../mime/FileBinaryMimeTypeGuesser.php | 95 + .../symfony/mime/FileinfoMimeTypeGuesser.php | 65 + vendor/symfony/mime/Header/AbstractHeader.php | 281 + vendor/symfony/mime/Header/DateHeader.php | 71 + .../symfony/mime/Header/HeaderInterface.php | 67 + vendor/symfony/mime/Header/Headers.php | 285 + .../mime/Header/IdentificationHeader.php | 115 + vendor/symfony/mime/Header/MailboxHeader.php | 93 + .../symfony/mime/Header/MailboxListHeader.php | 139 + .../mime/Header/ParameterizedHeader.php | 176 + vendor/symfony/mime/Header/PathHeader.php | 67 + .../mime/Header/UnstructuredHeader.php | 71 + vendor/symfony/mime/LICENSE | 19 + vendor/symfony/mime/Message.php | 148 + vendor/symfony/mime/MessageConverter.php | 127 + .../symfony/mime/MimeTypeGuesserInterface.php | 39 + vendor/symfony/mime/MimeTypes.php | 3154 ++++ vendor/symfony/mime/MimeTypesInterface.php | 34 + vendor/symfony/mime/NamedAddress.php | 44 + .../mime/Part/AbstractMultipartPart.php | 87 + vendor/symfony/mime/Part/AbstractPart.php | 62 + vendor/symfony/mime/Part/DataPart.php | 150 + vendor/symfony/mime/Part/MessagePart.php | 64 + .../mime/Part/Multipart/AlternativePart.php | 27 + .../mime/Part/Multipart/DigestPart.php | 33 + .../mime/Part/Multipart/FormDataPart.php | 96 + .../symfony/mime/Part/Multipart/MixedPart.php | 27 + .../mime/Part/Multipart/RelatedPart.php | 57 + vendor/symfony/mime/Part/TextPart.php | 190 + vendor/symfony/mime/README.md | 18 + vendor/symfony/mime/RawMessage.php | 87 + .../mime/Resources/bin/update_mime_types.php | 170 + .../Tests/AbstractMimeTypeGuesserTest.php | 102 + vendor/symfony/mime/Tests/AddressTest.php | 61 + .../mime/Tests/CharacterStreamTest.php | 87 + .../AddMimeTypeGuesserPassTest.php | 42 + vendor/symfony/mime/Tests/EmailTest.php | 385 + .../mime/Tests/Encoder/Base64EncoderTest.php | 158 + .../Encoder/Base64MimeHeaderEncoderTest.php | 23 + .../mime/Tests/Encoder/QpEncoderTest.php | 213 + .../Tests/Encoder/QpMimeHeaderEncoderTest.php | 139 + .../mime/Tests/Encoder/Rfc2231EncoderTest.php | 129 + .../Tests/FileBinaryMimeTypeGuesserTest.php | 23 + .../Tests/FileinfoMimeTypeGuesserTest.php | 26 + .../Fixtures/mimetypes/.unknownextension | 1 + .../Tests/Fixtures/mimetypes/directory/.empty | 0 .../Fixtures/mimetypes/other-file.example | 0 .../mime/Tests/Fixtures/mimetypes/test | Bin 0 -> 35 bytes .../mime/Tests/Fixtures/mimetypes/test.gif | Bin 0 -> 35 bytes .../samples/charsets/iso-2022-jp/one.txt | 11 + .../samples/charsets/iso-8859-1/one.txt | 19 + .../Fixtures/samples/charsets/utf-8/one.txt | 22 + .../Fixtures/samples/charsets/utf-8/three.txt | 45 + .../Fixtures/samples/charsets/utf-8/two.txt | 3 + .../mime/Tests/Header/DateHeaderTest.php | 80 + .../symfony/mime/Tests/Header/HeadersTest.php | 245 + .../Tests/Header/IdentificationHeaderTest.php | 179 + .../mime/Tests/Header/MailboxHeaderTest.php | 79 + .../Tests/Header/MailboxListHeaderTest.php | 133 + .../Tests/Header/ParameterizedHeaderTest.php | 274 + .../mime/Tests/Header/PathHeaderTest.php | 81 + .../Tests/Header/UnstructuredHeaderTest.php | 247 + .../mime/Tests/MessageConverterTest.php | 81 + vendor/symfony/mime/Tests/MessageTest.php | 151 + vendor/symfony/mime/Tests/MimeTypesTest.php | 61 + .../symfony/mime/Tests/NamedAddressTest.php | 27 + .../symfony/mime/Tests/Part/DataPartTest.php | 149 + .../mime/Tests/Part/MessagePartTest.php | 42 + .../Part/Multipart/AlternativePartTest.php | 25 + .../Tests/Part/Multipart/DigestPartTest.php | 28 + .../Tests/Part/Multipart/FormDataPartTest.php | 66 + .../Tests/Part/Multipart/MixedPartTest.php | 25 + .../Tests/Part/Multipart/RelatedPartTest.php | 30 + .../symfony/mime/Tests/Part/TextPartTest.php | 92 + vendor/symfony/mime/Tests/RawMessageTest.php | 35 + vendor/symfony/mime/composer.json | 39 + .../{contracts => mime}/phpunit.xml.dist | 4 +- vendor/symfony/options-resolver/CHANGELOG.md | 5 + .../Debug/OptionsResolverIntrospector.php | 10 +- .../options-resolver/OptionsResolver.php | 139 +- .../Debug/OptionsResolverIntrospectorTest.php | 42 +- .../Tests/OptionsResolverTest.php | 701 +- vendor/symfony/options-resolver/composer.json | 2 +- vendor/symfony/polyfill-ctype/LICENSE | 2 +- vendor/symfony/polyfill-ctype/composer.json | 2 +- vendor/symfony/polyfill-iconv/Iconv.php | 741 + vendor/symfony/polyfill-iconv/LICENSE | 19 + vendor/symfony/polyfill-iconv/README.md | 14 + .../Resources/charset/from.big5.php | 13719 ++++++++++++++++ .../Resources/charset/from.cp037.php | Bin 0 -> 3779 bytes .../Resources/charset/from.cp1006.php | Bin 0 -> 3860 bytes .../Resources/charset/from.cp1026.php | Bin 0 -> 3779 bytes .../Resources/charset/from.cp424.php | Bin 0 -> 3210 bytes .../Resources/charset/from.cp437.php | Bin 0 -> 3841 bytes .../Resources/charset/from.cp500.php | Bin 0 -> 3779 bytes .../Resources/charset/from.cp737.php | Bin 0 -> 3834 bytes .../Resources/charset/from.cp775.php | Bin 0 -> 3815 bytes .../Resources/charset/from.cp850.php | Bin 0 -> 3809 bytes .../Resources/charset/from.cp852.php | Bin 0 -> 3808 bytes .../Resources/charset/from.cp855.php | Bin 0 -> 3809 bytes .../Resources/charset/from.cp856.php | Bin 0 -> 3194 bytes .../Resources/charset/from.cp857.php | Bin 0 -> 3763 bytes .../Resources/charset/from.cp860.php | Bin 0 -> 3840 bytes .../Resources/charset/from.cp861.php | Bin 0 -> 3841 bytes .../Resources/charset/from.cp862.php | Bin 0 -> 3841 bytes .../Resources/charset/from.cp863.php | Bin 0 -> 3841 bytes .../Resources/charset/from.cp864.php | Bin 0 -> 3779 bytes .../Resources/charset/from.cp865.php | Bin 0 -> 3841 bytes .../Resources/charset/from.cp866.php | Bin 0 -> 3831 bytes .../Resources/charset/from.cp869.php | Bin 0 -> 3676 bytes .../Resources/charset/from.cp874.php | Bin 0 -> 3410 bytes .../Resources/charset/from.cp875.php | Bin 0 -> 3776 bytes .../Resources/charset/from.cp932.php | Bin 0 -> 134095 bytes .../Resources/charset/from.cp936.php | Bin 0 -> 372283 bytes .../Resources/charset/from.cp949.php | Bin 0 -> 291504 bytes .../Resources/charset/from.cp950.php | Bin 0 -> 231436 bytes .../Resources/charset/from.iso-8859-1.php | Bin 0 -> 3779 bytes .../Resources/charset/from.iso-8859-10.php | Bin 0 -> 3780 bytes .../Resources/charset/from.iso-8859-11.php | Bin 0 -> 3746 bytes .../Resources/charset/from.iso-8859-13.php | Bin 0 -> 3783 bytes .../Resources/charset/from.iso-8859-14.php | Bin 0 -> 3801 bytes .../Resources/charset/from.iso-8859-15.php | Bin 0 -> 3780 bytes .../Resources/charset/from.iso-8859-16.php | Bin 0 -> 3782 bytes .../Resources/charset/from.iso-8859-2.php | Bin 0 -> 3779 bytes .../Resources/charset/from.iso-8859-3.php | Bin 0 -> 3674 bytes .../Resources/charset/from.iso-8859-4.php | Bin 0 -> 3779 bytes .../Resources/charset/from.iso-8859-5.php | Bin 0 -> 3780 bytes .../Resources/charset/from.iso-8859-6.php | Bin 0 -> 3104 bytes .../Resources/charset/from.iso-8859-7.php | Bin 0 -> 3692 bytes .../Resources/charset/from.iso-8859-8.php | Bin 0 -> 3242 bytes .../Resources/charset/from.iso-8859-9.php | Bin 0 -> 3779 bytes .../Resources/charset/from.koi8-r.php | Bin 0 -> 3835 bytes .../Resources/charset/from.koi8-u.php | Bin 0 -> 3827 bytes .../Resources/charset/from.us-ascii.php | Bin 0 -> 1859 bytes .../Resources/charset/from.windows-1250.php | Bin 0 -> 3721 bytes .../Resources/charset/from.windows-1251.php | Bin 0 -> 3782 bytes .../Resources/charset/from.windows-1252.php | Bin 0 -> 3721 bytes .../Resources/charset/from.windows-1253.php | Bin 0 -> 3542 bytes .../Resources/charset/from.windows-1254.php | Bin 0 -> 3691 bytes .../Resources/charset/from.windows-1255.php | Bin 0 -> 3454 bytes .../Resources/charset/from.windows-1256.php | Bin 0 -> 3800 bytes .../Resources/charset/from.windows-1257.php | Bin 0 -> 3616 bytes .../Resources/charset/from.windows-1258.php | Bin 0 -> 3662 bytes .../Resources/charset/translit.php | 3969 +++++ vendor/symfony/polyfill-iconv/bootstrap.php | 44 + vendor/symfony/polyfill-iconv/composer.json | 34 + vendor/symfony/polyfill-intl-idn/Idn.php | 283 + vendor/symfony/polyfill-intl-idn/LICENSE | 19 + vendor/symfony/polyfill-intl-idn/README.md | 12 + .../symfony/polyfill-intl-idn/bootstrap.php | 59 + .../symfony/polyfill-intl-idn/composer.json | 36 + vendor/symfony/polyfill-mbstring/LICENSE | 2 +- .../symfony/polyfill-mbstring/composer.json | 2 +- vendor/symfony/polyfill-php72/LICENSE | 2 +- vendor/symfony/polyfill-php72/composer.json | 2 +- vendor/symfony/polyfill-php73/LICENSE | 19 + vendor/symfony/polyfill-php73/Php73.php | 34 + vendor/symfony/polyfill-php73/README.md | 18 + .../Resources/stubs/JsonException.php | 14 + vendor/symfony/polyfill-php73/bootstrap.php | 31 + vendor/symfony/polyfill-php73/composer.json | 32 + vendor/symfony/process/CHANGELOG.md | 4 +- vendor/symfony/process/ExecutableFinder.php | 10 +- vendor/symfony/process/InputStream.php | 2 +- .../symfony/process/PhpExecutableFinder.php | 6 +- vendor/symfony/process/PhpProcess.php | 11 +- .../symfony/process/Pipes/AbstractPipes.php | 14 +- vendor/symfony/process/Pipes/UnixPipes.php | 44 +- vendor/symfony/process/Pipes/WindowsPipes.php | 34 +- vendor/symfony/process/Process.php | 45 +- .../process/Tests/ErrorProcessInitiator.php | 36 + .../process/Tests/ExecutableFinderTest.php | 2 +- .../Tests/KillableProcessWithOutput.php | 4 +- .../process/Tests/PhpExecutableFinderTest.php | 4 +- .../symfony/process/Tests/PhpProcessTest.php | 15 + .../PipeStdinInStdoutStdErrStreamSelect.php | 8 +- .../Tests/ProcessFailedExceptionTest.php | 32 +- vendor/symfony/process/Tests/ProcessTest.php | 228 +- vendor/symfony/process/composer.json | 2 +- vendor/symfony/routing/Annotation/Route.php | 34 +- vendor/symfony/routing/CHANGELOG.md | 27 +- vendor/symfony/routing/CompiledRoute.php | 30 +- .../RoutingResolverPass.php | 2 +- .../Exception/MethodNotAllowedException.php | 2 +- .../Generator/CompiledUrlGenerator.php | 58 + .../ConfigurableRequirementsInterface.php | 2 +- .../Dumper/CompiledUrlGeneratorDumper.php | 73 + .../Dumper/GeneratorDumperInterface.php | 2 +- .../Generator/Dumper/PhpGeneratorDumper.php | 22 +- .../routing/Generator/UrlGenerator.php | 57 +- .../Generator/UrlGeneratorInterface.php | 2 +- .../routing/Loader/AnnotationClassLoader.php | 23 +- .../routing/Loader/AnnotationFileLoader.php | 10 +- .../Loader/Configurator/Traits/AddTrait.php | 2 +- .../Loader/Configurator/Traits/RouteTrait.php | 38 +- .../ServiceRouterLoader.php | 2 - .../routing/Loader/ObjectRouteLoader.php | 14 +- .../symfony/routing/Loader/PhpFileLoader.php | 2 +- .../symfony/routing/Loader/XmlFileLoader.php | 31 +- .../symfony/routing/Loader/YamlFileLoader.php | 44 +- .../Loader/schema/routing/routing-1.0.xsd | 6 + .../routing/Matcher/CompiledUrlMatcher.php | 31 + .../Dumper/CompiledUrlMatcherDumper.php | 501 + ...rTrait.php => CompiledUrlMatcherTrait.php} | 97 +- .../Matcher/Dumper/MatcherDumperInterface.php | 2 +- .../Matcher/Dumper/PhpMatcherDumper.php | 448 +- .../Matcher/Dumper/StaticPrefixCollection.php | 12 +- .../Matcher/RedirectableUrlMatcher.php | 2 +- .../routing/Matcher/TraceableUrlMatcher.php | 14 +- vendor/symfony/routing/Matcher/UrlMatcher.php | 72 +- vendor/symfony/routing/RequestContext.php | 4 +- vendor/symfony/routing/Route.php | 55 +- vendor/symfony/routing/RouteCollection.php | 10 +- .../routing/RouteCollectionBuilder.php | 16 +- vendor/symfony/routing/RouteCompiler.php | 42 +- vendor/symfony/routing/Router.php | 111 +- .../routing/Tests/Annotation/RouteTest.php | 30 +- .../routing/Tests/CompiledRouteTest.php | 6 +- .../RoutingResolverPassTest.php | 2 +- .../AnnotatedClasses/AbstractClass.php | 5 + .../AnnotatedClasses/EncodingClass.php | 10 + .../DefaultValueController.php | 8 + .../GlobalDefaultsClass.php | 34 + .../Utf8ActionControllers.php | 25 + .../Tests/Fixtures/CustomRouteCompiler.php | 2 +- .../Tests/Fixtures/RedirectableUrlMatcher.php | 4 +- .../controller/import__controller.xml | 2 +- .../Fixtures/controller/import_controller.xml | 2 +- .../controller/import_override_defaults.xml | 2 +- .../Fixtures/controller/override_defaults.xml | 2 +- .../Tests/Fixtures/controller/routing.xml | 2 +- .../routing/Tests/Fixtures/defaults.php | 10 + .../routing/Tests/Fixtures/defaults.xml | 8 + .../routing/Tests/Fixtures/defaults.yml | 4 + .../Fixtures/dumper/compiled_url_matcher0.php | 17 + .../Fixtures/dumper/compiled_url_matcher1.php | 108 + .../dumper/compiled_url_matcher10.php | 2774 ++++ .../dumper/compiled_url_matcher11.php | 64 + .../dumper/compiled_url_matcher12.php | 44 + .../dumper/compiled_url_matcher13.php | 29 + .../Fixtures/dumper/compiled_url_matcher2.php | 110 + .../Fixtures/dumper/compiled_url_matcher3.php | 30 + .../Fixtures/dumper/compiled_url_matcher4.php | 25 + .../Fixtures/dumper/compiled_url_matcher5.php | 38 + .../Fixtures/dumper/compiled_url_matcher6.php | 50 + .../Fixtures/dumper/compiled_url_matcher7.php | 50 + .../Fixtures/dumper/compiled_url_matcher8.php | 32 + .../Fixtures/dumper/compiled_url_matcher9.php | 22 + .../Tests/Fixtures/dumper/url_matcher0.php | 4 +- .../Tests/Fixtures/dumper/url_matcher1.php | 103 +- .../Tests/Fixtures/dumper/url_matcher10.php | 2015 +-- .../Tests/Fixtures/dumper/url_matcher11.php | 43 +- .../Tests/Fixtures/dumper/url_matcher12.php | 27 +- .../Tests/Fixtures/dumper/url_matcher13.php | 21 +- .../Tests/Fixtures/dumper/url_matcher2.php | 107 +- .../Tests/Fixtures/dumper/url_matcher3.php | 25 +- .../Tests/Fixtures/dumper/url_matcher4.php | 24 +- .../Tests/Fixtures/dumper/url_matcher5.php | 47 +- .../Tests/Fixtures/dumper/url_matcher6.php | 51 +- .../Tests/Fixtures/dumper/url_matcher7.php | 51 +- .../Tests/Fixtures/dumper/url_matcher8.php | 21 +- .../Tests/Fixtures/dumper/url_matcher9.php | 18 +- .../routing/Tests/Fixtures/glob/bar.xml | 2 +- .../routing/Tests/Fixtures/glob/baz.xml | 2 +- .../Tests/Fixtures/glob/import_multiple.xml | 2 +- .../Tests/Fixtures/glob/import_single.xml | 2 +- .../Tests/Fixtures/glob/php_dsl_bar.php | 2 +- .../Tests/Fixtures/glob/php_dsl_baz.php | 2 +- .../import_with_name_prefix/routing.xml | 2 +- .../import_with_no_trailing_slash/routing.xml | 2 +- .../Tests/Fixtures/imported-with-defaults.php | 10 + .../Tests/Fixtures/imported-with-defaults.xml | 11 + .../Tests/Fixtures/imported-with-defaults.yml | 7 + .../Tests/Fixtures/importer-with-defaults.php | 11 + .../Tests/Fixtures/importer-with-defaults.xml | 10 + .../Tests/Fixtures/importer-with-defaults.yml | 5 + .../routing/Tests/Fixtures/list_defaults.xml | 2 +- .../Tests/Fixtures/list_in_list_defaults.xml | 2 +- .../Tests/Fixtures/list_in_map_defaults.xml | 2 +- .../Tests/Fixtures/list_null_values.xml | 2 +- .../routing/Tests/Fixtures/localized.xml | 2 +- ...imported-with-locale-but-not-localized.xml | 2 +- .../localized/imported-with-locale.xml | 2 +- .../Fixtures/localized/imported-with-utf8.php | 10 + .../Fixtures/localized/imported-with-utf8.xml | 8 + .../Fixtures/localized/imported-with-utf8.yml | 5 + ...ith-locale-imports-non-localized-route.xml | 2 +- .../localized/importer-with-locale.xml | 2 +- .../Fixtures/localized/importer-with-utf8.php | 7 + .../Fixtures/localized/importer-with-utf8.xml | 7 + .../Fixtures/localized/importer-with-utf8.yml | 3 + .../routing/Tests/Fixtures/localized/utf8.php | 10 + .../routing/Tests/Fixtures/localized/utf8.xml | 13 + .../routing/Tests/Fixtures/localized/utf8.yml | 6 + .../routing/Tests/Fixtures/map_defaults.xml | 2 +- .../Tests/Fixtures/map_in_list_defaults.xml | 2 +- .../Tests/Fixtures/map_in_map_defaults.xml | 2 +- .../Tests/Fixtures/map_null_values.xml | 2 +- .../routing/Tests/Fixtures/missing_id.xml | 2 +- .../routing/Tests/Fixtures/missing_path.xml | 2 +- .../Tests/Fixtures/namespaceprefix.xml | 2 +- .../routing/Tests/Fixtures/nonvalid.xml | 2 +- .../routing/Tests/Fixtures/nonvalidnode.xml | 2 +- .../routing/Tests/Fixtures/nonvalidroute.xml | 2 +- .../routing/Tests/Fixtures/null_values.xml | 2 +- .../routing/Tests/Fixtures/php_dsl.php | 10 +- .../routing/Tests/Fixtures/php_dsl_i18n.php | 8 +- .../Tests/Fixtures/php_dsl_sub_i18n.php | 4 +- .../routing/Tests/Fixtures/php_object_dsl.php | 10 +- .../Tests/Fixtures/scalar_defaults.xml | 2 +- .../routing/Tests/Fixtures/validpattern.php | 10 +- .../routing/Tests/Fixtures/validpattern.xml | 2 +- .../routing/Tests/Fixtures/validresource.php | 12 +- .../routing/Tests/Fixtures/validresource.xml | 2 +- .../Dumper/CompiledUrlGeneratorDumperTest.php | 240 + .../Dumper/PhpGeneratorDumperTest.php | 65 +- .../Tests/Generator/UrlGeneratorTest.php | 467 +- .../Loader/AbstractAnnotationLoaderTest.php | 2 +- .../Loader/AnnotationClassLoaderTest.php | 102 +- .../Loader/AnnotationDirectoryLoaderTest.php | 17 +- .../Tests/Loader/AnnotationFileLoaderTest.php | 12 +- .../Tests/Loader/DirectoryLoaderTest.php | 4 +- .../Tests/Loader/ObjectRouteLoaderTest.php | 34 +- .../Tests/Loader/PhpFileLoaderTest.php | 120 +- .../Tests/Loader/XmlFileLoaderTest.php | 198 +- .../Tests/Loader/YamlFileLoaderTest.php | 154 +- .../CompiledRedirectableUrlMatcherTest.php | 40 + .../Tests/Matcher/CompiledUrlMatcherTest.php | 27 + .../DumpedRedirectableUrlMatcherTest.php | 11 +- .../Tests/Matcher/DumpedUrlMatcherTest.php | 5 +- .../Dumper/CompiledUrlMatcherDumperTest.php | 496 + .../Matcher/Dumper/PhpMatcherDumperTest.php | 257 +- .../Dumper/StaticPrefixCollectionTest.php | 138 +- .../Matcher/RedirectableUrlMatcherTest.php | 80 +- .../Tests/Matcher/TraceableUrlMatcherTest.php | 48 +- .../routing/Tests/Matcher/UrlMatcherTest.php | 436 +- .../routing/Tests/RequestContextTest.php | 12 +- .../Tests/RouteCollectionBuilderTest.php | 60 +- .../routing/Tests/RouteCollectionTest.php | 74 +- .../routing/Tests/RouteCompilerTest.php | 408 +- vendor/symfony/routing/Tests/RouteTest.php | 106 +- vendor/symfony/routing/Tests/RouterTest.php | 44 +- vendor/symfony/routing/composer.json | 7 +- vendor/symfony/service-contracts/LICENSE | 19 + vendor/symfony/service-contracts/README.md | 9 + .../ResetInterface.php | 0 .../ServiceLocatorTrait.php | 27 +- .../ServiceProviderInterface.php | 36 + .../ServiceSubscriberInterface.php | 16 +- .../ServiceSubscriberTrait.php | 4 +- .../Test}/ServiceLocatorTest.php | 22 +- .../symfony/service-contracts/composer.json | 34 + vendor/symfony/translation-contracts/LICENSE | 19 + .../LocaleAwareInterface.php | 0 .../symfony/translation-contracts/README.md | 9 + .../Test}/TranslatorTest.php | 192 +- .../TranslatorInterface.php | 2 +- .../TranslatorTrait.php | 6 +- .../translation-contracts/composer.json | 33 + vendor/symfony/translation/CHANGELOG.md | 6 + .../Catalogue/AbstractOperation.php | 26 +- .../translation/Catalogue/MergeOperation.php | 14 +- .../translation/Catalogue/TargetOperation.php | 14 +- .../translation/Command/XliffLintCommand.php | 31 +- .../TranslationDataCollector.php | 21 +- .../translation/DataCollectorTranslator.php | 35 +- .../TranslationDumperPass.php | 2 +- .../TranslationExtractorPass.php | 2 +- .../DependencyInjection/TranslatorPass.php | 22 +- .../TranslatorPathsPass.php | 144 + .../translation/Dumper/CsvFileDumper.php | 4 +- .../translation/Dumper/DumperInterface.php | 2 +- .../symfony/translation/Dumper/FileDumper.php | 12 +- .../translation/Dumper/IcuResFileDumper.php | 2 +- .../translation/Dumper/IniFileDumper.php | 2 +- .../translation/Dumper/JsonFileDumper.php | 2 +- .../translation/Dumper/MoFileDumper.php | 12 +- .../translation/Dumper/PhpFileDumper.php | 2 +- .../translation/Dumper/PoFileDumper.php | 27 +- .../translation/Dumper/QtFileDumper.php | 13 +- .../translation/Dumper/XliffFileDumper.php | 22 +- .../translation/Dumper/YamlFileDumper.php | 2 +- .../Extractor/AbstractFileExtractor.php | 4 +- .../translation/Extractor/ChainExtractor.php | 2 +- .../translation/Extractor/PhpExtractor.php | 62 +- .../Extractor/PhpStringTokenParser.php | 10 +- .../ChoiceMessageFormatterInterface.php | 2 +- .../translation/Formatter/IntlFormatter.php | 6 +- .../Formatter/IntlFormatterInterface.php | 2 +- .../Formatter/MessageFormatter.php | 10 +- .../Formatter/MessageFormatterInterface.php | 2 +- .../translation/IdentityTranslator.php | 8 +- .../translation/Loader/ArrayLoader.php | 2 +- .../translation/Loader/CsvFileLoader.php | 2 +- .../symfony/translation/Loader/FileLoader.php | 2 +- .../translation/Loader/IcuResFileLoader.php | 2 +- .../translation/Loader/JsonFileLoader.php | 2 +- .../translation/Loader/MoFileLoader.php | 6 +- .../translation/Loader/PoFileLoader.php | 12 +- .../translation/Loader/XliffFileLoader.php | 77 +- .../symfony/translation/LoggingTranslator.php | 16 +- .../symfony/translation/MessageCatalogue.php | 22 +- .../symfony/translation/MessageSelector.php | 6 +- .../translation/PluralizationRules.php | 2 +- .../translation/Reader/TranslationReader.php | 2 +- .../Resources/bin/translation-status.php | 200 + .../translation/Resources/data/parents.json | 2 +- .../Tests/Catalogue/AbstractOperationTest.php | 14 +- .../Tests/Catalogue/MergeOperationTest.php | 38 +- .../Tests/Catalogue/TargetOperationTest.php | 38 +- .../Tests/Command/XliffLintCommandTest.php | 47 +- .../TranslationDataCollectorTest.php | 70 +- .../Tests/DataCollectorTranslatorTest.php | 54 +- .../TranslationDumperPassTest.php | 4 +- .../TranslationExtractorPassTest.php | 6 +- .../TranslationPassTest.php | 79 +- .../TranslationPathsPassTest.php | 89 + .../fixtures/ControllerArguments.php | 16 + .../fixtures/ServiceArguments.php | 12 + .../fixtures/ServiceMethodCalls.php | 12 + .../fixtures/ServiceProperties.php | 8 + .../fixtures/ServiceSubscriber.php | 19 + .../Tests/Dumper/CsvFileDumperTest.php | 4 +- .../Tests/Dumper/FileDumperTest.php | 18 +- .../Tests/Dumper/IcuResFileDumperTest.php | 2 +- .../Tests/Dumper/IniFileDumperTest.php | 2 +- .../Tests/Dumper/JsonFileDumperTest.php | 6 +- .../Tests/Dumper/MoFileDumperTest.php | 2 +- .../Tests/Dumper/PhpFileDumperTest.php | 2 +- .../Tests/Dumper/PoFileDumperTest.php | 21 +- .../Tests/Dumper/QtFileDumperTest.php | 21 +- .../Tests/Dumper/XliffFileDumperTest.php | 73 +- .../Tests/Dumper/YamlFileDumperTest.php | 20 +- .../Tests/Extractor/PhpExtractorTest.php | 36 +- .../Tests/Formatter/IntlFormatterTest.php | 28 +- .../Tests/Formatter/MessageFormatterTest.php | 52 +- .../Tests/IdentityTranslatorTest.php | 2 +- .../translation/Tests/IntervalTest.php | 22 +- .../Tests/Loader/CsvFileLoaderTest.php | 8 +- .../Tests/Loader/IcuDatFileLoaderTest.php | 8 +- .../Tests/Loader/IcuResFileLoaderTest.php | 4 +- .../Tests/Loader/IniFileLoaderTest.php | 8 +- .../Tests/Loader/JsonFileLoaderTest.php | 8 +- .../Tests/Loader/MoFileLoaderTest.php | 12 +- .../Tests/Loader/PhpFileLoaderTest.php | 4 +- .../Tests/Loader/PoFileLoaderTest.php | 16 +- .../Tests/Loader/QtFileLoaderTest.php | 8 +- .../Tests/Loader/XliffFileLoaderTest.php | 107 +- .../Tests/Loader/YamlFileLoaderTest.php | 8 +- .../Tests/LoggingTranslatorTest.php | 8 +- .../Tests/MessageCatalogueTest.php | 92 +- .../translation/Tests/MessageSelectorTest.php | 100 +- .../Tests/PluralizationRulesTest.php | 30 +- .../translation/Tests/TranslatorCacheTest.php | 66 +- .../translation/Tests/TranslatorTest.php | 264 +- .../Tests/Util/ArrayConverterTest.php | 50 +- .../Tests/Writer/TranslationWriterTest.php | 4 +- .../fixtures/extractor/translation.html.php | 32 +- .../Tests/fixtures/resources-2.0+intl-icu.xlf | 11 + .../Tests/fixtures/resources-multi-files.xlf | 27 + .../translation/Tests/fixtures/resources.po | 18 +- .../translation/Tests/fixtures/resources.ts | 11 + .../translation/Tests/fixtures/withnote.xlf | 4 +- vendor/symfony/translation/Translator.php | 29 +- .../translation/TranslatorInterface.php | 4 +- .../translation/Util/ArrayConverter.php | 4 +- .../symfony/translation/Util/XliffUtils.php | 8 +- .../translation/Writer/TranslationWriter.php | 4 +- .../Writer/TranslationWriterInterface.php | 2 +- vendor/symfony/translation/composer.json | 11 +- vendor/symfony/var-dumper/CHANGELOG.md | 7 +- .../symfony/var-dumper/Caster/AmqpCaster.php | 50 +- vendor/symfony/var-dumper/Caster/ArgsStub.php | 12 +- vendor/symfony/var-dumper/Caster/Caster.php | 10 +- .../symfony/var-dumper/Caster/ClassStub.php | 8 +- .../symfony/var-dumper/Caster/ConstStub.php | 4 +- .../symfony/var-dumper/Caster/DOMCaster.php | 78 +- .../symfony/var-dumper/Caster/DateCaster.php | 10 +- .../var-dumper/Caster/DoctrineCaster.php | 12 +- vendor/symfony/var-dumper/Caster/DsCaster.php | 68 + .../symfony/var-dumper/Caster/DsPairStub.php | 28 + .../var-dumper/Caster/ExceptionCaster.php | 36 +- .../symfony/var-dumper/Caster/IntlCaster.php | 45 +- vendor/symfony/var-dumper/Caster/LinkStub.php | 2 +- .../var-dumper/Caster/MemcachedCaster.php | 10 +- .../symfony/var-dumper/Caster/PdoCaster.php | 28 +- .../symfony/var-dumper/Caster/PgSqlCaster.php | 20 +- .../symfony/var-dumper/Caster/RedisCaster.php | 42 +- .../var-dumper/Caster/ReflectionCaster.php | 88 +- .../var-dumper/Caster/ResourceCaster.php | 26 + .../symfony/var-dumper/Caster/SplCaster.php | 51 +- .../symfony/var-dumper/Caster/StubCaster.php | 6 +- .../var-dumper/Caster/SymfonyCaster.php | 12 +- .../var-dumper/Caster/XmlReaderCaster.php | 16 +- .../var-dumper/Caster/XmlResourceCaster.php | 4 +- .../var-dumper/Cloner/AbstractCloner.php | 250 +- vendor/symfony/var-dumper/Cloner/Cursor.php | 2 +- vendor/symfony/var-dumper/Cloner/Data.php | 16 +- vendor/symfony/var-dumper/Cloner/Stub.php | 32 +- .../symfony/var-dumper/Cloner/VarCloner.php | 30 +- .../Command/Descriptor/CliDescriptor.php | 25 +- .../Command/Descriptor/HtmlDescriptor.php | 6 +- .../var-dumper/Command/ServerDumpCommand.php | 6 +- .../var-dumper/Dumper/AbstractDumper.php | 4 +- .../symfony/var-dumper/Dumper/CliDumper.php | 96 +- .../ContextProvider/CliContextProvider.php | 4 +- .../RequestContextProvider.php | 6 +- .../ContextProvider/SourceContextProvider.php | 4 +- .../symfony/var-dumper/Dumper/HtmlDumper.php | 75 +- .../var-dumper/Dumper/ServerDumper.php | 2 +- vendor/symfony/var-dumper/README.md | 4 +- .../symfony/var-dumper/Server/Connection.php | 12 +- .../symfony/var-dumper/Server/DumpServer.php | 10 +- .../var-dumper/Test/VarDumperTestTrait.php | 1 + .../var-dumper/Tests/Caster/CasterTest.php | 124 +- .../Tests/Caster/DateCasterTest.php | 150 +- .../Tests/Caster/ExceptionCasterTest.php | 16 +- .../var-dumper/Tests/Caster/GmpCasterTest.php | 6 +- .../Tests/Caster/IntlCasterTest.php | 26 +- .../var-dumper/Tests/Caster/PdoCasterTest.php | 4 +- .../Tests/Caster/ReflectionCasterTest.php | 15 +- .../var-dumper/Tests/Caster/SplCasterTest.php | 28 +- .../Tests/Caster/StubCasterTest.php | 32 +- .../Tests/Caster/XmlReaderCasterTest.php | 68 +- .../var-dumper/Tests/Cloner/DataTest.php | 16 +- .../var-dumper/Tests/Cloner/VarClonerTest.php | 46 +- .../Command/Descriptor/CliDescriptorTest.php | 95 +- .../Command/Descriptor/HtmlDescriptorTest.php | 56 +- .../var-dumper/Tests/Dumper/CliDumperTest.php | 45 +- .../var-dumper/Tests/Dumper/FunctionsTest.php | 2 +- .../Tests/Dumper/HtmlDumperTest.php | 11 +- .../Tests/Dumper/ServerDumperTest.php | 10 +- .../var-dumper/Tests/Fixtures/Twig.php | 6 +- .../var-dumper/Tests/Fixtures/dumb-var.php | 10 +- .../Tests/Server/ConnectionTest.php | 10 +- .../Tests/Test/VarDumperTestTraitTest.php | 4 +- vendor/symfony/var-dumper/VarDumper.php | 4 +- vendor/symfony/var-dumper/composer.json | 2 +- vendor/theseer/tokenizer/.gitignore | 1 + vendor/theseer/tokenizer/.travis.yml | 3 +- vendor/theseer/tokenizer/CHANGELOG.md | 32 + vendor/theseer/tokenizer/phive.xml | 4 +- vendor/theseer/tokenizer/src/Tokenizer.php | 5 + vendor/vlucas/phpdotenv/composer.json | 5 +- vendor/vlucas/phpdotenv/src/Dotenv.php | 8 + vendor/vlucas/phpdotenv/src/Loader.php | 62 +- vendor/vlucas/phpdotenv/src/Parser.php | 126 + .../zend-diactoros/.coveralls.yml | 2 - .../zendframework/zend-diactoros/CHANGELOG.md | 210 + .../zendframework/zend-diactoros/CONDUCT.md | 43 - .../zend-diactoros/CONTRIBUTING.md | 228 - .../zendframework/zend-diactoros/LICENSE.md | 2 +- vendor/zendframework/zend-diactoros/README.md | 8 +- .../zend-diactoros/composer.json | 31 +- .../zend-diactoros/composer.lock | 1695 -- .../zendframework/zend-diactoros/mkdocs.yml | 16 - .../zend-diactoros/src/AbstractSerializer.php | 43 +- .../zend-diactoros/src/CallbackStream.php | 57 +- .../Exception/DeprecatedMethodException.php | 19 - .../Exception/DeserializationException.php | 51 + .../src/Exception/ExceptionInterface.php | 12 +- .../Exception/InvalidArgumentException.php | 14 + .../InvalidStreamPointerPositionException.php | 24 + .../src/Exception/SerializationException.php | 25 + .../Exception/UnreadableStreamException.php | 35 + .../UnrecognizedProtocolVersionException.php | 22 + .../Exception/UnrewindableStreamException.php | 20 + .../Exception/UnseekableStreamException.php | 35 + .../Exception/UntellableStreamException.php | 30 + .../Exception/UnwritableStreamException.php | 35 + .../UploadedFileAlreadyMovedException.php | 24 + .../Exception/UploadedFileErrorException.php | 43 + .../zend-diactoros/src/HeaderSecurity.php | 29 +- .../zend-diactoros/src/MessageTrait.php | 58 +- .../zend-diactoros/src/PhpInputStream.php | 10 +- .../zend-diactoros/src/RelativeStream.php | 48 +- .../zend-diactoros/src/Request.php | 10 +- .../src/Request/ArraySerializer.php | 31 +- .../zend-diactoros/src/Request/Serializer.php | 51 +- .../zend-diactoros/src/RequestFactory.php | 24 + .../zend-diactoros/src/RequestTrait.php | 81 +- .../zend-diactoros/src/Response.php | 21 +- .../src/Response/ArraySerializer.php | 28 +- .../src/Response/EmitterInterface.php | 34 - .../src/Response/EmptyResponse.php | 12 +- .../src/Response/HtmlResponse.php | 21 +- .../src/Response/InjectContentTypeTrait.php | 12 +- .../src/Response/JsonResponse.php | 53 +- .../src/Response/RedirectResponse.php | 14 +- .../src/Response/SapiEmitter.php | 46 - .../src/Response/SapiEmitterTrait.php | 112 - .../src/Response/SapiStreamEmitter.php | 134 - .../src/Response/Serializer.php | 41 +- .../src/Response/TextResponse.php | 21 +- .../src/Response/XmlResponse.php | 17 +- .../zend-diactoros/src/ResponseFactory.php | 25 + .../zend-diactoros/src/Server.php | 185 - .../zend-diactoros/src/ServerRequest.php | 78 +- .../src/ServerRequestFactory.php | 173 +- .../zend-diactoros/src/Stream.php | 80 +- .../zend-diactoros/src/StreamFactory.php | 55 + .../zend-diactoros/src/UploadedFile.php | 92 +- .../src/UploadedFileFactory.php | 36 + .../zendframework/zend-diactoros/src/Uri.php | 139 +- .../zend-diactoros/src/UriFactory.php | 24 + .../src/functions/create_uploaded_file.php | 13 +- .../functions/marshal_headers_from_sapi.php | 12 +- .../functions/marshal_method_from_sapi.php | 7 +- .../marshal_protocol_version_from_sapi.php | 19 +- .../src/functions/marshal_uri_from_sapi.php | 49 +- .../src/functions/normalize_server.php | 5 +- .../functions/normalize_uploaded_files.php | 16 +- .../src/functions/parse_cookie_header.php | 4 +- 1835 files changed, 74500 insertions(+), 27482 deletions(-) create mode 100644 vendor/clue/stream-filter/src/functions_include.php create mode 100644 vendor/doctrine/instantiator/.doctrine-project.json create mode 100644 vendor/doctrine/instantiator/docs/en/index.rst create mode 100644 vendor/doctrine/instantiator/docs/en/sidebar.rst create mode 100644 vendor/doctrine/instantiator/phpbench.json create mode 100644 vendor/doctrine/instantiator/phpcs.xml.dist create mode 100644 vendor/doctrine/instantiator/phpstan.neon.dist create mode 100644 vendor/doctrine/lexer/.doctrine-project.json create mode 100644 vendor/doctrine/lexer/.github/FUNDING.yml create mode 100644 vendor/doctrine/lexer/.gitignore create mode 100644 vendor/doctrine/lexer/docs/en/dql-parser.rst create mode 100644 vendor/doctrine/lexer/docs/en/index.rst create mode 100644 vendor/doctrine/lexer/docs/en/sidebar.rst create mode 100644 vendor/doctrine/lexer/docs/en/simple-parser-example.rst create mode 100644 vendor/doctrine/lexer/phpunit.xml.dist create mode 100644 vendor/doctrine/lexer/tests/Doctrine/Common/Lexer/AbstractLexerTest.php create mode 100644 vendor/doctrine/lexer/tests/Doctrine/Common/Lexer/ConcreteLexer.php create mode 100644 vendor/knplabs/github-api/lib/Github/Api/Miscellaneous/Licenses.php create mode 100644 vendor/knplabs/github-api/lib/Github/Api/RateLimit/RateLimitResource.php create mode 100644 vendor/kylekatarnls/update-helper/LICENSE create mode 100644 vendor/kylekatarnls/update-helper/composer.json create mode 100644 vendor/kylekatarnls/update-helper/src/UpdateHelper/ComposerPlugin.php create mode 100644 vendor/kylekatarnls/update-helper/src/UpdateHelper/UpdateHelper.php create mode 100644 vendor/kylekatarnls/update-helper/src/UpdateHelper/UpdateHelperInterface.php create mode 100644 vendor/laravel/framework/src/Illuminate/Auth/LICENSE.md create mode 100644 vendor/laravel/framework/src/Illuminate/Broadcasting/LICENSE.md create mode 100644 vendor/laravel/framework/src/Illuminate/Bus/LICENSE.md create mode 100644 vendor/laravel/framework/src/Illuminate/Cache/LICENSE.md create mode 100644 vendor/laravel/framework/src/Illuminate/Config/LICENSE.md create mode 100644 vendor/laravel/framework/src/Illuminate/Console/LICENSE.md create mode 100644 vendor/laravel/framework/src/Illuminate/Container/LICENSE.md create mode 100644 vendor/laravel/framework/src/Illuminate/Contracts/LICENSE.md create mode 100644 vendor/laravel/framework/src/Illuminate/Cookie/LICENSE.md create mode 100644 vendor/laravel/framework/src/Illuminate/Database/Eloquent/HigherOrderBuilderProxy.php create mode 100644 vendor/laravel/framework/src/Illuminate/Database/LICENSE.md create mode 100644 vendor/laravel/framework/src/Illuminate/Encryption/LICENSE.md create mode 100644 vendor/laravel/framework/src/Illuminate/Events/LICENSE.md create mode 100644 vendor/laravel/framework/src/Illuminate/Filesystem/LICENSE.md create mode 100644 vendor/laravel/framework/src/Illuminate/Hashing/LICENSE.md create mode 100644 vendor/laravel/framework/src/Illuminate/Http/LICENSE.md create mode 100644 vendor/laravel/framework/src/Illuminate/Log/LICENSE.md create mode 100644 vendor/laravel/framework/src/Illuminate/Mail/LICENSE.md create mode 100644 vendor/laravel/framework/src/Illuminate/Notifications/LICENSE.md create mode 100644 vendor/laravel/framework/src/Illuminate/Pagination/LICENSE.md create mode 100644 vendor/laravel/framework/src/Illuminate/Pipeline/LICENSE.md create mode 100644 vendor/laravel/framework/src/Illuminate/Queue/LICENSE.md create mode 100644 vendor/laravel/framework/src/Illuminate/Redis/LICENSE.md create mode 100644 vendor/laravel/framework/src/Illuminate/Routing/LICENSE.md create mode 100644 vendor/laravel/framework/src/Illuminate/Session/LICENSE.md create mode 100644 vendor/laravel/framework/src/Illuminate/Support/LICENSE.md create mode 100644 vendor/laravel/framework/src/Illuminate/Translation/LICENSE.md create mode 100644 vendor/laravel/framework/src/Illuminate/Validation/LICENSE.md create mode 100644 vendor/laravel/framework/src/Illuminate/View/LICENSE.md delete mode 100644 vendor/lcobucci/jwt/composer.lock delete mode 100644 vendor/lcobucci/jwt/src/Signer/Ecdsa/KeyParser.php create mode 100644 vendor/lcobucci/jwt/src/Signer/Ecdsa/MultibyteStringConverter.php create mode 100644 vendor/lcobucci/jwt/src/Signer/Ecdsa/SignatureConverter.php create mode 100644 vendor/lcobucci/jwt/src/Signer/OpenSSL.php create mode 100644 vendor/lcobucci/jwt/test/functional/RFC6978VectorTest.php delete mode 100644 vendor/lcobucci/jwt/test/unit/Signer/Ecdsa/KeyParserTest.php create mode 100644 vendor/lcobucci/jwt/test/unit/Signer/Ecdsa/MultibyteStringConverterTest.php create mode 100644 vendor/lcobucci/jwt/test/unit/Signer/RsaTest.php create mode 100644 vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryPHPUnitIntegrationAssertPostConditionsForV7AndPrevious.php create mode 100644 vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryPHPUnitIntegrationAssertPostConditionsForV8.php create mode 100644 vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryTestCaseSetUpForV7AndPrevious.php create mode 100644 vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryTestCaseSetUpForV8.php create mode 100644 vendor/mockery/mockery/tests/Mockery/Generator/StringManipulation/Pass/ClassPassTest.php create mode 100644 vendor/mockery/mockery/tests/Mockery/MockingStaticMethodsCalledObjectStyleTest.php create mode 100644 vendor/nesbot/carbon/bin/upgrade-carbon create mode 100644 vendor/nesbot/carbon/bin/upgrade-carbon.bat create mode 100644 vendor/nesbot/carbon/src/Carbon/Upgrade.php delete mode 100644 vendor/nexmo/client/examples/fetch_recording.php delete mode 100644 vendor/nexmo/client/examples/send.php create mode 100644 vendor/nexmo/client/src/Account/Config.php create mode 100644 vendor/nexmo/client/src/Application/MessagesConfig.php create mode 100644 vendor/nexmo/client/src/Application/RtcConfig.php create mode 100644 vendor/nexmo/client/src/Application/VbcConfig.php create mode 100644 vendor/nexmo/client/src/Entity/ModernCollectionTrait.php create mode 100644 vendor/nexmo/client/src/Message/Shortcode.php create mode 100644 vendor/nexmo/client/src/Message/Shortcode/Alert.php create mode 100644 vendor/nexmo/client/src/Message/Shortcode/Marketing.php create mode 100644 vendor/nexmo/client/src/Message/Shortcode/TwoFactor.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/CoaleseEqualTokenEmulator.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/FnTokenEmulator.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/TokenEmulatorInterface.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrowFunction.php create mode 100644 vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Coalesce.php create mode 100644 vendor/nikic/php-parser/test/code/formatPreservation/array_spread.test create mode 100644 vendor/nikic/php-parser/test/code/formatPreservation/arrow_function.test create mode 100644 vendor/nikic/php-parser/test/code/formatPreservation/emptyListInsertion.test create mode 100644 vendor/nikic/php-parser/test/code/parser/expr/arraySpread.test create mode 100644 vendor/nikic/php-parser/test/code/parser/expr/arrow_function.test delete mode 100644 vendor/nikic/php-parser/test/code/parser/exprStmtMode.test create mode 100644 vendor/nikic/php-parser/test/code/parser/nopPositions.test create mode 100644 vendor/nikic/php-parser/test/code/prettyPrinter/expr/arraySpread.test create mode 100644 vendor/nikic/php-parser/test/code/prettyPrinter/expr/arrow_function.test create mode 100644 vendor/php-http/cache-plugin/src/Cache/Listener/AddHeaderCacheListener.php create mode 100644 vendor/php-http/cache-plugin/src/Cache/Listener/CacheListener.php create mode 100644 vendor/php-http/discovery/src/Psr17FactoryDiscovery.php create mode 100644 vendor/php-http/discovery/src/Psr18ClientDiscovery.php create mode 100644 vendor/php-http/discovery/src/Strategy/CommonPsr17ClassesStrategy.php delete mode 100644 vendor/phpunit/phpunit/ChangeLog-5.7.md create mode 100644 vendor/psr/http-factory/.gitignore create mode 100644 vendor/psr/http-factory/.pullapprove.yml create mode 100644 vendor/psr/http-factory/LICENSE create mode 100644 vendor/psr/http-factory/README.md create mode 100644 vendor/psr/http-factory/composer.json create mode 100644 vendor/psr/http-factory/src/RequestFactoryInterface.php create mode 100644 vendor/psr/http-factory/src/ResponseFactoryInterface.php create mode 100644 vendor/psr/http-factory/src/ServerRequestFactoryInterface.php create mode 100644 vendor/psr/http-factory/src/StreamFactoryInterface.php create mode 100644 vendor/psr/http-factory/src/UploadedFileFactoryInterface.php create mode 100644 vendor/psr/http-factory/src/UriFactoryInterface.php create mode 100644 vendor/symfony/console/Helper/Dumper.php rename vendor/symfony/console/Tests/Fixtures/{TestToto.php => TestAmbiguousCommandRegistering.php} (58%) rename vendor/symfony/console/Tests/Fixtures/{TestTiti.php => TestAmbiguousCommandRegistering2.php} (62%) create mode 100644 vendor/symfony/console/Tests/Helper/DumperNativeFallbackTest.php create mode 100644 vendor/symfony/console/Tests/Helper/DumperTest.php create mode 100644 vendor/symfony/console/Tests/Question/ConfirmationQuestionTest.php create mode 100644 vendor/symfony/console/Tests/Question/QuestionTest.php delete mode 100644 vendor/symfony/contracts/CHANGELOG.md delete mode 100644 vendor/symfony/contracts/Cache/CacheInterface.php delete mode 100644 vendor/symfony/contracts/Cache/CacheTrait.php delete mode 100644 vendor/symfony/contracts/Cache/CallbackInterface.php delete mode 100644 vendor/symfony/contracts/Cache/ItemInterface.php delete mode 100644 vendor/symfony/contracts/Cache/TagAwareCacheInterface.php delete mode 100644 vendor/symfony/contracts/README.md delete mode 100644 vendor/symfony/contracts/Tests/Cache/CacheTraitTest.php delete mode 100644 vendor/symfony/contracts/Tests/Service/ServiceSubscriberTraitTest.php delete mode 100644 vendor/symfony/contracts/composer.json create mode 100644 vendor/symfony/debug/Tests/Fixtures/DefinitionInEvaluatedCode.php create mode 100644 vendor/symfony/debug/Tests/Fixtures/ErrorHandlerThatUsesThePreviousOne.php create mode 100644 vendor/symfony/debug/Tests/Fixtures/FinalClasses.php create mode 100644 vendor/symfony/debug/Tests/Fixtures/LoggerThatSetAnErrorHandler.php create mode 100644 vendor/symfony/debug/Tests/Fixtures/VirtualClass.php create mode 100644 vendor/symfony/debug/Tests/Fixtures/VirtualClassMagicCall.php create mode 100644 vendor/symfony/debug/Tests/Fixtures/VirtualInterface.php create mode 100644 vendor/symfony/debug/Tests/Fixtures/VirtualSubInterface.php rename vendor/symfony/debug/Tests/Fixtures/{FinalClass.php => VirtualTrait.php} (57%) create mode 100644 vendor/symfony/event-dispatcher-contracts/Event.php create mode 100644 vendor/symfony/event-dispatcher-contracts/EventDispatcherInterface.php rename vendor/symfony/{contracts => event-dispatcher-contracts}/LICENSE (96%) create mode 100644 vendor/symfony/event-dispatcher-contracts/README.md create mode 100644 vendor/symfony/event-dispatcher-contracts/composer.json create mode 100644 vendor/symfony/event-dispatcher/LegacyEventDispatcherProxy.php create mode 100644 vendor/symfony/event-dispatcher/LegacyEventProxy.php delete mode 100644 vendor/symfony/event-dispatcher/Tests/AbstractEventDispatcherTest.php create mode 100644 vendor/symfony/event-dispatcher/Tests/ChildEventDispatcherTest.php create mode 100644 vendor/symfony/event-dispatcher/Tests/LegacyEventDispatcherTest.php create mode 100644 vendor/symfony/finder/Exception/DirectoryNotFoundException.php create mode 100644 vendor/symfony/finder/Gitignore.php create mode 100644 vendor/symfony/finder/Tests/GitignoreTest.php create mode 100644 vendor/symfony/http-foundation/Test/Constraint/RequestAttributeValueSame.php create mode 100644 vendor/symfony/http-foundation/Test/Constraint/ResponseCookieValueSame.php create mode 100644 vendor/symfony/http-foundation/Test/Constraint/ResponseHasCookie.php create mode 100644 vendor/symfony/http-foundation/Test/Constraint/ResponseHasHeader.php create mode 100644 vendor/symfony/http-foundation/Test/Constraint/ResponseHeaderSame.php create mode 100644 vendor/symfony/http-foundation/Test/Constraint/ResponseIsRedirected.php create mode 100644 vendor/symfony/http-foundation/Test/Constraint/ResponseIsSuccessful.php create mode 100644 vendor/symfony/http-foundation/Test/Constraint/ResponseStatusCodeSame.php create mode 100644 vendor/symfony/http-foundation/Tests/File/Fixtures/case-sensitive-mime-type.xlsm create mode 100644 vendor/symfony/http-foundation/Tests/Test/Constraint/RequestAttributeValueSameTest.php create mode 100644 vendor/symfony/http-foundation/Tests/Test/Constraint/ResponseCookieValueSameTest.php create mode 100644 vendor/symfony/http-foundation/Tests/Test/Constraint/ResponseHasCookieTest.php create mode 100644 vendor/symfony/http-foundation/Tests/Test/Constraint/ResponseHasHeaderTest.php create mode 100644 vendor/symfony/http-foundation/Tests/Test/Constraint/ResponseHeaderSameTest.php create mode 100644 vendor/symfony/http-foundation/Tests/Test/Constraint/ResponseIsRedirectedTest.php create mode 100644 vendor/symfony/http-foundation/Tests/Test/Constraint/ResponseIsSuccessfulTest.php create mode 100644 vendor/symfony/http-foundation/Tests/Test/Constraint/ResponseStatusCodeSameTest.php create mode 100644 vendor/symfony/http-foundation/Tests/UrlHelperTest.php create mode 100644 vendor/symfony/http-foundation/UrlHelper.php create mode 100644 vendor/symfony/http-kernel/Controller/ArgumentResolver/NotTaggedControllerValueResolver.php create mode 100644 vendor/symfony/http-kernel/DependencyInjection/RegisterLocaleAwareServicesPass.php create mode 100644 vendor/symfony/http-kernel/Event/ControllerArgumentsEvent.php create mode 100644 vendor/symfony/http-kernel/Event/ControllerEvent.php create mode 100644 vendor/symfony/http-kernel/Event/ExceptionEvent.php create mode 100644 vendor/symfony/http-kernel/Event/RequestEvent.php create mode 100644 vendor/symfony/http-kernel/Event/ResponseEvent.php create mode 100644 vendor/symfony/http-kernel/Event/TerminateEvent.php create mode 100644 vendor/symfony/http-kernel/Event/ViewEvent.php create mode 100644 vendor/symfony/http-kernel/EventListener/DisallowRobotsIndexingListener.php create mode 100644 vendor/symfony/http-kernel/EventListener/LocaleAwareListener.php create mode 100644 vendor/symfony/http-kernel/HttpClientKernel.php create mode 100644 vendor/symfony/http-kernel/HttpKernelBrowser.php create mode 100644 vendor/symfony/http-kernel/Tests/Controller/ArgumentResolver/NotTaggedControllerValueResolverTest.php create mode 100644 vendor/symfony/http-kernel/Tests/DependencyInjection/RegisterLocaleAwareServicesPassTest.php create mode 100644 vendor/symfony/http-kernel/Tests/Event/ControllerArgumentsEventTest.php rename vendor/symfony/http-kernel/Tests/Event/{GetResponseForExceptionEventTest.php => ExceptionEventTest.php} (71%) delete mode 100644 vendor/symfony/http-kernel/Tests/Event/FilterControllerArgumentsEventTest.php create mode 100644 vendor/symfony/http-kernel/Tests/EventListener/DisallowRobotsIndexingListenerTest.php create mode 100644 vendor/symfony/http-kernel/Tests/EventListener/LocaleAwareListenerTest.php rename vendor/symfony/http-kernel/Tests/{ClientTest.php => HttpKernelBrowserTest.php} (83%) rename vendor/symfony/{contracts => mime}/.gitignore (100%) create mode 100644 vendor/symfony/mime/Address.php create mode 100644 vendor/symfony/mime/BodyRendererInterface.php create mode 100644 vendor/symfony/mime/CharacterStream.php create mode 100644 vendor/symfony/mime/DependencyInjection/AddMimeTypeGuesserPass.php create mode 100644 vendor/symfony/mime/Email.php create mode 100644 vendor/symfony/mime/Encoder/AddressEncoderInterface.php create mode 100644 vendor/symfony/mime/Encoder/Base64ContentEncoder.php create mode 100644 vendor/symfony/mime/Encoder/Base64Encoder.php create mode 100644 vendor/symfony/mime/Encoder/Base64MimeHeaderEncoder.php create mode 100644 vendor/symfony/mime/Encoder/ContentEncoderInterface.php create mode 100644 vendor/symfony/mime/Encoder/EightBitContentEncoder.php create mode 100644 vendor/symfony/mime/Encoder/EncoderInterface.php create mode 100644 vendor/symfony/mime/Encoder/IdnAddressEncoder.php create mode 100644 vendor/symfony/mime/Encoder/MimeHeaderEncoderInterface.php create mode 100644 vendor/symfony/mime/Encoder/QpContentEncoder.php create mode 100644 vendor/symfony/mime/Encoder/QpEncoder.php create mode 100644 vendor/symfony/mime/Encoder/QpMimeHeaderEncoder.php create mode 100644 vendor/symfony/mime/Encoder/Rfc2231Encoder.php create mode 100644 vendor/symfony/mime/Exception/AddressEncoderException.php create mode 100644 vendor/symfony/mime/Exception/ExceptionInterface.php create mode 100644 vendor/symfony/mime/Exception/InvalidArgumentException.php create mode 100644 vendor/symfony/mime/Exception/LogicException.php create mode 100644 vendor/symfony/mime/Exception/RfcComplianceException.php create mode 100644 vendor/symfony/mime/Exception/RuntimeException.php create mode 100644 vendor/symfony/mime/FileBinaryMimeTypeGuesser.php create mode 100644 vendor/symfony/mime/FileinfoMimeTypeGuesser.php create mode 100644 vendor/symfony/mime/Header/AbstractHeader.php create mode 100644 vendor/symfony/mime/Header/DateHeader.php create mode 100644 vendor/symfony/mime/Header/HeaderInterface.php create mode 100644 vendor/symfony/mime/Header/Headers.php create mode 100644 vendor/symfony/mime/Header/IdentificationHeader.php create mode 100644 vendor/symfony/mime/Header/MailboxHeader.php create mode 100644 vendor/symfony/mime/Header/MailboxListHeader.php create mode 100644 vendor/symfony/mime/Header/ParameterizedHeader.php create mode 100644 vendor/symfony/mime/Header/PathHeader.php create mode 100644 vendor/symfony/mime/Header/UnstructuredHeader.php create mode 100644 vendor/symfony/mime/LICENSE create mode 100644 vendor/symfony/mime/Message.php create mode 100644 vendor/symfony/mime/MessageConverter.php create mode 100644 vendor/symfony/mime/MimeTypeGuesserInterface.php create mode 100644 vendor/symfony/mime/MimeTypes.php create mode 100644 vendor/symfony/mime/MimeTypesInterface.php create mode 100644 vendor/symfony/mime/NamedAddress.php create mode 100644 vendor/symfony/mime/Part/AbstractMultipartPart.php create mode 100644 vendor/symfony/mime/Part/AbstractPart.php create mode 100644 vendor/symfony/mime/Part/DataPart.php create mode 100644 vendor/symfony/mime/Part/MessagePart.php create mode 100644 vendor/symfony/mime/Part/Multipart/AlternativePart.php create mode 100644 vendor/symfony/mime/Part/Multipart/DigestPart.php create mode 100644 vendor/symfony/mime/Part/Multipart/FormDataPart.php create mode 100644 vendor/symfony/mime/Part/Multipart/MixedPart.php create mode 100644 vendor/symfony/mime/Part/Multipart/RelatedPart.php create mode 100644 vendor/symfony/mime/Part/TextPart.php create mode 100644 vendor/symfony/mime/README.md create mode 100644 vendor/symfony/mime/RawMessage.php create mode 100644 vendor/symfony/mime/Resources/bin/update_mime_types.php create mode 100644 vendor/symfony/mime/Tests/AbstractMimeTypeGuesserTest.php create mode 100644 vendor/symfony/mime/Tests/AddressTest.php create mode 100644 vendor/symfony/mime/Tests/CharacterStreamTest.php create mode 100644 vendor/symfony/mime/Tests/DependencyInjection/AddMimeTypeGuesserPassTest.php create mode 100644 vendor/symfony/mime/Tests/EmailTest.php create mode 100644 vendor/symfony/mime/Tests/Encoder/Base64EncoderTest.php create mode 100644 vendor/symfony/mime/Tests/Encoder/Base64MimeHeaderEncoderTest.php create mode 100644 vendor/symfony/mime/Tests/Encoder/QpEncoderTest.php create mode 100644 vendor/symfony/mime/Tests/Encoder/QpMimeHeaderEncoderTest.php create mode 100644 vendor/symfony/mime/Tests/Encoder/Rfc2231EncoderTest.php create mode 100644 vendor/symfony/mime/Tests/FileBinaryMimeTypeGuesserTest.php create mode 100644 vendor/symfony/mime/Tests/FileinfoMimeTypeGuesserTest.php create mode 100644 vendor/symfony/mime/Tests/Fixtures/mimetypes/.unknownextension create mode 100644 vendor/symfony/mime/Tests/Fixtures/mimetypes/directory/.empty create mode 100644 vendor/symfony/mime/Tests/Fixtures/mimetypes/other-file.example create mode 100644 vendor/symfony/mime/Tests/Fixtures/mimetypes/test create mode 100644 vendor/symfony/mime/Tests/Fixtures/mimetypes/test.gif create mode 100644 vendor/symfony/mime/Tests/Fixtures/samples/charsets/iso-2022-jp/one.txt create mode 100644 vendor/symfony/mime/Tests/Fixtures/samples/charsets/iso-8859-1/one.txt create mode 100644 vendor/symfony/mime/Tests/Fixtures/samples/charsets/utf-8/one.txt create mode 100644 vendor/symfony/mime/Tests/Fixtures/samples/charsets/utf-8/three.txt create mode 100644 vendor/symfony/mime/Tests/Fixtures/samples/charsets/utf-8/two.txt create mode 100644 vendor/symfony/mime/Tests/Header/DateHeaderTest.php create mode 100644 vendor/symfony/mime/Tests/Header/HeadersTest.php create mode 100644 vendor/symfony/mime/Tests/Header/IdentificationHeaderTest.php create mode 100644 vendor/symfony/mime/Tests/Header/MailboxHeaderTest.php create mode 100644 vendor/symfony/mime/Tests/Header/MailboxListHeaderTest.php create mode 100644 vendor/symfony/mime/Tests/Header/ParameterizedHeaderTest.php create mode 100644 vendor/symfony/mime/Tests/Header/PathHeaderTest.php create mode 100644 vendor/symfony/mime/Tests/Header/UnstructuredHeaderTest.php create mode 100644 vendor/symfony/mime/Tests/MessageConverterTest.php create mode 100644 vendor/symfony/mime/Tests/MessageTest.php create mode 100644 vendor/symfony/mime/Tests/MimeTypesTest.php create mode 100644 vendor/symfony/mime/Tests/NamedAddressTest.php create mode 100644 vendor/symfony/mime/Tests/Part/DataPartTest.php create mode 100644 vendor/symfony/mime/Tests/Part/MessagePartTest.php create mode 100644 vendor/symfony/mime/Tests/Part/Multipart/AlternativePartTest.php create mode 100644 vendor/symfony/mime/Tests/Part/Multipart/DigestPartTest.php create mode 100644 vendor/symfony/mime/Tests/Part/Multipart/FormDataPartTest.php create mode 100644 vendor/symfony/mime/Tests/Part/Multipart/MixedPartTest.php create mode 100644 vendor/symfony/mime/Tests/Part/Multipart/RelatedPartTest.php create mode 100644 vendor/symfony/mime/Tests/Part/TextPartTest.php create mode 100644 vendor/symfony/mime/Tests/RawMessageTest.php create mode 100644 vendor/symfony/mime/composer.json rename vendor/symfony/{contracts => mime}/phpunit.xml.dist (87%) create mode 100644 vendor/symfony/polyfill-iconv/Iconv.php create mode 100644 vendor/symfony/polyfill-iconv/LICENSE create mode 100644 vendor/symfony/polyfill-iconv/README.md create mode 100644 vendor/symfony/polyfill-iconv/Resources/charset/from.big5.php create mode 100644 vendor/symfony/polyfill-iconv/Resources/charset/from.cp037.php create mode 100644 vendor/symfony/polyfill-iconv/Resources/charset/from.cp1006.php create mode 100644 vendor/symfony/polyfill-iconv/Resources/charset/from.cp1026.php create mode 100644 vendor/symfony/polyfill-iconv/Resources/charset/from.cp424.php create mode 100644 vendor/symfony/polyfill-iconv/Resources/charset/from.cp437.php create mode 100644 vendor/symfony/polyfill-iconv/Resources/charset/from.cp500.php create mode 100644 vendor/symfony/polyfill-iconv/Resources/charset/from.cp737.php create mode 100644 vendor/symfony/polyfill-iconv/Resources/charset/from.cp775.php create mode 100644 vendor/symfony/polyfill-iconv/Resources/charset/from.cp850.php create mode 100644 vendor/symfony/polyfill-iconv/Resources/charset/from.cp852.php create mode 100644 vendor/symfony/polyfill-iconv/Resources/charset/from.cp855.php create mode 100644 vendor/symfony/polyfill-iconv/Resources/charset/from.cp856.php create mode 100644 vendor/symfony/polyfill-iconv/Resources/charset/from.cp857.php create mode 100644 vendor/symfony/polyfill-iconv/Resources/charset/from.cp860.php create mode 100644 vendor/symfony/polyfill-iconv/Resources/charset/from.cp861.php create mode 100644 vendor/symfony/polyfill-iconv/Resources/charset/from.cp862.php create mode 100644 vendor/symfony/polyfill-iconv/Resources/charset/from.cp863.php create mode 100644 vendor/symfony/polyfill-iconv/Resources/charset/from.cp864.php create mode 100644 vendor/symfony/polyfill-iconv/Resources/charset/from.cp865.php create mode 100644 vendor/symfony/polyfill-iconv/Resources/charset/from.cp866.php create mode 100644 vendor/symfony/polyfill-iconv/Resources/charset/from.cp869.php create mode 100644 vendor/symfony/polyfill-iconv/Resources/charset/from.cp874.php create mode 100644 vendor/symfony/polyfill-iconv/Resources/charset/from.cp875.php create mode 100644 vendor/symfony/polyfill-iconv/Resources/charset/from.cp932.php create mode 100644 vendor/symfony/polyfill-iconv/Resources/charset/from.cp936.php create mode 100644 vendor/symfony/polyfill-iconv/Resources/charset/from.cp949.php create mode 100644 vendor/symfony/polyfill-iconv/Resources/charset/from.cp950.php create mode 100644 vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-1.php create mode 100644 vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-10.php create mode 100644 vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-11.php create mode 100644 vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-13.php create mode 100644 vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-14.php create mode 100644 vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-15.php create mode 100644 vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-16.php create mode 100644 vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-2.php create mode 100644 vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-3.php create mode 100644 vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-4.php create mode 100644 vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-5.php create mode 100644 vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-6.php create mode 100644 vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-7.php create mode 100644 vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-8.php create mode 100644 vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-9.php create mode 100644 vendor/symfony/polyfill-iconv/Resources/charset/from.koi8-r.php create mode 100644 vendor/symfony/polyfill-iconv/Resources/charset/from.koi8-u.php create mode 100644 vendor/symfony/polyfill-iconv/Resources/charset/from.us-ascii.php create mode 100644 vendor/symfony/polyfill-iconv/Resources/charset/from.windows-1250.php create mode 100644 vendor/symfony/polyfill-iconv/Resources/charset/from.windows-1251.php create mode 100644 vendor/symfony/polyfill-iconv/Resources/charset/from.windows-1252.php create mode 100644 vendor/symfony/polyfill-iconv/Resources/charset/from.windows-1253.php create mode 100644 vendor/symfony/polyfill-iconv/Resources/charset/from.windows-1254.php create mode 100644 vendor/symfony/polyfill-iconv/Resources/charset/from.windows-1255.php create mode 100644 vendor/symfony/polyfill-iconv/Resources/charset/from.windows-1256.php create mode 100644 vendor/symfony/polyfill-iconv/Resources/charset/from.windows-1257.php create mode 100644 vendor/symfony/polyfill-iconv/Resources/charset/from.windows-1258.php create mode 100644 vendor/symfony/polyfill-iconv/Resources/charset/translit.php create mode 100644 vendor/symfony/polyfill-iconv/bootstrap.php create mode 100644 vendor/symfony/polyfill-iconv/composer.json create mode 100644 vendor/symfony/polyfill-intl-idn/Idn.php create mode 100644 vendor/symfony/polyfill-intl-idn/LICENSE create mode 100644 vendor/symfony/polyfill-intl-idn/README.md create mode 100644 vendor/symfony/polyfill-intl-idn/bootstrap.php create mode 100644 vendor/symfony/polyfill-intl-idn/composer.json create mode 100644 vendor/symfony/polyfill-php73/LICENSE create mode 100644 vendor/symfony/polyfill-php73/Php73.php create mode 100644 vendor/symfony/polyfill-php73/README.md create mode 100644 vendor/symfony/polyfill-php73/Resources/stubs/JsonException.php create mode 100644 vendor/symfony/polyfill-php73/bootstrap.php create mode 100644 vendor/symfony/polyfill-php73/composer.json create mode 100644 vendor/symfony/process/Tests/ErrorProcessInitiator.php create mode 100644 vendor/symfony/routing/Generator/CompiledUrlGenerator.php create mode 100644 vendor/symfony/routing/Generator/Dumper/CompiledUrlGeneratorDumper.php create mode 100644 vendor/symfony/routing/Matcher/CompiledUrlMatcher.php create mode 100644 vendor/symfony/routing/Matcher/Dumper/CompiledUrlMatcherDumper.php rename vendor/symfony/routing/Matcher/Dumper/{PhpMatcherTrait.php => CompiledUrlMatcherTrait.php} (69%) create mode 100644 vendor/symfony/routing/Tests/Fixtures/AnnotatedClasses/EncodingClass.php create mode 100644 vendor/symfony/routing/Tests/Fixtures/AnnotationFixtures/GlobalDefaultsClass.php create mode 100644 vendor/symfony/routing/Tests/Fixtures/AnnotationFixtures/Utf8ActionControllers.php create mode 100644 vendor/symfony/routing/Tests/Fixtures/defaults.php create mode 100644 vendor/symfony/routing/Tests/Fixtures/defaults.xml create mode 100644 vendor/symfony/routing/Tests/Fixtures/defaults.yml create mode 100644 vendor/symfony/routing/Tests/Fixtures/dumper/compiled_url_matcher0.php create mode 100644 vendor/symfony/routing/Tests/Fixtures/dumper/compiled_url_matcher1.php create mode 100644 vendor/symfony/routing/Tests/Fixtures/dumper/compiled_url_matcher10.php create mode 100644 vendor/symfony/routing/Tests/Fixtures/dumper/compiled_url_matcher11.php create mode 100644 vendor/symfony/routing/Tests/Fixtures/dumper/compiled_url_matcher12.php create mode 100644 vendor/symfony/routing/Tests/Fixtures/dumper/compiled_url_matcher13.php create mode 100644 vendor/symfony/routing/Tests/Fixtures/dumper/compiled_url_matcher2.php create mode 100644 vendor/symfony/routing/Tests/Fixtures/dumper/compiled_url_matcher3.php create mode 100644 vendor/symfony/routing/Tests/Fixtures/dumper/compiled_url_matcher4.php create mode 100644 vendor/symfony/routing/Tests/Fixtures/dumper/compiled_url_matcher5.php create mode 100644 vendor/symfony/routing/Tests/Fixtures/dumper/compiled_url_matcher6.php create mode 100644 vendor/symfony/routing/Tests/Fixtures/dumper/compiled_url_matcher7.php create mode 100644 vendor/symfony/routing/Tests/Fixtures/dumper/compiled_url_matcher8.php create mode 100644 vendor/symfony/routing/Tests/Fixtures/dumper/compiled_url_matcher9.php create mode 100644 vendor/symfony/routing/Tests/Fixtures/imported-with-defaults.php create mode 100644 vendor/symfony/routing/Tests/Fixtures/imported-with-defaults.xml create mode 100644 vendor/symfony/routing/Tests/Fixtures/imported-with-defaults.yml create mode 100644 vendor/symfony/routing/Tests/Fixtures/importer-with-defaults.php create mode 100644 vendor/symfony/routing/Tests/Fixtures/importer-with-defaults.xml create mode 100644 vendor/symfony/routing/Tests/Fixtures/importer-with-defaults.yml create mode 100644 vendor/symfony/routing/Tests/Fixtures/localized/imported-with-utf8.php create mode 100644 vendor/symfony/routing/Tests/Fixtures/localized/imported-with-utf8.xml create mode 100644 vendor/symfony/routing/Tests/Fixtures/localized/imported-with-utf8.yml create mode 100644 vendor/symfony/routing/Tests/Fixtures/localized/importer-with-utf8.php create mode 100644 vendor/symfony/routing/Tests/Fixtures/localized/importer-with-utf8.xml create mode 100644 vendor/symfony/routing/Tests/Fixtures/localized/importer-with-utf8.yml create mode 100644 vendor/symfony/routing/Tests/Fixtures/localized/utf8.php create mode 100644 vendor/symfony/routing/Tests/Fixtures/localized/utf8.xml create mode 100644 vendor/symfony/routing/Tests/Fixtures/localized/utf8.yml create mode 100644 vendor/symfony/routing/Tests/Generator/Dumper/CompiledUrlGeneratorDumperTest.php create mode 100644 vendor/symfony/routing/Tests/Matcher/CompiledRedirectableUrlMatcherTest.php create mode 100644 vendor/symfony/routing/Tests/Matcher/CompiledUrlMatcherTest.php create mode 100644 vendor/symfony/routing/Tests/Matcher/Dumper/CompiledUrlMatcherDumperTest.php create mode 100644 vendor/symfony/service-contracts/LICENSE create mode 100644 vendor/symfony/service-contracts/README.md rename vendor/symfony/{contracts/Service => service-contracts}/ResetInterface.php (100%) rename vendor/symfony/{contracts/Service => service-contracts}/ServiceLocatorTrait.php (78%) create mode 100644 vendor/symfony/service-contracts/ServiceProviderInterface.php rename vendor/symfony/{contracts/Service => service-contracts}/ServiceSubscriberInterface.php (71%) rename vendor/symfony/{contracts/Service => service-contracts}/ServiceSubscriberTrait.php (90%) rename vendor/symfony/{contracts/Tests/Service => service-contracts/Test}/ServiceLocatorTest.php (87%) create mode 100644 vendor/symfony/service-contracts/composer.json create mode 100644 vendor/symfony/translation-contracts/LICENSE rename vendor/symfony/{contracts/Translation => translation-contracts}/LocaleAwareInterface.php (100%) create mode 100644 vendor/symfony/translation-contracts/README.md rename vendor/symfony/{contracts/Tests/Translation => translation-contracts/Test}/TranslatorTest.php (50%) rename vendor/symfony/{contracts/Translation => translation-contracts}/TranslatorInterface.php (96%) rename vendor/symfony/{contracts/Translation => translation-contracts}/TranslatorTrait.php (98%) create mode 100644 vendor/symfony/translation-contracts/composer.json create mode 100644 vendor/symfony/translation/DependencyInjection/TranslatorPathsPass.php create mode 100644 vendor/symfony/translation/Resources/bin/translation-status.php create mode 100644 vendor/symfony/translation/Tests/DependencyInjection/TranslationPathsPassTest.php create mode 100644 vendor/symfony/translation/Tests/DependencyInjection/fixtures/ControllerArguments.php create mode 100644 vendor/symfony/translation/Tests/DependencyInjection/fixtures/ServiceArguments.php create mode 100644 vendor/symfony/translation/Tests/DependencyInjection/fixtures/ServiceMethodCalls.php create mode 100644 vendor/symfony/translation/Tests/DependencyInjection/fixtures/ServiceProperties.php create mode 100644 vendor/symfony/translation/Tests/DependencyInjection/fixtures/ServiceSubscriber.php create mode 100644 vendor/symfony/translation/Tests/fixtures/resources-2.0+intl-icu.xlf create mode 100644 vendor/symfony/translation/Tests/fixtures/resources-multi-files.xlf create mode 100644 vendor/symfony/var-dumper/Caster/DsCaster.php create mode 100644 vendor/symfony/var-dumper/Caster/DsPairStub.php create mode 100644 vendor/theseer/tokenizer/CHANGELOG.md create mode 100644 vendor/vlucas/phpdotenv/src/Parser.php delete mode 100644 vendor/zendframework/zend-diactoros/.coveralls.yml delete mode 100644 vendor/zendframework/zend-diactoros/CONDUCT.md delete mode 100644 vendor/zendframework/zend-diactoros/CONTRIBUTING.md delete mode 100644 vendor/zendframework/zend-diactoros/composer.lock delete mode 100644 vendor/zendframework/zend-diactoros/mkdocs.yml delete mode 100644 vendor/zendframework/zend-diactoros/src/Exception/DeprecatedMethodException.php create mode 100644 vendor/zendframework/zend-diactoros/src/Exception/DeserializationException.php create mode 100644 vendor/zendframework/zend-diactoros/src/Exception/InvalidArgumentException.php create mode 100644 vendor/zendframework/zend-diactoros/src/Exception/InvalidStreamPointerPositionException.php create mode 100644 vendor/zendframework/zend-diactoros/src/Exception/SerializationException.php create mode 100644 vendor/zendframework/zend-diactoros/src/Exception/UnreadableStreamException.php create mode 100644 vendor/zendframework/zend-diactoros/src/Exception/UnrecognizedProtocolVersionException.php create mode 100644 vendor/zendframework/zend-diactoros/src/Exception/UnrewindableStreamException.php create mode 100644 vendor/zendframework/zend-diactoros/src/Exception/UnseekableStreamException.php create mode 100644 vendor/zendframework/zend-diactoros/src/Exception/UntellableStreamException.php create mode 100644 vendor/zendframework/zend-diactoros/src/Exception/UnwritableStreamException.php create mode 100644 vendor/zendframework/zend-diactoros/src/Exception/UploadedFileAlreadyMovedException.php create mode 100644 vendor/zendframework/zend-diactoros/src/Exception/UploadedFileErrorException.php create mode 100644 vendor/zendframework/zend-diactoros/src/RequestFactory.php delete mode 100644 vendor/zendframework/zend-diactoros/src/Response/EmitterInterface.php delete mode 100644 vendor/zendframework/zend-diactoros/src/Response/SapiEmitter.php delete mode 100644 vendor/zendframework/zend-diactoros/src/Response/SapiEmitterTrait.php delete mode 100644 vendor/zendframework/zend-diactoros/src/Response/SapiStreamEmitter.php create mode 100644 vendor/zendframework/zend-diactoros/src/ResponseFactory.php delete mode 100644 vendor/zendframework/zend-diactoros/src/Server.php create mode 100644 vendor/zendframework/zend-diactoros/src/StreamFactory.php create mode 100644 vendor/zendframework/zend-diactoros/src/UploadedFileFactory.php create mode 100644 vendor/zendframework/zend-diactoros/src/UriFactory.php diff --git a/composer.lock b/composer.lock index 8d704044..a5141f9d 100644 --- a/composer.lock +++ b/composer.lock @@ -8,16 +8,16 @@ "packages": [ { "name": "clue/stream-filter", - "version": "v1.4.0", + "version": "v1.4.1", "source": { "type": "git", "url": "https://github.com/clue/php-stream-filter.git", - "reference": "d80fdee9b3a7e0d16fc330a22f41f3ad0eeb09d0" + "reference": "5a58cc30a8bd6a4eb8f856adf61dd3e013f53f71" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/clue/php-stream-filter/zipball/d80fdee9b3a7e0d16fc330a22f41f3ad0eeb09d0", - "reference": "d80fdee9b3a7e0d16fc330a22f41f3ad0eeb09d0", + "url": "https://api.github.com/repos/clue/php-stream-filter/zipball/5a58cc30a8bd6a4eb8f856adf61dd3e013f53f71", + "reference": "5a58cc30a8bd6a4eb8f856adf61dd3e013f53f71", "shasum": "" }, "require": { @@ -32,7 +32,7 @@ "Clue\\StreamFilter\\": "src/" }, "files": [ - "src/functions.php" + "src/functions_include.php" ] }, "notification-url": "https://packagist.org/downloads/", @@ -56,7 +56,7 @@ "stream_filter_append", "stream_filter_register" ], - "time": "2017-08-18T09:54:01+00:00" + "time": "2019-04-09T12:31:48+00:00" }, { "name": "dnoegel/php-xdg-base-dir", @@ -160,21 +160,24 @@ }, { "name": "doctrine/lexer", - "version": "v1.0.1", + "version": "1.0.2", "source": { "type": "git", "url": "https://github.com/doctrine/lexer.git", - "reference": "83893c552fd2045dd78aef794c31e694c37c0b8c" + "reference": "1febd6c3ef84253d7c815bed85fc622ad207a9f8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/83893c552fd2045dd78aef794c31e694c37c0b8c", - "reference": "83893c552fd2045dd78aef794c31e694c37c0b8c", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/1febd6c3ef84253d7c815bed85fc622ad207a9f8", + "reference": "1febd6c3ef84253d7c815bed85fc622ad207a9f8", "shasum": "" }, "require": { "php": ">=5.3.2" }, + "require-dev": { + "phpunit/phpunit": "^4.5" + }, "type": "library", "extra": { "branch-alias": { @@ -182,8 +185,8 @@ } }, "autoload": { - "psr-0": { - "Doctrine\\Common\\Lexer\\": "lib/" + "psr-4": { + "Doctrine\\Common\\Lexer\\": "lib/Doctrine/Common/Lexer" } }, "notification-url": "https://packagist.org/downloads/", @@ -204,35 +207,43 @@ "email": "schmittjoh@gmail.com" } ], - "description": "Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.", - "homepage": "http://www.doctrine-project.org", + "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.", + "homepage": "https://www.doctrine-project.org/projects/lexer.html", "keywords": [ + "annotations", + "docblock", "lexer", - "parser" + "parser", + "php" ], - "time": "2014-09-09T13:34:57+00:00" + "time": "2019-06-08T11:03:04+00:00" }, { "name": "dragonmantank/cron-expression", - "version": "v2.2.0", + "version": "v2.3.0", "source": { "type": "git", "url": "https://github.com/dragonmantank/cron-expression.git", - "reference": "92a2c3768d50e21a1f26a53cb795ce72806266c5" + "reference": "72b6fbf76adb3cf5bc0db68559b33d41219aba27" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/dragonmantank/cron-expression/zipball/92a2c3768d50e21a1f26a53cb795ce72806266c5", - "reference": "92a2c3768d50e21a1f26a53cb795ce72806266c5", + "url": "https://api.github.com/repos/dragonmantank/cron-expression/zipball/72b6fbf76adb3cf5bc0db68559b33d41219aba27", + "reference": "72b6fbf76adb3cf5bc0db68559b33d41219aba27", "shasum": "" }, "require": { - "php": ">=7.0.0" + "php": "^7.0" }, "require-dev": { - "phpunit/phpunit": "~6.4" + "phpunit/phpunit": "^6.4|^7.0" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.3-dev" + } + }, "autoload": { "psr-4": { "Cron\\": "src/Cron/" @@ -259,20 +270,20 @@ "cron", "schedule" ], - "time": "2018-06-06T03:12:17+00:00" + "time": "2019-03-31T00:38:28+00:00" }, { "name": "egulias/email-validator", - "version": "2.1.7", + "version": "2.1.8", "source": { "type": "git", "url": "https://github.com/egulias/EmailValidator.git", - "reference": "709f21f92707308cdf8f9bcfa1af4cb26586521e" + "reference": "c26463ff9241f27907112fbcd0c86fa670cfef98" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/709f21f92707308cdf8f9bcfa1af4cb26586521e", - "reference": "709f21f92707308cdf8f9bcfa1af4cb26586521e", + "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/c26463ff9241f27907112fbcd0c86fa670cfef98", + "reference": "c26463ff9241f27907112fbcd0c86fa670cfef98", "shasum": "" }, "require": { @@ -316,20 +327,20 @@ "validation", "validator" ], - "time": "2018-12-04T22:38:24+00:00" + "time": "2019-05-16T22:02:54+00:00" }, { "name": "erusev/parsedown", - "version": "1.7.1", + "version": "1.7.3", "source": { "type": "git", "url": "https://github.com/erusev/parsedown.git", - "reference": "92e9c27ba0e74b8b028b111d1b6f956a15c01fc1" + "reference": "6d893938171a817f4e9bc9e86f2da1e370b7bcd7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/erusev/parsedown/zipball/92e9c27ba0e74b8b028b111d1b6f956a15c01fc1", - "reference": "92e9c27ba0e74b8b028b111d1b6f956a15c01fc1", + "url": "https://api.github.com/repos/erusev/parsedown/zipball/6d893938171a817f4e9bc9e86f2da1e370b7bcd7", + "reference": "6d893938171a817f4e9bc9e86f2da1e370b7bcd7", "shasum": "" }, "require": { @@ -362,7 +373,7 @@ "markdown", "parser" ], - "time": "2018-03-08T01:11:30+00:00" + "time": "2019-03-17T18:48:37+00:00" }, { "name": "fideloper/proxy", @@ -420,33 +431,33 @@ }, { "name": "graham-campbell/cache-plugin", - "version": "v1.0.0", + "version": "v1.1.0", "source": { "type": "git", "url": "https://github.com/GrahamCampbell/Cache-Plugin.git", - "reference": "f1a3c5c95e9734e3653fa4bba43800ee41c79484" + "reference": "7090dd5e4a07f5c9c8e8a4ff65c3c57dab536b78" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/GrahamCampbell/Cache-Plugin/zipball/f1a3c5c95e9734e3653fa4bba43800ee41c79484", - "reference": "f1a3c5c95e9734e3653fa4bba43800ee41c79484", + "url": "https://api.github.com/repos/GrahamCampbell/Cache-Plugin/zipball/7090dd5e4a07f5c9c8e8a4ff65c3c57dab536b78", + "reference": "7090dd5e4a07f5c9c8e8a4ff65c3c57dab536b78", "shasum": "" }, "require": { "php": "^7.0", - "php-http/cache-plugin": "^1.5", - "php-http/client-common": "^1.7", + "php-http/cache-plugin": "^1.6", + "php-http/client-common": "^1.9|^2.0", "php-http/message-factory": "^1.0", "psr/cache": "^1.0" }, "require-dev": { - "graham-campbell/analyzer": "^2.0", + "graham-campbell/analyzer": "^2.1", "phpunit/phpunit": "^6.5|^7.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-master": "1.1-dev" } }, "autoload": { @@ -473,37 +484,37 @@ "cache", "http" ], - "time": "2018-03-17T14:01:43+00:00" + "time": "2019-01-27T13:36:25+00:00" }, { "name": "graham-campbell/github", - "version": "v7.5.0", + "version": "v7.7.0", "source": { "type": "git", "url": "https://github.com/GrahamCampbell/Laravel-GitHub.git", - "reference": "bed9ac8adfd14be344fb8ac3ab2f7ef1910b841e" + "reference": "eb61a055a03a5151cbbeedb3b0a357c4eeb2640d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/GrahamCampbell/Laravel-GitHub/zipball/bed9ac8adfd14be344fb8ac3ab2f7ef1910b841e", - "reference": "bed9ac8adfd14be344fb8ac3ab2f7ef1910b841e", + "url": "https://api.github.com/repos/GrahamCampbell/Laravel-GitHub/zipball/eb61a055a03a5151cbbeedb3b0a357c4eeb2640d", + "reference": "eb61a055a03a5151cbbeedb3b0a357c4eeb2640d", "shasum": "" }, "require": { "graham-campbell/cache-plugin": "^1.0", - "graham-campbell/manager": "^4.1", - "illuminate/contracts": "5.5.*|5.6.*|5.7.*", - "illuminate/support": "5.5.*|5.6.*|5.7.*", - "knplabs/github-api": "2.7.*|2.8.*|2.9.*|2.10.*", + "graham-campbell/manager": "^4.2", + "illuminate/contracts": "5.5.*|5.6.*|5.7.*|5.8.*", + "illuminate/support": "5.5.*|5.6.*|5.7.*|5.8.*", + "knplabs/github-api": "2.11.*", "php": "^7.1.3" }, "require-dev": { "graham-campbell/analyzer": "^2.1", - "graham-campbell/testbench": "^5.1", + "graham-campbell/testbench": "^5.2", "madewithlove/illuminate-psr-cache-bridge": "^1.0", "mockery/mockery": "^1.0", "php-http/guzzle6-adapter": "^1.0", - "phpunit/phpunit": "^6.5|^7.0" + "phpunit/phpunit": "^6.5|^7.0|^8.0" }, "suggest": { "madewithlove/illuminate-psr-cache-bridge": "Allows caching GitHub HTTP requests" @@ -511,7 +522,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "7.5-dev" + "dev-master": "7.7-dev" }, "laravel": { "providers": [ @@ -548,37 +559,37 @@ "laravel", "php-github-api" ], - "time": "2018-09-04T08:45:47+00:00" + "time": "2019-04-07T11:08:44+00:00" }, { "name": "graham-campbell/manager", - "version": "v4.1.0", + "version": "v4.2.1", "source": { "type": "git", "url": "https://github.com/GrahamCampbell/Laravel-Manager.git", - "reference": "9aff87cb08fa57a1b471bd74d84317c2abfc0f6b" + "reference": "ba3e236392665425723b2b967196aeeabc7f929f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/GrahamCampbell/Laravel-Manager/zipball/9aff87cb08fa57a1b471bd74d84317c2abfc0f6b", - "reference": "9aff87cb08fa57a1b471bd74d84317c2abfc0f6b", + "url": "https://api.github.com/repos/GrahamCampbell/Laravel-Manager/zipball/ba3e236392665425723b2b967196aeeabc7f929f", + "reference": "ba3e236392665425723b2b967196aeeabc7f929f", "shasum": "" }, "require": { - "illuminate/contracts": "5.5.*|5.6.*|5.7.*", - "illuminate/support": "5.5.*|5.6.*|5.7.*", + "illuminate/contracts": "5.5.*|5.6.*|5.7.*|5.8.*", + "illuminate/support": "5.5.*|5.6.*|5.7.*|5.8.*", "php": "^7.1.3" }, "require-dev": { "graham-campbell/analyzer": "^2.1", "graham-campbell/testbench-core": "^3.0", "mockery/mockery": "^1.0", - "phpunit/phpunit": "^6.5|^7.0" + "phpunit/phpunit": "^6.5|^7.0|^8.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.1-dev" + "dev-master": "4.2-dev" } }, "autoload": { @@ -608,7 +619,7 @@ "laravel", "manager" ], - "time": "2018-08-23T10:42:08+00:00" + "time": "2019-02-16T14:23:38+00:00" }, { "name": "guzzlehttp/guzzle", @@ -883,16 +894,16 @@ }, { "name": "knplabs/github-api", - "version": "2.10.1", + "version": "2.11.0", "source": { "type": "git", "url": "https://github.com/KnpLabs/php-github-api.git", - "reference": "493423ae7ad1fa9075924cdfb98537828b9e80b5" + "reference": "7e67b4ccf9ef62fbd6321a314c61d3202c07b855" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/KnpLabs/php-github-api/zipball/493423ae7ad1fa9075924cdfb98537828b9e80b5", - "reference": "493423ae7ad1fa9075924cdfb98537828b9e80b5", + "url": "https://api.github.com/repos/KnpLabs/php-github-api/zipball/7e67b4ccf9ef62fbd6321a314c61d3202c07b855", + "reference": "7e67b4ccf9ef62fbd6321a314c61d3202c07b855", "shasum": "" }, "require": { @@ -915,7 +926,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.10.x-dev" + "dev-master": "2.11.x-dev" } }, "autoload": { @@ -946,20 +957,65 @@ "gist", "github" ], - "time": "2018-09-05T19:12:14+00:00" + "time": "2019-01-28T19:31:35+00:00" }, { - "name": "laravel/framework", - "version": "v5.7.21", + "name": "kylekatarnls/update-helper", + "version": "1.1.1", "source": { "type": "git", - "url": "https://github.com/laravel/framework.git", - "reference": "25f74458a242b61cc9e9c09d31f94fb13ed805f3" + "url": "https://github.com/kylekatarnls/update-helper.git", + "reference": "b34a46d7f5ec1795b4a15ac9d46b884377262df9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/25f74458a242b61cc9e9c09d31f94fb13ed805f3", - "reference": "25f74458a242b61cc9e9c09d31f94fb13ed805f3", + "url": "https://api.github.com/repos/kylekatarnls/update-helper/zipball/b34a46d7f5ec1795b4a15ac9d46b884377262df9", + "reference": "b34a46d7f5ec1795b4a15ac9d46b884377262df9", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^1.1.0", + "php": ">=5.3.0" + }, + "require-dev": { + "codeclimate/php-test-reporter": "dev-master", + "composer/composer": "^2.0.x-dev", + "phpunit/phpunit": ">=4.8.35 <6.0" + }, + "type": "composer-plugin", + "extra": { + "class": "UpdateHelper\\ComposerPlugin" + }, + "autoload": { + "psr-0": { + "UpdateHelper\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Kyle", + "email": "kylekatarnls@gmail.com" + } + ], + "description": "Update helper", + "time": "2019-06-05T08:34:23+00:00" + }, + { + "name": "laravel/framework", + "version": "v5.7.28", + "source": { + "type": "git", + "url": "https://github.com/laravel/framework.git", + "reference": "8e69728f1c80a024588adbd24c65c4fcf9aa9192" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/framework/zipball/8e69728f1c80a024588adbd24c65c4fcf9aa9192", + "reference": "8e69728f1c80a024588adbd24c65c4fcf9aa9192", "shasum": "" }, "require": { @@ -1032,7 +1088,7 @@ "mockery/mockery": "^1.0", "moontoast/math": "^1.1", "orchestra/testbench-core": "3.7.*", - "pda/pheanstalk": "^3.0", + "pda/pheanstalk": "^3.0|^4.0", "phpunit/phpunit": "^7.5", "predis/predis": "^1.1.1", "symfony/css-selector": "^4.1", @@ -1054,7 +1110,7 @@ "league/flysystem-sftp": "Required to use the Flysystem SFTP driver (^1.0).", "moontoast/math": "Required to use ordered UUIDs (^1.1).", "nexmo/client": "Required to use the Nexmo transport (^1.0).", - "pda/pheanstalk": "Required to use the beanstalk queue driver (^3.0).", + "pda/pheanstalk": "Required to use the beanstalk queue driver (^3.0|^4.0).", "predis/predis": "Required to use the redis cache and queue drivers (^1.0).", "pusher/pusher-php-server": "Required to use the Pusher broadcast driver (^3.0).", "symfony/css-selector": "Required to use some of the crawler integration testing tools (^4.1).", @@ -1092,7 +1148,7 @@ "framework", "laravel" ], - "time": "2019-01-15T15:20:32+00:00" + "time": "2019-02-26T15:41:34+00:00" }, { "name": "laravel/nexmo-notification-channel", @@ -1341,33 +1397,30 @@ }, { "name": "lcobucci/jwt", - "version": "3.2.5", + "version": "3.3.1", "source": { "type": "git", "url": "https://github.com/lcobucci/jwt.git", - "reference": "82be04b4753f8b7693b62852b7eab30f97524f9b" + "reference": "a11ec5f4b4d75d1fcd04e133dede4c317aac9e18" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/lcobucci/jwt/zipball/82be04b4753f8b7693b62852b7eab30f97524f9b", - "reference": "82be04b4753f8b7693b62852b7eab30f97524f9b", + "url": "https://api.github.com/repos/lcobucci/jwt/zipball/a11ec5f4b4d75d1fcd04e133dede4c317aac9e18", + "reference": "a11ec5f4b4d75d1fcd04e133dede4c317aac9e18", "shasum": "" }, "require": { + "ext-mbstring": "*", "ext-openssl": "*", - "php": ">=5.5" + "php": "^5.6 || ^7.0" }, "require-dev": { - "mdanter/ecc": "~0.3.1", "mikey179/vfsstream": "~1.5", "phpmd/phpmd": "~2.2", "phpunit/php-invoker": "~1.1", - "phpunit/phpunit": "~4.5", + "phpunit/phpunit": "^5.7 || ^7.3", "squizlabs/php_codesniffer": "~2.3" }, - "suggest": { - "mdanter/ecc": "Required to use Elliptic Curves based algorithms." - }, "type": "library", "extra": { "branch-alias": { @@ -1387,7 +1440,7 @@ { "name": "Luís Otávio Cobucci Oblonczyk", "email": "lcobucci@gmail.com", - "role": "developer" + "role": "Developer" } ], "description": "A simple library to work with JSON Web Token and JSON Web Signature", @@ -1395,20 +1448,20 @@ "JWS", "jwt" ], - "time": "2018-11-11T12:22:26+00:00" + "time": "2019-05-24T18:30:49+00:00" }, { "name": "league/flysystem", - "version": "1.0.49", + "version": "1.0.52", "source": { "type": "git", "url": "https://github.com/thephpleague/flysystem.git", - "reference": "a63cc83d8a931b271be45148fa39ba7156782ffd" + "reference": "c5a5097156387970e6f0ccfcdf03f752856f3391" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/a63cc83d8a931b271be45148fa39ba7156782ffd", - "reference": "a63cc83d8a931b271be45148fa39ba7156782ffd", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/c5a5097156387970e6f0ccfcdf03f752856f3391", + "reference": "c5a5097156387970e6f0ccfcdf03f752856f3391", "shasum": "" }, "require": { @@ -1479,7 +1532,7 @@ "sftp", "storage" ], - "time": "2018-11-23T23:41:29+00:00" + "time": "2019-05-20T20:21:14+00:00" }, { "name": "monolog/monolog", @@ -1561,31 +1614,34 @@ }, { "name": "nesbot/carbon", - "version": "1.36.2", + "version": "1.38.4", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "cd324b98bc30290f233dd0e75e6ce49f7ab2a6c9" + "reference": "8dd4172bfe1784952c4d58c4db725d183b1c23ad" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/cd324b98bc30290f233dd0e75e6ce49f7ab2a6c9", - "reference": "cd324b98bc30290f233dd0e75e6ce49f7ab2a6c9", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/8dd4172bfe1784952c4d58c4db725d183b1c23ad", + "reference": "8dd4172bfe1784952c4d58c4db725d183b1c23ad", "shasum": "" }, "require": { + "kylekatarnls/update-helper": "^1.1", "php": ">=5.3.9", "symfony/translation": "~2.6 || ~3.0 || ~4.0" }, "require-dev": { + "composer/composer": "^1.2", + "friendsofphp/php-cs-fixer": "~2", "phpunit/phpunit": "^4.8.35 || ^5.7" }, - "suggest": { - "friendsofphp/php-cs-fixer": "Needed for the `composer phpcs` command. Allow to automatically fix code style.", - "phpstan/phpstan": "Needed for the `composer phpstan` command. Allow to detect potential errors." - }, + "bin": [ + "bin/upgrade-carbon" + ], "type": "library", "extra": { + "update-helper": "Carbon\\Upgrade", "laravel": { "providers": [ "Carbon\\Laravel\\ServiceProvider" @@ -1615,20 +1671,20 @@ "datetime", "time" ], - "time": "2018-12-28T10:07:33+00:00" + "time": "2019-06-03T15:41:40+00:00" }, { "name": "nexmo/client", - "version": "1.6.0", + "version": "1.8.1", "source": { "type": "git", "url": "https://github.com/Nexmo/nexmo-php.git", - "reference": "01809cc1e17a5af275913c49bb5d444eb6cc06d4" + "reference": "182d41a02ebd3e4be147baea45458ccfe2f528c4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Nexmo/nexmo-php/zipball/01809cc1e17a5af275913c49bb5d444eb6cc06d4", - "reference": "01809cc1e17a5af275913c49bb5d444eb6cc06d4", + "url": "https://api.github.com/repos/Nexmo/nexmo-php/zipball/182d41a02ebd3e4be147baea45458ccfe2f528c4", + "reference": "182d41a02ebd3e4be147baea45458ccfe2f528c4", "shasum": "" }, "require": { @@ -1636,7 +1692,7 @@ "php": ">=5.6", "php-http/client-implementation": "^1.0", "php-http/guzzle6-adapter": "^1.0", - "zendframework/zend-diactoros": "^1.3" + "zendframework/zend-diactoros": "^1.8.4 || ^2.0" }, "require-dev": { "estahn/phpunit-json-assertions": "^1.0.0", @@ -1663,20 +1719,20 @@ } ], "description": "PHP Client for using Nexmo's API.", - "time": "2018-12-17T10:47:50+00:00" + "time": "2019-05-13T20:27:43+00:00" }, { "name": "nikic/php-parser", - "version": "v4.2.0", + "version": "v4.2.2", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "594bcae1fc0bccd3993d2f0d61a018e26ac2865a" + "reference": "1bd73cc04c3843ad8d6b0bfc0956026a151fc420" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/594bcae1fc0bccd3993d2f0d61a018e26ac2865a", - "reference": "594bcae1fc0bccd3993d2f0d61a018e26ac2865a", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/1bd73cc04c3843ad8d6b0bfc0956026a151fc420", + "reference": "1bd73cc04c3843ad8d6b0bfc0956026a151fc420", "shasum": "" }, "require": { @@ -1714,20 +1770,20 @@ "parser", "php" ], - "time": "2019-01-12T16:31:37+00:00" + "time": "2019-05-25T20:07:01+00:00" }, { "name": "opis/closure", - "version": "3.1.5", + "version": "3.3.0", "source": { "type": "git", "url": "https://github.com/opis/closure.git", - "reference": "41f5da65d75cf473e5ee582df8fc7f2c733ce9d6" + "reference": "f846725591203098246276b2e7b9e8b7814c4965" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/opis/closure/zipball/41f5da65d75cf473e5ee582df8fc7f2c733ce9d6", - "reference": "41f5da65d75cf473e5ee582df8fc7f2c733ce9d6", + "url": "https://api.github.com/repos/opis/closure/zipball/f846725591203098246276b2e7b9e8b7814c4965", + "reference": "f846725591203098246276b2e7b9e8b7814c4965", "shasum": "" }, "require": { @@ -1735,12 +1791,12 @@ }, "require-dev": { "jeremeamia/superclosure": "^2.0", - "phpunit/phpunit": "^4.0|^5.0|^6.0|^7.0" + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1.x-dev" + "dev-master": "3.3.x-dev" } }, "autoload": { @@ -1775,7 +1831,7 @@ "serialization", "serialize" ], - "time": "2019-01-14T14:45:33+00:00" + "time": "2019-05-31T20:04:32+00:00" }, { "name": "paragonie/random_compat", @@ -1824,21 +1880,21 @@ }, { "name": "php-http/cache-plugin", - "version": "v1.5.0", + "version": "1.6.0", "source": { "type": "git", "url": "https://github.com/php-http/cache-plugin.git", - "reference": "c573ac6ea9b4e33fad567f875b844229d18000b9" + "reference": "8e2505d2090316fac7cce637b39b6bbb5249c5a8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-http/cache-plugin/zipball/c573ac6ea9b4e33fad567f875b844229d18000b9", - "reference": "c573ac6ea9b4e33fad567f875b844229d18000b9", + "url": "https://api.github.com/repos/php-http/cache-plugin/zipball/8e2505d2090316fac7cce637b39b6bbb5249c5a8", + "reference": "8e2505d2090316fac7cce637b39b6bbb5249c5a8", "shasum": "" }, "require": { "php": "^5.4 || ^7.0", - "php-http/client-common": "^1.1", + "php-http/client-common": "^1.9 || ^2.0", "php-http/message-factory": "^1.0", "psr/cache": "^1.0", "symfony/options-resolver": "^2.6 || ^3.0 || ^4.0" @@ -1850,7 +1906,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.5-dev" + "dev-master": "1.6-dev" } }, "autoload": { @@ -1876,20 +1932,20 @@ "httplug", "plugin" ], - "time": "2017-11-29T20:45:41+00:00" + "time": "2019-01-23T16:51:58+00:00" }, { "name": "php-http/client-common", - "version": "1.9.0", + "version": "1.9.1", "source": { "type": "git", "url": "https://github.com/php-http/client-common.git", - "reference": "9c21b6058caafdf2fcc99a0cabdf31b3ecb33961" + "reference": "0e156a12cc3e46f590c73bf57592a2252fc3dc48" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-http/client-common/zipball/9c21b6058caafdf2fcc99a0cabdf31b3ecb33961", - "reference": "9c21b6058caafdf2fcc99a0cabdf31b3ecb33961", + "url": "https://api.github.com/repos/php-http/client-common/zipball/0e156a12cc3e46f590c73bf57592a2252fc3dc48", + "reference": "0e156a12cc3e46f590c73bf57592a2252fc3dc48", "shasum": "" }, "require": { @@ -1937,20 +1993,20 @@ "http", "httplug" ], - "time": "2019-01-03T10:59:55+00:00" + "time": "2019-02-02T07:03:15+00:00" }, { "name": "php-http/discovery", - "version": "1.5.2", + "version": "1.6.1", "source": { "type": "git", "url": "https://github.com/php-http/discovery.git", - "reference": "ffef11d54171336d841a34816a35bc035fb8cef0" + "reference": "684855f2c2e9d0a61868b8f8d6bd0295c8a4b651" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-http/discovery/zipball/ffef11d54171336d841a34816a35bc035fb8cef0", - "reference": "ffef11d54171336d841a34816a35bc035fb8cef0", + "url": "https://api.github.com/repos/php-http/discovery/zipball/684855f2c2e9d0a61868b8f8d6bd0295c8a4b651", + "reference": "684855f2c2e9d0a61868b8f8d6bd0295c8a4b651", "shasum": "" }, "require": { @@ -1960,8 +2016,7 @@ "nyholm/psr7": "<1.0" }, "require-dev": { - "henrikbjorn/phpspec-code-coverage": "^2.0.2", - "php-http/httplug": "^1.0|^2.0", + "php-http/httplug": "^1.0 || ^2.0", "php-http/message-factory": "^1.0", "phpspec/phpspec": "^2.4", "puli/composer-plugin": "1.0.0-beta10" @@ -2002,7 +2057,7 @@ "message", "psr7" ], - "time": "2018-12-31T07:31:26+00:00" + "time": "2019-02-23T07:42:53+00:00" }, { "name": "php-http/guzzle6-adapter", @@ -2387,6 +2442,58 @@ ], "time": "2017-02-14T16:28:37+00:00" }, + { + "name": "psr/http-factory", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-factory.git", + "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-factory/zipball/12ac7fcd07e5b077433f5f2bee95b3a771bf61be", + "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be", + "shasum": "" + }, + "require": { + "php": ">=7.0.0", + "psr/http-message": "^1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interfaces for PSR-7 HTTP message factories", + "keywords": [ + "factory", + "http", + "message", + "psr", + "psr-17", + "psr-7", + "request", + "response" + ], + "time": "2019-04-30T12:38:16+00:00" + }, { "name": "psr/http-message", "version": "1.0.1", @@ -2730,25 +2837,28 @@ }, { "name": "swiftmailer/swiftmailer", - "version": "v6.1.3", + "version": "v6.2.1", "source": { "type": "git", "url": "https://github.com/swiftmailer/swiftmailer.git", - "reference": "8ddcb66ac10c392d3beb54829eef8ac1438595f4" + "reference": "5397cd05b0a0f7937c47b0adcb4c60e5ab936b6a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/8ddcb66ac10c392d3beb54829eef8ac1438595f4", - "reference": "8ddcb66ac10c392d3beb54829eef8ac1438595f4", + "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/5397cd05b0a0f7937c47b0adcb4c60e5ab936b6a", + "reference": "5397cd05b0a0f7937c47b0adcb4c60e5ab936b6a", "shasum": "" }, "require": { "egulias/email-validator": "~2.0", - "php": ">=7.0.0" + "php": ">=7.0.0", + "symfony/polyfill-iconv": "^1.0", + "symfony/polyfill-intl-idn": "^1.10", + "symfony/polyfill-mbstring": "^1.0" }, "require-dev": { "mockery/mockery": "~0.9.1", - "symfony/phpunit-bridge": "~3.3@dev" + "symfony/phpunit-bridge": "^3.4.19|^4.1.8" }, "suggest": { "ext-intl": "Needed to support internationalized email addresses", @@ -2757,7 +2867,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "6.1-dev" + "dev-master": "6.2-dev" } }, "autoload": { @@ -2785,41 +2895,47 @@ "mail", "mailer" ], - "time": "2018-09-11T07:12:52+00:00" + "time": "2019-04-21T09:21:45+00:00" }, { "name": "symfony/console", - "version": "v4.2.2", + "version": "v4.3.1", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "b0a03c1bb0fcbe288629956cf2f1dd3f1dc97522" + "reference": "d50bbeeb0e17e6dd4124ea391eff235e932cbf64" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/b0a03c1bb0fcbe288629956cf2f1dd3f1dc97522", - "reference": "b0a03c1bb0fcbe288629956cf2f1dd3f1dc97522", + "url": "https://api.github.com/repos/symfony/console/zipball/d50bbeeb0e17e6dd4124ea391eff235e932cbf64", + "reference": "d50bbeeb0e17e6dd4124ea391eff235e932cbf64", "shasum": "" }, "require": { "php": "^7.1.3", - "symfony/contracts": "^1.0", - "symfony/polyfill-mbstring": "~1.0" + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php73": "^1.8", + "symfony/service-contracts": "^1.1" }, "conflict": { "symfony/dependency-injection": "<3.4", + "symfony/event-dispatcher": "<4.3", "symfony/process": "<3.3" }, + "provide": { + "psr/log-implementation": "1.0" + }, "require-dev": { "psr/log": "~1.0", "symfony/config": "~3.4|~4.0", "symfony/dependency-injection": "~3.4|~4.0", - "symfony/event-dispatcher": "~3.4|~4.0", + "symfony/event-dispatcher": "^4.3", "symfony/lock": "~3.4|~4.0", - "symfony/process": "~3.4|~4.0" + "symfony/process": "~3.4|~4.0", + "symfony/var-dumper": "^4.3" }, "suggest": { - "psr/log-implementation": "For using the console logger", + "psr/log": "For using the console logger", "symfony/event-dispatcher": "", "symfony/lock": "", "symfony/process": "" @@ -2827,7 +2943,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.2-dev" + "dev-master": "4.3-dev" } }, "autoload": { @@ -2854,88 +2970,20 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2019-01-04T15:13:53+00:00" - }, - { - "name": "symfony/contracts", - "version": "v1.0.2", - "source": { - "type": "git", - "url": "https://github.com/symfony/contracts.git", - "reference": "1aa7ab2429c3d594dd70689604b5cf7421254cdf" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/contracts/zipball/1aa7ab2429c3d594dd70689604b5cf7421254cdf", - "reference": "1aa7ab2429c3d594dd70689604b5cf7421254cdf", - "shasum": "" - }, - "require": { - "php": "^7.1.3" - }, - "require-dev": { - "psr/cache": "^1.0", - "psr/container": "^1.0" - }, - "suggest": { - "psr/cache": "When using the Cache contracts", - "psr/container": "When using the Service contracts", - "symfony/cache-contracts-implementation": "", - "symfony/service-contracts-implementation": "", - "symfony/translation-contracts-implementation": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Contracts\\": "" - }, - "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": "A set of abstractions extracted out of the Symfony components", - "homepage": "https://symfony.com", - "keywords": [ - "abstractions", - "contracts", - "decoupling", - "interfaces", - "interoperability", - "standards" - ], - "time": "2018-12-05T08:06:11+00:00" + "time": "2019-06-05T13:25:51+00:00" }, { "name": "symfony/css-selector", - "version": "v4.2.2", + "version": "v4.3.1", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", - "reference": "76dac1dbe2830213e95892c7c2ec1edd74113ea4" + "reference": "105c98bb0c5d8635bea056135304bd8edcc42b4d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/css-selector/zipball/76dac1dbe2830213e95892c7c2ec1edd74113ea4", - "reference": "76dac1dbe2830213e95892c7c2ec1edd74113ea4", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/105c98bb0c5d8635bea056135304bd8edcc42b4d", + "reference": "105c98bb0c5d8635bea056135304bd8edcc42b4d", "shasum": "" }, "require": { @@ -2944,7 +2992,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.2-dev" + "dev-master": "4.3-dev" } }, "autoload": { @@ -2975,20 +3023,20 @@ ], "description": "Symfony CssSelector Component", "homepage": "https://symfony.com", - "time": "2019-01-03T09:07:35+00:00" + "time": "2019-01-16T21:53:39+00:00" }, { "name": "symfony/debug", - "version": "v4.2.2", + "version": "v4.3.1", "source": { "type": "git", "url": "https://github.com/symfony/debug.git", - "reference": "64cb33c81e37d19b7715d4a6a4d49c1c382066dd" + "reference": "4e025104f1f9adb1f7a2d14fb102c9986d6e97c6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/64cb33c81e37d19b7715d4a6a4d49c1c382066dd", - "reference": "64cb33c81e37d19b7715d4a6a4d49c1c382066dd", + "url": "https://api.github.com/repos/symfony/debug/zipball/4e025104f1f9adb1f7a2d14fb102c9986d6e97c6", + "reference": "4e025104f1f9adb1f7a2d14fb102c9986d6e97c6", "shasum": "" }, "require": { @@ -3004,7 +3052,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.2-dev" + "dev-master": "4.3-dev" } }, "autoload": { @@ -3031,34 +3079,40 @@ ], "description": "Symfony Debug Component", "homepage": "https://symfony.com", - "time": "2019-01-03T09:07:35+00:00" + "time": "2019-05-30T16:10:05+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v4.2.2", + "version": "v4.3.1", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "887de6d34c86cf0cb6cbf910afb170cdb743cb5e" + "reference": "4e6c670af81c4fb0b6c08b035530a9915d0b691f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/887de6d34c86cf0cb6cbf910afb170cdb743cb5e", - "reference": "887de6d34c86cf0cb6cbf910afb170cdb743cb5e", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/4e6c670af81c4fb0b6c08b035530a9915d0b691f", + "reference": "4e6c670af81c4fb0b6c08b035530a9915d0b691f", "shasum": "" }, "require": { "php": "^7.1.3", - "symfony/contracts": "^1.0" + "symfony/event-dispatcher-contracts": "^1.1" }, "conflict": { "symfony/dependency-injection": "<3.4" }, + "provide": { + "psr/event-dispatcher-implementation": "1.0", + "symfony/event-dispatcher-implementation": "1.1" + }, "require-dev": { "psr/log": "~1.0", "symfony/config": "~3.4|~4.0", "symfony/dependency-injection": "~3.4|~4.0", "symfony/expression-language": "~3.4|~4.0", + "symfony/http-foundation": "^3.4|^4.0", + "symfony/service-contracts": "^1.1", "symfony/stopwatch": "~3.4|~4.0" }, "suggest": { @@ -3068,7 +3122,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.2-dev" + "dev-master": "4.3-dev" } }, "autoload": { @@ -3095,20 +3149,78 @@ ], "description": "Symfony EventDispatcher Component", "homepage": "https://symfony.com", - "time": "2019-01-05T16:37:49+00:00" + "time": "2019-05-30T16:10:05+00:00" }, { - "name": "symfony/finder", - "version": "v4.2.2", + "name": "symfony/event-dispatcher-contracts", + "version": "v1.1.1", "source": { "type": "git", - "url": "https://github.com/symfony/finder.git", - "reference": "9094d69e8c6ee3fe186a0ec5a4f1401e506071ce" + "url": "https://github.com/symfony/event-dispatcher-contracts.git", + "reference": "8fa2cf2177083dd59cf8e44ea4b6541764fbda69" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/9094d69e8c6ee3fe186a0ec5a4f1401e506071ce", - "reference": "9094d69e8c6ee3fe186a0ec5a4f1401e506071ce", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/8fa2cf2177083dd59cf8e44ea4b6541764fbda69", + "reference": "8fa2cf2177083dd59cf8e44ea4b6541764fbda69", + "shasum": "" + }, + "require": { + "php": "^7.1.3" + }, + "suggest": { + "psr/event-dispatcher": "", + "symfony/event-dispatcher-implementation": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\EventDispatcher\\": "" + } + }, + "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": "Generic abstractions related to dispatching event", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "time": "2019-05-22T12:23:29+00:00" + }, + { + "name": "symfony/finder", + "version": "v4.3.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/finder.git", + "reference": "b3d4f4c0e4eadfdd8b296af9ca637cfbf51d8176" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/finder/zipball/b3d4f4c0e4eadfdd8b296af9ca637cfbf51d8176", + "reference": "b3d4f4c0e4eadfdd8b296af9ca637cfbf51d8176", "shasum": "" }, "require": { @@ -3117,7 +3229,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.2-dev" + "dev-master": "4.3-dev" } }, "autoload": { @@ -3144,24 +3256,25 @@ ], "description": "Symfony Finder Component", "homepage": "https://symfony.com", - "time": "2019-01-03T09:07:35+00:00" + "time": "2019-05-26T20:47:49+00:00" }, { "name": "symfony/http-foundation", - "version": "v4.2.2", + "version": "v4.3.1", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "a633d422a09242064ba24e44a6e1494c5126de86" + "reference": "b7e4945dd9b277cd24e93566e4da0a87956392a9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/a633d422a09242064ba24e44a6e1494c5126de86", - "reference": "a633d422a09242064ba24e44a6e1494c5126de86", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/b7e4945dd9b277cd24e93566e4da0a87956392a9", + "reference": "b7e4945dd9b277cd24e93566e4da0a87956392a9", "shasum": "" }, "require": { "php": "^7.1.3", + "symfony/mime": "^4.3", "symfony/polyfill-mbstring": "~1.1" }, "require-dev": { @@ -3171,7 +3284,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.2-dev" + "dev-master": "4.3-dev" } }, "autoload": { @@ -3198,34 +3311,35 @@ ], "description": "Symfony HttpFoundation Component", "homepage": "https://symfony.com", - "time": "2019-01-05T16:37:49+00:00" + "time": "2019-06-06T10:05:02+00:00" }, { "name": "symfony/http-kernel", - "version": "v4.2.2", + "version": "v4.3.1", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "83de6543328917c18d5498eeb6bb6d36f7aab31b" + "reference": "738ad561cd6a8d1c44ee1da941b2e628e264c429" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/83de6543328917c18d5498eeb6bb6d36f7aab31b", - "reference": "83de6543328917c18d5498eeb6bb6d36f7aab31b", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/738ad561cd6a8d1c44ee1da941b2e628e264c429", + "reference": "738ad561cd6a8d1c44ee1da941b2e628e264c429", "shasum": "" }, "require": { "php": "^7.1.3", "psr/log": "~1.0", - "symfony/contracts": "^1.0.2", "symfony/debug": "~3.4|~4.0", - "symfony/event-dispatcher": "~4.1", + "symfony/event-dispatcher": "^4.3", "symfony/http-foundation": "^4.1.1", - "symfony/polyfill-ctype": "~1.8" + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-php73": "^1.9" }, "conflict": { + "symfony/browser-kit": "<4.3", "symfony/config": "<3.4", - "symfony/dependency-injection": "<4.2", + "symfony/dependency-injection": "<4.3", "symfony/translation": "<4.2", "symfony/var-dumper": "<4.1.1", "twig/twig": "<1.34|<2.4,>=2" @@ -3235,11 +3349,11 @@ }, "require-dev": { "psr/cache": "~1.0", - "symfony/browser-kit": "~3.4|~4.0", + "symfony/browser-kit": "^4.3", "symfony/config": "~3.4|~4.0", "symfony/console": "~3.4|~4.0", "symfony/css-selector": "~3.4|~4.0", - "symfony/dependency-injection": "^4.2", + "symfony/dependency-injection": "^4.3", "symfony/dom-crawler": "~3.4|~4.0", "symfony/expression-language": "~3.4|~4.0", "symfony/finder": "~3.4|~4.0", @@ -3248,7 +3362,9 @@ "symfony/stopwatch": "~3.4|~4.0", "symfony/templating": "~3.4|~4.0", "symfony/translation": "~4.2", - "symfony/var-dumper": "^4.1.1" + "symfony/translation-contracts": "^1.1", + "symfony/var-dumper": "^4.1.1", + "twig/twig": "^1.34|^2.4" }, "suggest": { "symfony/browser-kit": "", @@ -3260,7 +3376,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.2-dev" + "dev-master": "4.3-dev" } }, "autoload": { @@ -3287,20 +3403,79 @@ ], "description": "Symfony HttpKernel Component", "homepage": "https://symfony.com", - "time": "2019-01-06T16:19:23+00:00" + "time": "2019-06-06T13:23:34+00:00" }, { - "name": "symfony/options-resolver", - "version": "v4.2.2", + "name": "symfony/mime", + "version": "v4.3.1", "source": { "type": "git", - "url": "https://github.com/symfony/options-resolver.git", - "reference": "fbcb106aeee72f3450298bf73324d2cc00d083d1" + "url": "https://github.com/symfony/mime.git", + "reference": "ec2c5565de60e03f33d4296a655e3273f0ad1f8b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/fbcb106aeee72f3450298bf73324d2cc00d083d1", - "reference": "fbcb106aeee72f3450298bf73324d2cc00d083d1", + "url": "https://api.github.com/repos/symfony/mime/zipball/ec2c5565de60e03f33d4296a655e3273f0ad1f8b", + "reference": "ec2c5565de60e03f33d4296a655e3273f0ad1f8b", + "shasum": "" + }, + "require": { + "php": "^7.1.3", + "symfony/polyfill-intl-idn": "^1.10", + "symfony/polyfill-mbstring": "^1.0" + }, + "require-dev": { + "egulias/email-validator": "^2.0", + "symfony/dependency-injection": "~3.4|^4.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.3-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Mime\\": "" + }, + "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": "A library to manipulate MIME messages", + "homepage": "https://symfony.com", + "keywords": [ + "mime", + "mime-type" + ], + "time": "2019-06-04T09:22:54+00:00" + }, + { + "name": "symfony/options-resolver", + "version": "v4.3.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/options-resolver.git", + "reference": "914e0edcb7cd0c9f494bc023b1d47534f4542332" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/914e0edcb7cd0c9f494bc023b1d47534f4542332", + "reference": "914e0edcb7cd0c9f494bc023b1d47534f4542332", "shasum": "" }, "require": { @@ -3309,7 +3484,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.2-dev" + "dev-master": "4.3-dev" } }, "autoload": { @@ -3341,20 +3516,20 @@ "configuration", "options" ], - "time": "2019-01-03T09:07:35+00:00" + "time": "2019-05-10T05:38:46+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.10.0", + "version": "v1.11.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "e3d826245268269cd66f8326bd8bc066687b4a19" + "reference": "82ebae02209c21113908c229e9883c419720738a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/e3d826245268269cd66f8326bd8bc066687b4a19", - "reference": "e3d826245268269cd66f8326bd8bc066687b4a19", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/82ebae02209c21113908c229e9883c419720738a", + "reference": "82ebae02209c21113908c229e9883c419720738a", "shasum": "" }, "require": { @@ -3366,7 +3541,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.9-dev" + "dev-master": "1.11-dev" } }, "autoload": { @@ -3388,7 +3563,7 @@ }, { "name": "Gert de Pagter", - "email": "backendtea@gmail.com" + "email": "BackEndTea@gmail.com" } ], "description": "Symfony polyfill for ctype functions", @@ -3399,20 +3574,141 @@ "polyfill", "portable" ], - "time": "2018-08-06T14:22:27+00:00" + "time": "2019-02-06T07:57:58+00:00" }, { - "name": "symfony/polyfill-mbstring", - "version": "v1.10.0", + "name": "symfony/polyfill-iconv", + "version": "v1.11.0", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "c79c051f5b3a46be09205c73b80b346e4153e494" + "url": "https://github.com/symfony/polyfill-iconv.git", + "reference": "f037ea22acfaee983e271dd9c3b8bb4150bd8ad7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/c79c051f5b3a46be09205c73b80b346e4153e494", - "reference": "c79c051f5b3a46be09205c73b80b346e4153e494", + "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/f037ea22acfaee983e271dd9c3b8bb4150bd8ad7", + "reference": "f037ea22acfaee983e271dd9c3b8bb4150bd8ad7", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-iconv": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.11-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Iconv\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "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 polyfill for the Iconv extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "iconv", + "polyfill", + "portable", + "shim" + ], + "time": "2019-02-06T07:57:58+00:00" + }, + { + "name": "symfony/polyfill-intl-idn", + "version": "v1.11.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-idn.git", + "reference": "c766e95bec706cdd89903b1eda8afab7d7a6b7af" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/c766e95bec706cdd89903b1eda8afab7d7a6b7af", + "reference": "c766e95bec706cdd89903b1eda8afab7d7a6b7af", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "symfony/polyfill-mbstring": "^1.3", + "symfony/polyfill-php72": "^1.9" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.9-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Intl\\Idn\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + }, + { + "name": "Laurent Bassin", + "email": "laurent@bassin.info" + } + ], + "description": "Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "idn", + "intl", + "polyfill", + "portable", + "shim" + ], + "time": "2019-03-04T13:44:35+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.11.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "fe5e94c604826c35a32fa832f35bd036b6799609" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/fe5e94c604826c35a32fa832f35bd036b6799609", + "reference": "fe5e94c604826c35a32fa832f35bd036b6799609", "shasum": "" }, "require": { @@ -3424,7 +3720,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.9-dev" + "dev-master": "1.11-dev" } }, "autoload": { @@ -3458,20 +3754,20 @@ "portable", "shim" ], - "time": "2018-09-21T13:07:52+00:00" + "time": "2019-02-06T07:57:58+00:00" }, { "name": "symfony/polyfill-php72", - "version": "v1.10.0", + "version": "v1.11.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "9050816e2ca34a8e916c3a0ae8b9c2fccf68b631" + "reference": "ab50dcf166d5f577978419edd37aa2bb8eabce0c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/9050816e2ca34a8e916c3a0ae8b9c2fccf68b631", - "reference": "9050816e2ca34a8e916c3a0ae8b9c2fccf68b631", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/ab50dcf166d5f577978419edd37aa2bb8eabce0c", + "reference": "ab50dcf166d5f577978419edd37aa2bb8eabce0c", "shasum": "" }, "require": { @@ -3480,7 +3776,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.9-dev" + "dev-master": "1.11-dev" } }, "autoload": { @@ -3513,20 +3809,78 @@ "portable", "shim" ], - "time": "2018-09-21T13:07:52+00:00" + "time": "2019-02-06T07:57:58+00:00" }, { - "name": "symfony/process", - "version": "v4.2.2", + "name": "symfony/polyfill-php73", + "version": "v1.11.0", "source": { "type": "git", - "url": "https://github.com/symfony/process.git", - "reference": "ea043ab5d8ed13b467a9087d81cb876aee7f689a" + "url": "https://github.com/symfony/polyfill-php73.git", + "reference": "d1fb4abcc0c47be136208ad9d68bf59f1ee17abd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/ea043ab5d8ed13b467a9087d81cb876aee7f689a", - "reference": "ea043ab5d8ed13b467a9087d81cb876aee7f689a", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/d1fb4abcc0c47be136208ad9d68bf59f1ee17abd", + "reference": "d1fb4abcc0c47be136208ad9d68bf59f1ee17abd", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.11-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php73\\": "" + }, + "files": [ + "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" + ] + }, + "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 polyfill backporting some PHP 7.3+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "time": "2019-02-06T07:57:58+00:00" + }, + { + "name": "symfony/process", + "version": "v4.3.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/process.git", + "reference": "856d35814cf287480465bb7a6c413bb7f5f5e69c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/process/zipball/856d35814cf287480465bb7a6c413bb7f5f5e69c", + "reference": "856d35814cf287480465bb7a6c413bb7f5f5e69c", "shasum": "" }, "require": { @@ -3535,7 +3889,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.2-dev" + "dev-master": "4.3-dev" } }, "autoload": { @@ -3562,20 +3916,20 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com", - "time": "2019-01-03T14:48:52+00:00" + "time": "2019-05-30T16:10:05+00:00" }, { "name": "symfony/routing", - "version": "v4.2.2", + "version": "v4.3.1", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "e69b7a13a0b58af378a49b49dd7084462de16cee" + "reference": "9b31cd24f6ad2cebde6845f6daa9c6d69efe2465" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/e69b7a13a0b58af378a49b49dd7084462de16cee", - "reference": "e69b7a13a0b58af378a49b49dd7084462de16cee", + "url": "https://api.github.com/repos/symfony/routing/zipball/9b31cd24f6ad2cebde6845f6daa9c6d69efe2465", + "reference": "9b31cd24f6ad2cebde6845f6daa9c6d69efe2465", "shasum": "" }, "require": { @@ -3587,7 +3941,7 @@ "symfony/yaml": "<3.4" }, "require-dev": { - "doctrine/annotations": "~1.0", + "doctrine/annotations": "~1.2", "psr/log": "~1.0", "symfony/config": "~4.2", "symfony/dependency-injection": "~3.4|~4.0", @@ -3598,7 +3952,6 @@ "suggest": { "doctrine/annotations": "For using the annotation loader", "symfony/config": "For using the all-in-one router or any loader", - "symfony/dependency-injection": "For loading routes from a service", "symfony/expression-language": "For using expression matching", "symfony/http-foundation": "For using a Symfony Request object", "symfony/yaml": "For using the YAML loader" @@ -3606,7 +3959,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.2-dev" + "dev-master": "4.3-dev" } }, "autoload": { @@ -3639,26 +3992,84 @@ "uri", "url" ], - "time": "2019-01-03T09:07:35+00:00" + "time": "2019-06-05T09:16:20+00:00" }, { - "name": "symfony/translation", - "version": "v4.2.2", + "name": "symfony/service-contracts", + "version": "v1.1.2", "source": { "type": "git", - "url": "https://github.com/symfony/translation.git", - "reference": "939fb792d73f2ce80e6ae9019d205fc480f1c9a0" + "url": "https://github.com/symfony/service-contracts.git", + "reference": "191afdcb5804db960d26d8566b7e9a2843cab3a0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/939fb792d73f2ce80e6ae9019d205fc480f1c9a0", - "reference": "939fb792d73f2ce80e6ae9019d205fc480f1c9a0", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/191afdcb5804db960d26d8566b7e9a2843cab3a0", + "reference": "191afdcb5804db960d26d8566b7e9a2843cab3a0", + "shasum": "" + }, + "require": { + "php": "^7.1.3" + }, + "suggest": { + "psr/container": "", + "symfony/service-implementation": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\Service\\": "" + } + }, + "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": "Generic abstractions related to writing services", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "time": "2019-05-28T07:50:59+00:00" + }, + { + "name": "symfony/translation", + "version": "v4.3.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/translation.git", + "reference": "5dda505e5f65d759741dfaf4e54b36010a4b57aa" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/translation/zipball/5dda505e5f65d759741dfaf4e54b36010a4b57aa", + "reference": "5dda505e5f65d759741dfaf4e54b36010a4b57aa", "shasum": "" }, "require": { "php": "^7.1.3", - "symfony/contracts": "^1.0.2", - "symfony/polyfill-mbstring": "~1.0" + "symfony/polyfill-mbstring": "~1.0", + "symfony/translation-contracts": "^1.1.2" }, "conflict": { "symfony/config": "<3.4", @@ -3666,7 +4077,7 @@ "symfony/yaml": "<3.4" }, "provide": { - "symfony/translation-contracts-implementation": "1.0" + "symfony/translation-implementation": "1.0" }, "require-dev": { "psr/log": "~1.0", @@ -3674,7 +4085,10 @@ "symfony/console": "~3.4|~4.0", "symfony/dependency-injection": "~3.4|~4.0", "symfony/finder": "~2.8|~3.0|~4.0", + "symfony/http-kernel": "~3.4|~4.0", "symfony/intl": "~3.4|~4.0", + "symfony/service-contracts": "^1.1.2", + "symfony/var-dumper": "~3.4|~4.0", "symfony/yaml": "~3.4|~4.0" }, "suggest": { @@ -3685,7 +4099,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.2-dev" + "dev-master": "4.3-dev" } }, "autoload": { @@ -3712,20 +4126,77 @@ ], "description": "Symfony Translation Component", "homepage": "https://symfony.com", - "time": "2019-01-03T09:07:35+00:00" + "time": "2019-06-03T20:27:40+00:00" }, { - "name": "symfony/var-dumper", - "version": "v4.2.2", + "name": "symfony/translation-contracts", + "version": "v1.1.2", "source": { "type": "git", - "url": "https://github.com/symfony/var-dumper.git", - "reference": "85bde661b178173d85c6f11ea9d03b61d1212bb2" + "url": "https://github.com/symfony/translation-contracts.git", + "reference": "93597ce975d91c52ebfaca1253343cd9ccb7916d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/85bde661b178173d85c6f11ea9d03b61d1212bb2", - "reference": "85bde661b178173d85c6f11ea9d03b61d1212bb2", + "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/93597ce975d91c52ebfaca1253343cd9ccb7916d", + "reference": "93597ce975d91c52ebfaca1253343cd9ccb7916d", + "shasum": "" + }, + "require": { + "php": "^7.1.3" + }, + "suggest": { + "symfony/translation-implementation": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\Translation\\": "" + } + }, + "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": "Generic abstractions related to translation", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "time": "2019-05-27T08:16:38+00:00" + }, + { + "name": "symfony/var-dumper", + "version": "v4.3.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/var-dumper.git", + "reference": "f974f448154928d2b5fb7c412bd23b81d063f34b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/f974f448154928d2b5fb7c412bd23b81d063f34b", + "reference": "f974f448154928d2b5fb7c412bd23b81d063f34b", "shasum": "" }, "require": { @@ -3754,7 +4225,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.2-dev" + "dev-master": "4.3-dev" } }, "autoload": { @@ -3788,7 +4259,7 @@ "debug", "dump" ], - "time": "2019-01-03T09:07:35+00:00" + "time": "2019-06-05T02:08:12+00:00" }, { "name": "tijsverkoyen/css-to-inline-styles", @@ -3839,20 +4310,21 @@ }, { "name": "vlucas/phpdotenv", - "version": "v2.5.2", + "version": "v2.6.1", "source": { "type": "git", "url": "https://github.com/vlucas/phpdotenv.git", - "reference": "cfd5dc225767ca154853752abc93aeec040fcf36" + "reference": "2a7dcf7e3e02dc5e701004e51a6f304b713107d5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/cfd5dc225767ca154853752abc93aeec040fcf36", - "reference": "cfd5dc225767ca154853752abc93aeec040fcf36", + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/2a7dcf7e3e02dc5e701004e51a6f304b713107d5", + "reference": "2a7dcf7e3e02dc5e701004e51a6f304b713107d5", "shasum": "" }, "require": { - "php": ">=5.3.9" + "php": ">=5.3.9", + "symfony/polyfill-ctype": "^1.9" }, "require-dev": { "phpunit/phpunit": "^4.8.35 || ^5.0" @@ -3860,7 +4332,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.5-dev" + "dev-master": "2.6-dev" } }, "autoload": { @@ -3885,42 +4357,45 @@ "env", "environment" ], - "time": "2018-10-30T17:29:25+00:00" + "time": "2019-01-29T11:11:52+00:00" }, { "name": "zendframework/zend-diactoros", - "version": "1.8.6", + "version": "2.1.2", "source": { "type": "git", "url": "https://github.com/zendframework/zend-diactoros.git", - "reference": "20da13beba0dde8fb648be3cc19765732790f46e" + "reference": "37bf68b428850ee26ed7c3be6c26236dd95a95f1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-diactoros/zipball/20da13beba0dde8fb648be3cc19765732790f46e", - "reference": "20da13beba0dde8fb648be3cc19765732790f46e", + "url": "https://api.github.com/repos/zendframework/zend-diactoros/zipball/37bf68b428850ee26ed7c3be6c26236dd95a95f1", + "reference": "37bf68b428850ee26ed7c3be6c26236dd95a95f1", "shasum": "" }, "require": { - "php": "^5.6 || ^7.0", + "php": "^7.1", + "psr/http-factory": "^1.0", "psr/http-message": "^1.0" }, "provide": { + "psr/http-factory-implementation": "1.0", "psr/http-message-implementation": "1.0" }, "require-dev": { "ext-dom": "*", "ext-libxml": "*", + "http-interop/http-factory-tests": "^0.5.0", "php-http/psr7-integration-tests": "dev-master", - "phpunit/phpunit": "^5.7.16 || ^6.0.8 || ^7.2.7", - "zendframework/zend-coding-standard": "~1.0" + "phpunit/phpunit": "^7.0.2", + "zendframework/zend-coding-standard": "~1.0.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.8.x-dev", - "dev-develop": "1.9.x-dev", - "dev-release-2.0": "2.0.x-dev" + "dev-master": "2.1.x-dev", + "dev-develop": "2.2.x-dev", + "dev-release-1.8": "1.8.x-dev" } }, "autoload": { @@ -3940,42 +4415,43 @@ }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-2-Clause" + "BSD-3-Clause" ], "description": "PSR HTTP Message implementations", - "homepage": "https://github.com/zendframework/zend-diactoros", "keywords": [ "http", "psr", "psr-7" ], - "time": "2018-09-05T19:29:37+00:00" + "time": "2019-04-29T21:11:00+00:00" } ], "packages-dev": [ { "name": "doctrine/instantiator", - "version": "1.1.0", + "version": "1.2.0", "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", - "reference": "185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda" + "reference": "a2c590166b2133a4633738648b6b064edae0814a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda", - "reference": "185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/a2c590166b2133a4633738648b6b064edae0814a", + "reference": "a2c590166b2133a4633738648b6b064edae0814a", "shasum": "" }, "require": { "php": "^7.1" }, "require-dev": { - "athletic/athletic": "~0.1.8", + "doctrine/coding-standard": "^6.0", "ext-pdo": "*", "ext-phar": "*", - "phpunit/phpunit": "^6.2.3", - "squizlabs/php_codesniffer": "^3.0.2" + "phpbench/phpbench": "^0.13", + "phpstan/phpstan-phpunit": "^0.11", + "phpstan/phpstan-shim": "^0.11", + "phpunit/phpunit": "^7.0" }, "type": "library", "extra": { @@ -4000,12 +4476,12 @@ } ], "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://github.com/doctrine/instantiator", + "homepage": "https://www.doctrine-project.org/projects/instantiator.html", "keywords": [ "constructor", "instantiate" ], - "time": "2017-07-22T11:58:36+00:00" + "time": "2019-03-17T17:37:11+00:00" }, { "name": "filp/whoops", @@ -4168,16 +4644,16 @@ }, { "name": "mockery/mockery", - "version": "1.2.0", + "version": "1.2.2", "source": { "type": "git", "url": "https://github.com/mockery/mockery.git", - "reference": "100633629bf76d57430b86b7098cd6beb996a35a" + "reference": "0eb0b48c3f07b3b89f5169ce005b7d05b18cf1d2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mockery/mockery/zipball/100633629bf76d57430b86b7098cd6beb996a35a", - "reference": "100633629bf76d57430b86b7098cd6beb996a35a", + "url": "https://api.github.com/repos/mockery/mockery/zipball/0eb0b48c3f07b3b89f5169ce005b7d05b18cf1d2", + "reference": "0eb0b48c3f07b3b89f5169ce005b7d05b18cf1d2", "shasum": "" }, "require": { @@ -4186,7 +4662,7 @@ "php": ">=5.6.0" }, "require-dev": { - "phpunit/phpunit": "~5.7.10|~6.5|~7.0" + "phpunit/phpunit": "~5.7.10|~6.5|~7.0|~8.0" }, "type": "library", "extra": { @@ -4229,20 +4705,20 @@ "test double", "testing" ], - "time": "2018-10-02T21:52:37+00:00" + "time": "2019-02-13T09:37:52+00:00" }, { "name": "myclabs/deep-copy", - "version": "1.8.1", + "version": "1.9.1", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "3e01bdad3e18354c3dce54466b7fbe33a9f9f7f8" + "reference": "e6828efaba2c9b79f4499dae1d66ef8bfa7b2b72" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3e01bdad3e18354c3dce54466b7fbe33a9f9f7f8", - "reference": "3e01bdad3e18354c3dce54466b7fbe33a9f9f7f8", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/e6828efaba2c9b79f4499dae1d66ef8bfa7b2b72", + "reference": "e6828efaba2c9b79f4499dae1d66ef8bfa7b2b72", "shasum": "" }, "require": { @@ -4277,7 +4753,7 @@ "object", "object graph" ], - "time": "2018-06-11T23:09:50+00:00" + "time": "2019-04-07T13:18:21+00:00" }, { "name": "phar-io/manifest", @@ -4437,16 +4913,16 @@ }, { "name": "phpdocumentor/reflection-docblock", - "version": "4.3.0", + "version": "4.3.1", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "94fd0001232e47129dd3504189fa1c7225010d08" + "reference": "bdd9f737ebc2a01c06ea7ff4308ec6697db9b53c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/94fd0001232e47129dd3504189fa1c7225010d08", - "reference": "94fd0001232e47129dd3504189fa1c7225010d08", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/bdd9f737ebc2a01c06ea7ff4308ec6697db9b53c", + "reference": "bdd9f737ebc2a01c06ea7ff4308ec6697db9b53c", "shasum": "" }, "require": { @@ -4484,7 +4960,7 @@ } ], "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "time": "2017-11-30T07:14:17+00:00" + "time": "2019-04-30T17:48:53+00:00" }, { "name": "phpdocumentor/type-resolver", @@ -4847,16 +5323,16 @@ }, { "name": "phpunit/phpunit", - "version": "6.5.13", + "version": "6.5.14", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "0973426fb012359b2f18d3bd1e90ef1172839693" + "reference": "bac23fe7ff13dbdb461481f706f0e9fe746334b7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/0973426fb012359b2f18d3bd1e90ef1172839693", - "reference": "0973426fb012359b2f18d3bd1e90ef1172839693", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/bac23fe7ff13dbdb461481f706f0e9fe746334b7", + "reference": "bac23fe7ff13dbdb461481f706f0e9fe746334b7", "shasum": "" }, "require": { @@ -4927,7 +5403,7 @@ "testing", "xunit" ], - "time": "2018-09-08T15:10:43+00:00" + "time": "2019-02-01T05:22:47+00:00" }, { "name": "phpunit/phpunit-mock-objects", @@ -5592,16 +6068,16 @@ }, { "name": "theseer/tokenizer", - "version": "1.1.0", + "version": "1.1.2", "source": { "type": "git", "url": "https://github.com/theseer/tokenizer.git", - "reference": "cb2f008f3f05af2893a87208fe6a6c4985483f8b" + "reference": "1c42705be2b6c1de5904f8afacef5895cab44bf8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/cb2f008f3f05af2893a87208fe6a6c4985483f8b", - "reference": "cb2f008f3f05af2893a87208fe6a6c4985483f8b", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/1c42705be2b6c1de5904f8afacef5895cab44bf8", + "reference": "1c42705be2b6c1de5904f8afacef5895cab44bf8", "shasum": "" }, "require": { @@ -5628,7 +6104,7 @@ } ], "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", - "time": "2017-04-07T12:08:54+00:00" + "time": "2019-04-04T09:56:43+00:00" }, { "name": "webmozart/assert", diff --git a/vendor/clue/stream-filter/.travis.yml b/vendor/clue/stream-filter/.travis.yml index a71864a3..398a5442 100644 --- a/vendor/clue/stream-filter/.travis.yml +++ b/vendor/clue/stream-filter/.travis.yml @@ -7,6 +7,7 @@ php: - 5.6 - 7.0 - 7.1 + - 7.2 - hhvm # ignore errors, see below # lock distro so new future defaults will not break the build diff --git a/vendor/clue/stream-filter/CHANGELOG.md b/vendor/clue/stream-filter/CHANGELOG.md index 9d53cd83..563ba3f9 100644 --- a/vendor/clue/stream-filter/CHANGELOG.md +++ b/vendor/clue/stream-filter/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## 1.4.1 (2019-04-09) + +* Fix: Check if the function is declared before declaring it. + (#23 by @Niko9911) + +* Improve test suite to also test against PHP 7.2 and + add test for base64 encoding and decoding filters. + (#22 by @arubacao and #25 by @Nyholm and @clue) + ## 1.4.0 (2017-08-18) * Feature / Fix: The `fun()` function does not pass filter parameter `null` diff --git a/vendor/clue/stream-filter/README.md b/vendor/clue/stream-filter/README.md index d46c2b57..e9c6fc9e 100644 --- a/vendor/clue/stream-filter/README.md +++ b/vendor/clue/stream-filter/README.md @@ -27,13 +27,13 @@ These filters can be used to easily and efficiently perform various transformati * and much more. But let's face it: -Its API is [*difficult to work with*](http://php.net/manual/en/php-user-filter.filter.php) -and its documentation is [*subpar*](http://stackoverflow.com/questions/27103269/what-is-a-bucket-brigade). +Its API is [*difficult to work with*](https://www.php.net/manual/en/php-user-filter.filter.php) +and its documentation is [*subpar*](https://stackoverflow.com/questions/27103269/what-is-a-bucket-brigade). This combined means its powerful features are often neglected. This project aims to make these features more accessible to a broader audience. * **Lightweight, SOLID design** - - Provides a thin abstraction that is [*just good enough*](http://en.wikipedia.org/wiki/Principle_of_good_enough) + Provides a thin abstraction that is [*just good enough*](https://en.wikipedia.org/wiki/Principle_of_good_enough) and does not get in your way. Custom filters require trivial effort. * **Good test coverage** - @@ -141,7 +141,7 @@ Filter\append($stream, function ($chunk) { ``` > Note that once a filter has been added to stream, the stream can no longer be passed to -> [`stream_select()`](http://php.net/manual/en/function.stream-select.php) +> [`stream_select()`](https://www.php.net/manual/en/function.stream-select.php) > (and family). > > > Warning: stream_select(): cannot cast a filtered stream on this system in {file} on line {line} @@ -178,7 +178,7 @@ For more details about its behavior, see also the [`append()`](#append) function The `fun($filter, $parameters = null)` function can be used to create a filter function which uses the given built-in `$filter`. -PHP comes with a useful set of [built-in filters](http://php.net/manual/en/filters.php). +PHP comes with a useful set of [built-in filters](https://www.php.net/manual/en/filters.php). Using `fun()` makes accessing these as easy as passing an input string to filter and getting the filtered output string. @@ -191,7 +191,7 @@ assert('test' === $fun($fun('test')); Please note that not all filter functions may be available depending on installed PHP extensions and the PHP version in use. -In particular, [HHVM](http://hhvm.com/) may not offer the same filter functions +In particular, [HHVM](https://hhvm.com/) may not offer the same filter functions or parameters as Zend PHP. Accessing an unknown filter function will result in a `RuntimeException`: @@ -218,7 +218,7 @@ assert('hi' === $ret); Under the hood, this function allocates a temporary memory stream, so it's recommended to clean up the filter function after use. Also, some filter functions (in particular the -[zlib compression filters](http://php.net/manual/en/filters.compression.php)) +[zlib compression filters](https://www.php.net/manual/en/filters.compression.php)) may use internal buffers and may emit a final data chunk on close. The filter function can be closed by invoking without any arguments: @@ -263,10 +263,11 @@ Filter\remove($filter); The recommended way to install this library is [through Composer](https://getcomposer.org). [New to Composer?](https://getcomposer.org/doc/00-intro.md) +This project follows [SemVer](https://semver.org/). This will install the latest supported version: ```bash -$ composer require clue/stream-filter:^1.4 +$ composer require clue/stream-filter:^1.4.1 ``` See also the [CHANGELOG](CHANGELOG.md) for details about version upgrades. @@ -280,7 +281,7 @@ Older PHP versions may suffer from a number of inconsistencies documented above. ## Tests To run the test suite, you first need to clone this repo and then install all -dependencies [through Composer](http://getcomposer.org): +dependencies [through Composer](https://getcomposer.org): ```bash $ composer install @@ -294,4 +295,7 @@ $ php vendor/bin/phpunit ## License -MIT +This project is released under the permissive [MIT license](LICENSE). + +> Did you know that I offer custom development services and issuing invoices for + sponsorships of releases and for contributions? Contact me (@clue) for details. diff --git a/vendor/clue/stream-filter/composer.json b/vendor/clue/stream-filter/composer.json index f8710531..834f2d48 100644 --- a/vendor/clue/stream-filter/composer.json +++ b/vendor/clue/stream-filter/composer.json @@ -18,6 +18,6 @@ }, "autoload": { "psr-4": { "Clue\\StreamFilter\\": "src/" }, - "files": [ "src/functions.php" ] + "files": [ "src/functions_include.php" ] } } diff --git a/vendor/clue/stream-filter/src/functions_include.php b/vendor/clue/stream-filter/src/functions_include.php new file mode 100644 index 00000000..346a91bb --- /dev/null +++ b/vendor/clue/stream-filter/src/functions_include.php @@ -0,0 +1,5 @@ +assertEquals(base64_encode($string), $encode($string) . $encode()); + $this->assertEquals($string, $decode(base64_encode($string))); + + $encode = Filter\fun('convert.base64-encode'); + $decode = Filter\fun('convert.base64-decode'); + $this->assertEquals($string, $decode($encode($string) . $encode())); + + $encode = Filter\fun('convert.base64-encode'); + $this->assertEquals(null, $encode()); + } } diff --git a/vendor/composer/ClassLoader.php b/vendor/composer/ClassLoader.php index 2c72175e..dc02dfb1 100644 --- a/vendor/composer/ClassLoader.php +++ b/vendor/composer/ClassLoader.php @@ -379,9 +379,9 @@ class ClassLoader $subPath = substr($subPath, 0, $lastPos); $search = $subPath.'\\'; if (isset($this->prefixDirsPsr4[$search])) { + $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1); foreach ($this->prefixDirsPsr4[$search] as $dir) { - $length = $this->prefixLengthsPsr4[$first][$search]; - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) { + if (file_exists($file = $dir . $pathEnd)) { return $file; } } diff --git a/vendor/composer/LICENSE b/vendor/composer/LICENSE index f27399a0..f0157a6e 100644 --- a/vendor/composer/LICENSE +++ b/vendor/composer/LICENSE @@ -1,21 +1,56 @@ +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: Composer +Upstream-Contact: Jordi Boggiano +Source: https://github.com/composer/composer -Copyright (c) Nils Adermann, Jordi Boggiano +Files: * +Copyright: 2016, Nils Adermann + 2016, Jordi Boggiano +License: Expat -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 the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: +Files: src/Composer/Util/TlsHelper.php +Copyright: 2016, Nils Adermann + 2016, Jordi Boggiano + 2013, Evan Coury +License: Expat and BSD-2-Clause -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. +License: BSD-2-Clause + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + . + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + . + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + . + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +License: Expat + 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 the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is furnished + to do so, subject to the following conditions: + . + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + . + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php index 053aea1c..c56aa1d1 100644 --- a/vendor/composer/autoload_classmap.php +++ b/vendor/composer/autoload_classmap.php @@ -42,71 +42,166 @@ return array( 'App\\SettingGroup' => $baseDir . '/app/SettingGroup.php', 'App\\SettingUser' => $baseDir . '/app/SettingUser.php', 'App\\SupportedApps' => $baseDir . '/app/SupportedApps.php', + 'App\\SupportedApps\\AVMFritzbox\\AVMFritzbox' => $baseDir . '/app/SupportedApps/AVMFritzbox/AVMFritzbox.php', + 'App\\SupportedApps\\Adminer\\Adminer' => $baseDir . '/app/SupportedApps/Adminer/Adminer.php', 'App\\SupportedApps\\Airsonic\\Airsonic' => $baseDir . '/app/SupportedApps/Airsonic/Airsonic.php', + 'App\\SupportedApps\\Alertmanager\\Alertmanager' => $baseDir . '/app/SupportedApps/Alertmanager/Alertmanager.php', + 'App\\SupportedApps\\ArchiveBox\\ArchiveBox' => $baseDir . '/app/SupportedApps/ArchiveBox/ArchiveBox.php', 'App\\SupportedApps\\Bazarr\\Bazarr' => $baseDir . '/app/SupportedApps/Bazarr/Bazarr.php', 'App\\SupportedApps\\Bitwarden\\Bitwarden' => $baseDir . '/app/SupportedApps/Bitwarden/Bitwarden.php', + 'App\\SupportedApps\\Booksonic\\Booksonic' => $baseDir . '/app/SupportedApps/Booksonic/Booksonic.php', 'App\\SupportedApps\\Bookstack\\Bookstack' => $baseDir . '/app/SupportedApps/Bookstack/Bookstack.php', + 'App\\SupportedApps\\Cabot\\Cabot' => $baseDir . '/app/SupportedApps/Cabot/Cabot.php', + 'App\\SupportedApps\\CalibreWeb\\CalibreWeb' => $baseDir . '/app/SupportedApps/CalibreWeb/CalibreWeb.php', 'App\\SupportedApps\\Cardigann\\Cardigann' => $baseDir . '/app/SupportedApps/Cardigann/Cardigann.php', + 'App\\SupportedApps\\CheckMK\\CheckMK' => $baseDir . '/app/SupportedApps/CheckMK/CheckMK.php', + 'App\\SupportedApps\\CloudCMD\\CloudCMD' => $baseDir . '/app/SupportedApps/CloudCMD/CloudCMD.php', + 'App\\SupportedApps\\CockpitCMS\\CockpitCMS' => $baseDir . '/app/SupportedApps/CockpitCMS/CockpitCMS.php', + 'App\\SupportedApps\\Cockpit\\Cockpit' => $baseDir . '/app/SupportedApps/Cockpit/Cockpit.php', + 'App\\SupportedApps\\Concourse\\Concourse' => $baseDir . '/app/SupportedApps/Concourse/Concourse.php', + 'App\\SupportedApps\\Confluence\\Confluence' => $baseDir . '/app/SupportedApps/Confluence/Confluence.php', 'App\\SupportedApps\\CouchPotato\\CouchPotato' => $baseDir . '/app/SupportedApps/CouchPotato/CouchPotato.php', + 'App\\SupportedApps\\CryptPad\\CryptPad' => $baseDir . '/app/SupportedApps/CryptPad/CryptPad.php', 'App\\SupportedApps\\Deluge\\Deluge' => $baseDir . '/app/SupportedApps/Deluge/Deluge.php', + 'App\\SupportedApps\\Directus\\Directus' => $baseDir . '/app/SupportedApps/Directus/Directus.php', 'App\\SupportedApps\\DokuWiki\\DokuWiki' => $baseDir . '/app/SupportedApps/DokuWiki/DokuWiki.php', + 'App\\SupportedApps\\Domoticz\\Domoticz' => $baseDir . '/app/SupportedApps/Domoticz/Domoticz.php', + 'App\\SupportedApps\\Drone\\Drone' => $baseDir . '/app/SupportedApps/Drone/Drone.php', + 'App\\SupportedApps\\Duplicacy\\Duplicacy' => $baseDir . '/app/SupportedApps/Duplicacy/Duplicacy.php', 'App\\SupportedApps\\Duplicati\\Duplicati' => $baseDir . '/app/SupportedApps/Duplicati/Duplicati.php', 'App\\SupportedApps\\Emby\\Emby' => $baseDir . '/app/SupportedApps/Emby/Emby.php', + 'App\\SupportedApps\\FileBrowser\\FileBrowser' => $baseDir . '/app/SupportedApps/FileBrowser/FileBrowser.php', + 'App\\SupportedApps\\Firefly\\Firefly' => $baseDir . '/app/SupportedApps/Firefly/Firefly.php', + 'App\\SupportedApps\\FirefoxSend\\FirefoxSend' => $baseDir . '/app/SupportedApps/FirefoxSend/FirefoxSend.php', + 'App\\SupportedApps\\FlexGet\\FlexGet' => $baseDir . '/app/SupportedApps/FlexGet/FlexGet.php', 'App\\SupportedApps\\Flood\\Flood' => $baseDir . '/app/SupportedApps/Flood/Flood.php', + 'App\\SupportedApps\\Freenas\\Freenas' => $baseDir . '/app/SupportedApps/Freenas/Freenas.php', 'App\\SupportedApps\\FreshRSS\\FreshRSS' => $baseDir . '/app/SupportedApps/FreshRSS/FreshRSS.php', + 'App\\SupportedApps\\Ghost\\Ghost' => $baseDir . '/app/SupportedApps/Ghost/Ghost.php', + 'App\\SupportedApps\\GitHub\\GitHub' => $baseDir . '/app/SupportedApps/GitHub/GitHub.php', + 'App\\SupportedApps\\GitLab\\GitLab' => $baseDir . '/app/SupportedApps/GitLab/GitLab.php', 'App\\SupportedApps\\Gitea\\Gitea' => $baseDir . '/app/SupportedApps/Gitea/Gitea.php', 'App\\SupportedApps\\Glances\\Glances' => $baseDir . '/app/SupportedApps/Glances/Glances.php', + 'App\\SupportedApps\\Gogs\\Gogs' => $baseDir . '/app/SupportedApps/Gogs/Gogs.php', + 'App\\SupportedApps\\Gotify\\Gotify' => $baseDir . '/app/SupportedApps/Gotify/Gotify.php', 'App\\SupportedApps\\Grafana\\Grafana' => $baseDir . '/app/SupportedApps/Grafana/Grafana.php', + 'App\\SupportedApps\\Grav\\Grav' => $baseDir . '/app/SupportedApps/Grav/Grav.php', 'App\\SupportedApps\\Graylog\\Graylog' => $baseDir . '/app/SupportedApps/Graylog/Graylog.php', + 'App\\SupportedApps\\Guacamole\\Guacamole' => $baseDir . '/app/SupportedApps/Guacamole/Guacamole.php', + 'App\\SupportedApps\\HAProxy\\HAProxy' => $baseDir . '/app/SupportedApps/HAProxy/HAProxy.php', 'App\\SupportedApps\\Headphones\\Headphones' => $baseDir . '/app/SupportedApps/Headphones/Headphones.php', + 'App\\SupportedApps\\Healthchecks\\Healthchecks' => $baseDir . '/app/SupportedApps/Healthchecks/Healthchecks.php', 'App\\SupportedApps\\HomeAssistant\\HomeAssistant' => $baseDir . '/app/SupportedApps/HomeAssistant/HomeAssistant.php', + 'App\\SupportedApps\\Huginn\\Huginn' => $baseDir . '/app/SupportedApps/Huginn/Huginn.php', + 'App\\SupportedApps\\InvoiceNinja\\InvoiceNinja' => $baseDir . '/app/SupportedApps/InvoiceNinja/InvoiceNinja.php', 'App\\SupportedApps\\JDownloader\\JDownloader' => $baseDir . '/app/SupportedApps/JDownloader/JDownloader.php', 'App\\SupportedApps\\Jackett\\Jackett' => $baseDir . '/app/SupportedApps/Jackett/Jackett.php', + 'App\\SupportedApps\\Jeedom\\Jeedom' => $baseDir . '/app/SupportedApps/Jeedom/Jeedom.php', + 'App\\SupportedApps\\Jellyfin\\Jellyfin' => $baseDir . '/app/SupportedApps/Jellyfin/Jellyfin.php', + 'App\\SupportedApps\\Jenkins\\Jenkins' => $baseDir . '/app/SupportedApps/Jenkins/Jenkins.php', + 'App\\SupportedApps\\Jira\\Jira' => $baseDir . '/app/SupportedApps/Jira/Jira.php', + 'App\\SupportedApps\\Jupyter\\Jupyter' => $baseDir . '/app/SupportedApps/Jupyter/Jupyter.php', + 'App\\SupportedApps\\Keycloak\\Keycloak' => $baseDir . '/app/SupportedApps/Keycloak/Keycloak.php', + 'App\\SupportedApps\\Kibana\\Kibana' => $baseDir . '/app/SupportedApps/Kibana/Kibana.php', + 'App\\SupportedApps\\Kimai\\Kimai' => $baseDir . '/app/SupportedApps/Kimai/Kimai.php', 'App\\SupportedApps\\Krusader\\Krusader' => $baseDir . '/app/SupportedApps/Krusader/Krusader.php', + 'App\\SupportedApps\\KubernetesDashboard\\KubernetesDashboard' => $baseDir . '/app/SupportedApps/KubernetesDashboard/KubernetesDashboard.php', + 'App\\SupportedApps\\LazyLibrarian\\LazyLibrarian' => $baseDir . '/app/SupportedApps/LazyLibrarian/LazyLibrarian.php', + 'App\\SupportedApps\\LemonLDAPNG\\LemonLDAPNG' => $baseDir . '/app/SupportedApps/LemonLDAPNG/LemonLDAPNG.php', 'App\\SupportedApps\\Lidarr\\Lidarr' => $baseDir . '/app/SupportedApps/Lidarr/Lidarr.php', + 'App\\SupportedApps\\MailcowSOGo\\MailcowSOGo' => $baseDir . '/app/SupportedApps/MailcowSOGo/MailcowSOGo.php', 'App\\SupportedApps\\Mailcow\\Mailcow' => $baseDir . '/app/SupportedApps/Mailcow/Mailcow.php', + 'App\\SupportedApps\\Mailhog\\Mailhog' => $baseDir . '/app/SupportedApps/Mailhog/Mailhog.php', + 'App\\SupportedApps\\Mattermost\\Mattermost' => $baseDir . '/app/SupportedApps/Mattermost/Mattermost.php', + 'App\\SupportedApps\\MayanEDMS\\MayanEDMS' => $baseDir . '/app/SupportedApps/MayanEDMS/MayanEDMS.php', 'App\\SupportedApps\\McMyAdmin\\McMyAdmin' => $baseDir . '/app/SupportedApps/McMyAdmin/McMyAdmin.php', 'App\\SupportedApps\\Medusa\\Medusa' => $baseDir . '/app/SupportedApps/Medusa/Medusa.php', + 'App\\SupportedApps\\Meraki\\Meraki' => $baseDir . '/app/SupportedApps/Meraki/Meraki.php', + 'App\\SupportedApps\\Miniflux\\Miniflux' => $baseDir . '/app/SupportedApps/Miniflux/Miniflux.php', + 'App\\SupportedApps\\Minio\\Minio' => $baseDir . '/app/SupportedApps/Minio/Minio.php', 'App\\SupportedApps\\Monica\\Monica' => $baseDir . '/app/SupportedApps/Monica/Monica.php', 'App\\SupportedApps\\MusicBrainz\\MusicBrainz' => $baseDir . '/app/SupportedApps/MusicBrainz/MusicBrainz.php', 'App\\SupportedApps\\Mylar\\Mylar' => $baseDir . '/app/SupportedApps/Mylar/Mylar.php', 'App\\SupportedApps\\NZBHydra\\NZBHydra' => $baseDir . '/app/SupportedApps/NZBHydra/NZBHydra.php', 'App\\SupportedApps\\Netdata\\Netdata' => $baseDir . '/app/SupportedApps/Netdata/Netdata.php', 'App\\SupportedApps\\Nextcloud\\Nextcloud' => $baseDir . '/app/SupportedApps/Nextcloud/Nextcloud.php', + 'App\\SupportedApps\\NginxProxyManager\\NginxProxyManager' => $baseDir . '/app/SupportedApps/NginxProxyManager/NginxProxyManager.php', 'App\\SupportedApps\\NodeRed\\NodeRed' => $baseDir . '/app/SupportedApps/NodeRed/NodeRed.php', 'App\\SupportedApps\\NowShowing\\NowShowing' => $baseDir . '/app/SupportedApps/NowShowing/NowShowing.php', + 'App\\SupportedApps\\Nzbget\\Nzbget' => $baseDir . '/app/SupportedApps/Nzbget/Nzbget.php', 'App\\SupportedApps\\OPNsense\\OPNsense' => $baseDir . '/app/SupportedApps/OPNsense/OPNsense.php', 'App\\SupportedApps\\Octoprint\\Octoprint' => $baseDir . '/app/SupportedApps/Octoprint/Octoprint.php', 'App\\SupportedApps\\Ombi\\Ombi' => $baseDir . '/app/SupportedApps/Ombi/Ombi.php', + 'App\\SupportedApps\\OmniDB\\OmniDB' => $baseDir . '/app/SupportedApps/OmniDB/OmniDB.php', + 'App\\SupportedApps\\Oscarr\\Oscarr' => $baseDir . '/app/SupportedApps/Oscarr/Oscarr.php', + 'App\\SupportedApps\\OwnPhotos\\OwnPhotos' => $baseDir . '/app/SupportedApps/OwnPhotos/OwnPhotos.php', + 'App\\SupportedApps\\Paperless\\Paperless' => $baseDir . '/app/SupportedApps/Paperless/Paperless.php', + 'App\\SupportedApps\\PartKeepr\\PartKeepr' => $baseDir . '/app/SupportedApps/PartKeepr/PartKeepr.php', 'App\\SupportedApps\\Pihole\\Pihole' => $baseDir . '/app/SupportedApps/Pihole/Pihole.php', 'App\\SupportedApps\\PlexRequests\\PlexRequests' => $baseDir . '/app/SupportedApps/PlexRequests/PlexRequests.php', 'App\\SupportedApps\\Plex\\Plex' => $baseDir . '/app/SupportedApps/Plex/Plex.php', 'App\\SupportedApps\\Portainer\\Portainer' => $baseDir . '/app/SupportedApps/Portainer/Portainer.php', + 'App\\SupportedApps\\Privatebin\\Privatebin' => $baseDir . '/app/SupportedApps/Privatebin/Privatebin.php', + 'App\\SupportedApps\\ProjectSend\\ProjectSend' => $baseDir . '/app/SupportedApps/ProjectSend/ProjectSend.php', + 'App\\SupportedApps\\Prometheus\\Prometheus' => $baseDir . '/app/SupportedApps/Prometheus/Prometheus.php', 'App\\SupportedApps\\Proxmox\\Proxmox' => $baseDir . '/app/SupportedApps/Proxmox/Proxmox.php', + 'App\\SupportedApps\\QNAP\\QNAP' => $baseDir . '/app/SupportedApps/QNAP/QNAP.php', 'App\\SupportedApps\\Radarr\\Radarr' => $baseDir . '/app/SupportedApps/Radarr/Radarr.php', 'App\\SupportedApps\\Rancher\\Rancher' => $baseDir . '/app/SupportedApps/Rancher/Rancher.php', + 'App\\SupportedApps\\Raneto\\Raneto' => $baseDir . '/app/SupportedApps/Raneto/Raneto.php', + 'App\\SupportedApps\\ResilioSync\\ResilioSync' => $baseDir . '/app/SupportedApps/ResilioSync/ResilioSync.php', + 'App\\SupportedApps\\RocketChat\\RocketChat' => $baseDir . '/app/SupportedApps/RocketChat/RocketChat.php', + 'App\\SupportedApps\\Rspamd\\Rspamd' => $baseDir . '/app/SupportedApps/Rspamd/Rspamd.php', 'App\\SupportedApps\\RuneAudio\\RuneAudio' => $baseDir . '/app/SupportedApps/RuneAudio/RuneAudio.php', 'App\\SupportedApps\\SABnzbd\\SABnzbd' => $baseDir . '/app/SupportedApps/SABnzbd/SABnzbd.php', + 'App\\SupportedApps\\SOGo\\SOGo' => $baseDir . '/app/SupportedApps/SOGo/SOGo.php', + 'App\\SupportedApps\\Seafile\\Seafile' => $baseDir . '/app/SupportedApps/Seafile/Seafile.php', + 'App\\SupportedApps\\SearxMetasearchEngine\\SearxMetasearchEngine' => $baseDir . '/app/SupportedApps/SearxMetasearchEngine/SearxMetasearchEngine.php', + 'App\\SupportedApps\\Serviio\\Serviio' => $baseDir . '/app/SupportedApps/Serviio/Serviio.php', + 'App\\SupportedApps\\Shaarli\\Shaarli' => $baseDir . '/app/SupportedApps/Shaarli/Shaarli.php', + 'App\\SupportedApps\\Shinobi\\Shinobi' => $baseDir . '/app/SupportedApps/Shinobi/Shinobi.php', + 'App\\SupportedApps\\SickBeard\\SickBeard' => $baseDir . '/app/SupportedApps/SickBeard/SickBeard.php', + 'App\\SupportedApps\\Sickchill\\Sickchill' => $baseDir . '/app/SupportedApps/Sickchill/Sickchill.php', 'App\\SupportedApps\\Slack\\Slack' => $baseDir . '/app/SupportedApps/Slack/Slack.php', + 'App\\SupportedApps\\Snibox\\Snibox' => $baseDir . '/app/SupportedApps/Snibox/Snibox.php', 'App\\SupportedApps\\Sonarr\\Sonarr' => $baseDir . '/app/SupportedApps/Sonarr/Sonarr.php', + 'App\\SupportedApps\\Sourcegraph\\Sourcegraph' => $baseDir . '/app/SupportedApps/Sourcegraph/Sourcegraph.php', + 'App\\SupportedApps\\Squidex\\Squidex' => $baseDir . '/app/SupportedApps/Squidex/Squidex.php', + 'App\\SupportedApps\\Strapi\\Strapi' => $baseDir . '/app/SupportedApps/Strapi/Strapi.php', 'App\\SupportedApps\\Syncthing\\Syncthing' => $baseDir . '/app/SupportedApps/Syncthing/Syncthing.php', + 'App\\SupportedApps\\Synology\\Synology' => $baseDir . '/app/SupportedApps/Synology/Synology.php', 'App\\SupportedApps\\TVHeadend\\TVHeadend' => $baseDir . '/app/SupportedApps/TVHeadend/TVHeadend.php', + 'App\\SupportedApps\\Taiga\\Taiga' => $baseDir . '/app/SupportedApps/Taiga/Taiga.php', 'App\\SupportedApps\\Tautulli\\Tautulli' => $baseDir . '/app/SupportedApps/Tautulli/Tautulli.php', 'App\\SupportedApps\\TheLounge\\TheLounge' => $baseDir . '/app/SupportedApps/TheLounge/TheLounge.php', 'App\\SupportedApps\\TinyTinyRSS\\TinyTinyRSS' => $baseDir . '/app/SupportedApps/TinyTinyRSS/TinyTinyRSS.php', + 'App\\SupportedApps\\Traccar\\Traccar' => $baseDir . '/app/SupportedApps/Traccar/Traccar.php', 'App\\SupportedApps\\Traefik\\Traefik' => $baseDir . '/app/SupportedApps/Traefik/Traefik.php', 'App\\SupportedApps\\Transmission\\Transmission' => $baseDir . '/app/SupportedApps/Transmission/Transmission.php', + 'App\\SupportedApps\\Trilium\\Trilium' => $baseDir . '/app/SupportedApps/Trilium/Trilium.php', + 'App\\SupportedApps\\Ubooquity\\Ubooquity' => $baseDir . '/app/SupportedApps/Ubooquity/Ubooquity.php', 'App\\SupportedApps\\UniFi\\UniFi' => $baseDir . '/app/SupportedApps/UniFi/UniFi.php', 'App\\SupportedApps\\Unraid\\Unraid' => $baseDir . '/app/SupportedApps/Unraid/Unraid.php', 'App\\SupportedApps\\VMwarevCenter\\VMwarevCenter' => $baseDir . '/app/SupportedApps/VMwarevCenter/VMwarevCenter.php', 'App\\SupportedApps\\Virtualmin\\Virtualmin' => $baseDir . '/app/SupportedApps/Virtualmin/Virtualmin.php', + 'App\\SupportedApps\\Wallabag\\Wallabag' => $baseDir . '/app/SupportedApps/Wallabag/Wallabag.php', 'App\\SupportedApps\\Watcher\\Watcher' => $baseDir . '/app/SupportedApps/Watcher/Watcher.php', 'App\\SupportedApps\\WebTools\\WebTools' => $baseDir . '/app/SupportedApps/WebTools/WebTools.php', 'App\\SupportedApps\\Webmin\\Webmin' => $baseDir . '/app/SupportedApps/Webmin/Webmin.php', + 'App\\SupportedApps\\Wekan\\Wekan' => $baseDir . '/app/SupportedApps/Wekan/Wekan.php', + 'App\\SupportedApps\\Wetty\\Wetty' => $baseDir . '/app/SupportedApps/Wetty/Wetty.php', + 'App\\SupportedApps\\XWiki\\XWiki' => $baseDir . '/app/SupportedApps/XWiki/XWiki.php', + 'App\\SupportedApps\\Xigmanas\\Xigmanas' => $baseDir . '/app/SupportedApps/Xigmanas/Xigmanas.php', 'App\\SupportedApps\\ZNC\\ZNC' => $baseDir . '/app/SupportedApps/ZNC/ZNC.php', + 'App\\SupportedApps\\ZoneMinder\\ZoneMinder' => $baseDir . '/app/SupportedApps/ZoneMinder/ZoneMinder.php', + 'App\\SupportedApps\\Zulip\\Zulip' => $baseDir . '/app/SupportedApps/Zulip/Zulip.php', 'App\\SupportedApps\\openHAB\\openHAB' => $baseDir . '/app/SupportedApps/openHAB/openHAB.php', 'App\\SupportedApps\\openmediavault\\openmediavault' => $baseDir . '/app/SupportedApps/openmediavault/openmediavault.php', + 'App\\SupportedApps\\ownCloud\\ownCloud' => $baseDir . '/app/SupportedApps/ownCloud/ownCloud.php', 'App\\SupportedApps\\pfSense\\pfSense' => $baseDir . '/app/SupportedApps/pfSense/pfSense.php', + 'App\\SupportedApps\\pgAdmin\\pgAdmin' => $baseDir . '/app/SupportedApps/pgAdmin/pgAdmin.php', + 'App\\SupportedApps\\phpLDAPadmin\\phpLDAPadmin' => $baseDir . '/app/SupportedApps/phpLDAPadmin/phpLDAPadmin.php', + 'App\\SupportedApps\\phpMyAdmin\\phpMyAdmin' => $baseDir . '/app/SupportedApps/phpMyAdmin/phpMyAdmin.php', 'App\\SupportedApps\\pyLoad\\pyLoad' => $baseDir . '/app/SupportedApps/pyLoad/pyLoad.php', 'App\\SupportedApps\\qBittorrent\\qBittorrent' => $baseDir . '/app/SupportedApps/qBittorrent/qBittorrent.php', 'App\\SupportedApps\\ruTorrent\\ruTorrent' => $baseDir . '/app/SupportedApps/ruTorrent/ruTorrent.php', @@ -117,6 +212,7 @@ return array( 'Carbon\\Exceptions\\InvalidDateException' => $vendorDir . '/nesbot/carbon/src/Carbon/Exceptions/InvalidDateException.php', 'Carbon\\Laravel\\ServiceProvider' => $vendorDir . '/nesbot/carbon/src/Carbon/Laravel/ServiceProvider.php', 'Carbon\\Translator' => $vendorDir . '/nesbot/carbon/src/Carbon/Translator.php', + 'Carbon\\Upgrade' => $vendorDir . '/nesbot/carbon/src/Carbon/Upgrade.php', 'Clue\\StreamFilter\\CallbackFilter' => $vendorDir . '/clue/stream-filter/src/CallbackFilter.php', 'Collective\\Html\\Componentable' => $vendorDir . '/laravelcollective/html/src/Componentable.php', 'Collective\\Html\\Eloquent\\FormAccessible' => $vendorDir . '/laravelcollective/html/src/Eloquent/FormAccessible.php', @@ -172,6 +268,7 @@ return array( 'Dotenv\\Exception\\InvalidPathException' => $vendorDir . '/vlucas/phpdotenv/src/Exception/InvalidPathException.php', 'Dotenv\\Exception\\ValidationException' => $vendorDir . '/vlucas/phpdotenv/src/Exception/ValidationException.php', 'Dotenv\\Loader' => $vendorDir . '/vlucas/phpdotenv/src/Loader.php', + 'Dotenv\\Parser' => $vendorDir . '/vlucas/phpdotenv/src/Parser.php', 'Dotenv\\Validator' => $vendorDir . '/vlucas/phpdotenv/src/Validator.php', 'Egulias\\EmailValidator\\EmailLexer' => $vendorDir . '/egulias/email-validator/EmailValidator/EmailLexer.php', 'Egulias\\EmailValidator\\EmailParser' => $vendorDir . '/egulias/email-validator/EmailValidator/EmailParser.php', @@ -187,12 +284,12 @@ return array( 'Egulias\\EmailValidator\\Exception\\DomainHyphened' => $vendorDir . '/egulias/email-validator/EmailValidator/Exception/DomainHyphened.php', 'Egulias\\EmailValidator\\Exception\\DotAtEnd' => $vendorDir . '/egulias/email-validator/EmailValidator/Exception/DotAtEnd.php', 'Egulias\\EmailValidator\\Exception\\DotAtStart' => $vendorDir . '/egulias/email-validator/EmailValidator/Exception/DotAtStart.php', - 'Egulias\\EmailValidator\\Exception\\ExpectedQPair' => $vendorDir . '/egulias/email-validator/EmailValidator/Exception/ExpectingQPair.php', 'Egulias\\EmailValidator\\Exception\\ExpectingAT' => $vendorDir . '/egulias/email-validator/EmailValidator/Exception/ExpectingAT.php', 'Egulias\\EmailValidator\\Exception\\ExpectingATEXT' => $vendorDir . '/egulias/email-validator/EmailValidator/Exception/ExpectingATEXT.php', 'Egulias\\EmailValidator\\Exception\\ExpectingCTEXT' => $vendorDir . '/egulias/email-validator/EmailValidator/Exception/ExpectingCTEXT.php', 'Egulias\\EmailValidator\\Exception\\ExpectingDTEXT' => $vendorDir . '/egulias/email-validator/EmailValidator/Exception/ExpectingDTEXT.php', 'Egulias\\EmailValidator\\Exception\\ExpectingDomainLiteralClose' => $vendorDir . '/egulias/email-validator/EmailValidator/Exception/ExpectingDomainLiteralClose.php', + 'Egulias\\EmailValidator\\Exception\\ExpectingQPair' => $vendorDir . '/egulias/email-validator/EmailValidator/Exception/ExpectingQPair.php', 'Egulias\\EmailValidator\\Exception\\InvalidEmail' => $vendorDir . '/egulias/email-validator/EmailValidator/Exception/InvalidEmail.php', 'Egulias\\EmailValidator\\Exception\\NoDNSRecord' => $vendorDir . '/egulias/email-validator/EmailValidator/Exception/NoDNSRecord.php', 'Egulias\\EmailValidator\\Exception\\NoDomainPart' => $vendorDir . '/egulias/email-validator/EmailValidator/Exception/NoDomainPart.php', @@ -726,6 +823,7 @@ return array( 'Github\\Api\\Miscellaneous\\CodeOfConduct' => $vendorDir . '/knplabs/github-api/lib/Github/Api/Miscellaneous/CodeOfConduct.php', 'Github\\Api\\Miscellaneous\\Emojis' => $vendorDir . '/knplabs/github-api/lib/Github/Api/Miscellaneous/Emojis.php', 'Github\\Api\\Miscellaneous\\Gitignore' => $vendorDir . '/knplabs/github-api/lib/Github/Api/Miscellaneous/Gitignore.php', + 'Github\\Api\\Miscellaneous\\Licenses' => $vendorDir . '/knplabs/github-api/lib/Github/Api/Miscellaneous/Licenses.php', 'Github\\Api\\Notification' => $vendorDir . '/knplabs/github-api/lib/Github/Api/Notification.php', 'Github\\Api\\Organization' => $vendorDir . '/knplabs/github-api/lib/Github/Api/Organization.php', 'Github\\Api\\Organization\\Hooks' => $vendorDir . '/knplabs/github-api/lib/Github/Api/Organization/Hooks.php', @@ -740,6 +838,7 @@ return array( 'Github\\Api\\PullRequest\\Review' => $vendorDir . '/knplabs/github-api/lib/Github/Api/PullRequest/Review.php', 'Github\\Api\\PullRequest\\ReviewRequest' => $vendorDir . '/knplabs/github-api/lib/Github/Api/PullRequest/ReviewRequest.php', 'Github\\Api\\RateLimit' => $vendorDir . '/knplabs/github-api/lib/Github/Api/RateLimit.php', + 'Github\\Api\\RateLimit\\RateLimitResource' => $vendorDir . '/knplabs/github-api/lib/Github/Api/RateLimit/RateLimitResource.php', 'Github\\Api\\Repo' => $vendorDir . '/knplabs/github-api/lib/Github/Api/Repo.php', 'Github\\Api\\Repository\\Assets' => $vendorDir . '/knplabs/github-api/lib/Github/Api/Repository/Assets.php', 'Github\\Api\\Repository\\Collaborators' => $vendorDir . '/knplabs/github-api/lib/Github/Api/Repository/Collaborators.php', @@ -967,6 +1066,8 @@ return array( 'Http\\Client\\Common\\Plugin\\Cache\\Generator\\CacheKeyGenerator' => $vendorDir . '/php-http/cache-plugin/src/Cache/Generator/CacheKeyGenerator.php', 'Http\\Client\\Common\\Plugin\\Cache\\Generator\\HeaderCacheKeyGenerator' => $vendorDir . '/php-http/cache-plugin/src/Cache/Generator/HeaderCacheKeyGenerator.php', 'Http\\Client\\Common\\Plugin\\Cache\\Generator\\SimpleGenerator' => $vendorDir . '/php-http/cache-plugin/src/Cache/Generator/SimpleGenerator.php', + 'Http\\Client\\Common\\Plugin\\Cache\\Listener\\AddHeaderCacheListener' => $vendorDir . '/php-http/cache-plugin/src/Cache/Listener/AddHeaderCacheListener.php', + 'Http\\Client\\Common\\Plugin\\Cache\\Listener\\CacheListener' => $vendorDir . '/php-http/cache-plugin/src/Cache/Listener/CacheListener.php', 'Http\\Client\\Common\\Plugin\\ContentLengthPlugin' => $vendorDir . '/php-http/client-common/src/Plugin/ContentLengthPlugin.php', 'Http\\Client\\Common\\Plugin\\ContentTypePlugin' => $vendorDir . '/php-http/client-common/src/Plugin/ContentTypePlugin.php', 'Http\\Client\\Common\\Plugin\\CookiePlugin' => $vendorDir . '/php-http/client-common/src/Plugin/CookiePlugin.php', @@ -1006,7 +1107,10 @@ return array( 'Http\\Discovery\\HttpClientDiscovery' => $vendorDir . '/php-http/discovery/src/HttpClientDiscovery.php', 'Http\\Discovery\\MessageFactoryDiscovery' => $vendorDir . '/php-http/discovery/src/MessageFactoryDiscovery.php', 'Http\\Discovery\\NotFoundException' => $vendorDir . '/php-http/discovery/src/NotFoundException.php', + 'Http\\Discovery\\Psr17FactoryDiscovery' => $vendorDir . '/php-http/discovery/src/Psr17FactoryDiscovery.php', + 'Http\\Discovery\\Psr18ClientDiscovery' => $vendorDir . '/php-http/discovery/src/Psr18ClientDiscovery.php', 'Http\\Discovery\\Strategy\\CommonClassesStrategy' => $vendorDir . '/php-http/discovery/src/Strategy/CommonClassesStrategy.php', + 'Http\\Discovery\\Strategy\\CommonPsr17ClassesStrategy' => $vendorDir . '/php-http/discovery/src/Strategy/CommonPsr17ClassesStrategy.php', 'Http\\Discovery\\Strategy\\DiscoveryStrategy' => $vendorDir . '/php-http/discovery/src/Strategy/DiscoveryStrategy.php', 'Http\\Discovery\\Strategy\\MockClientStrategy' => $vendorDir . '/php-http/discovery/src/Strategy/MockClientStrategy.php', 'Http\\Discovery\\Strategy\\PuliBetaStrategy' => $vendorDir . '/php-http/discovery/src/Strategy/PuliBetaStrategy.php', @@ -1320,6 +1424,7 @@ return array( 'Illuminate\\Database\\Eloquent\\Concerns\\QueriesRelationships' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/QueriesRelationships.php', 'Illuminate\\Database\\Eloquent\\Factory' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/Factory.php', 'Illuminate\\Database\\Eloquent\\FactoryBuilder' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/FactoryBuilder.php', + 'Illuminate\\Database\\Eloquent\\HigherOrderBuilderProxy' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/HigherOrderBuilderProxy.php', 'Illuminate\\Database\\Eloquent\\JsonEncodingException' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/JsonEncodingException.php', 'Illuminate\\Database\\Eloquent\\MassAssignmentException' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/MassAssignmentException.php', 'Illuminate\\Database\\Eloquent\\Model' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/Model.php', @@ -1878,6 +1983,7 @@ return array( 'JakubOnderka\\PhpConsoleColor\\ConsoleColor' => $vendorDir . '/jakub-onderka/php-console-color/src/ConsoleColor.php', 'JakubOnderka\\PhpConsoleColor\\InvalidStyleException' => $vendorDir . '/jakub-onderka/php-console-color/src/InvalidStyleException.php', 'JakubOnderka\\PhpConsoleHighlighter\\Highlighter' => $vendorDir . '/jakub-onderka/php-console-highlighter/src/Highlighter.php', + 'JsonException' => $vendorDir . '/symfony/polyfill-php73/Resources/stubs/JsonException.php', 'JsonSerializable' => $vendorDir . '/nesbot/carbon/src/JsonSerializable.php', 'Laravel\\Tinker\\ClassAliasAutoloader' => $vendorDir . '/laravel/tinker/src/ClassAliasAutoloader.php', 'Laravel\\Tinker\\Console\\TinkerCommand' => $vendorDir . '/laravel/tinker/src/Console/TinkerCommand.php', @@ -1898,16 +2004,18 @@ return array( 'Lcobucci\\JWT\\Signer' => $vendorDir . '/lcobucci/jwt/src/Signer.php', 'Lcobucci\\JWT\\Signer\\BaseSigner' => $vendorDir . '/lcobucci/jwt/src/Signer/BaseSigner.php', 'Lcobucci\\JWT\\Signer\\Ecdsa' => $vendorDir . '/lcobucci/jwt/src/Signer/Ecdsa.php', - 'Lcobucci\\JWT\\Signer\\Ecdsa\\KeyParser' => $vendorDir . '/lcobucci/jwt/src/Signer/Ecdsa/KeyParser.php', + 'Lcobucci\\JWT\\Signer\\Ecdsa\\MultibyteStringConverter' => $vendorDir . '/lcobucci/jwt/src/Signer/Ecdsa/MultibyteStringConverter.php', 'Lcobucci\\JWT\\Signer\\Ecdsa\\Sha256' => $vendorDir . '/lcobucci/jwt/src/Signer/Ecdsa/Sha256.php', 'Lcobucci\\JWT\\Signer\\Ecdsa\\Sha384' => $vendorDir . '/lcobucci/jwt/src/Signer/Ecdsa/Sha384.php', 'Lcobucci\\JWT\\Signer\\Ecdsa\\Sha512' => $vendorDir . '/lcobucci/jwt/src/Signer/Ecdsa/Sha512.php', + 'Lcobucci\\JWT\\Signer\\Ecdsa\\SignatureConverter' => $vendorDir . '/lcobucci/jwt/src/Signer/Ecdsa/SignatureConverter.php', 'Lcobucci\\JWT\\Signer\\Hmac' => $vendorDir . '/lcobucci/jwt/src/Signer/Hmac.php', 'Lcobucci\\JWT\\Signer\\Hmac\\Sha256' => $vendorDir . '/lcobucci/jwt/src/Signer/Hmac/Sha256.php', 'Lcobucci\\JWT\\Signer\\Hmac\\Sha384' => $vendorDir . '/lcobucci/jwt/src/Signer/Hmac/Sha384.php', 'Lcobucci\\JWT\\Signer\\Hmac\\Sha512' => $vendorDir . '/lcobucci/jwt/src/Signer/Hmac/Sha512.php', 'Lcobucci\\JWT\\Signer\\Key' => $vendorDir . '/lcobucci/jwt/src/Signer/Key.php', 'Lcobucci\\JWT\\Signer\\Keychain' => $vendorDir . '/lcobucci/jwt/src/Signer/Keychain.php', + 'Lcobucci\\JWT\\Signer\\OpenSSL' => $vendorDir . '/lcobucci/jwt/src/Signer/OpenSSL.php', 'Lcobucci\\JWT\\Signer\\Rsa' => $vendorDir . '/lcobucci/jwt/src/Signer/Rsa.php', 'Lcobucci\\JWT\\Signer\\Rsa\\Sha256' => $vendorDir . '/lcobucci/jwt/src/Signer/Rsa/Sha256.php', 'Lcobucci\\JWT\\Signer\\Rsa\\Sha384' => $vendorDir . '/lcobucci/jwt/src/Signer/Rsa/Sha384.php', @@ -1966,7 +2074,11 @@ return array( 'Mockery\\Adapter\\Phpunit\\Legacy\\TestListenerForV7' => $vendorDir . '/mockery/mockery/library/Mockery/Adapter/Phpunit/Legacy/TestListenerForV7.php', 'Mockery\\Adapter\\Phpunit\\Legacy\\TestListenerTrait' => $vendorDir . '/mockery/mockery/library/Mockery/Adapter/Phpunit/Legacy/TestListenerTrait.php', 'Mockery\\Adapter\\Phpunit\\MockeryPHPUnitIntegration' => $vendorDir . '/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryPHPUnitIntegration.php', + 'Mockery\\Adapter\\Phpunit\\MockeryPHPUnitIntegrationAssertPostConditionsForV7AndPrevious' => $vendorDir . '/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryPHPUnitIntegrationAssertPostConditionsForV7AndPrevious.php', + 'Mockery\\Adapter\\Phpunit\\MockeryPHPUnitIntegrationAssertPostConditionsForV8' => $vendorDir . '/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryPHPUnitIntegrationAssertPostConditionsForV8.php', 'Mockery\\Adapter\\Phpunit\\MockeryTestCase' => $vendorDir . '/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryTestCase.php', + 'Mockery\\Adapter\\Phpunit\\MockeryTestCaseSetUpForV7AndPrevious' => $vendorDir . '/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryTestCaseSetUpForV7AndPrevious.php', + 'Mockery\\Adapter\\Phpunit\\MockeryTestCaseSetUpForV8' => $vendorDir . '/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryTestCaseSetUpForV8.php', 'Mockery\\Adapter\\Phpunit\\TestListener' => $vendorDir . '/mockery/mockery/library/Mockery/Adapter/Phpunit/TestListener.php', 'Mockery\\ClosureWrapper' => $vendorDir . '/mockery/mockery/library/Mockery/ClosureWrapper.php', 'Mockery\\CompositeExpectation' => $vendorDir . '/mockery/mockery/library/Mockery/CompositeExpectation.php', @@ -2139,6 +2251,7 @@ return array( 'Monolog\\Utils' => $vendorDir . '/monolog/monolog/src/Monolog/Utils.php', 'Nexmo\\Account\\Balance' => $vendorDir . '/nexmo/client/src/Account/Balance.php', 'Nexmo\\Account\\Client' => $vendorDir . '/nexmo/client/src/Account/Client.php', + 'Nexmo\\Account\\Config' => $vendorDir . '/nexmo/client/src/Account/Config.php', 'Nexmo\\Account\\PrefixPrice' => $vendorDir . '/nexmo/client/src/Account/PrefixPrice.php', 'Nexmo\\Account\\Price' => $vendorDir . '/nexmo/client/src/Account/Price.php', 'Nexmo\\Account\\Secret' => $vendorDir . '/nexmo/client/src/Account/Secret.php', @@ -2150,6 +2263,9 @@ return array( 'Nexmo\\Application\\ApplicationInterface' => $vendorDir . '/nexmo/client/src/Application/ApplicationInterface.php', 'Nexmo\\Application\\Client' => $vendorDir . '/nexmo/client/src/Application/Client.php', 'Nexmo\\Application\\Filter' => $vendorDir . '/nexmo/client/src/Application/Filter.php', + 'Nexmo\\Application\\MessagesConfig' => $vendorDir . '/nexmo/client/src/Application/MessagesConfig.php', + 'Nexmo\\Application\\RtcConfig' => $vendorDir . '/nexmo/client/src/Application/RtcConfig.php', + 'Nexmo\\Application\\VbcConfig' => $vendorDir . '/nexmo/client/src/Application/VbcConfig.php', 'Nexmo\\Application\\VoiceConfig' => $vendorDir . '/nexmo/client/src/Application/VoiceConfig.php', 'Nexmo\\Application\\Webhook' => $vendorDir . '/nexmo/client/src/Application/Webhook.php', 'Nexmo\\Call\\Call' => $vendorDir . '/nexmo/client/src/Call/Call.php', @@ -2210,6 +2326,7 @@ return array( 'Nexmo\\Entity\\JsonSerializableInterface' => $vendorDir . '/nexmo/client/src/Entity/JsonSerializableInterface.php', 'Nexmo\\Entity\\JsonSerializableTrait' => $vendorDir . '/nexmo/client/src/Entity/JsonSerializableTrait.php', 'Nexmo\\Entity\\JsonUnserializableInterface' => $vendorDir . '/nexmo/client/src/Entity/JsonUnserializableInterface.php', + 'Nexmo\\Entity\\ModernCollectionTrait' => $vendorDir . '/nexmo/client/src/Entity/ModernCollectionTrait.php', 'Nexmo\\Entity\\NoRequestResponseTrait' => $vendorDir . '/nexmo/client/src/Entity/NoRequestResponseTrait.php', 'Nexmo\\Entity\\Psr7Trait' => $vendorDir . '/nexmo/client/src/Entity/Psr7Trait.php', 'Nexmo\\Entity\\RequestArrayTrait' => $vendorDir . '/nexmo/client/src/Entity/RequestArrayTrait.php', @@ -2233,6 +2350,10 @@ return array( 'Nexmo\\Message\\Query' => $vendorDir . '/nexmo/client/src/Message/Query.php', 'Nexmo\\Message\\Response\\Collection' => $vendorDir . '/nexmo/client/src/Message/Response/Collection.php', 'Nexmo\\Message\\Response\\Message' => $vendorDir . '/nexmo/client/src/Message/Response/Message.php', + 'Nexmo\\Message\\Shortcode' => $vendorDir . '/nexmo/client/src/Message/Shortcode.php', + 'Nexmo\\Message\\Shortcode\\Alert' => $vendorDir . '/nexmo/client/src/Message/Shortcode/Alert.php', + 'Nexmo\\Message\\Shortcode\\Marketing' => $vendorDir . '/nexmo/client/src/Message/Shortcode/Marketing.php', + 'Nexmo\\Message\\Shortcode\\TwoFactor' => $vendorDir . '/nexmo/client/src/Message/Shortcode/TwoFactor.php', 'Nexmo\\Message\\Text' => $vendorDir . '/nexmo/client/src/Message/Text.php', 'Nexmo\\Message\\Unicode' => $vendorDir . '/nexmo/client/src/Message/Unicode.php', 'Nexmo\\Message\\Vcal' => $vendorDir . '/nexmo/client/src/Message/Vcal.php', @@ -2737,6 +2858,9 @@ return array( 'PhpParser\\JsonDecoder' => $vendorDir . '/nikic/php-parser/lib/PhpParser/JsonDecoder.php', 'PhpParser\\Lexer' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer.php', 'PhpParser\\Lexer\\Emulative' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/Emulative.php', + 'PhpParser\\Lexer\\TokenEmulator\\CoaleseEqualTokenEmulator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/CoaleseEqualTokenEmulator.php', + 'PhpParser\\Lexer\\TokenEmulator\\FnTokenEmulator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/FnTokenEmulator.php', + 'PhpParser\\Lexer\\TokenEmulator\\TokenEmulatorInterface' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/TokenEmulatorInterface.php', 'PhpParser\\NameContext' => $vendorDir . '/nikic/php-parser/lib/PhpParser/NameContext.php', 'PhpParser\\Node' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node.php', 'PhpParser\\NodeAbstract' => $vendorDir . '/nikic/php-parser/lib/PhpParser/NodeAbstract.php', @@ -2756,11 +2880,13 @@ return array( 'PhpParser\\Node\\Expr\\ArrayDimFetch' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayDimFetch.php', 'PhpParser\\Node\\Expr\\ArrayItem' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayItem.php', 'PhpParser\\Node\\Expr\\Array_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Array_.php', + 'PhpParser\\Node\\Expr\\ArrowFunction' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/ArrowFunction.php', 'PhpParser\\Node\\Expr\\Assign' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Assign.php', 'PhpParser\\Node\\Expr\\AssignOp' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp.php', 'PhpParser\\Node\\Expr\\AssignOp\\BitwiseAnd' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseAnd.php', 'PhpParser\\Node\\Expr\\AssignOp\\BitwiseOr' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseOr.php', 'PhpParser\\Node\\Expr\\AssignOp\\BitwiseXor' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseXor.php', + 'PhpParser\\Node\\Expr\\AssignOp\\Coalesce' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Coalesce.php', 'PhpParser\\Node\\Expr\\AssignOp\\Concat' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Concat.php', 'PhpParser\\Node\\Expr\\AssignOp\\Div' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Div.php', 'PhpParser\\Node\\Expr\\AssignOp\\Minus' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Minus.php', @@ -3018,11 +3144,17 @@ return array( 'Psr\\Container\\ContainerInterface' => $vendorDir . '/psr/container/src/ContainerInterface.php', 'Psr\\Container\\NotFoundExceptionInterface' => $vendorDir . '/psr/container/src/NotFoundExceptionInterface.php', 'Psr\\Http\\Message\\MessageInterface' => $vendorDir . '/psr/http-message/src/MessageInterface.php', + 'Psr\\Http\\Message\\RequestFactoryInterface' => $vendorDir . '/psr/http-factory/src/RequestFactoryInterface.php', 'Psr\\Http\\Message\\RequestInterface' => $vendorDir . '/psr/http-message/src/RequestInterface.php', + 'Psr\\Http\\Message\\ResponseFactoryInterface' => $vendorDir . '/psr/http-factory/src/ResponseFactoryInterface.php', 'Psr\\Http\\Message\\ResponseInterface' => $vendorDir . '/psr/http-message/src/ResponseInterface.php', + 'Psr\\Http\\Message\\ServerRequestFactoryInterface' => $vendorDir . '/psr/http-factory/src/ServerRequestFactoryInterface.php', 'Psr\\Http\\Message\\ServerRequestInterface' => $vendorDir . '/psr/http-message/src/ServerRequestInterface.php', + 'Psr\\Http\\Message\\StreamFactoryInterface' => $vendorDir . '/psr/http-factory/src/StreamFactoryInterface.php', 'Psr\\Http\\Message\\StreamInterface' => $vendorDir . '/psr/http-message/src/StreamInterface.php', + 'Psr\\Http\\Message\\UploadedFileFactoryInterface' => $vendorDir . '/psr/http-factory/src/UploadedFileFactoryInterface.php', 'Psr\\Http\\Message\\UploadedFileInterface' => $vendorDir . '/psr/http-message/src/UploadedFileInterface.php', + 'Psr\\Http\\Message\\UriFactoryInterface' => $vendorDir . '/psr/http-factory/src/UriFactoryInterface.php', 'Psr\\Http\\Message\\UriInterface' => $vendorDir . '/psr/http-message/src/UriInterface.php', 'Psr\\Log\\AbstractLogger' => $vendorDir . '/psr/log/Psr/Log/AbstractLogger.php', 'Psr\\Log\\InvalidArgumentException' => $vendorDir . '/psr/log/Psr/Log/InvalidArgumentException.php', @@ -3352,6 +3484,7 @@ return array( 'Symfony\\Component\\Console\\Formatter\\WrappableOutputFormatterInterface' => $vendorDir . '/symfony/console/Formatter/WrappableOutputFormatterInterface.php', 'Symfony\\Component\\Console\\Helper\\DebugFormatterHelper' => $vendorDir . '/symfony/console/Helper/DebugFormatterHelper.php', 'Symfony\\Component\\Console\\Helper\\DescriptorHelper' => $vendorDir . '/symfony/console/Helper/DescriptorHelper.php', + 'Symfony\\Component\\Console\\Helper\\Dumper' => $vendorDir . '/symfony/console/Helper/Dumper.php', 'Symfony\\Component\\Console\\Helper\\FormatterHelper' => $vendorDir . '/symfony/console/Helper/FormatterHelper.php', 'Symfony\\Component\\Console\\Helper\\Helper' => $vendorDir . '/symfony/console/Helper/Helper.php', 'Symfony\\Component\\Console\\Helper\\HelperInterface' => $vendorDir . '/symfony/console/Helper/HelperInterface.php', @@ -3472,11 +3605,15 @@ return array( 'Symfony\\Component\\EventDispatcher\\EventSubscriberInterface' => $vendorDir . '/symfony/event-dispatcher/EventSubscriberInterface.php', 'Symfony\\Component\\EventDispatcher\\GenericEvent' => $vendorDir . '/symfony/event-dispatcher/GenericEvent.php', 'Symfony\\Component\\EventDispatcher\\ImmutableEventDispatcher' => $vendorDir . '/symfony/event-dispatcher/ImmutableEventDispatcher.php', + 'Symfony\\Component\\EventDispatcher\\LegacyEventDispatcherProxy' => $vendorDir . '/symfony/event-dispatcher/LegacyEventDispatcherProxy.php', + 'Symfony\\Component\\EventDispatcher\\LegacyEventProxy' => $vendorDir . '/symfony/event-dispatcher/LegacyEventProxy.php', 'Symfony\\Component\\Finder\\Comparator\\Comparator' => $vendorDir . '/symfony/finder/Comparator/Comparator.php', 'Symfony\\Component\\Finder\\Comparator\\DateComparator' => $vendorDir . '/symfony/finder/Comparator/DateComparator.php', 'Symfony\\Component\\Finder\\Comparator\\NumberComparator' => $vendorDir . '/symfony/finder/Comparator/NumberComparator.php', 'Symfony\\Component\\Finder\\Exception\\AccessDeniedException' => $vendorDir . '/symfony/finder/Exception/AccessDeniedException.php', + 'Symfony\\Component\\Finder\\Exception\\DirectoryNotFoundException' => $vendorDir . '/symfony/finder/Exception/DirectoryNotFoundException.php', 'Symfony\\Component\\Finder\\Finder' => $vendorDir . '/symfony/finder/Finder.php', + 'Symfony\\Component\\Finder\\Gitignore' => $vendorDir . '/symfony/finder/Gitignore.php', 'Symfony\\Component\\Finder\\Glob' => $vendorDir . '/symfony/finder/Glob.php', 'Symfony\\Component\\Finder\\Iterator\\CustomFilterIterator' => $vendorDir . '/symfony/finder/Iterator/CustomFilterIterator.php', 'Symfony\\Component\\Finder\\Iterator\\DateRangeFilterIterator' => $vendorDir . '/symfony/finder/Iterator/DateRangeFilterIterator.php', @@ -3565,6 +3702,15 @@ return array( 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Proxy\\SessionHandlerProxy' => $vendorDir . '/symfony/http-foundation/Session/Storage/Proxy/SessionHandlerProxy.php', 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\SessionStorageInterface' => $vendorDir . '/symfony/http-foundation/Session/Storage/SessionStorageInterface.php', 'Symfony\\Component\\HttpFoundation\\StreamedResponse' => $vendorDir . '/symfony/http-foundation/StreamedResponse.php', + 'Symfony\\Component\\HttpFoundation\\Test\\Constraint\\RequestAttributeValueSame' => $vendorDir . '/symfony/http-foundation/Test/Constraint/RequestAttributeValueSame.php', + 'Symfony\\Component\\HttpFoundation\\Test\\Constraint\\ResponseCookieValueSame' => $vendorDir . '/symfony/http-foundation/Test/Constraint/ResponseCookieValueSame.php', + 'Symfony\\Component\\HttpFoundation\\Test\\Constraint\\ResponseHasCookie' => $vendorDir . '/symfony/http-foundation/Test/Constraint/ResponseHasCookie.php', + 'Symfony\\Component\\HttpFoundation\\Test\\Constraint\\ResponseHasHeader' => $vendorDir . '/symfony/http-foundation/Test/Constraint/ResponseHasHeader.php', + 'Symfony\\Component\\HttpFoundation\\Test\\Constraint\\ResponseHeaderSame' => $vendorDir . '/symfony/http-foundation/Test/Constraint/ResponseHeaderSame.php', + 'Symfony\\Component\\HttpFoundation\\Test\\Constraint\\ResponseIsRedirected' => $vendorDir . '/symfony/http-foundation/Test/Constraint/ResponseIsRedirected.php', + 'Symfony\\Component\\HttpFoundation\\Test\\Constraint\\ResponseIsSuccessful' => $vendorDir . '/symfony/http-foundation/Test/Constraint/ResponseIsSuccessful.php', + 'Symfony\\Component\\HttpFoundation\\Test\\Constraint\\ResponseStatusCodeSame' => $vendorDir . '/symfony/http-foundation/Test/Constraint/ResponseStatusCodeSame.php', + 'Symfony\\Component\\HttpFoundation\\UrlHelper' => $vendorDir . '/symfony/http-foundation/UrlHelper.php', 'Symfony\\Component\\HttpKernel\\Bundle\\Bundle' => $vendorDir . '/symfony/http-kernel/Bundle/Bundle.php', 'Symfony\\Component\\HttpKernel\\Bundle\\BundleInterface' => $vendorDir . '/symfony/http-kernel/Bundle/BundleInterface.php', 'Symfony\\Component\\HttpKernel\\CacheClearer\\CacheClearerInterface' => $vendorDir . '/symfony/http-kernel/CacheClearer/CacheClearerInterface.php', @@ -3582,6 +3728,7 @@ return array( 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver' => $vendorDir . '/symfony/http-kernel/Controller/ArgumentResolver.php', 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolverInterface' => $vendorDir . '/symfony/http-kernel/Controller/ArgumentResolverInterface.php', 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\DefaultValueResolver' => $vendorDir . '/symfony/http-kernel/Controller/ArgumentResolver/DefaultValueResolver.php', + 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\NotTaggedControllerValueResolver' => $vendorDir . '/symfony/http-kernel/Controller/ArgumentResolver/NotTaggedControllerValueResolver.php', 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\RequestAttributeValueResolver' => $vendorDir . '/symfony/http-kernel/Controller/ArgumentResolver/RequestAttributeValueResolver.php', 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\RequestValueResolver' => $vendorDir . '/symfony/http-kernel/Controller/ArgumentResolver/RequestValueResolver.php', 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\ServiceValueResolver' => $vendorDir . '/symfony/http-kernel/Controller/ArgumentResolver/ServiceValueResolver.php', @@ -3619,6 +3766,7 @@ return array( 'Symfony\\Component\\HttpKernel\\DependencyInjection\\LoggerPass' => $vendorDir . '/symfony/http-kernel/DependencyInjection/LoggerPass.php', 'Symfony\\Component\\HttpKernel\\DependencyInjection\\MergeExtensionConfigurationPass' => $vendorDir . '/symfony/http-kernel/DependencyInjection/MergeExtensionConfigurationPass.php', 'Symfony\\Component\\HttpKernel\\DependencyInjection\\RegisterControllerArgumentLocatorsPass' => $vendorDir . '/symfony/http-kernel/DependencyInjection/RegisterControllerArgumentLocatorsPass.php', + 'Symfony\\Component\\HttpKernel\\DependencyInjection\\RegisterLocaleAwareServicesPass' => $vendorDir . '/symfony/http-kernel/DependencyInjection/RegisterLocaleAwareServicesPass.php', 'Symfony\\Component\\HttpKernel\\DependencyInjection\\RemoveEmptyControllerArgumentLocatorsPass' => $vendorDir . '/symfony/http-kernel/DependencyInjection/RemoveEmptyControllerArgumentLocatorsPass.php', 'Symfony\\Component\\HttpKernel\\DependencyInjection\\ResettableServicePass' => $vendorDir . '/symfony/http-kernel/DependencyInjection/ResettableServicePass.php', 'Symfony\\Component\\HttpKernel\\DependencyInjection\\ServicesResetter' => $vendorDir . '/symfony/http-kernel/DependencyInjection/ServicesResetter.php', @@ -3626,9 +3774,11 @@ return array( 'Symfony\\Component\\HttpKernel\\EventListener\\AbstractTestSessionListener' => $vendorDir . '/symfony/http-kernel/EventListener/AbstractTestSessionListener.php', 'Symfony\\Component\\HttpKernel\\EventListener\\AddRequestFormatsListener' => $vendorDir . '/symfony/http-kernel/EventListener/AddRequestFormatsListener.php', 'Symfony\\Component\\HttpKernel\\EventListener\\DebugHandlersListener' => $vendorDir . '/symfony/http-kernel/EventListener/DebugHandlersListener.php', + 'Symfony\\Component\\HttpKernel\\EventListener\\DisallowRobotsIndexingListener' => $vendorDir . '/symfony/http-kernel/EventListener/DisallowRobotsIndexingListener.php', 'Symfony\\Component\\HttpKernel\\EventListener\\DumpListener' => $vendorDir . '/symfony/http-kernel/EventListener/DumpListener.php', 'Symfony\\Component\\HttpKernel\\EventListener\\ExceptionListener' => $vendorDir . '/symfony/http-kernel/EventListener/ExceptionListener.php', 'Symfony\\Component\\HttpKernel\\EventListener\\FragmentListener' => $vendorDir . '/symfony/http-kernel/EventListener/FragmentListener.php', + 'Symfony\\Component\\HttpKernel\\EventListener\\LocaleAwareListener' => $vendorDir . '/symfony/http-kernel/EventListener/LocaleAwareListener.php', 'Symfony\\Component\\HttpKernel\\EventListener\\LocaleListener' => $vendorDir . '/symfony/http-kernel/EventListener/LocaleListener.php', 'Symfony\\Component\\HttpKernel\\EventListener\\ProfilerListener' => $vendorDir . '/symfony/http-kernel/EventListener/ProfilerListener.php', 'Symfony\\Component\\HttpKernel\\EventListener\\ResponseListener' => $vendorDir . '/symfony/http-kernel/EventListener/ResponseListener.php', @@ -3640,6 +3790,9 @@ return array( 'Symfony\\Component\\HttpKernel\\EventListener\\TestSessionListener' => $vendorDir . '/symfony/http-kernel/EventListener/TestSessionListener.php', 'Symfony\\Component\\HttpKernel\\EventListener\\TranslatorListener' => $vendorDir . '/symfony/http-kernel/EventListener/TranslatorListener.php', 'Symfony\\Component\\HttpKernel\\EventListener\\ValidateRequestListener' => $vendorDir . '/symfony/http-kernel/EventListener/ValidateRequestListener.php', + 'Symfony\\Component\\HttpKernel\\Event\\ControllerArgumentsEvent' => $vendorDir . '/symfony/http-kernel/Event/ControllerArgumentsEvent.php', + 'Symfony\\Component\\HttpKernel\\Event\\ControllerEvent' => $vendorDir . '/symfony/http-kernel/Event/ControllerEvent.php', + 'Symfony\\Component\\HttpKernel\\Event\\ExceptionEvent' => $vendorDir . '/symfony/http-kernel/Event/ExceptionEvent.php', 'Symfony\\Component\\HttpKernel\\Event\\FilterControllerArgumentsEvent' => $vendorDir . '/symfony/http-kernel/Event/FilterControllerArgumentsEvent.php', 'Symfony\\Component\\HttpKernel\\Event\\FilterControllerEvent' => $vendorDir . '/symfony/http-kernel/Event/FilterControllerEvent.php', 'Symfony\\Component\\HttpKernel\\Event\\FilterResponseEvent' => $vendorDir . '/symfony/http-kernel/Event/FilterResponseEvent.php', @@ -3649,6 +3802,10 @@ return array( 'Symfony\\Component\\HttpKernel\\Event\\GetResponseForExceptionEvent' => $vendorDir . '/symfony/http-kernel/Event/GetResponseForExceptionEvent.php', 'Symfony\\Component\\HttpKernel\\Event\\KernelEvent' => $vendorDir . '/symfony/http-kernel/Event/KernelEvent.php', 'Symfony\\Component\\HttpKernel\\Event\\PostResponseEvent' => $vendorDir . '/symfony/http-kernel/Event/PostResponseEvent.php', + 'Symfony\\Component\\HttpKernel\\Event\\RequestEvent' => $vendorDir . '/symfony/http-kernel/Event/RequestEvent.php', + 'Symfony\\Component\\HttpKernel\\Event\\ResponseEvent' => $vendorDir . '/symfony/http-kernel/Event/ResponseEvent.php', + 'Symfony\\Component\\HttpKernel\\Event\\TerminateEvent' => $vendorDir . '/symfony/http-kernel/Event/TerminateEvent.php', + 'Symfony\\Component\\HttpKernel\\Event\\ViewEvent' => $vendorDir . '/symfony/http-kernel/Event/ViewEvent.php', 'Symfony\\Component\\HttpKernel\\Exception\\AccessDeniedHttpException' => $vendorDir . '/symfony/http-kernel/Exception/AccessDeniedHttpException.php', 'Symfony\\Component\\HttpKernel\\Exception\\BadRequestHttpException' => $vendorDir . '/symfony/http-kernel/Exception/BadRequestHttpException.php', 'Symfony\\Component\\HttpKernel\\Exception\\ConflictHttpException' => $vendorDir . '/symfony/http-kernel/Exception/ConflictHttpException.php', @@ -3685,7 +3842,9 @@ return array( 'Symfony\\Component\\HttpKernel\\HttpCache\\StoreInterface' => $vendorDir . '/symfony/http-kernel/HttpCache/StoreInterface.php', 'Symfony\\Component\\HttpKernel\\HttpCache\\SubRequestHandler' => $vendorDir . '/symfony/http-kernel/HttpCache/SubRequestHandler.php', 'Symfony\\Component\\HttpKernel\\HttpCache\\SurrogateInterface' => $vendorDir . '/symfony/http-kernel/HttpCache/SurrogateInterface.php', + 'Symfony\\Component\\HttpKernel\\HttpClientKernel' => $vendorDir . '/symfony/http-kernel/HttpClientKernel.php', 'Symfony\\Component\\HttpKernel\\HttpKernel' => $vendorDir . '/symfony/http-kernel/HttpKernel.php', + 'Symfony\\Component\\HttpKernel\\HttpKernelBrowser' => $vendorDir . '/symfony/http-kernel/HttpKernelBrowser.php', 'Symfony\\Component\\HttpKernel\\HttpKernelInterface' => $vendorDir . '/symfony/http-kernel/HttpKernelInterface.php', 'Symfony\\Component\\HttpKernel\\Kernel' => $vendorDir . '/symfony/http-kernel/Kernel.php', 'Symfony\\Component\\HttpKernel\\KernelEvents' => $vendorDir . '/symfony/http-kernel/KernelEvents.php', @@ -3699,6 +3858,59 @@ return array( 'Symfony\\Component\\HttpKernel\\RebootableInterface' => $vendorDir . '/symfony/http-kernel/RebootableInterface.php', 'Symfony\\Component\\HttpKernel\\TerminableInterface' => $vendorDir . '/symfony/http-kernel/TerminableInterface.php', 'Symfony\\Component\\HttpKernel\\UriSigner' => $vendorDir . '/symfony/http-kernel/UriSigner.php', + 'Symfony\\Component\\Mime\\Address' => $vendorDir . '/symfony/mime/Address.php', + 'Symfony\\Component\\Mime\\BodyRendererInterface' => $vendorDir . '/symfony/mime/BodyRendererInterface.php', + 'Symfony\\Component\\Mime\\CharacterStream' => $vendorDir . '/symfony/mime/CharacterStream.php', + 'Symfony\\Component\\Mime\\DependencyInjection\\AddMimeTypeGuesserPass' => $vendorDir . '/symfony/mime/DependencyInjection/AddMimeTypeGuesserPass.php', + 'Symfony\\Component\\Mime\\Email' => $vendorDir . '/symfony/mime/Email.php', + 'Symfony\\Component\\Mime\\Encoder\\AddressEncoderInterface' => $vendorDir . '/symfony/mime/Encoder/AddressEncoderInterface.php', + 'Symfony\\Component\\Mime\\Encoder\\Base64ContentEncoder' => $vendorDir . '/symfony/mime/Encoder/Base64ContentEncoder.php', + 'Symfony\\Component\\Mime\\Encoder\\Base64Encoder' => $vendorDir . '/symfony/mime/Encoder/Base64Encoder.php', + 'Symfony\\Component\\Mime\\Encoder\\Base64MimeHeaderEncoder' => $vendorDir . '/symfony/mime/Encoder/Base64MimeHeaderEncoder.php', + 'Symfony\\Component\\Mime\\Encoder\\ContentEncoderInterface' => $vendorDir . '/symfony/mime/Encoder/ContentEncoderInterface.php', + 'Symfony\\Component\\Mime\\Encoder\\EightBitContentEncoder' => $vendorDir . '/symfony/mime/Encoder/EightBitContentEncoder.php', + 'Symfony\\Component\\Mime\\Encoder\\EncoderInterface' => $vendorDir . '/symfony/mime/Encoder/EncoderInterface.php', + 'Symfony\\Component\\Mime\\Encoder\\IdnAddressEncoder' => $vendorDir . '/symfony/mime/Encoder/IdnAddressEncoder.php', + 'Symfony\\Component\\Mime\\Encoder\\MimeHeaderEncoderInterface' => $vendorDir . '/symfony/mime/Encoder/MimeHeaderEncoderInterface.php', + 'Symfony\\Component\\Mime\\Encoder\\QpContentEncoder' => $vendorDir . '/symfony/mime/Encoder/QpContentEncoder.php', + 'Symfony\\Component\\Mime\\Encoder\\QpEncoder' => $vendorDir . '/symfony/mime/Encoder/QpEncoder.php', + 'Symfony\\Component\\Mime\\Encoder\\QpMimeHeaderEncoder' => $vendorDir . '/symfony/mime/Encoder/QpMimeHeaderEncoder.php', + 'Symfony\\Component\\Mime\\Encoder\\Rfc2231Encoder' => $vendorDir . '/symfony/mime/Encoder/Rfc2231Encoder.php', + 'Symfony\\Component\\Mime\\Exception\\AddressEncoderException' => $vendorDir . '/symfony/mime/Exception/AddressEncoderException.php', + 'Symfony\\Component\\Mime\\Exception\\ExceptionInterface' => $vendorDir . '/symfony/mime/Exception/ExceptionInterface.php', + 'Symfony\\Component\\Mime\\Exception\\InvalidArgumentException' => $vendorDir . '/symfony/mime/Exception/InvalidArgumentException.php', + 'Symfony\\Component\\Mime\\Exception\\LogicException' => $vendorDir . '/symfony/mime/Exception/LogicException.php', + 'Symfony\\Component\\Mime\\Exception\\RfcComplianceException' => $vendorDir . '/symfony/mime/Exception/RfcComplianceException.php', + 'Symfony\\Component\\Mime\\Exception\\RuntimeException' => $vendorDir . '/symfony/mime/Exception/RuntimeException.php', + 'Symfony\\Component\\Mime\\FileBinaryMimeTypeGuesser' => $vendorDir . '/symfony/mime/FileBinaryMimeTypeGuesser.php', + 'Symfony\\Component\\Mime\\FileinfoMimeTypeGuesser' => $vendorDir . '/symfony/mime/FileinfoMimeTypeGuesser.php', + 'Symfony\\Component\\Mime\\Header\\AbstractHeader' => $vendorDir . '/symfony/mime/Header/AbstractHeader.php', + 'Symfony\\Component\\Mime\\Header\\DateHeader' => $vendorDir . '/symfony/mime/Header/DateHeader.php', + 'Symfony\\Component\\Mime\\Header\\HeaderInterface' => $vendorDir . '/symfony/mime/Header/HeaderInterface.php', + 'Symfony\\Component\\Mime\\Header\\Headers' => $vendorDir . '/symfony/mime/Header/Headers.php', + 'Symfony\\Component\\Mime\\Header\\IdentificationHeader' => $vendorDir . '/symfony/mime/Header/IdentificationHeader.php', + 'Symfony\\Component\\Mime\\Header\\MailboxHeader' => $vendorDir . '/symfony/mime/Header/MailboxHeader.php', + 'Symfony\\Component\\Mime\\Header\\MailboxListHeader' => $vendorDir . '/symfony/mime/Header/MailboxListHeader.php', + 'Symfony\\Component\\Mime\\Header\\ParameterizedHeader' => $vendorDir . '/symfony/mime/Header/ParameterizedHeader.php', + 'Symfony\\Component\\Mime\\Header\\PathHeader' => $vendorDir . '/symfony/mime/Header/PathHeader.php', + 'Symfony\\Component\\Mime\\Header\\UnstructuredHeader' => $vendorDir . '/symfony/mime/Header/UnstructuredHeader.php', + 'Symfony\\Component\\Mime\\Message' => $vendorDir . '/symfony/mime/Message.php', + 'Symfony\\Component\\Mime\\MessageConverter' => $vendorDir . '/symfony/mime/MessageConverter.php', + 'Symfony\\Component\\Mime\\MimeTypeGuesserInterface' => $vendorDir . '/symfony/mime/MimeTypeGuesserInterface.php', + 'Symfony\\Component\\Mime\\MimeTypes' => $vendorDir . '/symfony/mime/MimeTypes.php', + 'Symfony\\Component\\Mime\\MimeTypesInterface' => $vendorDir . '/symfony/mime/MimeTypesInterface.php', + 'Symfony\\Component\\Mime\\NamedAddress' => $vendorDir . '/symfony/mime/NamedAddress.php', + 'Symfony\\Component\\Mime\\Part\\AbstractMultipartPart' => $vendorDir . '/symfony/mime/Part/AbstractMultipartPart.php', + 'Symfony\\Component\\Mime\\Part\\AbstractPart' => $vendorDir . '/symfony/mime/Part/AbstractPart.php', + 'Symfony\\Component\\Mime\\Part\\DataPart' => $vendorDir . '/symfony/mime/Part/DataPart.php', + 'Symfony\\Component\\Mime\\Part\\MessagePart' => $vendorDir . '/symfony/mime/Part/MessagePart.php', + 'Symfony\\Component\\Mime\\Part\\Multipart\\AlternativePart' => $vendorDir . '/symfony/mime/Part/Multipart/AlternativePart.php', + 'Symfony\\Component\\Mime\\Part\\Multipart\\DigestPart' => $vendorDir . '/symfony/mime/Part/Multipart/DigestPart.php', + 'Symfony\\Component\\Mime\\Part\\Multipart\\FormDataPart' => $vendorDir . '/symfony/mime/Part/Multipart/FormDataPart.php', + 'Symfony\\Component\\Mime\\Part\\Multipart\\MixedPart' => $vendorDir . '/symfony/mime/Part/Multipart/MixedPart.php', + 'Symfony\\Component\\Mime\\Part\\Multipart\\RelatedPart' => $vendorDir . '/symfony/mime/Part/Multipart/RelatedPart.php', + 'Symfony\\Component\\Mime\\Part\\TextPart' => $vendorDir . '/symfony/mime/Part/TextPart.php', + 'Symfony\\Component\\Mime\\RawMessage' => $vendorDir . '/symfony/mime/RawMessage.php', 'Symfony\\Component\\OptionsResolver\\Debug\\OptionsResolverIntrospector' => $vendorDir . '/symfony/options-resolver/Debug/OptionsResolverIntrospector.php', 'Symfony\\Component\\OptionsResolver\\Exception\\AccessException' => $vendorDir . '/symfony/options-resolver/Exception/AccessException.php', 'Symfony\\Component\\OptionsResolver\\Exception\\ExceptionInterface' => $vendorDir . '/symfony/options-resolver/Exception/ExceptionInterface.php', @@ -3738,7 +3950,9 @@ return array( 'Symfony\\Component\\Routing\\Exception\\NoConfigurationException' => $vendorDir . '/symfony/routing/Exception/NoConfigurationException.php', 'Symfony\\Component\\Routing\\Exception\\ResourceNotFoundException' => $vendorDir . '/symfony/routing/Exception/ResourceNotFoundException.php', 'Symfony\\Component\\Routing\\Exception\\RouteNotFoundException' => $vendorDir . '/symfony/routing/Exception/RouteNotFoundException.php', + 'Symfony\\Component\\Routing\\Generator\\CompiledUrlGenerator' => $vendorDir . '/symfony/routing/Generator/CompiledUrlGenerator.php', 'Symfony\\Component\\Routing\\Generator\\ConfigurableRequirementsInterface' => $vendorDir . '/symfony/routing/Generator/ConfigurableRequirementsInterface.php', + 'Symfony\\Component\\Routing\\Generator\\Dumper\\CompiledUrlGeneratorDumper' => $vendorDir . '/symfony/routing/Generator/Dumper/CompiledUrlGeneratorDumper.php', 'Symfony\\Component\\Routing\\Generator\\Dumper\\GeneratorDumper' => $vendorDir . '/symfony/routing/Generator/Dumper/GeneratorDumper.php', 'Symfony\\Component\\Routing\\Generator\\Dumper\\GeneratorDumperInterface' => $vendorDir . '/symfony/routing/Generator/Dumper/GeneratorDumperInterface.php', 'Symfony\\Component\\Routing\\Generator\\Dumper\\PhpGeneratorDumper' => $vendorDir . '/symfony/routing/Generator/Dumper/PhpGeneratorDumper.php', @@ -3762,10 +3976,12 @@ return array( 'Symfony\\Component\\Routing\\Loader\\ProtectedPhpFileLoader' => $vendorDir . '/symfony/routing/Loader/PhpFileLoader.php', 'Symfony\\Component\\Routing\\Loader\\XmlFileLoader' => $vendorDir . '/symfony/routing/Loader/XmlFileLoader.php', 'Symfony\\Component\\Routing\\Loader\\YamlFileLoader' => $vendorDir . '/symfony/routing/Loader/YamlFileLoader.php', + 'Symfony\\Component\\Routing\\Matcher\\CompiledUrlMatcher' => $vendorDir . '/symfony/routing/Matcher/CompiledUrlMatcher.php', + 'Symfony\\Component\\Routing\\Matcher\\Dumper\\CompiledUrlMatcherDumper' => $vendorDir . '/symfony/routing/Matcher/Dumper/CompiledUrlMatcherDumper.php', + 'Symfony\\Component\\Routing\\Matcher\\Dumper\\CompiledUrlMatcherTrait' => $vendorDir . '/symfony/routing/Matcher/Dumper/CompiledUrlMatcherTrait.php', 'Symfony\\Component\\Routing\\Matcher\\Dumper\\MatcherDumper' => $vendorDir . '/symfony/routing/Matcher/Dumper/MatcherDumper.php', 'Symfony\\Component\\Routing\\Matcher\\Dumper\\MatcherDumperInterface' => $vendorDir . '/symfony/routing/Matcher/Dumper/MatcherDumperInterface.php', 'Symfony\\Component\\Routing\\Matcher\\Dumper\\PhpMatcherDumper' => $vendorDir . '/symfony/routing/Matcher/Dumper/PhpMatcherDumper.php', - 'Symfony\\Component\\Routing\\Matcher\\Dumper\\PhpMatcherTrait' => $vendorDir . '/symfony/routing/Matcher/Dumper/PhpMatcherTrait.php', 'Symfony\\Component\\Routing\\Matcher\\Dumper\\StaticPrefixCollection' => $vendorDir . '/symfony/routing/Matcher/Dumper/StaticPrefixCollection.php', 'Symfony\\Component\\Routing\\Matcher\\RedirectableUrlMatcher' => $vendorDir . '/symfony/routing/Matcher/RedirectableUrlMatcher.php', 'Symfony\\Component\\Routing\\Matcher\\RedirectableUrlMatcherInterface' => $vendorDir . '/symfony/routing/Matcher/RedirectableUrlMatcherInterface.php', @@ -3792,6 +4008,7 @@ return array( 'Symfony\\Component\\Translation\\DependencyInjection\\TranslationDumperPass' => $vendorDir . '/symfony/translation/DependencyInjection/TranslationDumperPass.php', 'Symfony\\Component\\Translation\\DependencyInjection\\TranslationExtractorPass' => $vendorDir . '/symfony/translation/DependencyInjection/TranslationExtractorPass.php', 'Symfony\\Component\\Translation\\DependencyInjection\\TranslatorPass' => $vendorDir . '/symfony/translation/DependencyInjection/TranslatorPass.php', + 'Symfony\\Component\\Translation\\DependencyInjection\\TranslatorPathsPass' => $vendorDir . '/symfony/translation/DependencyInjection/TranslatorPathsPass.php', 'Symfony\\Component\\Translation\\Dumper\\CsvFileDumper' => $vendorDir . '/symfony/translation/Dumper/CsvFileDumper.php', 'Symfony\\Component\\Translation\\Dumper\\DumperInterface' => $vendorDir . '/symfony/translation/Dumper/DumperInterface.php', 'Symfony\\Component\\Translation\\Dumper\\FileDumper' => $vendorDir . '/symfony/translation/Dumper/FileDumper.php', @@ -3861,6 +4078,8 @@ return array( 'Symfony\\Component\\VarDumper\\Caster\\DOMCaster' => $vendorDir . '/symfony/var-dumper/Caster/DOMCaster.php', 'Symfony\\Component\\VarDumper\\Caster\\DateCaster' => $vendorDir . '/symfony/var-dumper/Caster/DateCaster.php', 'Symfony\\Component\\VarDumper\\Caster\\DoctrineCaster' => $vendorDir . '/symfony/var-dumper/Caster/DoctrineCaster.php', + 'Symfony\\Component\\VarDumper\\Caster\\DsCaster' => $vendorDir . '/symfony/var-dumper/Caster/DsCaster.php', + 'Symfony\\Component\\VarDumper\\Caster\\DsPairStub' => $vendorDir . '/symfony/var-dumper/Caster/DsPairStub.php', 'Symfony\\Component\\VarDumper\\Caster\\EnumStub' => $vendorDir . '/symfony/var-dumper/Caster/EnumStub.php', 'Symfony\\Component\\VarDumper\\Caster\\ExceptionCaster' => $vendorDir . '/symfony/var-dumper/Caster/ExceptionCaster.php', 'Symfony\\Component\\VarDumper\\Caster\\FrameStub' => $vendorDir . '/symfony/var-dumper/Caster/FrameStub.php', @@ -3905,29 +4124,24 @@ return array( 'Symfony\\Component\\VarDumper\\Server\\DumpServer' => $vendorDir . '/symfony/var-dumper/Server/DumpServer.php', 'Symfony\\Component\\VarDumper\\Test\\VarDumperTestTrait' => $vendorDir . '/symfony/var-dumper/Test/VarDumperTestTrait.php', 'Symfony\\Component\\VarDumper\\VarDumper' => $vendorDir . '/symfony/var-dumper/VarDumper.php', - 'Symfony\\Contracts\\Cache\\CacheInterface' => $vendorDir . '/symfony/contracts/Cache/CacheInterface.php', - 'Symfony\\Contracts\\Cache\\CacheTrait' => $vendorDir . '/symfony/contracts/Cache/CacheTrait.php', - 'Symfony\\Contracts\\Cache\\CallbackInterface' => $vendorDir . '/symfony/contracts/Cache/CallbackInterface.php', - 'Symfony\\Contracts\\Cache\\ItemInterface' => $vendorDir . '/symfony/contracts/Cache/ItemInterface.php', - 'Symfony\\Contracts\\Cache\\TagAwareCacheInterface' => $vendorDir . '/symfony/contracts/Cache/TagAwareCacheInterface.php', - 'Symfony\\Contracts\\Service\\ResetInterface' => $vendorDir . '/symfony/contracts/Service/ResetInterface.php', - 'Symfony\\Contracts\\Service\\ServiceLocatorTrait' => $vendorDir . '/symfony/contracts/Service/ServiceLocatorTrait.php', - 'Symfony\\Contracts\\Service\\ServiceSubscriberInterface' => $vendorDir . '/symfony/contracts/Service/ServiceSubscriberInterface.php', - 'Symfony\\Contracts\\Service\\ServiceSubscriberTrait' => $vendorDir . '/symfony/contracts/Service/ServiceSubscriberTrait.php', - 'Symfony\\Contracts\\Tests\\Cache\\CacheTraitTest' => $vendorDir . '/symfony/contracts/Tests/Cache/CacheTraitTest.php', - 'Symfony\\Contracts\\Tests\\Cache\\TestPool' => $vendorDir . '/symfony/contracts/Tests/Cache/CacheTraitTest.php', - 'Symfony\\Contracts\\Tests\\Service\\ChildTestService' => $vendorDir . '/symfony/contracts/Tests/Service/ServiceSubscriberTraitTest.php', - 'Symfony\\Contracts\\Tests\\Service\\ParentTestService' => $vendorDir . '/symfony/contracts/Tests/Service/ServiceSubscriberTraitTest.php', - 'Symfony\\Contracts\\Tests\\Service\\ServiceLocatorTest' => $vendorDir . '/symfony/contracts/Tests/Service/ServiceLocatorTest.php', - 'Symfony\\Contracts\\Tests\\Service\\ServiceSubscriberTraitTest' => $vendorDir . '/symfony/contracts/Tests/Service/ServiceSubscriberTraitTest.php', - 'Symfony\\Contracts\\Tests\\Service\\TestService' => $vendorDir . '/symfony/contracts/Tests/Service/ServiceSubscriberTraitTest.php', - 'Symfony\\Contracts\\Tests\\Translation\\TranslatorTest' => $vendorDir . '/symfony/contracts/Tests/Translation/TranslatorTest.php', - 'Symfony\\Contracts\\Translation\\LocaleAwareInterface' => $vendorDir . '/symfony/contracts/Translation/LocaleAwareInterface.php', - 'Symfony\\Contracts\\Translation\\TranslatorInterface' => $vendorDir . '/symfony/contracts/Translation/TranslatorInterface.php', - 'Symfony\\Contracts\\Translation\\TranslatorTrait' => $vendorDir . '/symfony/contracts/Translation/TranslatorTrait.php', + 'Symfony\\Contracts\\EventDispatcher\\Event' => $vendorDir . '/symfony/event-dispatcher-contracts/Event.php', + 'Symfony\\Contracts\\EventDispatcher\\EventDispatcherInterface' => $vendorDir . '/symfony/event-dispatcher-contracts/EventDispatcherInterface.php', + 'Symfony\\Contracts\\Service\\ResetInterface' => $vendorDir . '/symfony/service-contracts/ResetInterface.php', + 'Symfony\\Contracts\\Service\\ServiceLocatorTrait' => $vendorDir . '/symfony/service-contracts/ServiceLocatorTrait.php', + 'Symfony\\Contracts\\Service\\ServiceProviderInterface' => $vendorDir . '/symfony/service-contracts/ServiceProviderInterface.php', + 'Symfony\\Contracts\\Service\\ServiceSubscriberInterface' => $vendorDir . '/symfony/service-contracts/ServiceSubscriberInterface.php', + 'Symfony\\Contracts\\Service\\ServiceSubscriberTrait' => $vendorDir . '/symfony/service-contracts/ServiceSubscriberTrait.php', + 'Symfony\\Contracts\\Service\\Test\\ServiceLocatorTest' => $vendorDir . '/symfony/service-contracts/Test/ServiceLocatorTest.php', + 'Symfony\\Contracts\\Translation\\LocaleAwareInterface' => $vendorDir . '/symfony/translation-contracts/LocaleAwareInterface.php', + 'Symfony\\Contracts\\Translation\\Test\\TranslatorTest' => $vendorDir . '/symfony/translation-contracts/Test/TranslatorTest.php', + 'Symfony\\Contracts\\Translation\\TranslatorInterface' => $vendorDir . '/symfony/translation-contracts/TranslatorInterface.php', + 'Symfony\\Contracts\\Translation\\TranslatorTrait' => $vendorDir . '/symfony/translation-contracts/TranslatorTrait.php', 'Symfony\\Polyfill\\Ctype\\Ctype' => $vendorDir . '/symfony/polyfill-ctype/Ctype.php', + 'Symfony\\Polyfill\\Iconv\\Iconv' => $vendorDir . '/symfony/polyfill-iconv/Iconv.php', + 'Symfony\\Polyfill\\Intl\\Idn\\Idn' => $vendorDir . '/symfony/polyfill-intl-idn/Idn.php', 'Symfony\\Polyfill\\Mbstring\\Mbstring' => $vendorDir . '/symfony/polyfill-mbstring/Mbstring.php', 'Symfony\\Polyfill\\Php72\\Php72' => $vendorDir . '/symfony/polyfill-php72/Php72.php', + 'Symfony\\Polyfill\\Php73\\Php73' => $vendorDir . '/symfony/polyfill-php73/Php73.php', 'Symfony\\Thanks\\Command\\ThanksCommand' => $vendorDir . '/symfony/thanks/src/Command/ThanksCommand.php', 'Symfony\\Thanks\\GitHubClient' => $vendorDir . '/symfony/thanks/src/GitHubClient.php', 'Symfony\\Thanks\\Thanks' => $vendorDir . '/symfony/thanks/src/Thanks.php', @@ -3950,6 +4164,9 @@ return array( 'TijsVerkoyen\\CssToInlineStyles\\Css\\Property\\Property' => $vendorDir . '/tijsverkoyen/css-to-inline-styles/src/Css/Property/Property.php', 'TijsVerkoyen\\CssToInlineStyles\\Css\\Rule\\Processor' => $vendorDir . '/tijsverkoyen/css-to-inline-styles/src/Css/Rule/Processor.php', 'TijsVerkoyen\\CssToInlineStyles\\Css\\Rule\\Rule' => $vendorDir . '/tijsverkoyen/css-to-inline-styles/src/Css/Rule/Rule.php', + 'UpdateHelper\\ComposerPlugin' => $vendorDir . '/kylekatarnls/update-helper/src/UpdateHelper/ComposerPlugin.php', + 'UpdateHelper\\UpdateHelper' => $vendorDir . '/kylekatarnls/update-helper/src/UpdateHelper/UpdateHelper.php', + 'UpdateHelper\\UpdateHelperInterface' => $vendorDir . '/kylekatarnls/update-helper/src/UpdateHelper/UpdateHelperInterface.php', 'UsersSeeder' => $baseDir . '/database/seeds/UsersSeeder.php', 'Webmozart\\Assert\\Assert' => $vendorDir . '/webmozart/assert/src/Assert.php', 'Whoops\\Exception\\ErrorException' => $vendorDir . '/filp/whoops/src/Whoops/Exception/ErrorException.php', @@ -3973,36 +4190,47 @@ return array( 'XdgBaseDir\\Xdg' => $vendorDir . '/dnoegel/php-xdg-base-dir/src/Xdg.php', 'Zend\\Diactoros\\AbstractSerializer' => $vendorDir . '/zendframework/zend-diactoros/src/AbstractSerializer.php', 'Zend\\Diactoros\\CallbackStream' => $vendorDir . '/zendframework/zend-diactoros/src/CallbackStream.php', - 'Zend\\Diactoros\\Exception\\DeprecatedMethodException' => $vendorDir . '/zendframework/zend-diactoros/src/Exception/DeprecatedMethodException.php', + 'Zend\\Diactoros\\Exception\\DeserializationException' => $vendorDir . '/zendframework/zend-diactoros/src/Exception/DeserializationException.php', 'Zend\\Diactoros\\Exception\\ExceptionInterface' => $vendorDir . '/zendframework/zend-diactoros/src/Exception/ExceptionInterface.php', + 'Zend\\Diactoros\\Exception\\InvalidArgumentException' => $vendorDir . '/zendframework/zend-diactoros/src/Exception/InvalidArgumentException.php', + 'Zend\\Diactoros\\Exception\\InvalidStreamPointerPositionException' => $vendorDir . '/zendframework/zend-diactoros/src/Exception/InvalidStreamPointerPositionException.php', + 'Zend\\Diactoros\\Exception\\SerializationException' => $vendorDir . '/zendframework/zend-diactoros/src/Exception/SerializationException.php', + 'Zend\\Diactoros\\Exception\\UnreadableStreamException' => $vendorDir . '/zendframework/zend-diactoros/src/Exception/UnreadableStreamException.php', + 'Zend\\Diactoros\\Exception\\UnrecognizedProtocolVersionException' => $vendorDir . '/zendframework/zend-diactoros/src/Exception/UnrecognizedProtocolVersionException.php', + 'Zend\\Diactoros\\Exception\\UnrewindableStreamException' => $vendorDir . '/zendframework/zend-diactoros/src/Exception/UnrewindableStreamException.php', + 'Zend\\Diactoros\\Exception\\UnseekableStreamException' => $vendorDir . '/zendframework/zend-diactoros/src/Exception/UnseekableStreamException.php', + 'Zend\\Diactoros\\Exception\\UntellableStreamException' => $vendorDir . '/zendframework/zend-diactoros/src/Exception/UntellableStreamException.php', + 'Zend\\Diactoros\\Exception\\UnwritableStreamException' => $vendorDir . '/zendframework/zend-diactoros/src/Exception/UnwritableStreamException.php', + 'Zend\\Diactoros\\Exception\\UploadedFileAlreadyMovedException' => $vendorDir . '/zendframework/zend-diactoros/src/Exception/UploadedFileAlreadyMovedException.php', + 'Zend\\Diactoros\\Exception\\UploadedFileErrorException' => $vendorDir . '/zendframework/zend-diactoros/src/Exception/UploadedFileErrorException.php', 'Zend\\Diactoros\\HeaderSecurity' => $vendorDir . '/zendframework/zend-diactoros/src/HeaderSecurity.php', 'Zend\\Diactoros\\MessageTrait' => $vendorDir . '/zendframework/zend-diactoros/src/MessageTrait.php', 'Zend\\Diactoros\\PhpInputStream' => $vendorDir . '/zendframework/zend-diactoros/src/PhpInputStream.php', 'Zend\\Diactoros\\RelativeStream' => $vendorDir . '/zendframework/zend-diactoros/src/RelativeStream.php', 'Zend\\Diactoros\\Request' => $vendorDir . '/zendframework/zend-diactoros/src/Request.php', + 'Zend\\Diactoros\\RequestFactory' => $vendorDir . '/zendframework/zend-diactoros/src/RequestFactory.php', 'Zend\\Diactoros\\RequestTrait' => $vendorDir . '/zendframework/zend-diactoros/src/RequestTrait.php', 'Zend\\Diactoros\\Request\\ArraySerializer' => $vendorDir . '/zendframework/zend-diactoros/src/Request/ArraySerializer.php', 'Zend\\Diactoros\\Request\\Serializer' => $vendorDir . '/zendframework/zend-diactoros/src/Request/Serializer.php', 'Zend\\Diactoros\\Response' => $vendorDir . '/zendframework/zend-diactoros/src/Response.php', + 'Zend\\Diactoros\\ResponseFactory' => $vendorDir . '/zendframework/zend-diactoros/src/ResponseFactory.php', 'Zend\\Diactoros\\Response\\ArraySerializer' => $vendorDir . '/zendframework/zend-diactoros/src/Response/ArraySerializer.php', - 'Zend\\Diactoros\\Response\\EmitterInterface' => $vendorDir . '/zendframework/zend-diactoros/src/Response/EmitterInterface.php', 'Zend\\Diactoros\\Response\\EmptyResponse' => $vendorDir . '/zendframework/zend-diactoros/src/Response/EmptyResponse.php', 'Zend\\Diactoros\\Response\\HtmlResponse' => $vendorDir . '/zendframework/zend-diactoros/src/Response/HtmlResponse.php', 'Zend\\Diactoros\\Response\\InjectContentTypeTrait' => $vendorDir . '/zendframework/zend-diactoros/src/Response/InjectContentTypeTrait.php', 'Zend\\Diactoros\\Response\\JsonResponse' => $vendorDir . '/zendframework/zend-diactoros/src/Response/JsonResponse.php', 'Zend\\Diactoros\\Response\\RedirectResponse' => $vendorDir . '/zendframework/zend-diactoros/src/Response/RedirectResponse.php', - 'Zend\\Diactoros\\Response\\SapiEmitter' => $vendorDir . '/zendframework/zend-diactoros/src/Response/SapiEmitter.php', - 'Zend\\Diactoros\\Response\\SapiEmitterTrait' => $vendorDir . '/zendframework/zend-diactoros/src/Response/SapiEmitterTrait.php', - 'Zend\\Diactoros\\Response\\SapiStreamEmitter' => $vendorDir . '/zendframework/zend-diactoros/src/Response/SapiStreamEmitter.php', 'Zend\\Diactoros\\Response\\Serializer' => $vendorDir . '/zendframework/zend-diactoros/src/Response/Serializer.php', 'Zend\\Diactoros\\Response\\TextResponse' => $vendorDir . '/zendframework/zend-diactoros/src/Response/TextResponse.php', 'Zend\\Diactoros\\Response\\XmlResponse' => $vendorDir . '/zendframework/zend-diactoros/src/Response/XmlResponse.php', - 'Zend\\Diactoros\\Server' => $vendorDir . '/zendframework/zend-diactoros/src/Server.php', 'Zend\\Diactoros\\ServerRequest' => $vendorDir . '/zendframework/zend-diactoros/src/ServerRequest.php', 'Zend\\Diactoros\\ServerRequestFactory' => $vendorDir . '/zendframework/zend-diactoros/src/ServerRequestFactory.php', 'Zend\\Diactoros\\Stream' => $vendorDir . '/zendframework/zend-diactoros/src/Stream.php', + 'Zend\\Diactoros\\StreamFactory' => $vendorDir . '/zendframework/zend-diactoros/src/StreamFactory.php', 'Zend\\Diactoros\\UploadedFile' => $vendorDir . '/zendframework/zend-diactoros/src/UploadedFile.php', + 'Zend\\Diactoros\\UploadedFileFactory' => $vendorDir . '/zendframework/zend-diactoros/src/UploadedFileFactory.php', 'Zend\\Diactoros\\Uri' => $vendorDir . '/zendframework/zend-diactoros/src/Uri.php', + 'Zend\\Diactoros\\UriFactory' => $vendorDir . '/zendframework/zend-diactoros/src/UriFactory.php', 'phpDocumentor\\Reflection\\DocBlock' => $vendorDir . '/phpdocumentor/reflection-docblock/src/DocBlock.php', 'phpDocumentor\\Reflection\\DocBlockFactory' => $vendorDir . '/phpdocumentor/reflection-docblock/src/DocBlockFactory.php', 'phpDocumentor\\Reflection\\DocBlockFactoryInterface' => $vendorDir . '/phpdocumentor/reflection-docblock/src/DocBlockFactoryInterface.php', diff --git a/vendor/composer/autoload_files.php b/vendor/composer/autoload_files.php index da79ac71..07ee10eb 100644 --- a/vendor/composer/autoload_files.php +++ b/vendor/composer/autoload_files.php @@ -7,8 +7,13 @@ $baseDir = dirname($vendorDir); return array( '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php', + '25072dd6e2470089de65ae7bf11d3109' => $vendorDir . '/symfony/polyfill-php72/bootstrap.php', + 'f598d06aa772fa33d905e87be6398fb1' => $vendorDir . '/symfony/polyfill-intl-idn/bootstrap.php', + '0d59ee240a4cd96ddbb4ff164fccea4d' => $vendorDir . '/symfony/polyfill-php73/bootstrap.php', '7b11c4dc42b3b3023073cb14e519683c' => $vendorDir . '/ralouphie/getallheaders/src/getallheaders.php', 'a0edc8309cc5e1d60e3047b5df6b7052' => $vendorDir . '/guzzlehttp/psr7/src/functions_include.php', + '667aeda72477189d0494fecd327c3641' => $vendorDir . '/symfony/var-dumper/Resources/functions/dump.php', + '320cde22f66dd4f5d3fd621d3e88b98f' => $vendorDir . '/symfony/polyfill-ctype/bootstrap.php', 'cf97c57bfe0f23854afd2f3818abb7a0' => $vendorDir . '/zendframework/zend-diactoros/src/functions/create_uploaded_file.php', '9bf37a3d0dad93e29cb4e1b1bfab04e9' => $vendorDir . '/zendframework/zend-diactoros/src/functions/marshal_headers_from_sapi.php', 'ce70dccb4bcc2efc6e94d2ee526e6972' => $vendorDir . '/zendframework/zend-diactoros/src/functions/marshal_method_from_sapi.php', @@ -17,19 +22,17 @@ return array( '0b0974a5566a1077e4f2e111341112c1' => $vendorDir . '/zendframework/zend-diactoros/src/functions/normalize_server.php', '1ca3bc274755662169f9629d5412a1da' => $vendorDir . '/zendframework/zend-diactoros/src/functions/normalize_uploaded_files.php', '40360c0b9b437e69bcbb7f1349ce029e' => $vendorDir . '/zendframework/zend-diactoros/src/functions/parse_cookie_header.php', - '25072dd6e2470089de65ae7bf11d3109' => $vendorDir . '/symfony/polyfill-php72/bootstrap.php', - 'ddc0a4d7e61c0286f0f8593b1903e894' => $vendorDir . '/clue/stream-filter/src/functions.php', + '9c67151ae59aff4788964ce8eb2a0f43' => $vendorDir . '/clue/stream-filter/src/functions_include.php', 'c964ee0ededf28c96ebd9db5099ef910' => $vendorDir . '/guzzlehttp/promises/src/functions_include.php', - '667aeda72477189d0494fecd327c3641' => $vendorDir . '/symfony/var-dumper/Resources/functions/dump.php', '37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php', '8cff32064859f4559445b89279f3199c' => $vendorDir . '/php-http/message/src/filters.php', - '320cde22f66dd4f5d3fd621d3e88b98f' => $vendorDir . '/symfony/polyfill-ctype/bootstrap.php', + 'def43f6c87e4f8dfd0c9e1b1bab14fe8' => $vendorDir . '/symfony/polyfill-iconv/bootstrap.php', '2c102faa651ef8ea5874edb585946bce' => $vendorDir . '/swiftmailer/swiftmailer/lib/swift_required.php', '6124b4c8570aa390c21fafd04a26c69f' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/deep_copy.php', - '801c31d8ed748cfa537fa45402288c95' => $vendorDir . '/psy/psysh/src/functions.php', '538ca81a9a966a6716601ecf48f4eaef' => $vendorDir . '/opis/closure/functions.php', - 'f18cc91337d49233e5754e93f3ed9ec3' => $vendorDir . '/laravelcollective/html/src/helpers.php', + '801c31d8ed748cfa537fa45402288c95' => $vendorDir . '/psy/psysh/src/functions.php', 'f0906e6318348a765ffb6eb24e0d0938' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/helpers.php', '58571171fd5812e6e447dce228f52f4d' => $vendorDir . '/laravel/framework/src/Illuminate/Support/helpers.php', + 'f18cc91337d49233e5754e93f3ed9ec3' => $vendorDir . '/laravelcollective/html/src/helpers.php', 'e617b14322a074392076a2f38eaf6115' => $baseDir . '/app/Helper.php', ); diff --git a/vendor/composer/autoload_namespaces.php b/vendor/composer/autoload_namespaces.php index 36551427..7ae47477 100644 --- a/vendor/composer/autoload_namespaces.php +++ b/vendor/composer/autoload_namespaces.php @@ -6,8 +6,8 @@ $vendorDir = dirname(dirname(__FILE__)); $baseDir = dirname($vendorDir); return array( + 'UpdateHelper\\' => array($vendorDir . '/kylekatarnls/update-helper/src'), 'Prophecy\\' => array($vendorDir . '/phpspec/prophecy/src'), 'Parsedown' => array($vendorDir . '/erusev/parsedown'), 'Mockery' => array($vendorDir . '/mockery/mockery/library'), - 'Doctrine\\Common\\Lexer\\' => array($vendorDir . '/doctrine/lexer/lib'), ); diff --git a/vendor/composer/autoload_psr4.php b/vendor/composer/autoload_psr4.php index 98df4f94..f0e88c05 100644 --- a/vendor/composer/autoload_psr4.php +++ b/vendor/composer/autoload_psr4.php @@ -14,15 +14,21 @@ return array( 'TijsVerkoyen\\CssToInlineStyles\\' => array($vendorDir . '/tijsverkoyen/css-to-inline-styles/src'), 'Tests\\' => array($baseDir . '/tests'), 'Symfony\\Thanks\\' => array($vendorDir . '/symfony/thanks/src'), + 'Symfony\\Polyfill\\Php73\\' => array($vendorDir . '/symfony/polyfill-php73'), 'Symfony\\Polyfill\\Php72\\' => array($vendorDir . '/symfony/polyfill-php72'), 'Symfony\\Polyfill\\Mbstring\\' => array($vendorDir . '/symfony/polyfill-mbstring'), + 'Symfony\\Polyfill\\Intl\\Idn\\' => array($vendorDir . '/symfony/polyfill-intl-idn'), + 'Symfony\\Polyfill\\Iconv\\' => array($vendorDir . '/symfony/polyfill-iconv'), 'Symfony\\Polyfill\\Ctype\\' => array($vendorDir . '/symfony/polyfill-ctype'), - 'Symfony\\Contracts\\' => array($vendorDir . '/symfony/contracts'), + 'Symfony\\Contracts\\Translation\\' => array($vendorDir . '/symfony/translation-contracts'), + 'Symfony\\Contracts\\Service\\' => array($vendorDir . '/symfony/service-contracts'), + 'Symfony\\Contracts\\EventDispatcher\\' => array($vendorDir . '/symfony/event-dispatcher-contracts'), 'Symfony\\Component\\VarDumper\\' => array($vendorDir . '/symfony/var-dumper'), 'Symfony\\Component\\Translation\\' => array($vendorDir . '/symfony/translation'), 'Symfony\\Component\\Routing\\' => array($vendorDir . '/symfony/routing'), 'Symfony\\Component\\Process\\' => array($vendorDir . '/symfony/process'), 'Symfony\\Component\\OptionsResolver\\' => array($vendorDir . '/symfony/options-resolver'), + 'Symfony\\Component\\Mime\\' => array($vendorDir . '/symfony/mime'), 'Symfony\\Component\\HttpKernel\\' => array($vendorDir . '/symfony/http-kernel'), 'Symfony\\Component\\HttpFoundation\\' => array($vendorDir . '/symfony/http-foundation'), 'Symfony\\Component\\Finder\\' => array($vendorDir . '/symfony/finder'), @@ -34,7 +40,7 @@ return array( 'Psy\\' => array($vendorDir . '/psy/psysh/src'), 'Psr\\SimpleCache\\' => array($vendorDir . '/psr/simple-cache/src'), 'Psr\\Log\\' => array($vendorDir . '/psr/log/Psr/Log'), - 'Psr\\Http\\Message\\' => array($vendorDir . '/psr/http-message/src'), + 'Psr\\Http\\Message\\' => array($vendorDir . '/psr/http-factory/src', $vendorDir . '/psr/http-message/src'), 'Psr\\Container\\' => array($vendorDir . '/psr/container/src'), 'Psr\\Cache\\' => array($vendorDir . '/psr/cache/src'), 'PhpParser\\' => array($vendorDir . '/nikic/php-parser/lib/PhpParser'), @@ -46,10 +52,10 @@ return array( 'Laravel\\Tinker\\' => array($vendorDir . '/laravel/tinker/src'), 'JakubOnderka\\PhpConsoleHighlighter\\' => array($vendorDir . '/jakub-onderka/php-console-highlighter/src'), 'JakubOnderka\\PhpConsoleColor\\' => array($vendorDir . '/jakub-onderka/php-console-color/src'), - 'Illuminate\\Notifications\\' => array($vendorDir . '/laravel/slack-notification-channel/src', $vendorDir . '/laravel/nexmo-notification-channel/src'), + 'Illuminate\\Notifications\\' => array($vendorDir . '/laravel/nexmo-notification-channel/src', $vendorDir . '/laravel/slack-notification-channel/src'), 'Illuminate\\' => array($vendorDir . '/laravel/framework/src/Illuminate'), 'Http\\Promise\\' => array($vendorDir . '/php-http/promise/src'), - 'Http\\Message\\' => array($vendorDir . '/php-http/message-factory/src', $vendorDir . '/php-http/message/src'), + 'Http\\Message\\' => array($vendorDir . '/php-http/message/src', $vendorDir . '/php-http/message-factory/src'), 'Http\\Discovery\\' => array($vendorDir . '/php-http/discovery/src'), 'Http\\Client\\Common\\Plugin\\' => array($vendorDir . '/php-http/cache-plugin/src'), 'Http\\Client\\Common\\' => array($vendorDir . '/php-http/client-common/src'), @@ -67,6 +73,7 @@ return array( 'Egulias\\EmailValidator\\' => array($vendorDir . '/egulias/email-validator/EmailValidator'), 'Dotenv\\' => array($vendorDir . '/vlucas/phpdotenv/src'), 'Doctrine\\Instantiator\\' => array($vendorDir . '/doctrine/instantiator/src/Doctrine/Instantiator'), + 'Doctrine\\Common\\Lexer\\' => array($vendorDir . '/doctrine/lexer/lib/Doctrine/Common/Lexer'), 'Doctrine\\Common\\Inflector\\' => array($vendorDir . '/doctrine/inflector/lib/Doctrine/Common/Inflector'), 'DeepCopy\\' => array($vendorDir . '/myclabs/deep-copy/src/DeepCopy'), 'Cron\\' => array($vendorDir . '/dragonmantank/cron-expression/src/Cron'), diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index 742582cc..53944c15 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -8,8 +8,13 @@ class ComposerStaticInit4b6fb9210a1ea37c2db27b8ff53a1ecf { public static $files = array ( '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php', + '25072dd6e2470089de65ae7bf11d3109' => __DIR__ . '/..' . '/symfony/polyfill-php72/bootstrap.php', + 'f598d06aa772fa33d905e87be6398fb1' => __DIR__ . '/..' . '/symfony/polyfill-intl-idn/bootstrap.php', + '0d59ee240a4cd96ddbb4ff164fccea4d' => __DIR__ . '/..' . '/symfony/polyfill-php73/bootstrap.php', '7b11c4dc42b3b3023073cb14e519683c' => __DIR__ . '/..' . '/ralouphie/getallheaders/src/getallheaders.php', 'a0edc8309cc5e1d60e3047b5df6b7052' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/functions_include.php', + '667aeda72477189d0494fecd327c3641' => __DIR__ . '/..' . '/symfony/var-dumper/Resources/functions/dump.php', + '320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php', 'cf97c57bfe0f23854afd2f3818abb7a0' => __DIR__ . '/..' . '/zendframework/zend-diactoros/src/functions/create_uploaded_file.php', '9bf37a3d0dad93e29cb4e1b1bfab04e9' => __DIR__ . '/..' . '/zendframework/zend-diactoros/src/functions/marshal_headers_from_sapi.php', 'ce70dccb4bcc2efc6e94d2ee526e6972' => __DIR__ . '/..' . '/zendframework/zend-diactoros/src/functions/marshal_method_from_sapi.php', @@ -18,20 +23,18 @@ class ComposerStaticInit4b6fb9210a1ea37c2db27b8ff53a1ecf '0b0974a5566a1077e4f2e111341112c1' => __DIR__ . '/..' . '/zendframework/zend-diactoros/src/functions/normalize_server.php', '1ca3bc274755662169f9629d5412a1da' => __DIR__ . '/..' . '/zendframework/zend-diactoros/src/functions/normalize_uploaded_files.php', '40360c0b9b437e69bcbb7f1349ce029e' => __DIR__ . '/..' . '/zendframework/zend-diactoros/src/functions/parse_cookie_header.php', - '25072dd6e2470089de65ae7bf11d3109' => __DIR__ . '/..' . '/symfony/polyfill-php72/bootstrap.php', - 'ddc0a4d7e61c0286f0f8593b1903e894' => __DIR__ . '/..' . '/clue/stream-filter/src/functions.php', + '9c67151ae59aff4788964ce8eb2a0f43' => __DIR__ . '/..' . '/clue/stream-filter/src/functions_include.php', 'c964ee0ededf28c96ebd9db5099ef910' => __DIR__ . '/..' . '/guzzlehttp/promises/src/functions_include.php', - '667aeda72477189d0494fecd327c3641' => __DIR__ . '/..' . '/symfony/var-dumper/Resources/functions/dump.php', '37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php', '8cff32064859f4559445b89279f3199c' => __DIR__ . '/..' . '/php-http/message/src/filters.php', - '320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php', + 'def43f6c87e4f8dfd0c9e1b1bab14fe8' => __DIR__ . '/..' . '/symfony/polyfill-iconv/bootstrap.php', '2c102faa651ef8ea5874edb585946bce' => __DIR__ . '/..' . '/swiftmailer/swiftmailer/lib/swift_required.php', '6124b4c8570aa390c21fafd04a26c69f' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/deep_copy.php', - '801c31d8ed748cfa537fa45402288c95' => __DIR__ . '/..' . '/psy/psysh/src/functions.php', '538ca81a9a966a6716601ecf48f4eaef' => __DIR__ . '/..' . '/opis/closure/functions.php', - 'f18cc91337d49233e5754e93f3ed9ec3' => __DIR__ . '/..' . '/laravelcollective/html/src/helpers.php', + '801c31d8ed748cfa537fa45402288c95' => __DIR__ . '/..' . '/psy/psysh/src/functions.php', 'f0906e6318348a765ffb6eb24e0d0938' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/helpers.php', '58571171fd5812e6e447dce228f52f4d' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Support/helpers.php', + 'f18cc91337d49233e5754e93f3ed9ec3' => __DIR__ . '/..' . '/laravelcollective/html/src/helpers.php', 'e617b14322a074392076a2f38eaf6115' => __DIR__ . '/../..' . '/app/Helper.php', ); @@ -61,15 +64,21 @@ class ComposerStaticInit4b6fb9210a1ea37c2db27b8ff53a1ecf 'S' => array ( 'Symfony\\Thanks\\' => 15, + 'Symfony\\Polyfill\\Php73\\' => 23, 'Symfony\\Polyfill\\Php72\\' => 23, 'Symfony\\Polyfill\\Mbstring\\' => 26, + 'Symfony\\Polyfill\\Intl\\Idn\\' => 26, + 'Symfony\\Polyfill\\Iconv\\' => 23, 'Symfony\\Polyfill\\Ctype\\' => 23, - 'Symfony\\Contracts\\' => 18, + 'Symfony\\Contracts\\Translation\\' => 30, + 'Symfony\\Contracts\\Service\\' => 26, + 'Symfony\\Contracts\\EventDispatcher\\' => 34, 'Symfony\\Component\\VarDumper\\' => 28, 'Symfony\\Component\\Translation\\' => 30, 'Symfony\\Component\\Routing\\' => 26, 'Symfony\\Component\\Process\\' => 26, 'Symfony\\Component\\OptionsResolver\\' => 34, + 'Symfony\\Component\\Mime\\' => 23, 'Symfony\\Component\\HttpKernel\\' => 29, 'Symfony\\Component\\HttpFoundation\\' => 33, 'Symfony\\Component\\Finder\\' => 25, @@ -153,6 +162,7 @@ class ComposerStaticInit4b6fb9210a1ea37c2db27b8ff53a1ecf array ( 'Dotenv\\' => 7, 'Doctrine\\Instantiator\\' => 22, + 'Doctrine\\Common\\Lexer\\' => 22, 'Doctrine\\Common\\Inflector\\' => 26, 'DeepCopy\\' => 9, ), @@ -203,6 +213,10 @@ class ComposerStaticInit4b6fb9210a1ea37c2db27b8ff53a1ecf array ( 0 => __DIR__ . '/..' . '/symfony/thanks/src', ), + 'Symfony\\Polyfill\\Php73\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/polyfill-php73', + ), 'Symfony\\Polyfill\\Php72\\' => array ( 0 => __DIR__ . '/..' . '/symfony/polyfill-php72', @@ -211,13 +225,29 @@ class ComposerStaticInit4b6fb9210a1ea37c2db27b8ff53a1ecf array ( 0 => __DIR__ . '/..' . '/symfony/polyfill-mbstring', ), + 'Symfony\\Polyfill\\Intl\\Idn\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/polyfill-intl-idn', + ), + 'Symfony\\Polyfill\\Iconv\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/polyfill-iconv', + ), 'Symfony\\Polyfill\\Ctype\\' => array ( 0 => __DIR__ . '/..' . '/symfony/polyfill-ctype', ), - 'Symfony\\Contracts\\' => + 'Symfony\\Contracts\\Translation\\' => array ( - 0 => __DIR__ . '/..' . '/symfony/contracts', + 0 => __DIR__ . '/..' . '/symfony/translation-contracts', + ), + 'Symfony\\Contracts\\Service\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/service-contracts', + ), + 'Symfony\\Contracts\\EventDispatcher\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/event-dispatcher-contracts', ), 'Symfony\\Component\\VarDumper\\' => array ( @@ -239,6 +269,10 @@ class ComposerStaticInit4b6fb9210a1ea37c2db27b8ff53a1ecf array ( 0 => __DIR__ . '/..' . '/symfony/options-resolver', ), + 'Symfony\\Component\\Mime\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/mime', + ), 'Symfony\\Component\\HttpKernel\\' => array ( 0 => __DIR__ . '/..' . '/symfony/http-kernel', @@ -285,7 +319,8 @@ class ComposerStaticInit4b6fb9210a1ea37c2db27b8ff53a1ecf ), 'Psr\\Http\\Message\\' => array ( - 0 => __DIR__ . '/..' . '/psr/http-message/src', + 0 => __DIR__ . '/..' . '/psr/http-factory/src', + 1 => __DIR__ . '/..' . '/psr/http-message/src', ), 'Psr\\Container\\' => array ( @@ -333,8 +368,8 @@ class ComposerStaticInit4b6fb9210a1ea37c2db27b8ff53a1ecf ), 'Illuminate\\Notifications\\' => array ( - 0 => __DIR__ . '/..' . '/laravel/slack-notification-channel/src', - 1 => __DIR__ . '/..' . '/laravel/nexmo-notification-channel/src', + 0 => __DIR__ . '/..' . '/laravel/nexmo-notification-channel/src', + 1 => __DIR__ . '/..' . '/laravel/slack-notification-channel/src', ), 'Illuminate\\' => array ( @@ -346,8 +381,8 @@ class ComposerStaticInit4b6fb9210a1ea37c2db27b8ff53a1ecf ), 'Http\\Message\\' => array ( - 0 => __DIR__ . '/..' . '/php-http/message-factory/src', - 1 => __DIR__ . '/..' . '/php-http/message/src', + 0 => __DIR__ . '/..' . '/php-http/message/src', + 1 => __DIR__ . '/..' . '/php-http/message-factory/src', ), 'Http\\Discovery\\' => array ( @@ -417,6 +452,10 @@ class ComposerStaticInit4b6fb9210a1ea37c2db27b8ff53a1ecf array ( 0 => __DIR__ . '/..' . '/doctrine/instantiator/src/Doctrine/Instantiator', ), + 'Doctrine\\Common\\Lexer\\' => + array ( + 0 => __DIR__ . '/..' . '/doctrine/lexer/lib/Doctrine/Common/Lexer', + ), 'Doctrine\\Common\\Inflector\\' => array ( 0 => __DIR__ . '/..' . '/doctrine/inflector/lib/Doctrine/Common/Inflector', @@ -448,6 +487,13 @@ class ComposerStaticInit4b6fb9210a1ea37c2db27b8ff53a1ecf ); public static $prefixesPsr0 = array ( + 'U' => + array ( + 'UpdateHelper\\' => + array ( + 0 => __DIR__ . '/..' . '/kylekatarnls/update-helper/src', + ), + ), 'P' => array ( 'Prophecy\\' => @@ -466,13 +512,6 @@ class ComposerStaticInit4b6fb9210a1ea37c2db27b8ff53a1ecf 0 => __DIR__ . '/..' . '/mockery/mockery/library', ), ), - 'D' => - array ( - 'Doctrine\\Common\\Lexer\\' => - array ( - 0 => __DIR__ . '/..' . '/doctrine/lexer/lib', - ), - ), ); public static $classMap = array ( @@ -512,71 +551,166 @@ class ComposerStaticInit4b6fb9210a1ea37c2db27b8ff53a1ecf 'App\\SettingGroup' => __DIR__ . '/../..' . '/app/SettingGroup.php', 'App\\SettingUser' => __DIR__ . '/../..' . '/app/SettingUser.php', 'App\\SupportedApps' => __DIR__ . '/../..' . '/app/SupportedApps.php', + 'App\\SupportedApps\\AVMFritzbox\\AVMFritzbox' => __DIR__ . '/../..' . '/app/SupportedApps/AVMFritzbox/AVMFritzbox.php', + 'App\\SupportedApps\\Adminer\\Adminer' => __DIR__ . '/../..' . '/app/SupportedApps/Adminer/Adminer.php', 'App\\SupportedApps\\Airsonic\\Airsonic' => __DIR__ . '/../..' . '/app/SupportedApps/Airsonic/Airsonic.php', + 'App\\SupportedApps\\Alertmanager\\Alertmanager' => __DIR__ . '/../..' . '/app/SupportedApps/Alertmanager/Alertmanager.php', + 'App\\SupportedApps\\ArchiveBox\\ArchiveBox' => __DIR__ . '/../..' . '/app/SupportedApps/ArchiveBox/ArchiveBox.php', 'App\\SupportedApps\\Bazarr\\Bazarr' => __DIR__ . '/../..' . '/app/SupportedApps/Bazarr/Bazarr.php', 'App\\SupportedApps\\Bitwarden\\Bitwarden' => __DIR__ . '/../..' . '/app/SupportedApps/Bitwarden/Bitwarden.php', + 'App\\SupportedApps\\Booksonic\\Booksonic' => __DIR__ . '/../..' . '/app/SupportedApps/Booksonic/Booksonic.php', 'App\\SupportedApps\\Bookstack\\Bookstack' => __DIR__ . '/../..' . '/app/SupportedApps/Bookstack/Bookstack.php', + 'App\\SupportedApps\\Cabot\\Cabot' => __DIR__ . '/../..' . '/app/SupportedApps/Cabot/Cabot.php', + 'App\\SupportedApps\\CalibreWeb\\CalibreWeb' => __DIR__ . '/../..' . '/app/SupportedApps/CalibreWeb/CalibreWeb.php', 'App\\SupportedApps\\Cardigann\\Cardigann' => __DIR__ . '/../..' . '/app/SupportedApps/Cardigann/Cardigann.php', + 'App\\SupportedApps\\CheckMK\\CheckMK' => __DIR__ . '/../..' . '/app/SupportedApps/CheckMK/CheckMK.php', + 'App\\SupportedApps\\CloudCMD\\CloudCMD' => __DIR__ . '/../..' . '/app/SupportedApps/CloudCMD/CloudCMD.php', + 'App\\SupportedApps\\CockpitCMS\\CockpitCMS' => __DIR__ . '/../..' . '/app/SupportedApps/CockpitCMS/CockpitCMS.php', + 'App\\SupportedApps\\Cockpit\\Cockpit' => __DIR__ . '/../..' . '/app/SupportedApps/Cockpit/Cockpit.php', + 'App\\SupportedApps\\Concourse\\Concourse' => __DIR__ . '/../..' . '/app/SupportedApps/Concourse/Concourse.php', + 'App\\SupportedApps\\Confluence\\Confluence' => __DIR__ . '/../..' . '/app/SupportedApps/Confluence/Confluence.php', 'App\\SupportedApps\\CouchPotato\\CouchPotato' => __DIR__ . '/../..' . '/app/SupportedApps/CouchPotato/CouchPotato.php', + 'App\\SupportedApps\\CryptPad\\CryptPad' => __DIR__ . '/../..' . '/app/SupportedApps/CryptPad/CryptPad.php', 'App\\SupportedApps\\Deluge\\Deluge' => __DIR__ . '/../..' . '/app/SupportedApps/Deluge/Deluge.php', + 'App\\SupportedApps\\Directus\\Directus' => __DIR__ . '/../..' . '/app/SupportedApps/Directus/Directus.php', 'App\\SupportedApps\\DokuWiki\\DokuWiki' => __DIR__ . '/../..' . '/app/SupportedApps/DokuWiki/DokuWiki.php', + 'App\\SupportedApps\\Domoticz\\Domoticz' => __DIR__ . '/../..' . '/app/SupportedApps/Domoticz/Domoticz.php', + 'App\\SupportedApps\\Drone\\Drone' => __DIR__ . '/../..' . '/app/SupportedApps/Drone/Drone.php', + 'App\\SupportedApps\\Duplicacy\\Duplicacy' => __DIR__ . '/../..' . '/app/SupportedApps/Duplicacy/Duplicacy.php', 'App\\SupportedApps\\Duplicati\\Duplicati' => __DIR__ . '/../..' . '/app/SupportedApps/Duplicati/Duplicati.php', 'App\\SupportedApps\\Emby\\Emby' => __DIR__ . '/../..' . '/app/SupportedApps/Emby/Emby.php', + 'App\\SupportedApps\\FileBrowser\\FileBrowser' => __DIR__ . '/../..' . '/app/SupportedApps/FileBrowser/FileBrowser.php', + 'App\\SupportedApps\\Firefly\\Firefly' => __DIR__ . '/../..' . '/app/SupportedApps/Firefly/Firefly.php', + 'App\\SupportedApps\\FirefoxSend\\FirefoxSend' => __DIR__ . '/../..' . '/app/SupportedApps/FirefoxSend/FirefoxSend.php', + 'App\\SupportedApps\\FlexGet\\FlexGet' => __DIR__ . '/../..' . '/app/SupportedApps/FlexGet/FlexGet.php', 'App\\SupportedApps\\Flood\\Flood' => __DIR__ . '/../..' . '/app/SupportedApps/Flood/Flood.php', + 'App\\SupportedApps\\Freenas\\Freenas' => __DIR__ . '/../..' . '/app/SupportedApps/Freenas/Freenas.php', 'App\\SupportedApps\\FreshRSS\\FreshRSS' => __DIR__ . '/../..' . '/app/SupportedApps/FreshRSS/FreshRSS.php', + 'App\\SupportedApps\\Ghost\\Ghost' => __DIR__ . '/../..' . '/app/SupportedApps/Ghost/Ghost.php', + 'App\\SupportedApps\\GitHub\\GitHub' => __DIR__ . '/../..' . '/app/SupportedApps/GitHub/GitHub.php', + 'App\\SupportedApps\\GitLab\\GitLab' => __DIR__ . '/../..' . '/app/SupportedApps/GitLab/GitLab.php', 'App\\SupportedApps\\Gitea\\Gitea' => __DIR__ . '/../..' . '/app/SupportedApps/Gitea/Gitea.php', 'App\\SupportedApps\\Glances\\Glances' => __DIR__ . '/../..' . '/app/SupportedApps/Glances/Glances.php', + 'App\\SupportedApps\\Gogs\\Gogs' => __DIR__ . '/../..' . '/app/SupportedApps/Gogs/Gogs.php', + 'App\\SupportedApps\\Gotify\\Gotify' => __DIR__ . '/../..' . '/app/SupportedApps/Gotify/Gotify.php', 'App\\SupportedApps\\Grafana\\Grafana' => __DIR__ . '/../..' . '/app/SupportedApps/Grafana/Grafana.php', + 'App\\SupportedApps\\Grav\\Grav' => __DIR__ . '/../..' . '/app/SupportedApps/Grav/Grav.php', 'App\\SupportedApps\\Graylog\\Graylog' => __DIR__ . '/../..' . '/app/SupportedApps/Graylog/Graylog.php', + 'App\\SupportedApps\\Guacamole\\Guacamole' => __DIR__ . '/../..' . '/app/SupportedApps/Guacamole/Guacamole.php', + 'App\\SupportedApps\\HAProxy\\HAProxy' => __DIR__ . '/../..' . '/app/SupportedApps/HAProxy/HAProxy.php', 'App\\SupportedApps\\Headphones\\Headphones' => __DIR__ . '/../..' . '/app/SupportedApps/Headphones/Headphones.php', + 'App\\SupportedApps\\Healthchecks\\Healthchecks' => __DIR__ . '/../..' . '/app/SupportedApps/Healthchecks/Healthchecks.php', 'App\\SupportedApps\\HomeAssistant\\HomeAssistant' => __DIR__ . '/../..' . '/app/SupportedApps/HomeAssistant/HomeAssistant.php', + 'App\\SupportedApps\\Huginn\\Huginn' => __DIR__ . '/../..' . '/app/SupportedApps/Huginn/Huginn.php', + 'App\\SupportedApps\\InvoiceNinja\\InvoiceNinja' => __DIR__ . '/../..' . '/app/SupportedApps/InvoiceNinja/InvoiceNinja.php', 'App\\SupportedApps\\JDownloader\\JDownloader' => __DIR__ . '/../..' . '/app/SupportedApps/JDownloader/JDownloader.php', 'App\\SupportedApps\\Jackett\\Jackett' => __DIR__ . '/../..' . '/app/SupportedApps/Jackett/Jackett.php', + 'App\\SupportedApps\\Jeedom\\Jeedom' => __DIR__ . '/../..' . '/app/SupportedApps/Jeedom/Jeedom.php', + 'App\\SupportedApps\\Jellyfin\\Jellyfin' => __DIR__ . '/../..' . '/app/SupportedApps/Jellyfin/Jellyfin.php', + 'App\\SupportedApps\\Jenkins\\Jenkins' => __DIR__ . '/../..' . '/app/SupportedApps/Jenkins/Jenkins.php', + 'App\\SupportedApps\\Jira\\Jira' => __DIR__ . '/../..' . '/app/SupportedApps/Jira/Jira.php', + 'App\\SupportedApps\\Jupyter\\Jupyter' => __DIR__ . '/../..' . '/app/SupportedApps/Jupyter/Jupyter.php', + 'App\\SupportedApps\\Keycloak\\Keycloak' => __DIR__ . '/../..' . '/app/SupportedApps/Keycloak/Keycloak.php', + 'App\\SupportedApps\\Kibana\\Kibana' => __DIR__ . '/../..' . '/app/SupportedApps/Kibana/Kibana.php', + 'App\\SupportedApps\\Kimai\\Kimai' => __DIR__ . '/../..' . '/app/SupportedApps/Kimai/Kimai.php', 'App\\SupportedApps\\Krusader\\Krusader' => __DIR__ . '/../..' . '/app/SupportedApps/Krusader/Krusader.php', + 'App\\SupportedApps\\KubernetesDashboard\\KubernetesDashboard' => __DIR__ . '/../..' . '/app/SupportedApps/KubernetesDashboard/KubernetesDashboard.php', + 'App\\SupportedApps\\LazyLibrarian\\LazyLibrarian' => __DIR__ . '/../..' . '/app/SupportedApps/LazyLibrarian/LazyLibrarian.php', + 'App\\SupportedApps\\LemonLDAPNG\\LemonLDAPNG' => __DIR__ . '/../..' . '/app/SupportedApps/LemonLDAPNG/LemonLDAPNG.php', 'App\\SupportedApps\\Lidarr\\Lidarr' => __DIR__ . '/../..' . '/app/SupportedApps/Lidarr/Lidarr.php', + 'App\\SupportedApps\\MailcowSOGo\\MailcowSOGo' => __DIR__ . '/../..' . '/app/SupportedApps/MailcowSOGo/MailcowSOGo.php', 'App\\SupportedApps\\Mailcow\\Mailcow' => __DIR__ . '/../..' . '/app/SupportedApps/Mailcow/Mailcow.php', + 'App\\SupportedApps\\Mailhog\\Mailhog' => __DIR__ . '/../..' . '/app/SupportedApps/Mailhog/Mailhog.php', + 'App\\SupportedApps\\Mattermost\\Mattermost' => __DIR__ . '/../..' . '/app/SupportedApps/Mattermost/Mattermost.php', + 'App\\SupportedApps\\MayanEDMS\\MayanEDMS' => __DIR__ . '/../..' . '/app/SupportedApps/MayanEDMS/MayanEDMS.php', 'App\\SupportedApps\\McMyAdmin\\McMyAdmin' => __DIR__ . '/../..' . '/app/SupportedApps/McMyAdmin/McMyAdmin.php', 'App\\SupportedApps\\Medusa\\Medusa' => __DIR__ . '/../..' . '/app/SupportedApps/Medusa/Medusa.php', + 'App\\SupportedApps\\Meraki\\Meraki' => __DIR__ . '/../..' . '/app/SupportedApps/Meraki/Meraki.php', + 'App\\SupportedApps\\Miniflux\\Miniflux' => __DIR__ . '/../..' . '/app/SupportedApps/Miniflux/Miniflux.php', + 'App\\SupportedApps\\Minio\\Minio' => __DIR__ . '/../..' . '/app/SupportedApps/Minio/Minio.php', 'App\\SupportedApps\\Monica\\Monica' => __DIR__ . '/../..' . '/app/SupportedApps/Monica/Monica.php', 'App\\SupportedApps\\MusicBrainz\\MusicBrainz' => __DIR__ . '/../..' . '/app/SupportedApps/MusicBrainz/MusicBrainz.php', 'App\\SupportedApps\\Mylar\\Mylar' => __DIR__ . '/../..' . '/app/SupportedApps/Mylar/Mylar.php', 'App\\SupportedApps\\NZBHydra\\NZBHydra' => __DIR__ . '/../..' . '/app/SupportedApps/NZBHydra/NZBHydra.php', 'App\\SupportedApps\\Netdata\\Netdata' => __DIR__ . '/../..' . '/app/SupportedApps/Netdata/Netdata.php', 'App\\SupportedApps\\Nextcloud\\Nextcloud' => __DIR__ . '/../..' . '/app/SupportedApps/Nextcloud/Nextcloud.php', + 'App\\SupportedApps\\NginxProxyManager\\NginxProxyManager' => __DIR__ . '/../..' . '/app/SupportedApps/NginxProxyManager/NginxProxyManager.php', 'App\\SupportedApps\\NodeRed\\NodeRed' => __DIR__ . '/../..' . '/app/SupportedApps/NodeRed/NodeRed.php', 'App\\SupportedApps\\NowShowing\\NowShowing' => __DIR__ . '/../..' . '/app/SupportedApps/NowShowing/NowShowing.php', + 'App\\SupportedApps\\Nzbget\\Nzbget' => __DIR__ . '/../..' . '/app/SupportedApps/Nzbget/Nzbget.php', 'App\\SupportedApps\\OPNsense\\OPNsense' => __DIR__ . '/../..' . '/app/SupportedApps/OPNsense/OPNsense.php', 'App\\SupportedApps\\Octoprint\\Octoprint' => __DIR__ . '/../..' . '/app/SupportedApps/Octoprint/Octoprint.php', 'App\\SupportedApps\\Ombi\\Ombi' => __DIR__ . '/../..' . '/app/SupportedApps/Ombi/Ombi.php', + 'App\\SupportedApps\\OmniDB\\OmniDB' => __DIR__ . '/../..' . '/app/SupportedApps/OmniDB/OmniDB.php', + 'App\\SupportedApps\\Oscarr\\Oscarr' => __DIR__ . '/../..' . '/app/SupportedApps/Oscarr/Oscarr.php', + 'App\\SupportedApps\\OwnPhotos\\OwnPhotos' => __DIR__ . '/../..' . '/app/SupportedApps/OwnPhotos/OwnPhotos.php', + 'App\\SupportedApps\\Paperless\\Paperless' => __DIR__ . '/../..' . '/app/SupportedApps/Paperless/Paperless.php', + 'App\\SupportedApps\\PartKeepr\\PartKeepr' => __DIR__ . '/../..' . '/app/SupportedApps/PartKeepr/PartKeepr.php', 'App\\SupportedApps\\Pihole\\Pihole' => __DIR__ . '/../..' . '/app/SupportedApps/Pihole/Pihole.php', 'App\\SupportedApps\\PlexRequests\\PlexRequests' => __DIR__ . '/../..' . '/app/SupportedApps/PlexRequests/PlexRequests.php', 'App\\SupportedApps\\Plex\\Plex' => __DIR__ . '/../..' . '/app/SupportedApps/Plex/Plex.php', 'App\\SupportedApps\\Portainer\\Portainer' => __DIR__ . '/../..' . '/app/SupportedApps/Portainer/Portainer.php', + 'App\\SupportedApps\\Privatebin\\Privatebin' => __DIR__ . '/../..' . '/app/SupportedApps/Privatebin/Privatebin.php', + 'App\\SupportedApps\\ProjectSend\\ProjectSend' => __DIR__ . '/../..' . '/app/SupportedApps/ProjectSend/ProjectSend.php', + 'App\\SupportedApps\\Prometheus\\Prometheus' => __DIR__ . '/../..' . '/app/SupportedApps/Prometheus/Prometheus.php', 'App\\SupportedApps\\Proxmox\\Proxmox' => __DIR__ . '/../..' . '/app/SupportedApps/Proxmox/Proxmox.php', + 'App\\SupportedApps\\QNAP\\QNAP' => __DIR__ . '/../..' . '/app/SupportedApps/QNAP/QNAP.php', 'App\\SupportedApps\\Radarr\\Radarr' => __DIR__ . '/../..' . '/app/SupportedApps/Radarr/Radarr.php', 'App\\SupportedApps\\Rancher\\Rancher' => __DIR__ . '/../..' . '/app/SupportedApps/Rancher/Rancher.php', + 'App\\SupportedApps\\Raneto\\Raneto' => __DIR__ . '/../..' . '/app/SupportedApps/Raneto/Raneto.php', + 'App\\SupportedApps\\ResilioSync\\ResilioSync' => __DIR__ . '/../..' . '/app/SupportedApps/ResilioSync/ResilioSync.php', + 'App\\SupportedApps\\RocketChat\\RocketChat' => __DIR__ . '/../..' . '/app/SupportedApps/RocketChat/RocketChat.php', + 'App\\SupportedApps\\Rspamd\\Rspamd' => __DIR__ . '/../..' . '/app/SupportedApps/Rspamd/Rspamd.php', 'App\\SupportedApps\\RuneAudio\\RuneAudio' => __DIR__ . '/../..' . '/app/SupportedApps/RuneAudio/RuneAudio.php', 'App\\SupportedApps\\SABnzbd\\SABnzbd' => __DIR__ . '/../..' . '/app/SupportedApps/SABnzbd/SABnzbd.php', + 'App\\SupportedApps\\SOGo\\SOGo' => __DIR__ . '/../..' . '/app/SupportedApps/SOGo/SOGo.php', + 'App\\SupportedApps\\Seafile\\Seafile' => __DIR__ . '/../..' . '/app/SupportedApps/Seafile/Seafile.php', + 'App\\SupportedApps\\SearxMetasearchEngine\\SearxMetasearchEngine' => __DIR__ . '/../..' . '/app/SupportedApps/SearxMetasearchEngine/SearxMetasearchEngine.php', + 'App\\SupportedApps\\Serviio\\Serviio' => __DIR__ . '/../..' . '/app/SupportedApps/Serviio/Serviio.php', + 'App\\SupportedApps\\Shaarli\\Shaarli' => __DIR__ . '/../..' . '/app/SupportedApps/Shaarli/Shaarli.php', + 'App\\SupportedApps\\Shinobi\\Shinobi' => __DIR__ . '/../..' . '/app/SupportedApps/Shinobi/Shinobi.php', + 'App\\SupportedApps\\SickBeard\\SickBeard' => __DIR__ . '/../..' . '/app/SupportedApps/SickBeard/SickBeard.php', + 'App\\SupportedApps\\Sickchill\\Sickchill' => __DIR__ . '/../..' . '/app/SupportedApps/Sickchill/Sickchill.php', 'App\\SupportedApps\\Slack\\Slack' => __DIR__ . '/../..' . '/app/SupportedApps/Slack/Slack.php', + 'App\\SupportedApps\\Snibox\\Snibox' => __DIR__ . '/../..' . '/app/SupportedApps/Snibox/Snibox.php', 'App\\SupportedApps\\Sonarr\\Sonarr' => __DIR__ . '/../..' . '/app/SupportedApps/Sonarr/Sonarr.php', + 'App\\SupportedApps\\Sourcegraph\\Sourcegraph' => __DIR__ . '/../..' . '/app/SupportedApps/Sourcegraph/Sourcegraph.php', + 'App\\SupportedApps\\Squidex\\Squidex' => __DIR__ . '/../..' . '/app/SupportedApps/Squidex/Squidex.php', + 'App\\SupportedApps\\Strapi\\Strapi' => __DIR__ . '/../..' . '/app/SupportedApps/Strapi/Strapi.php', 'App\\SupportedApps\\Syncthing\\Syncthing' => __DIR__ . '/../..' . '/app/SupportedApps/Syncthing/Syncthing.php', + 'App\\SupportedApps\\Synology\\Synology' => __DIR__ . '/../..' . '/app/SupportedApps/Synology/Synology.php', 'App\\SupportedApps\\TVHeadend\\TVHeadend' => __DIR__ . '/../..' . '/app/SupportedApps/TVHeadend/TVHeadend.php', + 'App\\SupportedApps\\Taiga\\Taiga' => __DIR__ . '/../..' . '/app/SupportedApps/Taiga/Taiga.php', 'App\\SupportedApps\\Tautulli\\Tautulli' => __DIR__ . '/../..' . '/app/SupportedApps/Tautulli/Tautulli.php', 'App\\SupportedApps\\TheLounge\\TheLounge' => __DIR__ . '/../..' . '/app/SupportedApps/TheLounge/TheLounge.php', 'App\\SupportedApps\\TinyTinyRSS\\TinyTinyRSS' => __DIR__ . '/../..' . '/app/SupportedApps/TinyTinyRSS/TinyTinyRSS.php', + 'App\\SupportedApps\\Traccar\\Traccar' => __DIR__ . '/../..' . '/app/SupportedApps/Traccar/Traccar.php', 'App\\SupportedApps\\Traefik\\Traefik' => __DIR__ . '/../..' . '/app/SupportedApps/Traefik/Traefik.php', 'App\\SupportedApps\\Transmission\\Transmission' => __DIR__ . '/../..' . '/app/SupportedApps/Transmission/Transmission.php', + 'App\\SupportedApps\\Trilium\\Trilium' => __DIR__ . '/../..' . '/app/SupportedApps/Trilium/Trilium.php', + 'App\\SupportedApps\\Ubooquity\\Ubooquity' => __DIR__ . '/../..' . '/app/SupportedApps/Ubooquity/Ubooquity.php', 'App\\SupportedApps\\UniFi\\UniFi' => __DIR__ . '/../..' . '/app/SupportedApps/UniFi/UniFi.php', 'App\\SupportedApps\\Unraid\\Unraid' => __DIR__ . '/../..' . '/app/SupportedApps/Unraid/Unraid.php', 'App\\SupportedApps\\VMwarevCenter\\VMwarevCenter' => __DIR__ . '/../..' . '/app/SupportedApps/VMwarevCenter/VMwarevCenter.php', 'App\\SupportedApps\\Virtualmin\\Virtualmin' => __DIR__ . '/../..' . '/app/SupportedApps/Virtualmin/Virtualmin.php', + 'App\\SupportedApps\\Wallabag\\Wallabag' => __DIR__ . '/../..' . '/app/SupportedApps/Wallabag/Wallabag.php', 'App\\SupportedApps\\Watcher\\Watcher' => __DIR__ . '/../..' . '/app/SupportedApps/Watcher/Watcher.php', 'App\\SupportedApps\\WebTools\\WebTools' => __DIR__ . '/../..' . '/app/SupportedApps/WebTools/WebTools.php', 'App\\SupportedApps\\Webmin\\Webmin' => __DIR__ . '/../..' . '/app/SupportedApps/Webmin/Webmin.php', + 'App\\SupportedApps\\Wekan\\Wekan' => __DIR__ . '/../..' . '/app/SupportedApps/Wekan/Wekan.php', + 'App\\SupportedApps\\Wetty\\Wetty' => __DIR__ . '/../..' . '/app/SupportedApps/Wetty/Wetty.php', + 'App\\SupportedApps\\XWiki\\XWiki' => __DIR__ . '/../..' . '/app/SupportedApps/XWiki/XWiki.php', + 'App\\SupportedApps\\Xigmanas\\Xigmanas' => __DIR__ . '/../..' . '/app/SupportedApps/Xigmanas/Xigmanas.php', 'App\\SupportedApps\\ZNC\\ZNC' => __DIR__ . '/../..' . '/app/SupportedApps/ZNC/ZNC.php', + 'App\\SupportedApps\\ZoneMinder\\ZoneMinder' => __DIR__ . '/../..' . '/app/SupportedApps/ZoneMinder/ZoneMinder.php', + 'App\\SupportedApps\\Zulip\\Zulip' => __DIR__ . '/../..' . '/app/SupportedApps/Zulip/Zulip.php', 'App\\SupportedApps\\openHAB\\openHAB' => __DIR__ . '/../..' . '/app/SupportedApps/openHAB/openHAB.php', 'App\\SupportedApps\\openmediavault\\openmediavault' => __DIR__ . '/../..' . '/app/SupportedApps/openmediavault/openmediavault.php', + 'App\\SupportedApps\\ownCloud\\ownCloud' => __DIR__ . '/../..' . '/app/SupportedApps/ownCloud/ownCloud.php', 'App\\SupportedApps\\pfSense\\pfSense' => __DIR__ . '/../..' . '/app/SupportedApps/pfSense/pfSense.php', + 'App\\SupportedApps\\pgAdmin\\pgAdmin' => __DIR__ . '/../..' . '/app/SupportedApps/pgAdmin/pgAdmin.php', + 'App\\SupportedApps\\phpLDAPadmin\\phpLDAPadmin' => __DIR__ . '/../..' . '/app/SupportedApps/phpLDAPadmin/phpLDAPadmin.php', + 'App\\SupportedApps\\phpMyAdmin\\phpMyAdmin' => __DIR__ . '/../..' . '/app/SupportedApps/phpMyAdmin/phpMyAdmin.php', 'App\\SupportedApps\\pyLoad\\pyLoad' => __DIR__ . '/../..' . '/app/SupportedApps/pyLoad/pyLoad.php', 'App\\SupportedApps\\qBittorrent\\qBittorrent' => __DIR__ . '/../..' . '/app/SupportedApps/qBittorrent/qBittorrent.php', 'App\\SupportedApps\\ruTorrent\\ruTorrent' => __DIR__ . '/../..' . '/app/SupportedApps/ruTorrent/ruTorrent.php', @@ -587,6 +721,7 @@ class ComposerStaticInit4b6fb9210a1ea37c2db27b8ff53a1ecf 'Carbon\\Exceptions\\InvalidDateException' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Exceptions/InvalidDateException.php', 'Carbon\\Laravel\\ServiceProvider' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Laravel/ServiceProvider.php', 'Carbon\\Translator' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Translator.php', + 'Carbon\\Upgrade' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Upgrade.php', 'Clue\\StreamFilter\\CallbackFilter' => __DIR__ . '/..' . '/clue/stream-filter/src/CallbackFilter.php', 'Collective\\Html\\Componentable' => __DIR__ . '/..' . '/laravelcollective/html/src/Componentable.php', 'Collective\\Html\\Eloquent\\FormAccessible' => __DIR__ . '/..' . '/laravelcollective/html/src/Eloquent/FormAccessible.php', @@ -642,6 +777,7 @@ class ComposerStaticInit4b6fb9210a1ea37c2db27b8ff53a1ecf 'Dotenv\\Exception\\InvalidPathException' => __DIR__ . '/..' . '/vlucas/phpdotenv/src/Exception/InvalidPathException.php', 'Dotenv\\Exception\\ValidationException' => __DIR__ . '/..' . '/vlucas/phpdotenv/src/Exception/ValidationException.php', 'Dotenv\\Loader' => __DIR__ . '/..' . '/vlucas/phpdotenv/src/Loader.php', + 'Dotenv\\Parser' => __DIR__ . '/..' . '/vlucas/phpdotenv/src/Parser.php', 'Dotenv\\Validator' => __DIR__ . '/..' . '/vlucas/phpdotenv/src/Validator.php', 'Egulias\\EmailValidator\\EmailLexer' => __DIR__ . '/..' . '/egulias/email-validator/EmailValidator/EmailLexer.php', 'Egulias\\EmailValidator\\EmailParser' => __DIR__ . '/..' . '/egulias/email-validator/EmailValidator/EmailParser.php', @@ -657,12 +793,12 @@ class ComposerStaticInit4b6fb9210a1ea37c2db27b8ff53a1ecf 'Egulias\\EmailValidator\\Exception\\DomainHyphened' => __DIR__ . '/..' . '/egulias/email-validator/EmailValidator/Exception/DomainHyphened.php', 'Egulias\\EmailValidator\\Exception\\DotAtEnd' => __DIR__ . '/..' . '/egulias/email-validator/EmailValidator/Exception/DotAtEnd.php', 'Egulias\\EmailValidator\\Exception\\DotAtStart' => __DIR__ . '/..' . '/egulias/email-validator/EmailValidator/Exception/DotAtStart.php', - 'Egulias\\EmailValidator\\Exception\\ExpectedQPair' => __DIR__ . '/..' . '/egulias/email-validator/EmailValidator/Exception/ExpectingQPair.php', 'Egulias\\EmailValidator\\Exception\\ExpectingAT' => __DIR__ . '/..' . '/egulias/email-validator/EmailValidator/Exception/ExpectingAT.php', 'Egulias\\EmailValidator\\Exception\\ExpectingATEXT' => __DIR__ . '/..' . '/egulias/email-validator/EmailValidator/Exception/ExpectingATEXT.php', 'Egulias\\EmailValidator\\Exception\\ExpectingCTEXT' => __DIR__ . '/..' . '/egulias/email-validator/EmailValidator/Exception/ExpectingCTEXT.php', 'Egulias\\EmailValidator\\Exception\\ExpectingDTEXT' => __DIR__ . '/..' . '/egulias/email-validator/EmailValidator/Exception/ExpectingDTEXT.php', 'Egulias\\EmailValidator\\Exception\\ExpectingDomainLiteralClose' => __DIR__ . '/..' . '/egulias/email-validator/EmailValidator/Exception/ExpectingDomainLiteralClose.php', + 'Egulias\\EmailValidator\\Exception\\ExpectingQPair' => __DIR__ . '/..' . '/egulias/email-validator/EmailValidator/Exception/ExpectingQPair.php', 'Egulias\\EmailValidator\\Exception\\InvalidEmail' => __DIR__ . '/..' . '/egulias/email-validator/EmailValidator/Exception/InvalidEmail.php', 'Egulias\\EmailValidator\\Exception\\NoDNSRecord' => __DIR__ . '/..' . '/egulias/email-validator/EmailValidator/Exception/NoDNSRecord.php', 'Egulias\\EmailValidator\\Exception\\NoDomainPart' => __DIR__ . '/..' . '/egulias/email-validator/EmailValidator/Exception/NoDomainPart.php', @@ -1196,6 +1332,7 @@ class ComposerStaticInit4b6fb9210a1ea37c2db27b8ff53a1ecf 'Github\\Api\\Miscellaneous\\CodeOfConduct' => __DIR__ . '/..' . '/knplabs/github-api/lib/Github/Api/Miscellaneous/CodeOfConduct.php', 'Github\\Api\\Miscellaneous\\Emojis' => __DIR__ . '/..' . '/knplabs/github-api/lib/Github/Api/Miscellaneous/Emojis.php', 'Github\\Api\\Miscellaneous\\Gitignore' => __DIR__ . '/..' . '/knplabs/github-api/lib/Github/Api/Miscellaneous/Gitignore.php', + 'Github\\Api\\Miscellaneous\\Licenses' => __DIR__ . '/..' . '/knplabs/github-api/lib/Github/Api/Miscellaneous/Licenses.php', 'Github\\Api\\Notification' => __DIR__ . '/..' . '/knplabs/github-api/lib/Github/Api/Notification.php', 'Github\\Api\\Organization' => __DIR__ . '/..' . '/knplabs/github-api/lib/Github/Api/Organization.php', 'Github\\Api\\Organization\\Hooks' => __DIR__ . '/..' . '/knplabs/github-api/lib/Github/Api/Organization/Hooks.php', @@ -1210,6 +1347,7 @@ class ComposerStaticInit4b6fb9210a1ea37c2db27b8ff53a1ecf 'Github\\Api\\PullRequest\\Review' => __DIR__ . '/..' . '/knplabs/github-api/lib/Github/Api/PullRequest/Review.php', 'Github\\Api\\PullRequest\\ReviewRequest' => __DIR__ . '/..' . '/knplabs/github-api/lib/Github/Api/PullRequest/ReviewRequest.php', 'Github\\Api\\RateLimit' => __DIR__ . '/..' . '/knplabs/github-api/lib/Github/Api/RateLimit.php', + 'Github\\Api\\RateLimit\\RateLimitResource' => __DIR__ . '/..' . '/knplabs/github-api/lib/Github/Api/RateLimit/RateLimitResource.php', 'Github\\Api\\Repo' => __DIR__ . '/..' . '/knplabs/github-api/lib/Github/Api/Repo.php', 'Github\\Api\\Repository\\Assets' => __DIR__ . '/..' . '/knplabs/github-api/lib/Github/Api/Repository/Assets.php', 'Github\\Api\\Repository\\Collaborators' => __DIR__ . '/..' . '/knplabs/github-api/lib/Github/Api/Repository/Collaborators.php', @@ -1437,6 +1575,8 @@ class ComposerStaticInit4b6fb9210a1ea37c2db27b8ff53a1ecf 'Http\\Client\\Common\\Plugin\\Cache\\Generator\\CacheKeyGenerator' => __DIR__ . '/..' . '/php-http/cache-plugin/src/Cache/Generator/CacheKeyGenerator.php', 'Http\\Client\\Common\\Plugin\\Cache\\Generator\\HeaderCacheKeyGenerator' => __DIR__ . '/..' . '/php-http/cache-plugin/src/Cache/Generator/HeaderCacheKeyGenerator.php', 'Http\\Client\\Common\\Plugin\\Cache\\Generator\\SimpleGenerator' => __DIR__ . '/..' . '/php-http/cache-plugin/src/Cache/Generator/SimpleGenerator.php', + 'Http\\Client\\Common\\Plugin\\Cache\\Listener\\AddHeaderCacheListener' => __DIR__ . '/..' . '/php-http/cache-plugin/src/Cache/Listener/AddHeaderCacheListener.php', + 'Http\\Client\\Common\\Plugin\\Cache\\Listener\\CacheListener' => __DIR__ . '/..' . '/php-http/cache-plugin/src/Cache/Listener/CacheListener.php', 'Http\\Client\\Common\\Plugin\\ContentLengthPlugin' => __DIR__ . '/..' . '/php-http/client-common/src/Plugin/ContentLengthPlugin.php', 'Http\\Client\\Common\\Plugin\\ContentTypePlugin' => __DIR__ . '/..' . '/php-http/client-common/src/Plugin/ContentTypePlugin.php', 'Http\\Client\\Common\\Plugin\\CookiePlugin' => __DIR__ . '/..' . '/php-http/client-common/src/Plugin/CookiePlugin.php', @@ -1476,7 +1616,10 @@ class ComposerStaticInit4b6fb9210a1ea37c2db27b8ff53a1ecf 'Http\\Discovery\\HttpClientDiscovery' => __DIR__ . '/..' . '/php-http/discovery/src/HttpClientDiscovery.php', 'Http\\Discovery\\MessageFactoryDiscovery' => __DIR__ . '/..' . '/php-http/discovery/src/MessageFactoryDiscovery.php', 'Http\\Discovery\\NotFoundException' => __DIR__ . '/..' . '/php-http/discovery/src/NotFoundException.php', + 'Http\\Discovery\\Psr17FactoryDiscovery' => __DIR__ . '/..' . '/php-http/discovery/src/Psr17FactoryDiscovery.php', + 'Http\\Discovery\\Psr18ClientDiscovery' => __DIR__ . '/..' . '/php-http/discovery/src/Psr18ClientDiscovery.php', 'Http\\Discovery\\Strategy\\CommonClassesStrategy' => __DIR__ . '/..' . '/php-http/discovery/src/Strategy/CommonClassesStrategy.php', + 'Http\\Discovery\\Strategy\\CommonPsr17ClassesStrategy' => __DIR__ . '/..' . '/php-http/discovery/src/Strategy/CommonPsr17ClassesStrategy.php', 'Http\\Discovery\\Strategy\\DiscoveryStrategy' => __DIR__ . '/..' . '/php-http/discovery/src/Strategy/DiscoveryStrategy.php', 'Http\\Discovery\\Strategy\\MockClientStrategy' => __DIR__ . '/..' . '/php-http/discovery/src/Strategy/MockClientStrategy.php', 'Http\\Discovery\\Strategy\\PuliBetaStrategy' => __DIR__ . '/..' . '/php-http/discovery/src/Strategy/PuliBetaStrategy.php', @@ -1790,6 +1933,7 @@ class ComposerStaticInit4b6fb9210a1ea37c2db27b8ff53a1ecf 'Illuminate\\Database\\Eloquent\\Concerns\\QueriesRelationships' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/QueriesRelationships.php', 'Illuminate\\Database\\Eloquent\\Factory' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Eloquent/Factory.php', 'Illuminate\\Database\\Eloquent\\FactoryBuilder' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Eloquent/FactoryBuilder.php', + 'Illuminate\\Database\\Eloquent\\HigherOrderBuilderProxy' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Eloquent/HigherOrderBuilderProxy.php', 'Illuminate\\Database\\Eloquent\\JsonEncodingException' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Eloquent/JsonEncodingException.php', 'Illuminate\\Database\\Eloquent\\MassAssignmentException' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Eloquent/MassAssignmentException.php', 'Illuminate\\Database\\Eloquent\\Model' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Eloquent/Model.php', @@ -2348,6 +2492,7 @@ class ComposerStaticInit4b6fb9210a1ea37c2db27b8ff53a1ecf 'JakubOnderka\\PhpConsoleColor\\ConsoleColor' => __DIR__ . '/..' . '/jakub-onderka/php-console-color/src/ConsoleColor.php', 'JakubOnderka\\PhpConsoleColor\\InvalidStyleException' => __DIR__ . '/..' . '/jakub-onderka/php-console-color/src/InvalidStyleException.php', 'JakubOnderka\\PhpConsoleHighlighter\\Highlighter' => __DIR__ . '/..' . '/jakub-onderka/php-console-highlighter/src/Highlighter.php', + 'JsonException' => __DIR__ . '/..' . '/symfony/polyfill-php73/Resources/stubs/JsonException.php', 'JsonSerializable' => __DIR__ . '/..' . '/nesbot/carbon/src/JsonSerializable.php', 'Laravel\\Tinker\\ClassAliasAutoloader' => __DIR__ . '/..' . '/laravel/tinker/src/ClassAliasAutoloader.php', 'Laravel\\Tinker\\Console\\TinkerCommand' => __DIR__ . '/..' . '/laravel/tinker/src/Console/TinkerCommand.php', @@ -2368,16 +2513,18 @@ class ComposerStaticInit4b6fb9210a1ea37c2db27b8ff53a1ecf 'Lcobucci\\JWT\\Signer' => __DIR__ . '/..' . '/lcobucci/jwt/src/Signer.php', 'Lcobucci\\JWT\\Signer\\BaseSigner' => __DIR__ . '/..' . '/lcobucci/jwt/src/Signer/BaseSigner.php', 'Lcobucci\\JWT\\Signer\\Ecdsa' => __DIR__ . '/..' . '/lcobucci/jwt/src/Signer/Ecdsa.php', - 'Lcobucci\\JWT\\Signer\\Ecdsa\\KeyParser' => __DIR__ . '/..' . '/lcobucci/jwt/src/Signer/Ecdsa/KeyParser.php', + 'Lcobucci\\JWT\\Signer\\Ecdsa\\MultibyteStringConverter' => __DIR__ . '/..' . '/lcobucci/jwt/src/Signer/Ecdsa/MultibyteStringConverter.php', 'Lcobucci\\JWT\\Signer\\Ecdsa\\Sha256' => __DIR__ . '/..' . '/lcobucci/jwt/src/Signer/Ecdsa/Sha256.php', 'Lcobucci\\JWT\\Signer\\Ecdsa\\Sha384' => __DIR__ . '/..' . '/lcobucci/jwt/src/Signer/Ecdsa/Sha384.php', 'Lcobucci\\JWT\\Signer\\Ecdsa\\Sha512' => __DIR__ . '/..' . '/lcobucci/jwt/src/Signer/Ecdsa/Sha512.php', + 'Lcobucci\\JWT\\Signer\\Ecdsa\\SignatureConverter' => __DIR__ . '/..' . '/lcobucci/jwt/src/Signer/Ecdsa/SignatureConverter.php', 'Lcobucci\\JWT\\Signer\\Hmac' => __DIR__ . '/..' . '/lcobucci/jwt/src/Signer/Hmac.php', 'Lcobucci\\JWT\\Signer\\Hmac\\Sha256' => __DIR__ . '/..' . '/lcobucci/jwt/src/Signer/Hmac/Sha256.php', 'Lcobucci\\JWT\\Signer\\Hmac\\Sha384' => __DIR__ . '/..' . '/lcobucci/jwt/src/Signer/Hmac/Sha384.php', 'Lcobucci\\JWT\\Signer\\Hmac\\Sha512' => __DIR__ . '/..' . '/lcobucci/jwt/src/Signer/Hmac/Sha512.php', 'Lcobucci\\JWT\\Signer\\Key' => __DIR__ . '/..' . '/lcobucci/jwt/src/Signer/Key.php', 'Lcobucci\\JWT\\Signer\\Keychain' => __DIR__ . '/..' . '/lcobucci/jwt/src/Signer/Keychain.php', + 'Lcobucci\\JWT\\Signer\\OpenSSL' => __DIR__ . '/..' . '/lcobucci/jwt/src/Signer/OpenSSL.php', 'Lcobucci\\JWT\\Signer\\Rsa' => __DIR__ . '/..' . '/lcobucci/jwt/src/Signer/Rsa.php', 'Lcobucci\\JWT\\Signer\\Rsa\\Sha256' => __DIR__ . '/..' . '/lcobucci/jwt/src/Signer/Rsa/Sha256.php', 'Lcobucci\\JWT\\Signer\\Rsa\\Sha384' => __DIR__ . '/..' . '/lcobucci/jwt/src/Signer/Rsa/Sha384.php', @@ -2436,7 +2583,11 @@ class ComposerStaticInit4b6fb9210a1ea37c2db27b8ff53a1ecf 'Mockery\\Adapter\\Phpunit\\Legacy\\TestListenerForV7' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Adapter/Phpunit/Legacy/TestListenerForV7.php', 'Mockery\\Adapter\\Phpunit\\Legacy\\TestListenerTrait' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Adapter/Phpunit/Legacy/TestListenerTrait.php', 'Mockery\\Adapter\\Phpunit\\MockeryPHPUnitIntegration' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryPHPUnitIntegration.php', + 'Mockery\\Adapter\\Phpunit\\MockeryPHPUnitIntegrationAssertPostConditionsForV7AndPrevious' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryPHPUnitIntegrationAssertPostConditionsForV7AndPrevious.php', + 'Mockery\\Adapter\\Phpunit\\MockeryPHPUnitIntegrationAssertPostConditionsForV8' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryPHPUnitIntegrationAssertPostConditionsForV8.php', 'Mockery\\Adapter\\Phpunit\\MockeryTestCase' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryTestCase.php', + 'Mockery\\Adapter\\Phpunit\\MockeryTestCaseSetUpForV7AndPrevious' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryTestCaseSetUpForV7AndPrevious.php', + 'Mockery\\Adapter\\Phpunit\\MockeryTestCaseSetUpForV8' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryTestCaseSetUpForV8.php', 'Mockery\\Adapter\\Phpunit\\TestListener' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/Adapter/Phpunit/TestListener.php', 'Mockery\\ClosureWrapper' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/ClosureWrapper.php', 'Mockery\\CompositeExpectation' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery/CompositeExpectation.php', @@ -2609,6 +2760,7 @@ class ComposerStaticInit4b6fb9210a1ea37c2db27b8ff53a1ecf 'Monolog\\Utils' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Utils.php', 'Nexmo\\Account\\Balance' => __DIR__ . '/..' . '/nexmo/client/src/Account/Balance.php', 'Nexmo\\Account\\Client' => __DIR__ . '/..' . '/nexmo/client/src/Account/Client.php', + 'Nexmo\\Account\\Config' => __DIR__ . '/..' . '/nexmo/client/src/Account/Config.php', 'Nexmo\\Account\\PrefixPrice' => __DIR__ . '/..' . '/nexmo/client/src/Account/PrefixPrice.php', 'Nexmo\\Account\\Price' => __DIR__ . '/..' . '/nexmo/client/src/Account/Price.php', 'Nexmo\\Account\\Secret' => __DIR__ . '/..' . '/nexmo/client/src/Account/Secret.php', @@ -2620,6 +2772,9 @@ class ComposerStaticInit4b6fb9210a1ea37c2db27b8ff53a1ecf 'Nexmo\\Application\\ApplicationInterface' => __DIR__ . '/..' . '/nexmo/client/src/Application/ApplicationInterface.php', 'Nexmo\\Application\\Client' => __DIR__ . '/..' . '/nexmo/client/src/Application/Client.php', 'Nexmo\\Application\\Filter' => __DIR__ . '/..' . '/nexmo/client/src/Application/Filter.php', + 'Nexmo\\Application\\MessagesConfig' => __DIR__ . '/..' . '/nexmo/client/src/Application/MessagesConfig.php', + 'Nexmo\\Application\\RtcConfig' => __DIR__ . '/..' . '/nexmo/client/src/Application/RtcConfig.php', + 'Nexmo\\Application\\VbcConfig' => __DIR__ . '/..' . '/nexmo/client/src/Application/VbcConfig.php', 'Nexmo\\Application\\VoiceConfig' => __DIR__ . '/..' . '/nexmo/client/src/Application/VoiceConfig.php', 'Nexmo\\Application\\Webhook' => __DIR__ . '/..' . '/nexmo/client/src/Application/Webhook.php', 'Nexmo\\Call\\Call' => __DIR__ . '/..' . '/nexmo/client/src/Call/Call.php', @@ -2680,6 +2835,7 @@ class ComposerStaticInit4b6fb9210a1ea37c2db27b8ff53a1ecf 'Nexmo\\Entity\\JsonSerializableInterface' => __DIR__ . '/..' . '/nexmo/client/src/Entity/JsonSerializableInterface.php', 'Nexmo\\Entity\\JsonSerializableTrait' => __DIR__ . '/..' . '/nexmo/client/src/Entity/JsonSerializableTrait.php', 'Nexmo\\Entity\\JsonUnserializableInterface' => __DIR__ . '/..' . '/nexmo/client/src/Entity/JsonUnserializableInterface.php', + 'Nexmo\\Entity\\ModernCollectionTrait' => __DIR__ . '/..' . '/nexmo/client/src/Entity/ModernCollectionTrait.php', 'Nexmo\\Entity\\NoRequestResponseTrait' => __DIR__ . '/..' . '/nexmo/client/src/Entity/NoRequestResponseTrait.php', 'Nexmo\\Entity\\Psr7Trait' => __DIR__ . '/..' . '/nexmo/client/src/Entity/Psr7Trait.php', 'Nexmo\\Entity\\RequestArrayTrait' => __DIR__ . '/..' . '/nexmo/client/src/Entity/RequestArrayTrait.php', @@ -2703,6 +2859,10 @@ class ComposerStaticInit4b6fb9210a1ea37c2db27b8ff53a1ecf 'Nexmo\\Message\\Query' => __DIR__ . '/..' . '/nexmo/client/src/Message/Query.php', 'Nexmo\\Message\\Response\\Collection' => __DIR__ . '/..' . '/nexmo/client/src/Message/Response/Collection.php', 'Nexmo\\Message\\Response\\Message' => __DIR__ . '/..' . '/nexmo/client/src/Message/Response/Message.php', + 'Nexmo\\Message\\Shortcode' => __DIR__ . '/..' . '/nexmo/client/src/Message/Shortcode.php', + 'Nexmo\\Message\\Shortcode\\Alert' => __DIR__ . '/..' . '/nexmo/client/src/Message/Shortcode/Alert.php', + 'Nexmo\\Message\\Shortcode\\Marketing' => __DIR__ . '/..' . '/nexmo/client/src/Message/Shortcode/Marketing.php', + 'Nexmo\\Message\\Shortcode\\TwoFactor' => __DIR__ . '/..' . '/nexmo/client/src/Message/Shortcode/TwoFactor.php', 'Nexmo\\Message\\Text' => __DIR__ . '/..' . '/nexmo/client/src/Message/Text.php', 'Nexmo\\Message\\Unicode' => __DIR__ . '/..' . '/nexmo/client/src/Message/Unicode.php', 'Nexmo\\Message\\Vcal' => __DIR__ . '/..' . '/nexmo/client/src/Message/Vcal.php', @@ -3207,6 +3367,9 @@ class ComposerStaticInit4b6fb9210a1ea37c2db27b8ff53a1ecf 'PhpParser\\JsonDecoder' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/JsonDecoder.php', 'PhpParser\\Lexer' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer.php', 'PhpParser\\Lexer\\Emulative' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/Emulative.php', + 'PhpParser\\Lexer\\TokenEmulator\\CoaleseEqualTokenEmulator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/CoaleseEqualTokenEmulator.php', + 'PhpParser\\Lexer\\TokenEmulator\\FnTokenEmulator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/FnTokenEmulator.php', + 'PhpParser\\Lexer\\TokenEmulator\\TokenEmulatorInterface' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/TokenEmulatorInterface.php', 'PhpParser\\NameContext' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/NameContext.php', 'PhpParser\\Node' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node.php', 'PhpParser\\NodeAbstract' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/NodeAbstract.php', @@ -3226,11 +3389,13 @@ class ComposerStaticInit4b6fb9210a1ea37c2db27b8ff53a1ecf 'PhpParser\\Node\\Expr\\ArrayDimFetch' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayDimFetch.php', 'PhpParser\\Node\\Expr\\ArrayItem' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayItem.php', 'PhpParser\\Node\\Expr\\Array_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Array_.php', + 'PhpParser\\Node\\Expr\\ArrowFunction' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/ArrowFunction.php', 'PhpParser\\Node\\Expr\\Assign' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Assign.php', 'PhpParser\\Node\\Expr\\AssignOp' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp.php', 'PhpParser\\Node\\Expr\\AssignOp\\BitwiseAnd' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseAnd.php', 'PhpParser\\Node\\Expr\\AssignOp\\BitwiseOr' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseOr.php', 'PhpParser\\Node\\Expr\\AssignOp\\BitwiseXor' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseXor.php', + 'PhpParser\\Node\\Expr\\AssignOp\\Coalesce' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Coalesce.php', 'PhpParser\\Node\\Expr\\AssignOp\\Concat' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Concat.php', 'PhpParser\\Node\\Expr\\AssignOp\\Div' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Div.php', 'PhpParser\\Node\\Expr\\AssignOp\\Minus' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Minus.php', @@ -3488,11 +3653,17 @@ class ComposerStaticInit4b6fb9210a1ea37c2db27b8ff53a1ecf 'Psr\\Container\\ContainerInterface' => __DIR__ . '/..' . '/psr/container/src/ContainerInterface.php', 'Psr\\Container\\NotFoundExceptionInterface' => __DIR__ . '/..' . '/psr/container/src/NotFoundExceptionInterface.php', 'Psr\\Http\\Message\\MessageInterface' => __DIR__ . '/..' . '/psr/http-message/src/MessageInterface.php', + 'Psr\\Http\\Message\\RequestFactoryInterface' => __DIR__ . '/..' . '/psr/http-factory/src/RequestFactoryInterface.php', 'Psr\\Http\\Message\\RequestInterface' => __DIR__ . '/..' . '/psr/http-message/src/RequestInterface.php', + 'Psr\\Http\\Message\\ResponseFactoryInterface' => __DIR__ . '/..' . '/psr/http-factory/src/ResponseFactoryInterface.php', 'Psr\\Http\\Message\\ResponseInterface' => __DIR__ . '/..' . '/psr/http-message/src/ResponseInterface.php', + 'Psr\\Http\\Message\\ServerRequestFactoryInterface' => __DIR__ . '/..' . '/psr/http-factory/src/ServerRequestFactoryInterface.php', 'Psr\\Http\\Message\\ServerRequestInterface' => __DIR__ . '/..' . '/psr/http-message/src/ServerRequestInterface.php', + 'Psr\\Http\\Message\\StreamFactoryInterface' => __DIR__ . '/..' . '/psr/http-factory/src/StreamFactoryInterface.php', 'Psr\\Http\\Message\\StreamInterface' => __DIR__ . '/..' . '/psr/http-message/src/StreamInterface.php', + 'Psr\\Http\\Message\\UploadedFileFactoryInterface' => __DIR__ . '/..' . '/psr/http-factory/src/UploadedFileFactoryInterface.php', 'Psr\\Http\\Message\\UploadedFileInterface' => __DIR__ . '/..' . '/psr/http-message/src/UploadedFileInterface.php', + 'Psr\\Http\\Message\\UriFactoryInterface' => __DIR__ . '/..' . '/psr/http-factory/src/UriFactoryInterface.php', 'Psr\\Http\\Message\\UriInterface' => __DIR__ . '/..' . '/psr/http-message/src/UriInterface.php', 'Psr\\Log\\AbstractLogger' => __DIR__ . '/..' . '/psr/log/Psr/Log/AbstractLogger.php', 'Psr\\Log\\InvalidArgumentException' => __DIR__ . '/..' . '/psr/log/Psr/Log/InvalidArgumentException.php', @@ -3822,6 +3993,7 @@ class ComposerStaticInit4b6fb9210a1ea37c2db27b8ff53a1ecf 'Symfony\\Component\\Console\\Formatter\\WrappableOutputFormatterInterface' => __DIR__ . '/..' . '/symfony/console/Formatter/WrappableOutputFormatterInterface.php', 'Symfony\\Component\\Console\\Helper\\DebugFormatterHelper' => __DIR__ . '/..' . '/symfony/console/Helper/DebugFormatterHelper.php', 'Symfony\\Component\\Console\\Helper\\DescriptorHelper' => __DIR__ . '/..' . '/symfony/console/Helper/DescriptorHelper.php', + 'Symfony\\Component\\Console\\Helper\\Dumper' => __DIR__ . '/..' . '/symfony/console/Helper/Dumper.php', 'Symfony\\Component\\Console\\Helper\\FormatterHelper' => __DIR__ . '/..' . '/symfony/console/Helper/FormatterHelper.php', 'Symfony\\Component\\Console\\Helper\\Helper' => __DIR__ . '/..' . '/symfony/console/Helper/Helper.php', 'Symfony\\Component\\Console\\Helper\\HelperInterface' => __DIR__ . '/..' . '/symfony/console/Helper/HelperInterface.php', @@ -3942,11 +4114,15 @@ class ComposerStaticInit4b6fb9210a1ea37c2db27b8ff53a1ecf 'Symfony\\Component\\EventDispatcher\\EventSubscriberInterface' => __DIR__ . '/..' . '/symfony/event-dispatcher/EventSubscriberInterface.php', 'Symfony\\Component\\EventDispatcher\\GenericEvent' => __DIR__ . '/..' . '/symfony/event-dispatcher/GenericEvent.php', 'Symfony\\Component\\EventDispatcher\\ImmutableEventDispatcher' => __DIR__ . '/..' . '/symfony/event-dispatcher/ImmutableEventDispatcher.php', + 'Symfony\\Component\\EventDispatcher\\LegacyEventDispatcherProxy' => __DIR__ . '/..' . '/symfony/event-dispatcher/LegacyEventDispatcherProxy.php', + 'Symfony\\Component\\EventDispatcher\\LegacyEventProxy' => __DIR__ . '/..' . '/symfony/event-dispatcher/LegacyEventProxy.php', 'Symfony\\Component\\Finder\\Comparator\\Comparator' => __DIR__ . '/..' . '/symfony/finder/Comparator/Comparator.php', 'Symfony\\Component\\Finder\\Comparator\\DateComparator' => __DIR__ . '/..' . '/symfony/finder/Comparator/DateComparator.php', 'Symfony\\Component\\Finder\\Comparator\\NumberComparator' => __DIR__ . '/..' . '/symfony/finder/Comparator/NumberComparator.php', 'Symfony\\Component\\Finder\\Exception\\AccessDeniedException' => __DIR__ . '/..' . '/symfony/finder/Exception/AccessDeniedException.php', + 'Symfony\\Component\\Finder\\Exception\\DirectoryNotFoundException' => __DIR__ . '/..' . '/symfony/finder/Exception/DirectoryNotFoundException.php', 'Symfony\\Component\\Finder\\Finder' => __DIR__ . '/..' . '/symfony/finder/Finder.php', + 'Symfony\\Component\\Finder\\Gitignore' => __DIR__ . '/..' . '/symfony/finder/Gitignore.php', 'Symfony\\Component\\Finder\\Glob' => __DIR__ . '/..' . '/symfony/finder/Glob.php', 'Symfony\\Component\\Finder\\Iterator\\CustomFilterIterator' => __DIR__ . '/..' . '/symfony/finder/Iterator/CustomFilterIterator.php', 'Symfony\\Component\\Finder\\Iterator\\DateRangeFilterIterator' => __DIR__ . '/..' . '/symfony/finder/Iterator/DateRangeFilterIterator.php', @@ -4035,6 +4211,15 @@ class ComposerStaticInit4b6fb9210a1ea37c2db27b8ff53a1ecf 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Proxy\\SessionHandlerProxy' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/Proxy/SessionHandlerProxy.php', 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\SessionStorageInterface' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/SessionStorageInterface.php', 'Symfony\\Component\\HttpFoundation\\StreamedResponse' => __DIR__ . '/..' . '/symfony/http-foundation/StreamedResponse.php', + 'Symfony\\Component\\HttpFoundation\\Test\\Constraint\\RequestAttributeValueSame' => __DIR__ . '/..' . '/symfony/http-foundation/Test/Constraint/RequestAttributeValueSame.php', + 'Symfony\\Component\\HttpFoundation\\Test\\Constraint\\ResponseCookieValueSame' => __DIR__ . '/..' . '/symfony/http-foundation/Test/Constraint/ResponseCookieValueSame.php', + 'Symfony\\Component\\HttpFoundation\\Test\\Constraint\\ResponseHasCookie' => __DIR__ . '/..' . '/symfony/http-foundation/Test/Constraint/ResponseHasCookie.php', + 'Symfony\\Component\\HttpFoundation\\Test\\Constraint\\ResponseHasHeader' => __DIR__ . '/..' . '/symfony/http-foundation/Test/Constraint/ResponseHasHeader.php', + 'Symfony\\Component\\HttpFoundation\\Test\\Constraint\\ResponseHeaderSame' => __DIR__ . '/..' . '/symfony/http-foundation/Test/Constraint/ResponseHeaderSame.php', + 'Symfony\\Component\\HttpFoundation\\Test\\Constraint\\ResponseIsRedirected' => __DIR__ . '/..' . '/symfony/http-foundation/Test/Constraint/ResponseIsRedirected.php', + 'Symfony\\Component\\HttpFoundation\\Test\\Constraint\\ResponseIsSuccessful' => __DIR__ . '/..' . '/symfony/http-foundation/Test/Constraint/ResponseIsSuccessful.php', + 'Symfony\\Component\\HttpFoundation\\Test\\Constraint\\ResponseStatusCodeSame' => __DIR__ . '/..' . '/symfony/http-foundation/Test/Constraint/ResponseStatusCodeSame.php', + 'Symfony\\Component\\HttpFoundation\\UrlHelper' => __DIR__ . '/..' . '/symfony/http-foundation/UrlHelper.php', 'Symfony\\Component\\HttpKernel\\Bundle\\Bundle' => __DIR__ . '/..' . '/symfony/http-kernel/Bundle/Bundle.php', 'Symfony\\Component\\HttpKernel\\Bundle\\BundleInterface' => __DIR__ . '/..' . '/symfony/http-kernel/Bundle/BundleInterface.php', 'Symfony\\Component\\HttpKernel\\CacheClearer\\CacheClearerInterface' => __DIR__ . '/..' . '/symfony/http-kernel/CacheClearer/CacheClearerInterface.php', @@ -4052,6 +4237,7 @@ class ComposerStaticInit4b6fb9210a1ea37c2db27b8ff53a1ecf 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver' => __DIR__ . '/..' . '/symfony/http-kernel/Controller/ArgumentResolver.php', 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolverInterface' => __DIR__ . '/..' . '/symfony/http-kernel/Controller/ArgumentResolverInterface.php', 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\DefaultValueResolver' => __DIR__ . '/..' . '/symfony/http-kernel/Controller/ArgumentResolver/DefaultValueResolver.php', + 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\NotTaggedControllerValueResolver' => __DIR__ . '/..' . '/symfony/http-kernel/Controller/ArgumentResolver/NotTaggedControllerValueResolver.php', 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\RequestAttributeValueResolver' => __DIR__ . '/..' . '/symfony/http-kernel/Controller/ArgumentResolver/RequestAttributeValueResolver.php', 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\RequestValueResolver' => __DIR__ . '/..' . '/symfony/http-kernel/Controller/ArgumentResolver/RequestValueResolver.php', 'Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolver\\ServiceValueResolver' => __DIR__ . '/..' . '/symfony/http-kernel/Controller/ArgumentResolver/ServiceValueResolver.php', @@ -4089,6 +4275,7 @@ class ComposerStaticInit4b6fb9210a1ea37c2db27b8ff53a1ecf 'Symfony\\Component\\HttpKernel\\DependencyInjection\\LoggerPass' => __DIR__ . '/..' . '/symfony/http-kernel/DependencyInjection/LoggerPass.php', 'Symfony\\Component\\HttpKernel\\DependencyInjection\\MergeExtensionConfigurationPass' => __DIR__ . '/..' . '/symfony/http-kernel/DependencyInjection/MergeExtensionConfigurationPass.php', 'Symfony\\Component\\HttpKernel\\DependencyInjection\\RegisterControllerArgumentLocatorsPass' => __DIR__ . '/..' . '/symfony/http-kernel/DependencyInjection/RegisterControllerArgumentLocatorsPass.php', + 'Symfony\\Component\\HttpKernel\\DependencyInjection\\RegisterLocaleAwareServicesPass' => __DIR__ . '/..' . '/symfony/http-kernel/DependencyInjection/RegisterLocaleAwareServicesPass.php', 'Symfony\\Component\\HttpKernel\\DependencyInjection\\RemoveEmptyControllerArgumentLocatorsPass' => __DIR__ . '/..' . '/symfony/http-kernel/DependencyInjection/RemoveEmptyControllerArgumentLocatorsPass.php', 'Symfony\\Component\\HttpKernel\\DependencyInjection\\ResettableServicePass' => __DIR__ . '/..' . '/symfony/http-kernel/DependencyInjection/ResettableServicePass.php', 'Symfony\\Component\\HttpKernel\\DependencyInjection\\ServicesResetter' => __DIR__ . '/..' . '/symfony/http-kernel/DependencyInjection/ServicesResetter.php', @@ -4096,9 +4283,11 @@ class ComposerStaticInit4b6fb9210a1ea37c2db27b8ff53a1ecf 'Symfony\\Component\\HttpKernel\\EventListener\\AbstractTestSessionListener' => __DIR__ . '/..' . '/symfony/http-kernel/EventListener/AbstractTestSessionListener.php', 'Symfony\\Component\\HttpKernel\\EventListener\\AddRequestFormatsListener' => __DIR__ . '/..' . '/symfony/http-kernel/EventListener/AddRequestFormatsListener.php', 'Symfony\\Component\\HttpKernel\\EventListener\\DebugHandlersListener' => __DIR__ . '/..' . '/symfony/http-kernel/EventListener/DebugHandlersListener.php', + 'Symfony\\Component\\HttpKernel\\EventListener\\DisallowRobotsIndexingListener' => __DIR__ . '/..' . '/symfony/http-kernel/EventListener/DisallowRobotsIndexingListener.php', 'Symfony\\Component\\HttpKernel\\EventListener\\DumpListener' => __DIR__ . '/..' . '/symfony/http-kernel/EventListener/DumpListener.php', 'Symfony\\Component\\HttpKernel\\EventListener\\ExceptionListener' => __DIR__ . '/..' . '/symfony/http-kernel/EventListener/ExceptionListener.php', 'Symfony\\Component\\HttpKernel\\EventListener\\FragmentListener' => __DIR__ . '/..' . '/symfony/http-kernel/EventListener/FragmentListener.php', + 'Symfony\\Component\\HttpKernel\\EventListener\\LocaleAwareListener' => __DIR__ . '/..' . '/symfony/http-kernel/EventListener/LocaleAwareListener.php', 'Symfony\\Component\\HttpKernel\\EventListener\\LocaleListener' => __DIR__ . '/..' . '/symfony/http-kernel/EventListener/LocaleListener.php', 'Symfony\\Component\\HttpKernel\\EventListener\\ProfilerListener' => __DIR__ . '/..' . '/symfony/http-kernel/EventListener/ProfilerListener.php', 'Symfony\\Component\\HttpKernel\\EventListener\\ResponseListener' => __DIR__ . '/..' . '/symfony/http-kernel/EventListener/ResponseListener.php', @@ -4110,6 +4299,9 @@ class ComposerStaticInit4b6fb9210a1ea37c2db27b8ff53a1ecf 'Symfony\\Component\\HttpKernel\\EventListener\\TestSessionListener' => __DIR__ . '/..' . '/symfony/http-kernel/EventListener/TestSessionListener.php', 'Symfony\\Component\\HttpKernel\\EventListener\\TranslatorListener' => __DIR__ . '/..' . '/symfony/http-kernel/EventListener/TranslatorListener.php', 'Symfony\\Component\\HttpKernel\\EventListener\\ValidateRequestListener' => __DIR__ . '/..' . '/symfony/http-kernel/EventListener/ValidateRequestListener.php', + 'Symfony\\Component\\HttpKernel\\Event\\ControllerArgumentsEvent' => __DIR__ . '/..' . '/symfony/http-kernel/Event/ControllerArgumentsEvent.php', + 'Symfony\\Component\\HttpKernel\\Event\\ControllerEvent' => __DIR__ . '/..' . '/symfony/http-kernel/Event/ControllerEvent.php', + 'Symfony\\Component\\HttpKernel\\Event\\ExceptionEvent' => __DIR__ . '/..' . '/symfony/http-kernel/Event/ExceptionEvent.php', 'Symfony\\Component\\HttpKernel\\Event\\FilterControllerArgumentsEvent' => __DIR__ . '/..' . '/symfony/http-kernel/Event/FilterControllerArgumentsEvent.php', 'Symfony\\Component\\HttpKernel\\Event\\FilterControllerEvent' => __DIR__ . '/..' . '/symfony/http-kernel/Event/FilterControllerEvent.php', 'Symfony\\Component\\HttpKernel\\Event\\FilterResponseEvent' => __DIR__ . '/..' . '/symfony/http-kernel/Event/FilterResponseEvent.php', @@ -4119,6 +4311,10 @@ class ComposerStaticInit4b6fb9210a1ea37c2db27b8ff53a1ecf 'Symfony\\Component\\HttpKernel\\Event\\GetResponseForExceptionEvent' => __DIR__ . '/..' . '/symfony/http-kernel/Event/GetResponseForExceptionEvent.php', 'Symfony\\Component\\HttpKernel\\Event\\KernelEvent' => __DIR__ . '/..' . '/symfony/http-kernel/Event/KernelEvent.php', 'Symfony\\Component\\HttpKernel\\Event\\PostResponseEvent' => __DIR__ . '/..' . '/symfony/http-kernel/Event/PostResponseEvent.php', + 'Symfony\\Component\\HttpKernel\\Event\\RequestEvent' => __DIR__ . '/..' . '/symfony/http-kernel/Event/RequestEvent.php', + 'Symfony\\Component\\HttpKernel\\Event\\ResponseEvent' => __DIR__ . '/..' . '/symfony/http-kernel/Event/ResponseEvent.php', + 'Symfony\\Component\\HttpKernel\\Event\\TerminateEvent' => __DIR__ . '/..' . '/symfony/http-kernel/Event/TerminateEvent.php', + 'Symfony\\Component\\HttpKernel\\Event\\ViewEvent' => __DIR__ . '/..' . '/symfony/http-kernel/Event/ViewEvent.php', 'Symfony\\Component\\HttpKernel\\Exception\\AccessDeniedHttpException' => __DIR__ . '/..' . '/symfony/http-kernel/Exception/AccessDeniedHttpException.php', 'Symfony\\Component\\HttpKernel\\Exception\\BadRequestHttpException' => __DIR__ . '/..' . '/symfony/http-kernel/Exception/BadRequestHttpException.php', 'Symfony\\Component\\HttpKernel\\Exception\\ConflictHttpException' => __DIR__ . '/..' . '/symfony/http-kernel/Exception/ConflictHttpException.php', @@ -4155,7 +4351,9 @@ class ComposerStaticInit4b6fb9210a1ea37c2db27b8ff53a1ecf 'Symfony\\Component\\HttpKernel\\HttpCache\\StoreInterface' => __DIR__ . '/..' . '/symfony/http-kernel/HttpCache/StoreInterface.php', 'Symfony\\Component\\HttpKernel\\HttpCache\\SubRequestHandler' => __DIR__ . '/..' . '/symfony/http-kernel/HttpCache/SubRequestHandler.php', 'Symfony\\Component\\HttpKernel\\HttpCache\\SurrogateInterface' => __DIR__ . '/..' . '/symfony/http-kernel/HttpCache/SurrogateInterface.php', + 'Symfony\\Component\\HttpKernel\\HttpClientKernel' => __DIR__ . '/..' . '/symfony/http-kernel/HttpClientKernel.php', 'Symfony\\Component\\HttpKernel\\HttpKernel' => __DIR__ . '/..' . '/symfony/http-kernel/HttpKernel.php', + 'Symfony\\Component\\HttpKernel\\HttpKernelBrowser' => __DIR__ . '/..' . '/symfony/http-kernel/HttpKernelBrowser.php', 'Symfony\\Component\\HttpKernel\\HttpKernelInterface' => __DIR__ . '/..' . '/symfony/http-kernel/HttpKernelInterface.php', 'Symfony\\Component\\HttpKernel\\Kernel' => __DIR__ . '/..' . '/symfony/http-kernel/Kernel.php', 'Symfony\\Component\\HttpKernel\\KernelEvents' => __DIR__ . '/..' . '/symfony/http-kernel/KernelEvents.php', @@ -4169,6 +4367,59 @@ class ComposerStaticInit4b6fb9210a1ea37c2db27b8ff53a1ecf 'Symfony\\Component\\HttpKernel\\RebootableInterface' => __DIR__ . '/..' . '/symfony/http-kernel/RebootableInterface.php', 'Symfony\\Component\\HttpKernel\\TerminableInterface' => __DIR__ . '/..' . '/symfony/http-kernel/TerminableInterface.php', 'Symfony\\Component\\HttpKernel\\UriSigner' => __DIR__ . '/..' . '/symfony/http-kernel/UriSigner.php', + 'Symfony\\Component\\Mime\\Address' => __DIR__ . '/..' . '/symfony/mime/Address.php', + 'Symfony\\Component\\Mime\\BodyRendererInterface' => __DIR__ . '/..' . '/symfony/mime/BodyRendererInterface.php', + 'Symfony\\Component\\Mime\\CharacterStream' => __DIR__ . '/..' . '/symfony/mime/CharacterStream.php', + 'Symfony\\Component\\Mime\\DependencyInjection\\AddMimeTypeGuesserPass' => __DIR__ . '/..' . '/symfony/mime/DependencyInjection/AddMimeTypeGuesserPass.php', + 'Symfony\\Component\\Mime\\Email' => __DIR__ . '/..' . '/symfony/mime/Email.php', + 'Symfony\\Component\\Mime\\Encoder\\AddressEncoderInterface' => __DIR__ . '/..' . '/symfony/mime/Encoder/AddressEncoderInterface.php', + 'Symfony\\Component\\Mime\\Encoder\\Base64ContentEncoder' => __DIR__ . '/..' . '/symfony/mime/Encoder/Base64ContentEncoder.php', + 'Symfony\\Component\\Mime\\Encoder\\Base64Encoder' => __DIR__ . '/..' . '/symfony/mime/Encoder/Base64Encoder.php', + 'Symfony\\Component\\Mime\\Encoder\\Base64MimeHeaderEncoder' => __DIR__ . '/..' . '/symfony/mime/Encoder/Base64MimeHeaderEncoder.php', + 'Symfony\\Component\\Mime\\Encoder\\ContentEncoderInterface' => __DIR__ . '/..' . '/symfony/mime/Encoder/ContentEncoderInterface.php', + 'Symfony\\Component\\Mime\\Encoder\\EightBitContentEncoder' => __DIR__ . '/..' . '/symfony/mime/Encoder/EightBitContentEncoder.php', + 'Symfony\\Component\\Mime\\Encoder\\EncoderInterface' => __DIR__ . '/..' . '/symfony/mime/Encoder/EncoderInterface.php', + 'Symfony\\Component\\Mime\\Encoder\\IdnAddressEncoder' => __DIR__ . '/..' . '/symfony/mime/Encoder/IdnAddressEncoder.php', + 'Symfony\\Component\\Mime\\Encoder\\MimeHeaderEncoderInterface' => __DIR__ . '/..' . '/symfony/mime/Encoder/MimeHeaderEncoderInterface.php', + 'Symfony\\Component\\Mime\\Encoder\\QpContentEncoder' => __DIR__ . '/..' . '/symfony/mime/Encoder/QpContentEncoder.php', + 'Symfony\\Component\\Mime\\Encoder\\QpEncoder' => __DIR__ . '/..' . '/symfony/mime/Encoder/QpEncoder.php', + 'Symfony\\Component\\Mime\\Encoder\\QpMimeHeaderEncoder' => __DIR__ . '/..' . '/symfony/mime/Encoder/QpMimeHeaderEncoder.php', + 'Symfony\\Component\\Mime\\Encoder\\Rfc2231Encoder' => __DIR__ . '/..' . '/symfony/mime/Encoder/Rfc2231Encoder.php', + 'Symfony\\Component\\Mime\\Exception\\AddressEncoderException' => __DIR__ . '/..' . '/symfony/mime/Exception/AddressEncoderException.php', + 'Symfony\\Component\\Mime\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/symfony/mime/Exception/ExceptionInterface.php', + 'Symfony\\Component\\Mime\\Exception\\InvalidArgumentException' => __DIR__ . '/..' . '/symfony/mime/Exception/InvalidArgumentException.php', + 'Symfony\\Component\\Mime\\Exception\\LogicException' => __DIR__ . '/..' . '/symfony/mime/Exception/LogicException.php', + 'Symfony\\Component\\Mime\\Exception\\RfcComplianceException' => __DIR__ . '/..' . '/symfony/mime/Exception/RfcComplianceException.php', + 'Symfony\\Component\\Mime\\Exception\\RuntimeException' => __DIR__ . '/..' . '/symfony/mime/Exception/RuntimeException.php', + 'Symfony\\Component\\Mime\\FileBinaryMimeTypeGuesser' => __DIR__ . '/..' . '/symfony/mime/FileBinaryMimeTypeGuesser.php', + 'Symfony\\Component\\Mime\\FileinfoMimeTypeGuesser' => __DIR__ . '/..' . '/symfony/mime/FileinfoMimeTypeGuesser.php', + 'Symfony\\Component\\Mime\\Header\\AbstractHeader' => __DIR__ . '/..' . '/symfony/mime/Header/AbstractHeader.php', + 'Symfony\\Component\\Mime\\Header\\DateHeader' => __DIR__ . '/..' . '/symfony/mime/Header/DateHeader.php', + 'Symfony\\Component\\Mime\\Header\\HeaderInterface' => __DIR__ . '/..' . '/symfony/mime/Header/HeaderInterface.php', + 'Symfony\\Component\\Mime\\Header\\Headers' => __DIR__ . '/..' . '/symfony/mime/Header/Headers.php', + 'Symfony\\Component\\Mime\\Header\\IdentificationHeader' => __DIR__ . '/..' . '/symfony/mime/Header/IdentificationHeader.php', + 'Symfony\\Component\\Mime\\Header\\MailboxHeader' => __DIR__ . '/..' . '/symfony/mime/Header/MailboxHeader.php', + 'Symfony\\Component\\Mime\\Header\\MailboxListHeader' => __DIR__ . '/..' . '/symfony/mime/Header/MailboxListHeader.php', + 'Symfony\\Component\\Mime\\Header\\ParameterizedHeader' => __DIR__ . '/..' . '/symfony/mime/Header/ParameterizedHeader.php', + 'Symfony\\Component\\Mime\\Header\\PathHeader' => __DIR__ . '/..' . '/symfony/mime/Header/PathHeader.php', + 'Symfony\\Component\\Mime\\Header\\UnstructuredHeader' => __DIR__ . '/..' . '/symfony/mime/Header/UnstructuredHeader.php', + 'Symfony\\Component\\Mime\\Message' => __DIR__ . '/..' . '/symfony/mime/Message.php', + 'Symfony\\Component\\Mime\\MessageConverter' => __DIR__ . '/..' . '/symfony/mime/MessageConverter.php', + 'Symfony\\Component\\Mime\\MimeTypeGuesserInterface' => __DIR__ . '/..' . '/symfony/mime/MimeTypeGuesserInterface.php', + 'Symfony\\Component\\Mime\\MimeTypes' => __DIR__ . '/..' . '/symfony/mime/MimeTypes.php', + 'Symfony\\Component\\Mime\\MimeTypesInterface' => __DIR__ . '/..' . '/symfony/mime/MimeTypesInterface.php', + 'Symfony\\Component\\Mime\\NamedAddress' => __DIR__ . '/..' . '/symfony/mime/NamedAddress.php', + 'Symfony\\Component\\Mime\\Part\\AbstractMultipartPart' => __DIR__ . '/..' . '/symfony/mime/Part/AbstractMultipartPart.php', + 'Symfony\\Component\\Mime\\Part\\AbstractPart' => __DIR__ . '/..' . '/symfony/mime/Part/AbstractPart.php', + 'Symfony\\Component\\Mime\\Part\\DataPart' => __DIR__ . '/..' . '/symfony/mime/Part/DataPart.php', + 'Symfony\\Component\\Mime\\Part\\MessagePart' => __DIR__ . '/..' . '/symfony/mime/Part/MessagePart.php', + 'Symfony\\Component\\Mime\\Part\\Multipart\\AlternativePart' => __DIR__ . '/..' . '/symfony/mime/Part/Multipart/AlternativePart.php', + 'Symfony\\Component\\Mime\\Part\\Multipart\\DigestPart' => __DIR__ . '/..' . '/symfony/mime/Part/Multipart/DigestPart.php', + 'Symfony\\Component\\Mime\\Part\\Multipart\\FormDataPart' => __DIR__ . '/..' . '/symfony/mime/Part/Multipart/FormDataPart.php', + 'Symfony\\Component\\Mime\\Part\\Multipart\\MixedPart' => __DIR__ . '/..' . '/symfony/mime/Part/Multipart/MixedPart.php', + 'Symfony\\Component\\Mime\\Part\\Multipart\\RelatedPart' => __DIR__ . '/..' . '/symfony/mime/Part/Multipart/RelatedPart.php', + 'Symfony\\Component\\Mime\\Part\\TextPart' => __DIR__ . '/..' . '/symfony/mime/Part/TextPart.php', + 'Symfony\\Component\\Mime\\RawMessage' => __DIR__ . '/..' . '/symfony/mime/RawMessage.php', 'Symfony\\Component\\OptionsResolver\\Debug\\OptionsResolverIntrospector' => __DIR__ . '/..' . '/symfony/options-resolver/Debug/OptionsResolverIntrospector.php', 'Symfony\\Component\\OptionsResolver\\Exception\\AccessException' => __DIR__ . '/..' . '/symfony/options-resolver/Exception/AccessException.php', 'Symfony\\Component\\OptionsResolver\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/symfony/options-resolver/Exception/ExceptionInterface.php', @@ -4208,7 +4459,9 @@ class ComposerStaticInit4b6fb9210a1ea37c2db27b8ff53a1ecf 'Symfony\\Component\\Routing\\Exception\\NoConfigurationException' => __DIR__ . '/..' . '/symfony/routing/Exception/NoConfigurationException.php', 'Symfony\\Component\\Routing\\Exception\\ResourceNotFoundException' => __DIR__ . '/..' . '/symfony/routing/Exception/ResourceNotFoundException.php', 'Symfony\\Component\\Routing\\Exception\\RouteNotFoundException' => __DIR__ . '/..' . '/symfony/routing/Exception/RouteNotFoundException.php', + 'Symfony\\Component\\Routing\\Generator\\CompiledUrlGenerator' => __DIR__ . '/..' . '/symfony/routing/Generator/CompiledUrlGenerator.php', 'Symfony\\Component\\Routing\\Generator\\ConfigurableRequirementsInterface' => __DIR__ . '/..' . '/symfony/routing/Generator/ConfigurableRequirementsInterface.php', + 'Symfony\\Component\\Routing\\Generator\\Dumper\\CompiledUrlGeneratorDumper' => __DIR__ . '/..' . '/symfony/routing/Generator/Dumper/CompiledUrlGeneratorDumper.php', 'Symfony\\Component\\Routing\\Generator\\Dumper\\GeneratorDumper' => __DIR__ . '/..' . '/symfony/routing/Generator/Dumper/GeneratorDumper.php', 'Symfony\\Component\\Routing\\Generator\\Dumper\\GeneratorDumperInterface' => __DIR__ . '/..' . '/symfony/routing/Generator/Dumper/GeneratorDumperInterface.php', 'Symfony\\Component\\Routing\\Generator\\Dumper\\PhpGeneratorDumper' => __DIR__ . '/..' . '/symfony/routing/Generator/Dumper/PhpGeneratorDumper.php', @@ -4232,10 +4485,12 @@ class ComposerStaticInit4b6fb9210a1ea37c2db27b8ff53a1ecf 'Symfony\\Component\\Routing\\Loader\\ProtectedPhpFileLoader' => __DIR__ . '/..' . '/symfony/routing/Loader/PhpFileLoader.php', 'Symfony\\Component\\Routing\\Loader\\XmlFileLoader' => __DIR__ . '/..' . '/symfony/routing/Loader/XmlFileLoader.php', 'Symfony\\Component\\Routing\\Loader\\YamlFileLoader' => __DIR__ . '/..' . '/symfony/routing/Loader/YamlFileLoader.php', + 'Symfony\\Component\\Routing\\Matcher\\CompiledUrlMatcher' => __DIR__ . '/..' . '/symfony/routing/Matcher/CompiledUrlMatcher.php', + 'Symfony\\Component\\Routing\\Matcher\\Dumper\\CompiledUrlMatcherDumper' => __DIR__ . '/..' . '/symfony/routing/Matcher/Dumper/CompiledUrlMatcherDumper.php', + 'Symfony\\Component\\Routing\\Matcher\\Dumper\\CompiledUrlMatcherTrait' => __DIR__ . '/..' . '/symfony/routing/Matcher/Dumper/CompiledUrlMatcherTrait.php', 'Symfony\\Component\\Routing\\Matcher\\Dumper\\MatcherDumper' => __DIR__ . '/..' . '/symfony/routing/Matcher/Dumper/MatcherDumper.php', 'Symfony\\Component\\Routing\\Matcher\\Dumper\\MatcherDumperInterface' => __DIR__ . '/..' . '/symfony/routing/Matcher/Dumper/MatcherDumperInterface.php', 'Symfony\\Component\\Routing\\Matcher\\Dumper\\PhpMatcherDumper' => __DIR__ . '/..' . '/symfony/routing/Matcher/Dumper/PhpMatcherDumper.php', - 'Symfony\\Component\\Routing\\Matcher\\Dumper\\PhpMatcherTrait' => __DIR__ . '/..' . '/symfony/routing/Matcher/Dumper/PhpMatcherTrait.php', 'Symfony\\Component\\Routing\\Matcher\\Dumper\\StaticPrefixCollection' => __DIR__ . '/..' . '/symfony/routing/Matcher/Dumper/StaticPrefixCollection.php', 'Symfony\\Component\\Routing\\Matcher\\RedirectableUrlMatcher' => __DIR__ . '/..' . '/symfony/routing/Matcher/RedirectableUrlMatcher.php', 'Symfony\\Component\\Routing\\Matcher\\RedirectableUrlMatcherInterface' => __DIR__ . '/..' . '/symfony/routing/Matcher/RedirectableUrlMatcherInterface.php', @@ -4262,6 +4517,7 @@ class ComposerStaticInit4b6fb9210a1ea37c2db27b8ff53a1ecf 'Symfony\\Component\\Translation\\DependencyInjection\\TranslationDumperPass' => __DIR__ . '/..' . '/symfony/translation/DependencyInjection/TranslationDumperPass.php', 'Symfony\\Component\\Translation\\DependencyInjection\\TranslationExtractorPass' => __DIR__ . '/..' . '/symfony/translation/DependencyInjection/TranslationExtractorPass.php', 'Symfony\\Component\\Translation\\DependencyInjection\\TranslatorPass' => __DIR__ . '/..' . '/symfony/translation/DependencyInjection/TranslatorPass.php', + 'Symfony\\Component\\Translation\\DependencyInjection\\TranslatorPathsPass' => __DIR__ . '/..' . '/symfony/translation/DependencyInjection/TranslatorPathsPass.php', 'Symfony\\Component\\Translation\\Dumper\\CsvFileDumper' => __DIR__ . '/..' . '/symfony/translation/Dumper/CsvFileDumper.php', 'Symfony\\Component\\Translation\\Dumper\\DumperInterface' => __DIR__ . '/..' . '/symfony/translation/Dumper/DumperInterface.php', 'Symfony\\Component\\Translation\\Dumper\\FileDumper' => __DIR__ . '/..' . '/symfony/translation/Dumper/FileDumper.php', @@ -4331,6 +4587,8 @@ class ComposerStaticInit4b6fb9210a1ea37c2db27b8ff53a1ecf 'Symfony\\Component\\VarDumper\\Caster\\DOMCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/DOMCaster.php', 'Symfony\\Component\\VarDumper\\Caster\\DateCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/DateCaster.php', 'Symfony\\Component\\VarDumper\\Caster\\DoctrineCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/DoctrineCaster.php', + 'Symfony\\Component\\VarDumper\\Caster\\DsCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/DsCaster.php', + 'Symfony\\Component\\VarDumper\\Caster\\DsPairStub' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/DsPairStub.php', 'Symfony\\Component\\VarDumper\\Caster\\EnumStub' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/EnumStub.php', 'Symfony\\Component\\VarDumper\\Caster\\ExceptionCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/ExceptionCaster.php', 'Symfony\\Component\\VarDumper\\Caster\\FrameStub' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/FrameStub.php', @@ -4375,29 +4633,24 @@ class ComposerStaticInit4b6fb9210a1ea37c2db27b8ff53a1ecf 'Symfony\\Component\\VarDumper\\Server\\DumpServer' => __DIR__ . '/..' . '/symfony/var-dumper/Server/DumpServer.php', 'Symfony\\Component\\VarDumper\\Test\\VarDumperTestTrait' => __DIR__ . '/..' . '/symfony/var-dumper/Test/VarDumperTestTrait.php', 'Symfony\\Component\\VarDumper\\VarDumper' => __DIR__ . '/..' . '/symfony/var-dumper/VarDumper.php', - 'Symfony\\Contracts\\Cache\\CacheInterface' => __DIR__ . '/..' . '/symfony/contracts/Cache/CacheInterface.php', - 'Symfony\\Contracts\\Cache\\CacheTrait' => __DIR__ . '/..' . '/symfony/contracts/Cache/CacheTrait.php', - 'Symfony\\Contracts\\Cache\\CallbackInterface' => __DIR__ . '/..' . '/symfony/contracts/Cache/CallbackInterface.php', - 'Symfony\\Contracts\\Cache\\ItemInterface' => __DIR__ . '/..' . '/symfony/contracts/Cache/ItemInterface.php', - 'Symfony\\Contracts\\Cache\\TagAwareCacheInterface' => __DIR__ . '/..' . '/symfony/contracts/Cache/TagAwareCacheInterface.php', - 'Symfony\\Contracts\\Service\\ResetInterface' => __DIR__ . '/..' . '/symfony/contracts/Service/ResetInterface.php', - 'Symfony\\Contracts\\Service\\ServiceLocatorTrait' => __DIR__ . '/..' . '/symfony/contracts/Service/ServiceLocatorTrait.php', - 'Symfony\\Contracts\\Service\\ServiceSubscriberInterface' => __DIR__ . '/..' . '/symfony/contracts/Service/ServiceSubscriberInterface.php', - 'Symfony\\Contracts\\Service\\ServiceSubscriberTrait' => __DIR__ . '/..' . '/symfony/contracts/Service/ServiceSubscriberTrait.php', - 'Symfony\\Contracts\\Tests\\Cache\\CacheTraitTest' => __DIR__ . '/..' . '/symfony/contracts/Tests/Cache/CacheTraitTest.php', - 'Symfony\\Contracts\\Tests\\Cache\\TestPool' => __DIR__ . '/..' . '/symfony/contracts/Tests/Cache/CacheTraitTest.php', - 'Symfony\\Contracts\\Tests\\Service\\ChildTestService' => __DIR__ . '/..' . '/symfony/contracts/Tests/Service/ServiceSubscriberTraitTest.php', - 'Symfony\\Contracts\\Tests\\Service\\ParentTestService' => __DIR__ . '/..' . '/symfony/contracts/Tests/Service/ServiceSubscriberTraitTest.php', - 'Symfony\\Contracts\\Tests\\Service\\ServiceLocatorTest' => __DIR__ . '/..' . '/symfony/contracts/Tests/Service/ServiceLocatorTest.php', - 'Symfony\\Contracts\\Tests\\Service\\ServiceSubscriberTraitTest' => __DIR__ . '/..' . '/symfony/contracts/Tests/Service/ServiceSubscriberTraitTest.php', - 'Symfony\\Contracts\\Tests\\Service\\TestService' => __DIR__ . '/..' . '/symfony/contracts/Tests/Service/ServiceSubscriberTraitTest.php', - 'Symfony\\Contracts\\Tests\\Translation\\TranslatorTest' => __DIR__ . '/..' . '/symfony/contracts/Tests/Translation/TranslatorTest.php', - 'Symfony\\Contracts\\Translation\\LocaleAwareInterface' => __DIR__ . '/..' . '/symfony/contracts/Translation/LocaleAwareInterface.php', - 'Symfony\\Contracts\\Translation\\TranslatorInterface' => __DIR__ . '/..' . '/symfony/contracts/Translation/TranslatorInterface.php', - 'Symfony\\Contracts\\Translation\\TranslatorTrait' => __DIR__ . '/..' . '/symfony/contracts/Translation/TranslatorTrait.php', + 'Symfony\\Contracts\\EventDispatcher\\Event' => __DIR__ . '/..' . '/symfony/event-dispatcher-contracts/Event.php', + 'Symfony\\Contracts\\EventDispatcher\\EventDispatcherInterface' => __DIR__ . '/..' . '/symfony/event-dispatcher-contracts/EventDispatcherInterface.php', + 'Symfony\\Contracts\\Service\\ResetInterface' => __DIR__ . '/..' . '/symfony/service-contracts/ResetInterface.php', + 'Symfony\\Contracts\\Service\\ServiceLocatorTrait' => __DIR__ . '/..' . '/symfony/service-contracts/ServiceLocatorTrait.php', + 'Symfony\\Contracts\\Service\\ServiceProviderInterface' => __DIR__ . '/..' . '/symfony/service-contracts/ServiceProviderInterface.php', + 'Symfony\\Contracts\\Service\\ServiceSubscriberInterface' => __DIR__ . '/..' . '/symfony/service-contracts/ServiceSubscriberInterface.php', + 'Symfony\\Contracts\\Service\\ServiceSubscriberTrait' => __DIR__ . '/..' . '/symfony/service-contracts/ServiceSubscriberTrait.php', + 'Symfony\\Contracts\\Service\\Test\\ServiceLocatorTest' => __DIR__ . '/..' . '/symfony/service-contracts/Test/ServiceLocatorTest.php', + 'Symfony\\Contracts\\Translation\\LocaleAwareInterface' => __DIR__ . '/..' . '/symfony/translation-contracts/LocaleAwareInterface.php', + 'Symfony\\Contracts\\Translation\\Test\\TranslatorTest' => __DIR__ . '/..' . '/symfony/translation-contracts/Test/TranslatorTest.php', + 'Symfony\\Contracts\\Translation\\TranslatorInterface' => __DIR__ . '/..' . '/symfony/translation-contracts/TranslatorInterface.php', + 'Symfony\\Contracts\\Translation\\TranslatorTrait' => __DIR__ . '/..' . '/symfony/translation-contracts/TranslatorTrait.php', 'Symfony\\Polyfill\\Ctype\\Ctype' => __DIR__ . '/..' . '/symfony/polyfill-ctype/Ctype.php', + 'Symfony\\Polyfill\\Iconv\\Iconv' => __DIR__ . '/..' . '/symfony/polyfill-iconv/Iconv.php', + 'Symfony\\Polyfill\\Intl\\Idn\\Idn' => __DIR__ . '/..' . '/symfony/polyfill-intl-idn/Idn.php', 'Symfony\\Polyfill\\Mbstring\\Mbstring' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/Mbstring.php', 'Symfony\\Polyfill\\Php72\\Php72' => __DIR__ . '/..' . '/symfony/polyfill-php72/Php72.php', + 'Symfony\\Polyfill\\Php73\\Php73' => __DIR__ . '/..' . '/symfony/polyfill-php73/Php73.php', 'Symfony\\Thanks\\Command\\ThanksCommand' => __DIR__ . '/..' . '/symfony/thanks/src/Command/ThanksCommand.php', 'Symfony\\Thanks\\GitHubClient' => __DIR__ . '/..' . '/symfony/thanks/src/GitHubClient.php', 'Symfony\\Thanks\\Thanks' => __DIR__ . '/..' . '/symfony/thanks/src/Thanks.php', @@ -4420,6 +4673,9 @@ class ComposerStaticInit4b6fb9210a1ea37c2db27b8ff53a1ecf 'TijsVerkoyen\\CssToInlineStyles\\Css\\Property\\Property' => __DIR__ . '/..' . '/tijsverkoyen/css-to-inline-styles/src/Css/Property/Property.php', 'TijsVerkoyen\\CssToInlineStyles\\Css\\Rule\\Processor' => __DIR__ . '/..' . '/tijsverkoyen/css-to-inline-styles/src/Css/Rule/Processor.php', 'TijsVerkoyen\\CssToInlineStyles\\Css\\Rule\\Rule' => __DIR__ . '/..' . '/tijsverkoyen/css-to-inline-styles/src/Css/Rule/Rule.php', + 'UpdateHelper\\ComposerPlugin' => __DIR__ . '/..' . '/kylekatarnls/update-helper/src/UpdateHelper/ComposerPlugin.php', + 'UpdateHelper\\UpdateHelper' => __DIR__ . '/..' . '/kylekatarnls/update-helper/src/UpdateHelper/UpdateHelper.php', + 'UpdateHelper\\UpdateHelperInterface' => __DIR__ . '/..' . '/kylekatarnls/update-helper/src/UpdateHelper/UpdateHelperInterface.php', 'UsersSeeder' => __DIR__ . '/../..' . '/database/seeds/UsersSeeder.php', 'Webmozart\\Assert\\Assert' => __DIR__ . '/..' . '/webmozart/assert/src/Assert.php', 'Whoops\\Exception\\ErrorException' => __DIR__ . '/..' . '/filp/whoops/src/Whoops/Exception/ErrorException.php', @@ -4443,36 +4699,47 @@ class ComposerStaticInit4b6fb9210a1ea37c2db27b8ff53a1ecf 'XdgBaseDir\\Xdg' => __DIR__ . '/..' . '/dnoegel/php-xdg-base-dir/src/Xdg.php', 'Zend\\Diactoros\\AbstractSerializer' => __DIR__ . '/..' . '/zendframework/zend-diactoros/src/AbstractSerializer.php', 'Zend\\Diactoros\\CallbackStream' => __DIR__ . '/..' . '/zendframework/zend-diactoros/src/CallbackStream.php', - 'Zend\\Diactoros\\Exception\\DeprecatedMethodException' => __DIR__ . '/..' . '/zendframework/zend-diactoros/src/Exception/DeprecatedMethodException.php', + 'Zend\\Diactoros\\Exception\\DeserializationException' => __DIR__ . '/..' . '/zendframework/zend-diactoros/src/Exception/DeserializationException.php', 'Zend\\Diactoros\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/zendframework/zend-diactoros/src/Exception/ExceptionInterface.php', + 'Zend\\Diactoros\\Exception\\InvalidArgumentException' => __DIR__ . '/..' . '/zendframework/zend-diactoros/src/Exception/InvalidArgumentException.php', + 'Zend\\Diactoros\\Exception\\InvalidStreamPointerPositionException' => __DIR__ . '/..' . '/zendframework/zend-diactoros/src/Exception/InvalidStreamPointerPositionException.php', + 'Zend\\Diactoros\\Exception\\SerializationException' => __DIR__ . '/..' . '/zendframework/zend-diactoros/src/Exception/SerializationException.php', + 'Zend\\Diactoros\\Exception\\UnreadableStreamException' => __DIR__ . '/..' . '/zendframework/zend-diactoros/src/Exception/UnreadableStreamException.php', + 'Zend\\Diactoros\\Exception\\UnrecognizedProtocolVersionException' => __DIR__ . '/..' . '/zendframework/zend-diactoros/src/Exception/UnrecognizedProtocolVersionException.php', + 'Zend\\Diactoros\\Exception\\UnrewindableStreamException' => __DIR__ . '/..' . '/zendframework/zend-diactoros/src/Exception/UnrewindableStreamException.php', + 'Zend\\Diactoros\\Exception\\UnseekableStreamException' => __DIR__ . '/..' . '/zendframework/zend-diactoros/src/Exception/UnseekableStreamException.php', + 'Zend\\Diactoros\\Exception\\UntellableStreamException' => __DIR__ . '/..' . '/zendframework/zend-diactoros/src/Exception/UntellableStreamException.php', + 'Zend\\Diactoros\\Exception\\UnwritableStreamException' => __DIR__ . '/..' . '/zendframework/zend-diactoros/src/Exception/UnwritableStreamException.php', + 'Zend\\Diactoros\\Exception\\UploadedFileAlreadyMovedException' => __DIR__ . '/..' . '/zendframework/zend-diactoros/src/Exception/UploadedFileAlreadyMovedException.php', + 'Zend\\Diactoros\\Exception\\UploadedFileErrorException' => __DIR__ . '/..' . '/zendframework/zend-diactoros/src/Exception/UploadedFileErrorException.php', 'Zend\\Diactoros\\HeaderSecurity' => __DIR__ . '/..' . '/zendframework/zend-diactoros/src/HeaderSecurity.php', 'Zend\\Diactoros\\MessageTrait' => __DIR__ . '/..' . '/zendframework/zend-diactoros/src/MessageTrait.php', 'Zend\\Diactoros\\PhpInputStream' => __DIR__ . '/..' . '/zendframework/zend-diactoros/src/PhpInputStream.php', 'Zend\\Diactoros\\RelativeStream' => __DIR__ . '/..' . '/zendframework/zend-diactoros/src/RelativeStream.php', 'Zend\\Diactoros\\Request' => __DIR__ . '/..' . '/zendframework/zend-diactoros/src/Request.php', + 'Zend\\Diactoros\\RequestFactory' => __DIR__ . '/..' . '/zendframework/zend-diactoros/src/RequestFactory.php', 'Zend\\Diactoros\\RequestTrait' => __DIR__ . '/..' . '/zendframework/zend-diactoros/src/RequestTrait.php', 'Zend\\Diactoros\\Request\\ArraySerializer' => __DIR__ . '/..' . '/zendframework/zend-diactoros/src/Request/ArraySerializer.php', 'Zend\\Diactoros\\Request\\Serializer' => __DIR__ . '/..' . '/zendframework/zend-diactoros/src/Request/Serializer.php', 'Zend\\Diactoros\\Response' => __DIR__ . '/..' . '/zendframework/zend-diactoros/src/Response.php', + 'Zend\\Diactoros\\ResponseFactory' => __DIR__ . '/..' . '/zendframework/zend-diactoros/src/ResponseFactory.php', 'Zend\\Diactoros\\Response\\ArraySerializer' => __DIR__ . '/..' . '/zendframework/zend-diactoros/src/Response/ArraySerializer.php', - 'Zend\\Diactoros\\Response\\EmitterInterface' => __DIR__ . '/..' . '/zendframework/zend-diactoros/src/Response/EmitterInterface.php', 'Zend\\Diactoros\\Response\\EmptyResponse' => __DIR__ . '/..' . '/zendframework/zend-diactoros/src/Response/EmptyResponse.php', 'Zend\\Diactoros\\Response\\HtmlResponse' => __DIR__ . '/..' . '/zendframework/zend-diactoros/src/Response/HtmlResponse.php', 'Zend\\Diactoros\\Response\\InjectContentTypeTrait' => __DIR__ . '/..' . '/zendframework/zend-diactoros/src/Response/InjectContentTypeTrait.php', 'Zend\\Diactoros\\Response\\JsonResponse' => __DIR__ . '/..' . '/zendframework/zend-diactoros/src/Response/JsonResponse.php', 'Zend\\Diactoros\\Response\\RedirectResponse' => __DIR__ . '/..' . '/zendframework/zend-diactoros/src/Response/RedirectResponse.php', - 'Zend\\Diactoros\\Response\\SapiEmitter' => __DIR__ . '/..' . '/zendframework/zend-diactoros/src/Response/SapiEmitter.php', - 'Zend\\Diactoros\\Response\\SapiEmitterTrait' => __DIR__ . '/..' . '/zendframework/zend-diactoros/src/Response/SapiEmitterTrait.php', - 'Zend\\Diactoros\\Response\\SapiStreamEmitter' => __DIR__ . '/..' . '/zendframework/zend-diactoros/src/Response/SapiStreamEmitter.php', 'Zend\\Diactoros\\Response\\Serializer' => __DIR__ . '/..' . '/zendframework/zend-diactoros/src/Response/Serializer.php', 'Zend\\Diactoros\\Response\\TextResponse' => __DIR__ . '/..' . '/zendframework/zend-diactoros/src/Response/TextResponse.php', 'Zend\\Diactoros\\Response\\XmlResponse' => __DIR__ . '/..' . '/zendframework/zend-diactoros/src/Response/XmlResponse.php', - 'Zend\\Diactoros\\Server' => __DIR__ . '/..' . '/zendframework/zend-diactoros/src/Server.php', 'Zend\\Diactoros\\ServerRequest' => __DIR__ . '/..' . '/zendframework/zend-diactoros/src/ServerRequest.php', 'Zend\\Diactoros\\ServerRequestFactory' => __DIR__ . '/..' . '/zendframework/zend-diactoros/src/ServerRequestFactory.php', 'Zend\\Diactoros\\Stream' => __DIR__ . '/..' . '/zendframework/zend-diactoros/src/Stream.php', + 'Zend\\Diactoros\\StreamFactory' => __DIR__ . '/..' . '/zendframework/zend-diactoros/src/StreamFactory.php', 'Zend\\Diactoros\\UploadedFile' => __DIR__ . '/..' . '/zendframework/zend-diactoros/src/UploadedFile.php', + 'Zend\\Diactoros\\UploadedFileFactory' => __DIR__ . '/..' . '/zendframework/zend-diactoros/src/UploadedFileFactory.php', 'Zend\\Diactoros\\Uri' => __DIR__ . '/..' . '/zendframework/zend-diactoros/src/Uri.php', + 'Zend\\Diactoros\\UriFactory' => __DIR__ . '/..' . '/zendframework/zend-diactoros/src/UriFactory.php', 'phpDocumentor\\Reflection\\DocBlock' => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src/DocBlock.php', 'phpDocumentor\\Reflection\\DocBlockFactory' => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src/DocBlockFactory.php', 'phpDocumentor\\Reflection\\DocBlockFactoryInterface' => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src/DocBlockFactoryInterface.php', diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index d75437ae..8fbc7aa3 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -1,17 +1,17 @@ [ { "name": "clue/stream-filter", - "version": "v1.4.0", - "version_normalized": "1.4.0.0", + "version": "v1.4.1", + "version_normalized": "1.4.1.0", "source": { "type": "git", "url": "https://github.com/clue/php-stream-filter.git", - "reference": "d80fdee9b3a7e0d16fc330a22f41f3ad0eeb09d0" + "reference": "5a58cc30a8bd6a4eb8f856adf61dd3e013f53f71" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/clue/php-stream-filter/zipball/d80fdee9b3a7e0d16fc330a22f41f3ad0eeb09d0", - "reference": "d80fdee9b3a7e0d16fc330a22f41f3ad0eeb09d0", + "url": "https://api.github.com/repos/clue/php-stream-filter/zipball/5a58cc30a8bd6a4eb8f856adf61dd3e013f53f71", + "reference": "5a58cc30a8bd6a4eb8f856adf61dd3e013f53f71", "shasum": "" }, "require": { @@ -20,7 +20,7 @@ "require-dev": { "phpunit/phpunit": "^5.0 || ^4.8" }, - "time": "2017-08-18T09:54:01+00:00", + "time": "2019-04-09T12:31:48+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -28,7 +28,7 @@ "Clue\\StreamFilter\\": "src/" }, "files": [ - "src/functions.php" + "src/functions_include.php" ] }, "notification-url": "https://packagist.org/downloads/", @@ -159,30 +159,32 @@ }, { "name": "doctrine/instantiator", - "version": "1.1.0", - "version_normalized": "1.1.0.0", + "version": "1.2.0", + "version_normalized": "1.2.0.0", "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", - "reference": "185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda" + "reference": "a2c590166b2133a4633738648b6b064edae0814a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda", - "reference": "185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/a2c590166b2133a4633738648b6b064edae0814a", + "reference": "a2c590166b2133a4633738648b6b064edae0814a", "shasum": "" }, "require": { "php": "^7.1" }, "require-dev": { - "athletic/athletic": "~0.1.8", + "doctrine/coding-standard": "^6.0", "ext-pdo": "*", "ext-phar": "*", - "phpunit/phpunit": "^6.2.3", - "squizlabs/php_codesniffer": "^3.0.2" + "phpbench/phpbench": "^0.13", + "phpstan/phpstan-phpunit": "^0.11", + "phpstan/phpstan-shim": "^0.11", + "phpunit/phpunit": "^7.0" }, - "time": "2017-07-22T11:58:36+00:00", + "time": "2019-03-17T17:37:11+00:00", "type": "library", "extra": { "branch-alias": { @@ -207,7 +209,7 @@ } ], "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://github.com/doctrine/instantiator", + "homepage": "https://www.doctrine-project.org/projects/instantiator.html", "keywords": [ "constructor", "instantiate" @@ -215,23 +217,26 @@ }, { "name": "doctrine/lexer", - "version": "v1.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/doctrine/lexer.git", - "reference": "83893c552fd2045dd78aef794c31e694c37c0b8c" + "reference": "1febd6c3ef84253d7c815bed85fc622ad207a9f8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/83893c552fd2045dd78aef794c31e694c37c0b8c", - "reference": "83893c552fd2045dd78aef794c31e694c37c0b8c", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/1febd6c3ef84253d7c815bed85fc622ad207a9f8", + "reference": "1febd6c3ef84253d7c815bed85fc622ad207a9f8", "shasum": "" }, "require": { "php": ">=5.3.2" }, - "time": "2014-09-09T13:34:57+00:00", + "require-dev": { + "phpunit/phpunit": "^4.5" + }, + "time": "2019-06-08T11:03:04+00:00", "type": "library", "extra": { "branch-alias": { @@ -240,8 +245,8 @@ }, "installation-source": "dist", "autoload": { - "psr-0": { - "Doctrine\\Common\\Lexer\\": "lib/" + "psr-4": { + "Doctrine\\Common\\Lexer\\": "lib/Doctrine/Common/Lexer" } }, "notification-url": "https://packagist.org/downloads/", @@ -262,36 +267,44 @@ "email": "schmittjoh@gmail.com" } ], - "description": "Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.", - "homepage": "http://www.doctrine-project.org", + "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.", + "homepage": "https://www.doctrine-project.org/projects/lexer.html", "keywords": [ + "annotations", + "docblock", "lexer", - "parser" + "parser", + "php" ] }, { "name": "dragonmantank/cron-expression", - "version": "v2.2.0", - "version_normalized": "2.2.0.0", + "version": "v2.3.0", + "version_normalized": "2.3.0.0", "source": { "type": "git", "url": "https://github.com/dragonmantank/cron-expression.git", - "reference": "92a2c3768d50e21a1f26a53cb795ce72806266c5" + "reference": "72b6fbf76adb3cf5bc0db68559b33d41219aba27" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/dragonmantank/cron-expression/zipball/92a2c3768d50e21a1f26a53cb795ce72806266c5", - "reference": "92a2c3768d50e21a1f26a53cb795ce72806266c5", + "url": "https://api.github.com/repos/dragonmantank/cron-expression/zipball/72b6fbf76adb3cf5bc0db68559b33d41219aba27", + "reference": "72b6fbf76adb3cf5bc0db68559b33d41219aba27", "shasum": "" }, "require": { - "php": ">=7.0.0" + "php": "^7.0" }, "require-dev": { - "phpunit/phpunit": "~6.4" + "phpunit/phpunit": "^6.4|^7.0" }, - "time": "2018-06-06T03:12:17+00:00", + "time": "2019-03-31T00:38:28+00:00", "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.3-dev" + } + }, "installation-source": "dist", "autoload": { "psr-4": { @@ -321,18 +334,77 @@ ] }, { - "name": "erusev/parsedown", - "version": "1.7.1", - "version_normalized": "1.7.1.0", + "name": "egulias/email-validator", + "version": "2.1.8", + "version_normalized": "2.1.8.0", "source": { "type": "git", - "url": "https://github.com/erusev/parsedown.git", - "reference": "92e9c27ba0e74b8b028b111d1b6f956a15c01fc1" + "url": "https://github.com/egulias/EmailValidator.git", + "reference": "c26463ff9241f27907112fbcd0c86fa670cfef98" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/erusev/parsedown/zipball/92e9c27ba0e74b8b028b111d1b6f956a15c01fc1", - "reference": "92e9c27ba0e74b8b028b111d1b6f956a15c01fc1", + "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/c26463ff9241f27907112fbcd0c86fa670cfef98", + "reference": "c26463ff9241f27907112fbcd0c86fa670cfef98", + "shasum": "" + }, + "require": { + "doctrine/lexer": "^1.0.1", + "php": ">= 5.5" + }, + "require-dev": { + "dominicsayers/isemail": "dev-master", + "phpunit/phpunit": "^4.8.35||^5.7||^6.0", + "satooshi/php-coveralls": "^1.0.1" + }, + "suggest": { + "ext-intl": "PHP Internationalization Libraries are required to use the SpoofChecking validation" + }, + "time": "2019-05-16T22:02:54+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Egulias\\EmailValidator\\": "EmailValidator" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Eduardo Gulias Davis" + } + ], + "description": "A library for validating emails against several RFCs", + "homepage": "https://github.com/egulias/EmailValidator", + "keywords": [ + "email", + "emailvalidation", + "emailvalidator", + "validation", + "validator" + ] + }, + { + "name": "erusev/parsedown", + "version": "1.7.3", + "version_normalized": "1.7.3.0", + "source": { + "type": "git", + "url": "https://github.com/erusev/parsedown.git", + "reference": "6d893938171a817f4e9bc9e86f2da1e370b7bcd7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/erusev/parsedown/zipball/6d893938171a817f4e9bc9e86f2da1e370b7bcd7", + "reference": "6d893938171a817f4e9bc9e86f2da1e370b7bcd7", "shasum": "" }, "require": { @@ -342,7 +414,7 @@ "require-dev": { "phpunit/phpunit": "^4.8.35" }, - "time": "2018-03-08T01:11:30+00:00", + "time": "2019-03-17T18:48:37+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -368,6 +440,125 @@ "parser" ] }, + { + "name": "fideloper/proxy", + "version": "4.1.0", + "version_normalized": "4.1.0.0", + "source": { + "type": "git", + "url": "https://github.com/fideloper/TrustedProxy.git", + "reference": "177c79a2d1f9970f89ee2fb4c12b429af38b6dfb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/fideloper/TrustedProxy/zipball/177c79a2d1f9970f89ee2fb4c12b429af38b6dfb", + "reference": "177c79a2d1f9970f89ee2fb4c12b429af38b6dfb", + "shasum": "" + }, + "require": { + "illuminate/contracts": "~5.0", + "php": ">=5.4.0" + }, + "require-dev": { + "illuminate/http": "~5.6", + "mockery/mockery": "~1.0", + "phpunit/phpunit": "^6.0" + }, + "time": "2019-01-10T14:06:47+00:00", + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Fideloper\\Proxy\\TrustedProxyServiceProvider" + ] + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Fideloper\\Proxy\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Chris Fidao", + "email": "fideloper@gmail.com" + } + ], + "description": "Set trusted proxies for Laravel", + "keywords": [ + "load balancing", + "proxy", + "trusted proxy" + ] + }, + { + "name": "filp/whoops", + "version": "2.3.1", + "version_normalized": "2.3.1.0", + "source": { + "type": "git", + "url": "https://github.com/filp/whoops.git", + "reference": "bc0fd11bc455cc20ee4b5edabc63ebbf859324c7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/filp/whoops/zipball/bc0fd11bc455cc20ee4b5edabc63ebbf859324c7", + "reference": "bc0fd11bc455cc20ee4b5edabc63ebbf859324c7", + "shasum": "" + }, + "require": { + "php": "^5.5.9 || ^7.0", + "psr/log": "^1.0.1" + }, + "require-dev": { + "mockery/mockery": "^0.9 || ^1.0", + "phpunit/phpunit": "^4.8.35 || ^5.7", + "symfony/var-dumper": "^2.6 || ^3.0 || ^4.0" + }, + "suggest": { + "symfony/var-dumper": "Pretty print complex values better with var-dumper available", + "whoops/soap": "Formats errors as SOAP responses" + }, + "time": "2018-10-23T09:00:00+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.2-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Whoops\\": "src/Whoops/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Filipe Dobreira", + "homepage": "https://github.com/filp", + "role": "Developer" + } + ], + "description": "php error handling for cool kids", + "homepage": "https://filp.github.io/whoops/", + "keywords": [ + "error", + "exception", + "handling", + "library", + "throwable", + "whoops" + ] + }, { "name": "fzaninotto/faker", "version": "v1.8.0", @@ -422,35 +613,35 @@ }, { "name": "graham-campbell/cache-plugin", - "version": "v1.0.0", - "version_normalized": "1.0.0.0", + "version": "v1.1.0", + "version_normalized": "1.1.0.0", "source": { "type": "git", "url": "https://github.com/GrahamCampbell/Cache-Plugin.git", - "reference": "f1a3c5c95e9734e3653fa4bba43800ee41c79484" + "reference": "7090dd5e4a07f5c9c8e8a4ff65c3c57dab536b78" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/GrahamCampbell/Cache-Plugin/zipball/f1a3c5c95e9734e3653fa4bba43800ee41c79484", - "reference": "f1a3c5c95e9734e3653fa4bba43800ee41c79484", + "url": "https://api.github.com/repos/GrahamCampbell/Cache-Plugin/zipball/7090dd5e4a07f5c9c8e8a4ff65c3c57dab536b78", + "reference": "7090dd5e4a07f5c9c8e8a4ff65c3c57dab536b78", "shasum": "" }, "require": { "php": "^7.0", - "php-http/cache-plugin": "^1.5", - "php-http/client-common": "^1.7", + "php-http/cache-plugin": "^1.6", + "php-http/client-common": "^1.9|^2.0", "php-http/message-factory": "^1.0", "psr/cache": "^1.0" }, "require-dev": { - "graham-campbell/analyzer": "^2.0", + "graham-campbell/analyzer": "^2.1", "phpunit/phpunit": "^6.5|^7.0" }, - "time": "2018-03-17T14:01:43+00:00", + "time": "2019-01-27T13:36:25+00:00", "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-master": "1.1-dev" } }, "installation-source": "dist", @@ -481,43 +672,43 @@ }, { "name": "graham-campbell/github", - "version": "v7.5.0", - "version_normalized": "7.5.0.0", + "version": "v7.7.0", + "version_normalized": "7.7.0.0", "source": { "type": "git", "url": "https://github.com/GrahamCampbell/Laravel-GitHub.git", - "reference": "bed9ac8adfd14be344fb8ac3ab2f7ef1910b841e" + "reference": "eb61a055a03a5151cbbeedb3b0a357c4eeb2640d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/GrahamCampbell/Laravel-GitHub/zipball/bed9ac8adfd14be344fb8ac3ab2f7ef1910b841e", - "reference": "bed9ac8adfd14be344fb8ac3ab2f7ef1910b841e", + "url": "https://api.github.com/repos/GrahamCampbell/Laravel-GitHub/zipball/eb61a055a03a5151cbbeedb3b0a357c4eeb2640d", + "reference": "eb61a055a03a5151cbbeedb3b0a357c4eeb2640d", "shasum": "" }, "require": { "graham-campbell/cache-plugin": "^1.0", - "graham-campbell/manager": "^4.1", - "illuminate/contracts": "5.5.*|5.6.*|5.7.*", - "illuminate/support": "5.5.*|5.6.*|5.7.*", - "knplabs/github-api": "2.7.*|2.8.*|2.9.*|2.10.*", + "graham-campbell/manager": "^4.2", + "illuminate/contracts": "5.5.*|5.6.*|5.7.*|5.8.*", + "illuminate/support": "5.5.*|5.6.*|5.7.*|5.8.*", + "knplabs/github-api": "2.11.*", "php": "^7.1.3" }, "require-dev": { "graham-campbell/analyzer": "^2.1", - "graham-campbell/testbench": "^5.1", + "graham-campbell/testbench": "^5.2", "madewithlove/illuminate-psr-cache-bridge": "^1.0", "mockery/mockery": "^1.0", "php-http/guzzle6-adapter": "^1.0", - "phpunit/phpunit": "^6.5|^7.0" + "phpunit/phpunit": "^6.5|^7.0|^8.0" }, "suggest": { "madewithlove/illuminate-psr-cache-bridge": "Allows caching GitHub HTTP requests" }, - "time": "2018-09-04T08:45:47+00:00", + "time": "2019-04-07T11:08:44+00:00", "type": "library", "extra": { "branch-alias": { - "dev-master": "7.5-dev" + "dev-master": "7.7-dev" }, "laravel": { "providers": [ @@ -558,35 +749,35 @@ }, { "name": "graham-campbell/manager", - "version": "v4.1.0", - "version_normalized": "4.1.0.0", + "version": "v4.2.1", + "version_normalized": "4.2.1.0", "source": { "type": "git", "url": "https://github.com/GrahamCampbell/Laravel-Manager.git", - "reference": "9aff87cb08fa57a1b471bd74d84317c2abfc0f6b" + "reference": "ba3e236392665425723b2b967196aeeabc7f929f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/GrahamCampbell/Laravel-Manager/zipball/9aff87cb08fa57a1b471bd74d84317c2abfc0f6b", - "reference": "9aff87cb08fa57a1b471bd74d84317c2abfc0f6b", + "url": "https://api.github.com/repos/GrahamCampbell/Laravel-Manager/zipball/ba3e236392665425723b2b967196aeeabc7f929f", + "reference": "ba3e236392665425723b2b967196aeeabc7f929f", "shasum": "" }, "require": { - "illuminate/contracts": "5.5.*|5.6.*|5.7.*", - "illuminate/support": "5.5.*|5.6.*|5.7.*", + "illuminate/contracts": "5.5.*|5.6.*|5.7.*|5.8.*", + "illuminate/support": "5.5.*|5.6.*|5.7.*|5.8.*", "php": "^7.1.3" }, "require-dev": { "graham-campbell/analyzer": "^2.1", "graham-campbell/testbench-core": "^3.0", "mockery/mockery": "^1.0", - "phpunit/phpunit": "^6.5|^7.0" + "phpunit/phpunit": "^6.5|^7.0|^8.0" }, - "time": "2018-08-23T10:42:08+00:00", + "time": "2019-02-16T14:23:38+00:00", "type": "library", "extra": { "branch-alias": { - "dev-master": "4.1-dev" + "dev-master": "4.2-dev" } }, "installation-source": "dist", @@ -738,6 +929,75 @@ "promise" ] }, + { + "name": "guzzlehttp/psr7", + "version": "1.5.2", + "version_normalized": "1.5.2.0", + "source": { + "type": "git", + "url": "https://github.com/guzzle/psr7.git", + "reference": "9f83dded91781a01c63574e387eaa769be769115" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/9f83dded91781a01c63574e387eaa769be769115", + "reference": "9f83dded91781a01c63574e387eaa769be769115", + "shasum": "" + }, + "require": { + "php": ">=5.4.0", + "psr/http-message": "~1.0", + "ralouphie/getallheaders": "^2.0.5" + }, + "provide": { + "psr/http-message-implementation": "1.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8" + }, + "time": "2018-12-04T20:46:45+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.5-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "GuzzleHttp\\Psr7\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Tobias Schultze", + "homepage": "https://github.com/Tobion" + } + ], + "description": "PSR-7 message implementation that also provides common utility methods", + "keywords": [ + "http", + "message", + "psr-7", + "request", + "response", + "stream", + "uri", + "url" + ] + }, { "name": "hamcrest/hamcrest-php", "version": "v2.0.0", @@ -882,17 +1142,17 @@ }, { "name": "knplabs/github-api", - "version": "2.10.1", - "version_normalized": "2.10.1.0", + "version": "2.11.0", + "version_normalized": "2.11.0.0", "source": { "type": "git", "url": "https://github.com/KnpLabs/php-github-api.git", - "reference": "493423ae7ad1fa9075924cdfb98537828b9e80b5" + "reference": "7e67b4ccf9ef62fbd6321a314c61d3202c07b855" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/KnpLabs/php-github-api/zipball/493423ae7ad1fa9075924cdfb98537828b9e80b5", - "reference": "493423ae7ad1fa9075924cdfb98537828b9e80b5", + "url": "https://api.github.com/repos/KnpLabs/php-github-api/zipball/7e67b4ccf9ef62fbd6321a314c61d3202c07b855", + "reference": "7e67b4ccf9ef62fbd6321a314c61d3202c07b855", "shasum": "" }, "require": { @@ -912,11 +1172,11 @@ "php-http/mock-client": "^1.0", "phpunit/phpunit": "^5.5 || ^6.0" }, - "time": "2018-09-05T19:12:14+00:00", + "time": "2019-01-28T19:31:35+00:00", "type": "library", "extra": { "branch-alias": { - "dev-master": "2.10.x-dev" + "dev-master": "2.11.x-dev" } }, "installation-source": "dist", @@ -949,6 +1209,319 @@ "github" ] }, + { + "name": "kylekatarnls/update-helper", + "version": "1.1.1", + "version_normalized": "1.1.1.0", + "source": { + "type": "git", + "url": "https://github.com/kylekatarnls/update-helper.git", + "reference": "b34a46d7f5ec1795b4a15ac9d46b884377262df9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/kylekatarnls/update-helper/zipball/b34a46d7f5ec1795b4a15ac9d46b884377262df9", + "reference": "b34a46d7f5ec1795b4a15ac9d46b884377262df9", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^1.1.0", + "php": ">=5.3.0" + }, + "require-dev": { + "codeclimate/php-test-reporter": "dev-master", + "composer/composer": "^2.0.x-dev", + "phpunit/phpunit": ">=4.8.35 <6.0" + }, + "time": "2019-06-05T08:34:23+00:00", + "type": "composer-plugin", + "extra": { + "class": "UpdateHelper\\ComposerPlugin" + }, + "installation-source": "dist", + "autoload": { + "psr-0": { + "UpdateHelper\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Kyle", + "email": "kylekatarnls@gmail.com" + } + ], + "description": "Update helper" + }, + { + "name": "laravel/framework", + "version": "v5.7.28", + "version_normalized": "5.7.28.0", + "source": { + "type": "git", + "url": "https://github.com/laravel/framework.git", + "reference": "8e69728f1c80a024588adbd24c65c4fcf9aa9192" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/framework/zipball/8e69728f1c80a024588adbd24c65c4fcf9aa9192", + "reference": "8e69728f1c80a024588adbd24c65c4fcf9aa9192", + "shasum": "" + }, + "require": { + "doctrine/inflector": "^1.1", + "dragonmantank/cron-expression": "^2.0", + "erusev/parsedown": "^1.7", + "ext-mbstring": "*", + "ext-openssl": "*", + "laravel/nexmo-notification-channel": "^1.0", + "laravel/slack-notification-channel": "^1.0", + "league/flysystem": "^1.0.8", + "monolog/monolog": "^1.12", + "nesbot/carbon": "^1.26.3", + "opis/closure": "^3.1", + "php": "^7.1.3", + "psr/container": "^1.0", + "psr/simple-cache": "^1.0", + "ramsey/uuid": "^3.7", + "swiftmailer/swiftmailer": "^6.0", + "symfony/console": "^4.1", + "symfony/debug": "^4.1", + "symfony/finder": "^4.1", + "symfony/http-foundation": "^4.1", + "symfony/http-kernel": "^4.1", + "symfony/process": "^4.1", + "symfony/routing": "^4.1", + "symfony/var-dumper": "^4.1", + "tijsverkoyen/css-to-inline-styles": "^2.2.1", + "vlucas/phpdotenv": "^2.2" + }, + "conflict": { + "tightenco/collect": "<5.5.33" + }, + "replace": { + "illuminate/auth": "self.version", + "illuminate/broadcasting": "self.version", + "illuminate/bus": "self.version", + "illuminate/cache": "self.version", + "illuminate/config": "self.version", + "illuminate/console": "self.version", + "illuminate/container": "self.version", + "illuminate/contracts": "self.version", + "illuminate/cookie": "self.version", + "illuminate/database": "self.version", + "illuminate/encryption": "self.version", + "illuminate/events": "self.version", + "illuminate/filesystem": "self.version", + "illuminate/hashing": "self.version", + "illuminate/http": "self.version", + "illuminate/log": "self.version", + "illuminate/mail": "self.version", + "illuminate/notifications": "self.version", + "illuminate/pagination": "self.version", + "illuminate/pipeline": "self.version", + "illuminate/queue": "self.version", + "illuminate/redis": "self.version", + "illuminate/routing": "self.version", + "illuminate/session": "self.version", + "illuminate/support": "self.version", + "illuminate/translation": "self.version", + "illuminate/validation": "self.version", + "illuminate/view": "self.version" + }, + "require-dev": { + "aws/aws-sdk-php": "^3.0", + "doctrine/dbal": "^2.6", + "filp/whoops": "^2.1.4", + "guzzlehttp/guzzle": "^6.3", + "league/flysystem-cached-adapter": "^1.0", + "mockery/mockery": "^1.0", + "moontoast/math": "^1.1", + "orchestra/testbench-core": "3.7.*", + "pda/pheanstalk": "^3.0|^4.0", + "phpunit/phpunit": "^7.5", + "predis/predis": "^1.1.1", + "symfony/css-selector": "^4.1", + "symfony/dom-crawler": "^4.1", + "true/punycode": "^2.1" + }, + "suggest": { + "aws/aws-sdk-php": "Required to use the SQS queue driver and SES mail driver (^3.0).", + "doctrine/dbal": "Required to rename columns and drop SQLite columns (^2.6).", + "ext-pcntl": "Required to use all features of the queue worker.", + "ext-posix": "Required to use all features of the queue worker.", + "filp/whoops": "Required for friendly error pages in development (^2.1.4).", + "fzaninotto/faker": "Required to use the eloquent factory builder (^1.4).", + "guzzlehttp/guzzle": "Required to use the Mailgun and Mandrill mail drivers and the ping methods on schedules (^6.0).", + "laravel/tinker": "Required to use the tinker console command (^1.0).", + "league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (^1.0).", + "league/flysystem-cached-adapter": "Required to use the Flysystem cache (^1.0).", + "league/flysystem-rackspace": "Required to use the Flysystem Rackspace driver (^1.0).", + "league/flysystem-sftp": "Required to use the Flysystem SFTP driver (^1.0).", + "moontoast/math": "Required to use ordered UUIDs (^1.1).", + "nexmo/client": "Required to use the Nexmo transport (^1.0).", + "pda/pheanstalk": "Required to use the beanstalk queue driver (^3.0|^4.0).", + "predis/predis": "Required to use the redis cache and queue drivers (^1.0).", + "pusher/pusher-php-server": "Required to use the Pusher broadcast driver (^3.0).", + "symfony/css-selector": "Required to use some of the crawler integration testing tools (^4.1).", + "symfony/dom-crawler": "Required to use most of the crawler integration testing tools (^4.1).", + "symfony/psr-http-message-bridge": "Required to psr7 bridging features (^1.0)." + }, + "time": "2019-02-26T15:41:34+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.7-dev" + } + }, + "installation-source": "dist", + "autoload": { + "files": [ + "src/Illuminate/Foundation/helpers.php", + "src/Illuminate/Support/helpers.php" + ], + "psr-4": { + "Illuminate\\": "src/Illuminate/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "The Laravel Framework.", + "homepage": "https://laravel.com", + "keywords": [ + "framework", + "laravel" + ] + }, + { + "name": "laravel/nexmo-notification-channel", + "version": "v1.0.1", + "version_normalized": "1.0.1.0", + "source": { + "type": "git", + "url": "https://github.com/laravel/nexmo-notification-channel.git", + "reference": "03edd42a55b306ff980c9950899d5a2b03260d48" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/nexmo-notification-channel/zipball/03edd42a55b306ff980c9950899d5a2b03260d48", + "reference": "03edd42a55b306ff980c9950899d5a2b03260d48", + "shasum": "" + }, + "require": { + "nexmo/client": "^1.0", + "php": "^7.1.3" + }, + "require-dev": { + "illuminate/notifications": "~5.7", + "mockery/mockery": "^1.0", + "phpunit/phpunit": "^7.0" + }, + "time": "2018-12-04T12:57:08+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + }, + "laravel": { + "providers": [ + "Illuminate\\Notifications\\NexmoChannelServiceProvider" + ] + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Illuminate\\Notifications\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "Nexmo Notification Channel for laravel.", + "keywords": [ + "laravel", + "nexmo", + "notifications" + ] + }, + { + "name": "laravel/slack-notification-channel", + "version": "v1.0.3", + "version_normalized": "1.0.3.0", + "source": { + "type": "git", + "url": "https://github.com/laravel/slack-notification-channel.git", + "reference": "6e164293b754a95f246faf50ab2bbea3e4923cc9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/slack-notification-channel/zipball/6e164293b754a95f246faf50ab2bbea3e4923cc9", + "reference": "6e164293b754a95f246faf50ab2bbea3e4923cc9", + "shasum": "" + }, + "require": { + "guzzlehttp/guzzle": "^6.0", + "php": "^7.1.3" + }, + "require-dev": { + "illuminate/notifications": "~5.7", + "mockery/mockery": "^1.0", + "phpunit/phpunit": "^7.0" + }, + "time": "2018-12-12T13:12:06+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + }, + "laravel": { + "providers": [ + "Illuminate\\Notifications\\SlackChannelServiceProvider" + ] + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Illuminate\\Notifications\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "Slack Notification Channel for laravel.", + "keywords": [ + "laravel", + "notifications", + "slack" + ] + }, { "name": "laravel/tinker", "version": "v1.0.8", @@ -1085,18 +1658,161 @@ "homepage": "https://laravelcollective.com" }, { - "name": "mockery/mockery", - "version": "1.2.0", - "version_normalized": "1.2.0.0", + "name": "lcobucci/jwt", + "version": "3.3.1", + "version_normalized": "3.3.1.0", "source": { "type": "git", - "url": "https://github.com/mockery/mockery.git", - "reference": "100633629bf76d57430b86b7098cd6beb996a35a" + "url": "https://github.com/lcobucci/jwt.git", + "reference": "a11ec5f4b4d75d1fcd04e133dede4c317aac9e18" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mockery/mockery/zipball/100633629bf76d57430b86b7098cd6beb996a35a", - "reference": "100633629bf76d57430b86b7098cd6beb996a35a", + "url": "https://api.github.com/repos/lcobucci/jwt/zipball/a11ec5f4b4d75d1fcd04e133dede4c317aac9e18", + "reference": "a11ec5f4b4d75d1fcd04e133dede4c317aac9e18", + "shasum": "" + }, + "require": { + "ext-mbstring": "*", + "ext-openssl": "*", + "php": "^5.6 || ^7.0" + }, + "require-dev": { + "mikey179/vfsstream": "~1.5", + "phpmd/phpmd": "~2.2", + "phpunit/php-invoker": "~1.1", + "phpunit/phpunit": "^5.7 || ^7.3", + "squizlabs/php_codesniffer": "~2.3" + }, + "time": "2019-05-24T18:30:49+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Lcobucci\\JWT\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Luís Otávio Cobucci Oblonczyk", + "email": "lcobucci@gmail.com", + "role": "Developer" + } + ], + "description": "A simple library to work with JSON Web Token and JSON Web Signature", + "keywords": [ + "JWS", + "jwt" + ] + }, + { + "name": "league/flysystem", + "version": "1.0.52", + "version_normalized": "1.0.52.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/flysystem.git", + "reference": "c5a5097156387970e6f0ccfcdf03f752856f3391" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/c5a5097156387970e6f0ccfcdf03f752856f3391", + "reference": "c5a5097156387970e6f0ccfcdf03f752856f3391", + "shasum": "" + }, + "require": { + "ext-fileinfo": "*", + "php": ">=5.5.9" + }, + "conflict": { + "league/flysystem-sftp": "<1.0.6" + }, + "require-dev": { + "phpspec/phpspec": "^3.4", + "phpunit/phpunit": "^5.7.10" + }, + "suggest": { + "ext-fileinfo": "Required for MimeType", + "ext-ftp": "Allows you to use FTP server storage", + "ext-openssl": "Allows you to use FTPS server storage", + "league/flysystem-aws-s3-v2": "Allows you to use S3 storage with AWS SDK v2", + "league/flysystem-aws-s3-v3": "Allows you to use S3 storage with AWS SDK v3", + "league/flysystem-azure": "Allows you to use Windows Azure Blob storage", + "league/flysystem-cached-adapter": "Flysystem adapter decorator for metadata caching", + "league/flysystem-eventable-filesystem": "Allows you to use EventableFilesystem", + "league/flysystem-rackspace": "Allows you to use Rackspace Cloud Files", + "league/flysystem-sftp": "Allows you to use SFTP server storage via phpseclib", + "league/flysystem-webdav": "Allows you to use WebDAV storage", + "league/flysystem-ziparchive": "Allows you to use ZipArchive adapter", + "spatie/flysystem-dropbox": "Allows you to use Dropbox storage", + "srmklive/flysystem-dropbox-v2": "Allows you to use Dropbox storage for PHP 5 applications" + }, + "time": "2019-05-20T20:21:14+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "League\\Flysystem\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Frank de Jonge", + "email": "info@frenky.net" + } + ], + "description": "Filesystem abstraction: Many filesystems, one API.", + "keywords": [ + "Cloud Files", + "WebDAV", + "abstraction", + "aws", + "cloud", + "copy.com", + "dropbox", + "file systems", + "files", + "filesystem", + "filesystems", + "ftp", + "rackspace", + "remote", + "s3", + "sftp", + "storage" + ] + }, + { + "name": "mockery/mockery", + "version": "1.2.2", + "version_normalized": "1.2.2.0", + "source": { + "type": "git", + "url": "https://github.com/mockery/mockery.git", + "reference": "0eb0b48c3f07b3b89f5169ce005b7d05b18cf1d2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/mockery/mockery/zipball/0eb0b48c3f07b3b89f5169ce005b7d05b18cf1d2", + "reference": "0eb0b48c3f07b3b89f5169ce005b7d05b18cf1d2", "shasum": "" }, "require": { @@ -1105,9 +1821,9 @@ "php": ">=5.6.0" }, "require-dev": { - "phpunit/phpunit": "~5.7.10|~6.5|~7.0" + "phpunit/phpunit": "~5.7.10|~6.5|~7.0|~8.0" }, - "time": "2018-10-02T21:52:37+00:00", + "time": "2019-02-13T09:37:52+00:00", "type": "library", "extra": { "branch-alias": { @@ -1152,18 +1868,98 @@ ] }, { - "name": "myclabs/deep-copy", - "version": "1.8.1", - "version_normalized": "1.8.1.0", + "name": "monolog/monolog", + "version": "1.24.0", + "version_normalized": "1.24.0.0", "source": { "type": "git", - "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "3e01bdad3e18354c3dce54466b7fbe33a9f9f7f8" + "url": "https://github.com/Seldaek/monolog.git", + "reference": "bfc9ebb28f97e7a24c45bdc3f0ff482e47bb0266" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3e01bdad3e18354c3dce54466b7fbe33a9f9f7f8", - "reference": "3e01bdad3e18354c3dce54466b7fbe33a9f9f7f8", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/bfc9ebb28f97e7a24c45bdc3f0ff482e47bb0266", + "reference": "bfc9ebb28f97e7a24c45bdc3f0ff482e47bb0266", + "shasum": "" + }, + "require": { + "php": ">=5.3.0", + "psr/log": "~1.0" + }, + "provide": { + "psr/log-implementation": "1.0.0" + }, + "require-dev": { + "aws/aws-sdk-php": "^2.4.9 || ^3.0", + "doctrine/couchdb": "~1.0@dev", + "graylog2/gelf-php": "~1.0", + "jakub-onderka/php-parallel-lint": "0.9", + "php-amqplib/php-amqplib": "~2.4", + "php-console/php-console": "^3.1.3", + "phpunit/phpunit": "~4.5", + "phpunit/phpunit-mock-objects": "2.3.0", + "ruflin/elastica": ">=0.90 <3.0", + "sentry/sentry": "^0.13", + "swiftmailer/swiftmailer": "^5.3|^6.0" + }, + "suggest": { + "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", + "doctrine/couchdb": "Allow sending log messages to a CouchDB server", + "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)", + "ext-mongo": "Allow sending log messages to a MongoDB server", + "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", + "mongodb/mongodb": "Allow sending log messages to a MongoDB server via PHP Driver", + "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib", + "php-console/php-console": "Allow sending log messages to Google Chrome", + "rollbar/rollbar": "Allow sending log messages to Rollbar", + "ruflin/elastica": "Allow sending log messages to an Elastic Search server", + "sentry/sentry": "Allow sending log messages to a Sentry server" + }, + "time": "2018-11-05T09:00:11+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Monolog\\": "src/Monolog" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "Sends your logs to files, sockets, inboxes, databases and various web services", + "homepage": "http://github.com/Seldaek/monolog", + "keywords": [ + "log", + "logging", + "psr-3" + ] + }, + { + "name": "myclabs/deep-copy", + "version": "1.9.1", + "version_normalized": "1.9.1.0", + "source": { + "type": "git", + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "e6828efaba2c9b79f4499dae1d66ef8bfa7b2b72" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/e6828efaba2c9b79f4499dae1d66ef8bfa7b2b72", + "reference": "e6828efaba2c9b79f4499dae1d66ef8bfa7b2b72", "shasum": "" }, "require": { @@ -1177,7 +1973,7 @@ "doctrine/common": "^2.6", "phpunit/phpunit": "^7.1" }, - "time": "2018-06-11T23:09:50+00:00", + "time": "2019-04-07T13:18:21+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -1201,6 +1997,235 @@ "object graph" ] }, + { + "name": "nesbot/carbon", + "version": "1.38.4", + "version_normalized": "1.38.4.0", + "source": { + "type": "git", + "url": "https://github.com/briannesbitt/Carbon.git", + "reference": "8dd4172bfe1784952c4d58c4db725d183b1c23ad" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/8dd4172bfe1784952c4d58c4db725d183b1c23ad", + "reference": "8dd4172bfe1784952c4d58c4db725d183b1c23ad", + "shasum": "" + }, + "require": { + "kylekatarnls/update-helper": "^1.1", + "php": ">=5.3.9", + "symfony/translation": "~2.6 || ~3.0 || ~4.0" + }, + "require-dev": { + "composer/composer": "^1.2", + "friendsofphp/php-cs-fixer": "~2", + "phpunit/phpunit": "^4.8.35 || ^5.7" + }, + "time": "2019-06-03T15:41:40+00:00", + "bin": [ + "bin/upgrade-carbon" + ], + "type": "library", + "extra": { + "update-helper": "Carbon\\Upgrade", + "laravel": { + "providers": [ + "Carbon\\Laravel\\ServiceProvider" + ] + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "": "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": "nexmo/client", + "version": "1.8.1", + "version_normalized": "1.8.1.0", + "source": { + "type": "git", + "url": "https://github.com/Nexmo/nexmo-php.git", + "reference": "182d41a02ebd3e4be147baea45458ccfe2f528c4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Nexmo/nexmo-php/zipball/182d41a02ebd3e4be147baea45458ccfe2f528c4", + "reference": "182d41a02ebd3e4be147baea45458ccfe2f528c4", + "shasum": "" + }, + "require": { + "lcobucci/jwt": "^3.2", + "php": ">=5.6", + "php-http/client-implementation": "^1.0", + "php-http/guzzle6-adapter": "^1.0", + "zendframework/zend-diactoros": "^1.8.4 || ^2.0" + }, + "require-dev": { + "estahn/phpunit-json-assertions": "^1.0.0", + "php-http/mock-client": "^0.3.0", + "phpunit/phpunit": "^5.7", + "squizlabs/php_codesniffer": "^3.1" + }, + "time": "2019-05-13T20:27:43+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "Nexmo\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Tim Lytle", + "email": "tim@nexmo.com", + "homepage": "http://twitter.com/tjlytle", + "role": "Developer" + } + ], + "description": "PHP Client for using Nexmo's API." + }, + { + "name": "nikic/php-parser", + "version": "v4.2.2", + "version_normalized": "4.2.2.0", + "source": { + "type": "git", + "url": "https://github.com/nikic/PHP-Parser.git", + "reference": "1bd73cc04c3843ad8d6b0bfc0956026a151fc420" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/1bd73cc04c3843ad8d6b0bfc0956026a151fc420", + "reference": "1bd73cc04c3843ad8d6b0bfc0956026a151fc420", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=7.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.5 || ^7.0" + }, + "time": "2019-05-25T20:07:01+00:00", + "bin": [ + "bin/php-parse" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.2-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "PhpParser\\": "lib/PhpParser" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Nikita Popov" + } + ], + "description": "A PHP parser written in PHP", + "keywords": [ + "parser", + "php" + ] + }, + { + "name": "opis/closure", + "version": "3.3.0", + "version_normalized": "3.3.0.0", + "source": { + "type": "git", + "url": "https://github.com/opis/closure.git", + "reference": "f846725591203098246276b2e7b9e8b7814c4965" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/opis/closure/zipball/f846725591203098246276b2e7b9e8b7814c4965", + "reference": "f846725591203098246276b2e7b9e8b7814c4965", + "shasum": "" + }, + "require": { + "php": "^5.4 || ^7.0" + }, + "require-dev": { + "jeremeamia/superclosure": "^2.0", + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" + }, + "time": "2019-05-31T20:04:32+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.3.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Opis\\Closure\\": "src/" + }, + "files": [ + "functions.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marius Sarca", + "email": "marius.sarca@gmail.com" + }, + { + "name": "Sorin Sarca", + "email": "sarca_sorin@hotmail.com" + } + ], + "description": "A library that can be used to serialize closures (anonymous functions) and arbitrary objects.", + "homepage": "https://opis.io/closure", + "keywords": [ + "anonymous functions", + "closure", + "function", + "serializable", + "serialization", + "serialize" + ] + }, { "name": "paragonie/random_compat", "version": "v9.99.99", @@ -1356,22 +2381,22 @@ }, { "name": "php-http/cache-plugin", - "version": "v1.5.0", - "version_normalized": "1.5.0.0", + "version": "1.6.0", + "version_normalized": "1.6.0.0", "source": { "type": "git", "url": "https://github.com/php-http/cache-plugin.git", - "reference": "c573ac6ea9b4e33fad567f875b844229d18000b9" + "reference": "8e2505d2090316fac7cce637b39b6bbb5249c5a8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-http/cache-plugin/zipball/c573ac6ea9b4e33fad567f875b844229d18000b9", - "reference": "c573ac6ea9b4e33fad567f875b844229d18000b9", + "url": "https://api.github.com/repos/php-http/cache-plugin/zipball/8e2505d2090316fac7cce637b39b6bbb5249c5a8", + "reference": "8e2505d2090316fac7cce637b39b6bbb5249c5a8", "shasum": "" }, "require": { "php": "^5.4 || ^7.0", - "php-http/client-common": "^1.1", + "php-http/client-common": "^1.9 || ^2.0", "php-http/message-factory": "^1.0", "psr/cache": "^1.0", "symfony/options-resolver": "^2.6 || ^3.0 || ^4.0" @@ -1380,11 +2405,11 @@ "henrikbjorn/phpspec-code-coverage": "^1.0", "phpspec/phpspec": "^2.5" }, - "time": "2017-11-29T20:45:41+00:00", + "time": "2019-01-23T16:51:58+00:00", "type": "library", "extra": { "branch-alias": { - "dev-master": "1.5-dev" + "dev-master": "1.6-dev" } }, "installation-source": "dist", @@ -1412,6 +2437,135 @@ "plugin" ] }, + { + "name": "php-http/client-common", + "version": "1.9.1", + "version_normalized": "1.9.1.0", + "source": { + "type": "git", + "url": "https://github.com/php-http/client-common.git", + "reference": "0e156a12cc3e46f590c73bf57592a2252fc3dc48" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-http/client-common/zipball/0e156a12cc3e46f590c73bf57592a2252fc3dc48", + "reference": "0e156a12cc3e46f590c73bf57592a2252fc3dc48", + "shasum": "" + }, + "require": { + "php": "^5.4 || ^7.0", + "php-http/httplug": "^1.1", + "php-http/message": "^1.6", + "php-http/message-factory": "^1.0", + "symfony/options-resolver": "^2.6 || ^3.0 || ^4.0" + }, + "require-dev": { + "guzzlehttp/psr7": "^1.4", + "phpspec/phpspec": "^2.5 || ^3.4 || ^4.2" + }, + "suggest": { + "php-http/cache-plugin": "PSR-6 Cache plugin", + "php-http/logger-plugin": "PSR-3 Logger plugin", + "php-http/stopwatch-plugin": "Symfony Stopwatch plugin" + }, + "time": "2019-02-02T07:03:15+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.9.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Http\\Client\\Common\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com" + } + ], + "description": "Common HTTP Client implementations and tools for HTTPlug", + "homepage": "http://httplug.io", + "keywords": [ + "client", + "common", + "http", + "httplug" + ] + }, + { + "name": "php-http/discovery", + "version": "1.6.1", + "version_normalized": "1.6.1.0", + "source": { + "type": "git", + "url": "https://github.com/php-http/discovery.git", + "reference": "684855f2c2e9d0a61868b8f8d6bd0295c8a4b651" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-http/discovery/zipball/684855f2c2e9d0a61868b8f8d6bd0295c8a4b651", + "reference": "684855f2c2e9d0a61868b8f8d6bd0295c8a4b651", + "shasum": "" + }, + "require": { + "php": "^5.5 || ^7.0" + }, + "conflict": { + "nyholm/psr7": "<1.0" + }, + "require-dev": { + "php-http/httplug": "^1.0 || ^2.0", + "php-http/message-factory": "^1.0", + "phpspec/phpspec": "^2.4", + "puli/composer-plugin": "1.0.0-beta10" + }, + "suggest": { + "php-http/message": "Allow to use Guzzle, Diactoros or Slim Framework factories", + "puli/composer-plugin": "Sets up Puli which is recommended for Discovery to work. Check http://docs.php-http.org/en/latest/discovery.html for more details." + }, + "time": "2019-02-23T07:42:53+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.5-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Http\\Discovery\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com" + } + ], + "description": "Finds installed HTTPlug implementations and PSR-7 message factories", + "homepage": "http://php-http.org", + "keywords": [ + "adapter", + "client", + "discovery", + "factory", + "http", + "message", + "psr7" + ] + }, { "name": "php-http/guzzle6-adapter", "version": "v1.1.1", @@ -1532,6 +2686,80 @@ "http" ] }, + { + "name": "php-http/message", + "version": "1.7.2", + "version_normalized": "1.7.2.0", + "source": { + "type": "git", + "url": "https://github.com/php-http/message.git", + "reference": "b159ffe570dffd335e22ef0b91a946eacb182fa1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-http/message/zipball/b159ffe570dffd335e22ef0b91a946eacb182fa1", + "reference": "b159ffe570dffd335e22ef0b91a946eacb182fa1", + "shasum": "" + }, + "require": { + "clue/stream-filter": "^1.4", + "php": "^5.4 || ^7.0", + "php-http/message-factory": "^1.0.2", + "psr/http-message": "^1.0" + }, + "provide": { + "php-http/message-factory-implementation": "1.0" + }, + "require-dev": { + "akeneo/phpspec-skip-example-extension": "^1.0", + "coduo/phpspec-data-provider-extension": "^1.0", + "ext-zlib": "*", + "guzzlehttp/psr7": "^1.0", + "henrikbjorn/phpspec-code-coverage": "^1.0", + "phpspec/phpspec": "^2.4", + "slim/slim": "^3.0", + "zendframework/zend-diactoros": "^1.0" + }, + "suggest": { + "ext-zlib": "Used with compressor/decompressor streams", + "guzzlehttp/psr7": "Used with Guzzle PSR-7 Factories", + "slim/slim": "Used with Slim Framework PSR-7 implementation", + "zendframework/zend-diactoros": "Used with Diactoros Factories" + }, + "time": "2018-11-01T09:32:41+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.6-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Http\\Message\\": "src/" + }, + "files": [ + "src/filters.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com" + } + ], + "description": "HTTP Message related tools", + "homepage": "http://php-http.org", + "keywords": [ + "http", + "message", + "psr-7" + ] + }, { "name": "php-http/message-factory", "version": "v1.0.2", @@ -1694,17 +2922,17 @@ }, { "name": "phpdocumentor/reflection-docblock", - "version": "4.3.0", - "version_normalized": "4.3.0.0", + "version": "4.3.1", + "version_normalized": "4.3.1.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "94fd0001232e47129dd3504189fa1c7225010d08" + "reference": "bdd9f737ebc2a01c06ea7ff4308ec6697db9b53c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/94fd0001232e47129dd3504189fa1c7225010d08", - "reference": "94fd0001232e47129dd3504189fa1c7225010d08", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/bdd9f737ebc2a01c06ea7ff4308ec6697db9b53c", + "reference": "bdd9f737ebc2a01c06ea7ff4308ec6697db9b53c", "shasum": "" }, "require": { @@ -1718,7 +2946,7 @@ "mockery/mockery": "^1.0", "phpunit/phpunit": "^6.4" }, - "time": "2017-11-30T07:14:17+00:00", + "time": "2019-04-30T17:48:53+00:00", "type": "library", "extra": { "branch-alias": { @@ -2120,17 +3348,17 @@ }, { "name": "phpunit/phpunit", - "version": "6.5.13", - "version_normalized": "6.5.13.0", + "version": "6.5.14", + "version_normalized": "6.5.14.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "0973426fb012359b2f18d3bd1e90ef1172839693" + "reference": "bac23fe7ff13dbdb461481f706f0e9fe746334b7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/0973426fb012359b2f18d3bd1e90ef1172839693", - "reference": "0973426fb012359b2f18d3bd1e90ef1172839693", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/bac23fe7ff13dbdb461481f706f0e9fe746334b7", + "reference": "bac23fe7ff13dbdb461481f706f0e9fe746334b7", "shasum": "" }, "require": { @@ -2169,7 +3397,7 @@ "ext-xdebug": "*", "phpunit/php-invoker": "^1.1" }, - "time": "2018-09-08T15:10:43+00:00", + "time": "2019-02-01T05:22:47+00:00", "bin": [ "phpunit" ], @@ -2263,7 +3491,8 @@ "keywords": [ "mock", "xunit" - ] + ], + "abandoned": true }, { "name": "psr/cache", @@ -2364,6 +3593,60 @@ "psr" ] }, + { + "name": "psr/http-factory", + "version": "1.0.1", + "version_normalized": "1.0.1.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-factory.git", + "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-factory/zipball/12ac7fcd07e5b077433f5f2bee95b3a771bf61be", + "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be", + "shasum": "" + }, + "require": { + "php": ">=7.0.0", + "psr/http-message": "^1.0" + }, + "time": "2019-04-30T12:38:16+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interfaces for PSR-7 HTTP message factories", + "keywords": [ + "factory", + "http", + "message", + "psr", + "psr-17", + "psr-7", + "request", + "response" + ] + }, { "name": "psr/http-message", "version": "1.0.1", @@ -2416,6 +3699,55 @@ "response" ] }, + { + "name": "psr/log", + "version": "1.1.0", + "version_normalized": "1.1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd", + "reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "time": "2018-11-20T15:27:04+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Psr\\Log\\": "Psr/Log/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ] + }, { "name": "psr/simple-cache", "version": "1.0.1", @@ -2542,6 +3874,48 @@ "shell" ] }, + { + "name": "ralouphie/getallheaders", + "version": "2.0.5", + "version_normalized": "2.0.5.0", + "source": { + "type": "git", + "url": "https://github.com/ralouphie/getallheaders.git", + "reference": "5601c8a83fbba7ef674a7369456d12f1e0d0eafa" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/5601c8a83fbba7ef674a7369456d12f1e0d0eafa", + "reference": "5601c8a83fbba7ef674a7369456d12f1e0d0eafa", + "shasum": "" + }, + "require": { + "php": ">=5.3" + }, + "require-dev": { + "phpunit/phpunit": "~3.7.0", + "satooshi/php-coveralls": ">=1.0" + }, + "time": "2016-02-11T07:05:27+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "files": [ + "src/getallheaders.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ralph Khattar", + "email": "ralph.khattar@gmail.com" + } + ], + "description": "A polyfill for getallheaders." + }, { "name": "ramsey/uuid", "version": "3.8.0", @@ -3209,36 +4583,39 @@ }, { "name": "swiftmailer/swiftmailer", - "version": "v6.1.3", - "version_normalized": "6.1.3.0", + "version": "v6.2.1", + "version_normalized": "6.2.1.0", "source": { "type": "git", "url": "https://github.com/swiftmailer/swiftmailer.git", - "reference": "8ddcb66ac10c392d3beb54829eef8ac1438595f4" + "reference": "5397cd05b0a0f7937c47b0adcb4c60e5ab936b6a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/8ddcb66ac10c392d3beb54829eef8ac1438595f4", - "reference": "8ddcb66ac10c392d3beb54829eef8ac1438595f4", + "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/5397cd05b0a0f7937c47b0adcb4c60e5ab936b6a", + "reference": "5397cd05b0a0f7937c47b0adcb4c60e5ab936b6a", "shasum": "" }, "require": { "egulias/email-validator": "~2.0", - "php": ">=7.0.0" + "php": ">=7.0.0", + "symfony/polyfill-iconv": "^1.0", + "symfony/polyfill-intl-idn": "^1.10", + "symfony/polyfill-mbstring": "^1.0" }, "require-dev": { "mockery/mockery": "~0.9.1", - "symfony/phpunit-bridge": "~3.3@dev" + "symfony/phpunit-bridge": "^3.4.19|^4.1.8" }, "suggest": { "ext-intl": "Needed to support internationalized email addresses", "true/punycode": "Needed to support internationalized email addresses, if ext-intl is not installed" }, - "time": "2018-09-11T07:12:52+00:00", + "time": "2019-04-21T09:21:45+00:00", "type": "library", "extra": { "branch-alias": { - "dev-master": "6.1-dev" + "dev-master": "6.2-dev" } }, "installation-source": "dist", @@ -3268,6 +4645,1199 @@ "mailer" ] }, + { + "name": "symfony/console", + "version": "v4.3.1", + "version_normalized": "4.3.1.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/console.git", + "reference": "d50bbeeb0e17e6dd4124ea391eff235e932cbf64" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/console/zipball/d50bbeeb0e17e6dd4124ea391eff235e932cbf64", + "reference": "d50bbeeb0e17e6dd4124ea391eff235e932cbf64", + "shasum": "" + }, + "require": { + "php": "^7.1.3", + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php73": "^1.8", + "symfony/service-contracts": "^1.1" + }, + "conflict": { + "symfony/dependency-injection": "<3.4", + "symfony/event-dispatcher": "<4.3", + "symfony/process": "<3.3" + }, + "provide": { + "psr/log-implementation": "1.0" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "~3.4|~4.0", + "symfony/dependency-injection": "~3.4|~4.0", + "symfony/event-dispatcher": "^4.3", + "symfony/lock": "~3.4|~4.0", + "symfony/process": "~3.4|~4.0", + "symfony/var-dumper": "^4.3" + }, + "suggest": { + "psr/log": "For using the console logger", + "symfony/event-dispatcher": "", + "symfony/lock": "", + "symfony/process": "" + }, + "time": "2019-06-05T13:25:51+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.3-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": "symfony/css-selector", + "version": "v4.3.1", + "version_normalized": "4.3.1.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/css-selector.git", + "reference": "105c98bb0c5d8635bea056135304bd8edcc42b4d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/105c98bb0c5d8635bea056135304bd8edcc42b4d", + "reference": "105c98bb0c5d8635bea056135304bd8edcc42b4d", + "shasum": "" + }, + "require": { + "php": "^7.1.3" + }, + "time": "2019-01-16T21:53:39+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.3-dev" + } + }, + "installation-source": "dist", + "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" + }, + { + "name": "symfony/debug", + "version": "v4.3.1", + "version_normalized": "4.3.1.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/debug.git", + "reference": "4e025104f1f9adb1f7a2d14fb102c9986d6e97c6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/debug/zipball/4e025104f1f9adb1f7a2d14fb102c9986d6e97c6", + "reference": "4e025104f1f9adb1f7a2d14fb102c9986d6e97c6", + "shasum": "" + }, + "require": { + "php": "^7.1.3", + "psr/log": "~1.0" + }, + "conflict": { + "symfony/http-kernel": "<3.4" + }, + "require-dev": { + "symfony/http-kernel": "~3.4|~4.0" + }, + "time": "2019-05-30T16:10:05+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.3-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/event-dispatcher", + "version": "v4.3.1", + "version_normalized": "4.3.1.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher.git", + "reference": "4e6c670af81c4fb0b6c08b035530a9915d0b691f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/4e6c670af81c4fb0b6c08b035530a9915d0b691f", + "reference": "4e6c670af81c4fb0b6c08b035530a9915d0b691f", + "shasum": "" + }, + "require": { + "php": "^7.1.3", + "symfony/event-dispatcher-contracts": "^1.1" + }, + "conflict": { + "symfony/dependency-injection": "<3.4" + }, + "provide": { + "psr/event-dispatcher-implementation": "1.0", + "symfony/event-dispatcher-implementation": "1.1" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "~3.4|~4.0", + "symfony/dependency-injection": "~3.4|~4.0", + "symfony/expression-language": "~3.4|~4.0", + "symfony/http-foundation": "^3.4|^4.0", + "symfony/service-contracts": "^1.1", + "symfony/stopwatch": "~3.4|~4.0" + }, + "suggest": { + "symfony/dependency-injection": "", + "symfony/http-kernel": "" + }, + "time": "2019-05-30T16:10:05+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.3-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/event-dispatcher-contracts", + "version": "v1.1.1", + "version_normalized": "1.1.1.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher-contracts.git", + "reference": "8fa2cf2177083dd59cf8e44ea4b6541764fbda69" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/8fa2cf2177083dd59cf8e44ea4b6541764fbda69", + "reference": "8fa2cf2177083dd59cf8e44ea4b6541764fbda69", + "shasum": "" + }, + "require": { + "php": "^7.1.3" + }, + "suggest": { + "psr/event-dispatcher": "", + "symfony/event-dispatcher-implementation": "" + }, + "time": "2019-05-22T12:23:29+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Contracts\\EventDispatcher\\": "" + } + }, + "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": "Generic abstractions related to dispatching event", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ] + }, + { + "name": "symfony/finder", + "version": "v4.3.1", + "version_normalized": "4.3.1.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/finder.git", + "reference": "b3d4f4c0e4eadfdd8b296af9ca637cfbf51d8176" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/finder/zipball/b3d4f4c0e4eadfdd8b296af9ca637cfbf51d8176", + "reference": "b3d4f4c0e4eadfdd8b296af9ca637cfbf51d8176", + "shasum": "" + }, + "require": { + "php": "^7.1.3" + }, + "time": "2019-05-26T20:47:49+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.3-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": "symfony/http-foundation", + "version": "v4.3.1", + "version_normalized": "4.3.1.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/http-foundation.git", + "reference": "b7e4945dd9b277cd24e93566e4da0a87956392a9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/b7e4945dd9b277cd24e93566e4da0a87956392a9", + "reference": "b7e4945dd9b277cd24e93566e4da0a87956392a9", + "shasum": "" + }, + "require": { + "php": "^7.1.3", + "symfony/mime": "^4.3", + "symfony/polyfill-mbstring": "~1.1" + }, + "require-dev": { + "predis/predis": "~1.0", + "symfony/expression-language": "~3.4|~4.0" + }, + "time": "2019-06-06T10:05:02+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.3-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Component\\HttpFoundation\\": "" + }, + "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/http-kernel", + "version": "v4.3.1", + "version_normalized": "4.3.1.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/http-kernel.git", + "reference": "738ad561cd6a8d1c44ee1da941b2e628e264c429" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/738ad561cd6a8d1c44ee1da941b2e628e264c429", + "reference": "738ad561cd6a8d1c44ee1da941b2e628e264c429", + "shasum": "" + }, + "require": { + "php": "^7.1.3", + "psr/log": "~1.0", + "symfony/debug": "~3.4|~4.0", + "symfony/event-dispatcher": "^4.3", + "symfony/http-foundation": "^4.1.1", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-php73": "^1.9" + }, + "conflict": { + "symfony/browser-kit": "<4.3", + "symfony/config": "<3.4", + "symfony/dependency-injection": "<4.3", + "symfony/translation": "<4.2", + "symfony/var-dumper": "<4.1.1", + "twig/twig": "<1.34|<2.4,>=2" + }, + "provide": { + "psr/log-implementation": "1.0" + }, + "require-dev": { + "psr/cache": "~1.0", + "symfony/browser-kit": "^4.3", + "symfony/config": "~3.4|~4.0", + "symfony/console": "~3.4|~4.0", + "symfony/css-selector": "~3.4|~4.0", + "symfony/dependency-injection": "^4.3", + "symfony/dom-crawler": "~3.4|~4.0", + "symfony/expression-language": "~3.4|~4.0", + "symfony/finder": "~3.4|~4.0", + "symfony/process": "~3.4|~4.0", + "symfony/routing": "~3.4|~4.0", + "symfony/stopwatch": "~3.4|~4.0", + "symfony/templating": "~3.4|~4.0", + "symfony/translation": "~4.2", + "symfony/translation-contracts": "^1.1", + "symfony/var-dumper": "^4.1.1", + "twig/twig": "^1.34|^2.4" + }, + "suggest": { + "symfony/browser-kit": "", + "symfony/config": "", + "symfony/console": "", + "symfony/dependency-injection": "", + "symfony/var-dumper": "" + }, + "time": "2019-06-06T13:23:34+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.3-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": "symfony/mime", + "version": "v4.3.1", + "version_normalized": "4.3.1.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/mime.git", + "reference": "ec2c5565de60e03f33d4296a655e3273f0ad1f8b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/mime/zipball/ec2c5565de60e03f33d4296a655e3273f0ad1f8b", + "reference": "ec2c5565de60e03f33d4296a655e3273f0ad1f8b", + "shasum": "" + }, + "require": { + "php": "^7.1.3", + "symfony/polyfill-intl-idn": "^1.10", + "symfony/polyfill-mbstring": "^1.0" + }, + "require-dev": { + "egulias/email-validator": "^2.0", + "symfony/dependency-injection": "~3.4|^4.1" + }, + "time": "2019-06-04T09:22:54+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.3-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Component\\Mime\\": "" + }, + "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": "A library to manipulate MIME messages", + "homepage": "https://symfony.com", + "keywords": [ + "mime", + "mime-type" + ] + }, + { + "name": "symfony/options-resolver", + "version": "v4.3.1", + "version_normalized": "4.3.1.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/options-resolver.git", + "reference": "914e0edcb7cd0c9f494bc023b1d47534f4542332" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/914e0edcb7cd0c9f494bc023b1d47534f4542332", + "reference": "914e0edcb7cd0c9f494bc023b1d47534f4542332", + "shasum": "" + }, + "require": { + "php": "^7.1.3" + }, + "time": "2019-05-10T05:38:46+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.3-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Component\\OptionsResolver\\": "" + }, + "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 OptionsResolver Component", + "homepage": "https://symfony.com", + "keywords": [ + "config", + "configuration", + "options" + ] + }, + { + "name": "symfony/polyfill-ctype", + "version": "v1.11.0", + "version_normalized": "1.11.0.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "82ebae02209c21113908c229e9883c419720738a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/82ebae02209c21113908c229e9883c419720738a", + "reference": "82ebae02209c21113908c229e9883c419720738a", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "time": "2019-02-06T07:57:58+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.11-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + }, + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ] + }, + { + "name": "symfony/polyfill-iconv", + "version": "v1.11.0", + "version_normalized": "1.11.0.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-iconv.git", + "reference": "f037ea22acfaee983e271dd9c3b8bb4150bd8ad7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/f037ea22acfaee983e271dd9c3b8bb4150bd8ad7", + "reference": "f037ea22acfaee983e271dd9c3b8bb4150bd8ad7", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-iconv": "For best performance" + }, + "time": "2019-02-06T07:57:58+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.11-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Iconv\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "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 polyfill for the Iconv extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "iconv", + "polyfill", + "portable", + "shim" + ] + }, + { + "name": "symfony/polyfill-intl-idn", + "version": "v1.11.0", + "version_normalized": "1.11.0.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-idn.git", + "reference": "c766e95bec706cdd89903b1eda8afab7d7a6b7af" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/c766e95bec706cdd89903b1eda8afab7d7a6b7af", + "reference": "c766e95bec706cdd89903b1eda8afab7d7a6b7af", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "symfony/polyfill-mbstring": "^1.3", + "symfony/polyfill-php72": "^1.9" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "time": "2019-03-04T13:44:35+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.9-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Intl\\Idn\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + }, + { + "name": "Laurent Bassin", + "email": "laurent@bassin.info" + } + ], + "description": "Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "idn", + "intl", + "polyfill", + "portable", + "shim" + ] + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.11.0", + "version_normalized": "1.11.0.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "fe5e94c604826c35a32fa832f35bd036b6799609" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/fe5e94c604826c35a32fa832f35bd036b6799609", + "reference": "fe5e94c604826c35a32fa832f35bd036b6799609", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "time": "2019-02-06T07:57:58+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.11-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "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 polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ] + }, + { + "name": "symfony/polyfill-php72", + "version": "v1.11.0", + "version_normalized": "1.11.0.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php72.git", + "reference": "ab50dcf166d5f577978419edd37aa2bb8eabce0c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/ab50dcf166d5f577978419edd37aa2bb8eabce0c", + "reference": "ab50dcf166d5f577978419edd37aa2bb8eabce0c", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "time": "2019-02-06T07:57:58+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.11-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php72\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "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 polyfill backporting some PHP 7.2+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ] + }, + { + "name": "symfony/polyfill-php73", + "version": "v1.11.0", + "version_normalized": "1.11.0.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php73.git", + "reference": "d1fb4abcc0c47be136208ad9d68bf59f1ee17abd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/d1fb4abcc0c47be136208ad9d68bf59f1ee17abd", + "reference": "d1fb4abcc0c47be136208ad9d68bf59f1ee17abd", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "time": "2019-02-06T07:57:58+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.11-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php73\\": "" + }, + "files": [ + "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" + ] + }, + "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 polyfill backporting some PHP 7.3+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ] + }, + { + "name": "symfony/process", + "version": "v4.3.1", + "version_normalized": "4.3.1.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/process.git", + "reference": "856d35814cf287480465bb7a6c413bb7f5f5e69c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/process/zipball/856d35814cf287480465bb7a6c413bb7f5f5e69c", + "reference": "856d35814cf287480465bb7a6c413bb7f5f5e69c", + "shasum": "" + }, + "require": { + "php": "^7.1.3" + }, + "time": "2019-05-30T16:10:05+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.3-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/routing", + "version": "v4.3.1", + "version_normalized": "4.3.1.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/routing.git", + "reference": "9b31cd24f6ad2cebde6845f6daa9c6d69efe2465" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/routing/zipball/9b31cd24f6ad2cebde6845f6daa9c6d69efe2465", + "reference": "9b31cd24f6ad2cebde6845f6daa9c6d69efe2465", + "shasum": "" + }, + "require": { + "php": "^7.1.3" + }, + "conflict": { + "symfony/config": "<4.2", + "symfony/dependency-injection": "<3.4", + "symfony/yaml": "<3.4" + }, + "require-dev": { + "doctrine/annotations": "~1.2", + "psr/log": "~1.0", + "symfony/config": "~4.2", + "symfony/dependency-injection": "~3.4|~4.0", + "symfony/expression-language": "~3.4|~4.0", + "symfony/http-foundation": "~3.4|~4.0", + "symfony/yaml": "~3.4|~4.0" + }, + "suggest": { + "doctrine/annotations": "For using the annotation loader", + "symfony/config": "For using the all-in-one router or any loader", + "symfony/expression-language": "For using expression matching", + "symfony/http-foundation": "For using a Symfony Request object", + "symfony/yaml": "For using the YAML loader" + }, + "time": "2019-06-05T09:16:20+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.3-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Component\\Routing\\": "" + }, + "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 Routing Component", + "homepage": "https://symfony.com", + "keywords": [ + "router", + "routing", + "uri", + "url" + ] + }, + { + "name": "symfony/service-contracts", + "version": "v1.1.2", + "version_normalized": "1.1.2.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/service-contracts.git", + "reference": "191afdcb5804db960d26d8566b7e9a2843cab3a0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/191afdcb5804db960d26d8566b7e9a2843cab3a0", + "reference": "191afdcb5804db960d26d8566b7e9a2843cab3a0", + "shasum": "" + }, + "require": { + "php": "^7.1.3" + }, + "suggest": { + "psr/container": "", + "symfony/service-implementation": "" + }, + "time": "2019-05-28T07:50:59+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Contracts\\Service\\": "" + } + }, + "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": "Generic abstractions related to writing services", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ] + }, { "name": "symfony/thanks", "version": "v1.1.0", @@ -3314,18 +5884,233 @@ "description": "Give thanks (in the form of a GitHub â­) to your fellow PHP package maintainers (not limited to Symfony components)!" }, { - "name": "theseer/tokenizer", - "version": "1.1.0", - "version_normalized": "1.1.0.0", + "name": "symfony/translation", + "version": "v4.3.1", + "version_normalized": "4.3.1.0", "source": { "type": "git", - "url": "https://github.com/theseer/tokenizer.git", - "reference": "cb2f008f3f05af2893a87208fe6a6c4985483f8b" + "url": "https://github.com/symfony/translation.git", + "reference": "5dda505e5f65d759741dfaf4e54b36010a4b57aa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/cb2f008f3f05af2893a87208fe6a6c4985483f8b", - "reference": "cb2f008f3f05af2893a87208fe6a6c4985483f8b", + "url": "https://api.github.com/repos/symfony/translation/zipball/5dda505e5f65d759741dfaf4e54b36010a4b57aa", + "reference": "5dda505e5f65d759741dfaf4e54b36010a4b57aa", + "shasum": "" + }, + "require": { + "php": "^7.1.3", + "symfony/polyfill-mbstring": "~1.0", + "symfony/translation-contracts": "^1.1.2" + }, + "conflict": { + "symfony/config": "<3.4", + "symfony/dependency-injection": "<3.4", + "symfony/yaml": "<3.4" + }, + "provide": { + "symfony/translation-implementation": "1.0" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "~3.4|~4.0", + "symfony/console": "~3.4|~4.0", + "symfony/dependency-injection": "~3.4|~4.0", + "symfony/finder": "~2.8|~3.0|~4.0", + "symfony/http-kernel": "~3.4|~4.0", + "symfony/intl": "~3.4|~4.0", + "symfony/service-contracts": "^1.1.2", + "symfony/var-dumper": "~3.4|~4.0", + "symfony/yaml": "~3.4|~4.0" + }, + "suggest": { + "psr/log-implementation": "To use logging capability in translator", + "symfony/config": "", + "symfony/yaml": "" + }, + "time": "2019-06-03T20:27:40+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.3-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": "symfony/translation-contracts", + "version": "v1.1.2", + "version_normalized": "1.1.2.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/translation-contracts.git", + "reference": "93597ce975d91c52ebfaca1253343cd9ccb7916d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/93597ce975d91c52ebfaca1253343cd9ccb7916d", + "reference": "93597ce975d91c52ebfaca1253343cd9ccb7916d", + "shasum": "" + }, + "require": { + "php": "^7.1.3" + }, + "suggest": { + "symfony/translation-implementation": "" + }, + "time": "2019-05-27T08:16:38+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Contracts\\Translation\\": "" + } + }, + "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": "Generic abstractions related to translation", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ] + }, + { + "name": "symfony/var-dumper", + "version": "v4.3.1", + "version_normalized": "4.3.1.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/var-dumper.git", + "reference": "f974f448154928d2b5fb7c412bd23b81d063f34b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/f974f448154928d2b5fb7c412bd23b81d063f34b", + "reference": "f974f448154928d2b5fb7c412bd23b81d063f34b", + "shasum": "" + }, + "require": { + "php": "^7.1.3", + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php72": "~1.5" + }, + "conflict": { + "phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0", + "symfony/console": "<3.4" + }, + "require-dev": { + "ext-iconv": "*", + "symfony/console": "~3.4|~4.0", + "symfony/process": "~3.4|~4.0", + "twig/twig": "~1.34|~2.4" + }, + "suggest": { + "ext-iconv": "To convert non-UTF-8 strings to UTF-8 (or symfony/polyfill-iconv in case ext-iconv cannot be used).", + "ext-intl": "To show region name in time zone dump", + "symfony/console": "To use the ServerDumpCommand and/or the bin/var-dump-server script" + }, + "time": "2019-06-05T02:08:12+00:00", + "bin": [ + "Resources/bin/var-dump-server" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.3-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": "theseer/tokenizer", + "version": "1.1.2", + "version_normalized": "1.1.2.0", + "source": { + "type": "git", + "url": "https://github.com/theseer/tokenizer.git", + "reference": "1c42705be2b6c1de5904f8afacef5895cab44bf8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/1c42705be2b6c1de5904f8afacef5895cab44bf8", + "reference": "1c42705be2b6c1de5904f8afacef5895cab44bf8", "shasum": "" }, "require": { @@ -3334,7 +6119,7 @@ "ext-xmlwriter": "*", "php": "^7.0" }, - "time": "2017-04-07T12:08:54+00:00", + "time": "2019-04-04T09:56:43+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -3406,30 +6191,31 @@ }, { "name": "vlucas/phpdotenv", - "version": "v2.5.2", - "version_normalized": "2.5.2.0", + "version": "v2.6.1", + "version_normalized": "2.6.1.0", "source": { "type": "git", "url": "https://github.com/vlucas/phpdotenv.git", - "reference": "cfd5dc225767ca154853752abc93aeec040fcf36" + "reference": "2a7dcf7e3e02dc5e701004e51a6f304b713107d5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/cfd5dc225767ca154853752abc93aeec040fcf36", - "reference": "cfd5dc225767ca154853752abc93aeec040fcf36", + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/2a7dcf7e3e02dc5e701004e51a6f304b713107d5", + "reference": "2a7dcf7e3e02dc5e701004e51a6f304b713107d5", "shasum": "" }, "require": { - "php": ">=5.3.9" + "php": ">=5.3.9", + "symfony/polyfill-ctype": "^1.9" }, "require-dev": { "phpunit/phpunit": "^4.8.35 || ^5.0" }, - "time": "2018-10-30T17:29:25+00:00", + "time": "2019-01-29T11:11:52+00:00", "type": "library", "extra": { "branch-alias": { - "dev-master": "2.5-dev" + "dev-master": "2.6-dev" } }, "installation-source": "dist", @@ -3456,2367 +6242,6 @@ "environment" ] }, - { - "name": "symfony/css-selector", - "version": "v4.2.2", - "version_normalized": "4.2.2.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/css-selector.git", - "reference": "76dac1dbe2830213e95892c7c2ec1edd74113ea4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/css-selector/zipball/76dac1dbe2830213e95892c7c2ec1edd74113ea4", - "reference": "76dac1dbe2830213e95892c7c2ec1edd74113ea4", - "shasum": "" - }, - "require": { - "php": "^7.1.3" - }, - "time": "2019-01-03T09:07:35+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.2-dev" - } - }, - "installation-source": "dist", - "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" - }, - { - "name": "symfony/polyfill-php72", - "version": "v1.10.0", - "version_normalized": "1.10.0.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "9050816e2ca34a8e916c3a0ae8b9c2fccf68b631" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/9050816e2ca34a8e916c3a0ae8b9c2fccf68b631", - "reference": "9050816e2ca34a8e916c3a0ae8b9c2fccf68b631", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "time": "2018-09-21T13:07:52+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.9-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Php72\\": "" - }, - "files": [ - "bootstrap.php" - ] - }, - "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 polyfill backporting some PHP 7.2+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ] - }, - { - "name": "symfony/polyfill-mbstring", - "version": "v1.10.0", - "version_normalized": "1.10.0.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "c79c051f5b3a46be09205c73b80b346e4153e494" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/c79c051f5b3a46be09205c73b80b346e4153e494", - "reference": "c79c051f5b3a46be09205c73b80b346e4153e494", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "suggest": { - "ext-mbstring": "For best performance" - }, - "time": "2018-09-21T13:07:52+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.9-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" - }, - "files": [ - "bootstrap.php" - ] - }, - "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 polyfill for the Mbstring extension", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "mbstring", - "polyfill", - "portable", - "shim" - ] - }, - { - "name": "symfony/var-dumper", - "version": "v4.2.2", - "version_normalized": "4.2.2.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/var-dumper.git", - "reference": "85bde661b178173d85c6f11ea9d03b61d1212bb2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/85bde661b178173d85c6f11ea9d03b61d1212bb2", - "reference": "85bde661b178173d85c6f11ea9d03b61d1212bb2", - "shasum": "" - }, - "require": { - "php": "^7.1.3", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php72": "~1.5" - }, - "conflict": { - "phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0", - "symfony/console": "<3.4" - }, - "require-dev": { - "ext-iconv": "*", - "symfony/console": "~3.4|~4.0", - "symfony/process": "~3.4|~4.0", - "twig/twig": "~1.34|~2.4" - }, - "suggest": { - "ext-iconv": "To convert non-UTF-8 strings to UTF-8 (or symfony/polyfill-iconv in case ext-iconv cannot be used).", - "ext-intl": "To show region name in time zone dump", - "symfony/console": "To use the ServerDumpCommand and/or the bin/var-dump-server script" - }, - "time": "2019-01-03T09:07:35+00:00", - "bin": [ - "Resources/bin/var-dump-server" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.2-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": "symfony/routing", - "version": "v4.2.2", - "version_normalized": "4.2.2.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/routing.git", - "reference": "e69b7a13a0b58af378a49b49dd7084462de16cee" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/e69b7a13a0b58af378a49b49dd7084462de16cee", - "reference": "e69b7a13a0b58af378a49b49dd7084462de16cee", - "shasum": "" - }, - "require": { - "php": "^7.1.3" - }, - "conflict": { - "symfony/config": "<4.2", - "symfony/dependency-injection": "<3.4", - "symfony/yaml": "<3.4" - }, - "require-dev": { - "doctrine/annotations": "~1.0", - "psr/log": "~1.0", - "symfony/config": "~4.2", - "symfony/dependency-injection": "~3.4|~4.0", - "symfony/expression-language": "~3.4|~4.0", - "symfony/http-foundation": "~3.4|~4.0", - "symfony/yaml": "~3.4|~4.0" - }, - "suggest": { - "doctrine/annotations": "For using the annotation loader", - "symfony/config": "For using the all-in-one router or any loader", - "symfony/dependency-injection": "For loading routes from a service", - "symfony/expression-language": "For using expression matching", - "symfony/http-foundation": "For using a Symfony Request object", - "symfony/yaml": "For using the YAML loader" - }, - "time": "2019-01-03T09:07:35+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.2-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Component\\Routing\\": "" - }, - "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 Routing Component", - "homepage": "https://symfony.com", - "keywords": [ - "router", - "routing", - "uri", - "url" - ] - }, - { - "name": "symfony/process", - "version": "v4.2.2", - "version_normalized": "4.2.2.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/process.git", - "reference": "ea043ab5d8ed13b467a9087d81cb876aee7f689a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/ea043ab5d8ed13b467a9087d81cb876aee7f689a", - "reference": "ea043ab5d8ed13b467a9087d81cb876aee7f689a", - "shasum": "" - }, - "require": { - "php": "^7.1.3" - }, - "time": "2019-01-03T14:48:52+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.2-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/polyfill-ctype", - "version": "v1.10.0", - "version_normalized": "1.10.0.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "e3d826245268269cd66f8326bd8bc066687b4a19" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/e3d826245268269cd66f8326bd8bc066687b4a19", - "reference": "e3d826245268269cd66f8326bd8bc066687b4a19", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "suggest": { - "ext-ctype": "For best performance" - }, - "time": "2018-08-06T14:22:27+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.9-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Ctype\\": "" - }, - "files": [ - "bootstrap.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - }, - { - "name": "Gert de Pagter", - "email": "backendtea@gmail.com" - } - ], - "description": "Symfony polyfill for ctype functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "ctype", - "polyfill", - "portable" - ] - }, - { - "name": "symfony/http-foundation", - "version": "v4.2.2", - "version_normalized": "4.2.2.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/http-foundation.git", - "reference": "a633d422a09242064ba24e44a6e1494c5126de86" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/a633d422a09242064ba24e44a6e1494c5126de86", - "reference": "a633d422a09242064ba24e44a6e1494c5126de86", - "shasum": "" - }, - "require": { - "php": "^7.1.3", - "symfony/polyfill-mbstring": "~1.1" - }, - "require-dev": { - "predis/predis": "~1.0", - "symfony/expression-language": "~3.4|~4.0" - }, - "time": "2019-01-05T16:37:49+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.2-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Component\\HttpFoundation\\": "" - }, - "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/contracts", - "version": "v1.0.2", - "version_normalized": "1.0.2.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/contracts.git", - "reference": "1aa7ab2429c3d594dd70689604b5cf7421254cdf" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/contracts/zipball/1aa7ab2429c3d594dd70689604b5cf7421254cdf", - "reference": "1aa7ab2429c3d594dd70689604b5cf7421254cdf", - "shasum": "" - }, - "require": { - "php": "^7.1.3" - }, - "require-dev": { - "psr/cache": "^1.0", - "psr/container": "^1.0" - }, - "suggest": { - "psr/cache": "When using the Cache contracts", - "psr/container": "When using the Service contracts", - "symfony/cache-contracts-implementation": "", - "symfony/service-contracts-implementation": "", - "symfony/translation-contracts-implementation": "" - }, - "time": "2018-12-05T08:06:11+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Contracts\\": "" - }, - "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": "A set of abstractions extracted out of the Symfony components", - "homepage": "https://symfony.com", - "keywords": [ - "abstractions", - "contracts", - "decoupling", - "interfaces", - "interoperability", - "standards" - ] - }, - { - "name": "symfony/event-dispatcher", - "version": "v4.2.2", - "version_normalized": "4.2.2.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "887de6d34c86cf0cb6cbf910afb170cdb743cb5e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/887de6d34c86cf0cb6cbf910afb170cdb743cb5e", - "reference": "887de6d34c86cf0cb6cbf910afb170cdb743cb5e", - "shasum": "" - }, - "require": { - "php": "^7.1.3", - "symfony/contracts": "^1.0" - }, - "conflict": { - "symfony/dependency-injection": "<3.4" - }, - "require-dev": { - "psr/log": "~1.0", - "symfony/config": "~3.4|~4.0", - "symfony/dependency-injection": "~3.4|~4.0", - "symfony/expression-language": "~3.4|~4.0", - "symfony/stopwatch": "~3.4|~4.0" - }, - "suggest": { - "symfony/dependency-injection": "", - "symfony/http-kernel": "" - }, - "time": "2019-01-05T16:37:49+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.2-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": "psr/log", - "version": "1.1.0", - "version_normalized": "1.1.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd", - "reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "time": "2018-11-20T15:27:04+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Psr\\Log\\": "Psr/Log/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for logging libraries", - "homepage": "https://github.com/php-fig/log", - "keywords": [ - "log", - "psr", - "psr-3" - ] - }, - { - "name": "symfony/debug", - "version": "v4.2.2", - "version_normalized": "4.2.2.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/debug.git", - "reference": "64cb33c81e37d19b7715d4a6a4d49c1c382066dd" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/64cb33c81e37d19b7715d4a6a4d49c1c382066dd", - "reference": "64cb33c81e37d19b7715d4a6a4d49c1c382066dd", - "shasum": "" - }, - "require": { - "php": "^7.1.3", - "psr/log": "~1.0" - }, - "conflict": { - "symfony/http-kernel": "<3.4" - }, - "require-dev": { - "symfony/http-kernel": "~3.4|~4.0" - }, - "time": "2019-01-03T09:07:35+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.2-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": "v4.2.2", - "version_normalized": "4.2.2.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/http-kernel.git", - "reference": "83de6543328917c18d5498eeb6bb6d36f7aab31b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/83de6543328917c18d5498eeb6bb6d36f7aab31b", - "reference": "83de6543328917c18d5498eeb6bb6d36f7aab31b", - "shasum": "" - }, - "require": { - "php": "^7.1.3", - "psr/log": "~1.0", - "symfony/contracts": "^1.0.2", - "symfony/debug": "~3.4|~4.0", - "symfony/event-dispatcher": "~4.1", - "symfony/http-foundation": "^4.1.1", - "symfony/polyfill-ctype": "~1.8" - }, - "conflict": { - "symfony/config": "<3.4", - "symfony/dependency-injection": "<4.2", - "symfony/translation": "<4.2", - "symfony/var-dumper": "<4.1.1", - "twig/twig": "<1.34|<2.4,>=2" - }, - "provide": { - "psr/log-implementation": "1.0" - }, - "require-dev": { - "psr/cache": "~1.0", - "symfony/browser-kit": "~3.4|~4.0", - "symfony/config": "~3.4|~4.0", - "symfony/console": "~3.4|~4.0", - "symfony/css-selector": "~3.4|~4.0", - "symfony/dependency-injection": "^4.2", - "symfony/dom-crawler": "~3.4|~4.0", - "symfony/expression-language": "~3.4|~4.0", - "symfony/finder": "~3.4|~4.0", - "symfony/process": "~3.4|~4.0", - "symfony/routing": "~3.4|~4.0", - "symfony/stopwatch": "~3.4|~4.0", - "symfony/templating": "~3.4|~4.0", - "symfony/translation": "~4.2", - "symfony/var-dumper": "^4.1.1" - }, - "suggest": { - "symfony/browser-kit": "", - "symfony/config": "", - "symfony/console": "", - "symfony/dependency-injection": "", - "symfony/var-dumper": "" - }, - "time": "2019-01-06T16:19:23+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.2-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": "symfony/finder", - "version": "v4.2.2", - "version_normalized": "4.2.2.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/finder.git", - "reference": "9094d69e8c6ee3fe186a0ec5a4f1401e506071ce" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/9094d69e8c6ee3fe186a0ec5a4f1401e506071ce", - "reference": "9094d69e8c6ee3fe186a0ec5a4f1401e506071ce", - "shasum": "" - }, - "require": { - "php": "^7.1.3" - }, - "time": "2019-01-03T09:07:35+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.2-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": "symfony/console", - "version": "v4.2.2", - "version_normalized": "4.2.2.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/console.git", - "reference": "b0a03c1bb0fcbe288629956cf2f1dd3f1dc97522" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/b0a03c1bb0fcbe288629956cf2f1dd3f1dc97522", - "reference": "b0a03c1bb0fcbe288629956cf2f1dd3f1dc97522", - "shasum": "" - }, - "require": { - "php": "^7.1.3", - "symfony/contracts": "^1.0", - "symfony/polyfill-mbstring": "~1.0" - }, - "conflict": { - "symfony/dependency-injection": "<3.4", - "symfony/process": "<3.3" - }, - "require-dev": { - "psr/log": "~1.0", - "symfony/config": "~3.4|~4.0", - "symfony/dependency-injection": "~3.4|~4.0", - "symfony/event-dispatcher": "~3.4|~4.0", - "symfony/lock": "~3.4|~4.0", - "symfony/process": "~3.4|~4.0" - }, - "suggest": { - "psr/log-implementation": "For using the console logger", - "symfony/event-dispatcher": "", - "symfony/lock": "", - "symfony/process": "" - }, - "time": "2019-01-04T15:13:53+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.2-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": "egulias/email-validator", - "version": "2.1.7", - "version_normalized": "2.1.7.0", - "source": { - "type": "git", - "url": "https://github.com/egulias/EmailValidator.git", - "reference": "709f21f92707308cdf8f9bcfa1af4cb26586521e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/709f21f92707308cdf8f9bcfa1af4cb26586521e", - "reference": "709f21f92707308cdf8f9bcfa1af4cb26586521e", - "shasum": "" - }, - "require": { - "doctrine/lexer": "^1.0.1", - "php": ">= 5.5" - }, - "require-dev": { - "dominicsayers/isemail": "dev-master", - "phpunit/phpunit": "^4.8.35||^5.7||^6.0", - "satooshi/php-coveralls": "^1.0.1" - }, - "suggest": { - "ext-intl": "PHP Internationalization Libraries are required to use the SpoofChecking validation" - }, - "time": "2018-12-04T22:38:24+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Egulias\\EmailValidator\\": "EmailValidator" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Eduardo Gulias Davis" - } - ], - "description": "A library for validating emails against several RFCs", - "homepage": "https://github.com/egulias/EmailValidator", - "keywords": [ - "email", - "emailvalidation", - "emailvalidator", - "validation", - "validator" - ] - }, - { - "name": "opis/closure", - "version": "3.1.5", - "version_normalized": "3.1.5.0", - "source": { - "type": "git", - "url": "https://github.com/opis/closure.git", - "reference": "41f5da65d75cf473e5ee582df8fc7f2c733ce9d6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/opis/closure/zipball/41f5da65d75cf473e5ee582df8fc7f2c733ce9d6", - "reference": "41f5da65d75cf473e5ee582df8fc7f2c733ce9d6", - "shasum": "" - }, - "require": { - "php": "^5.4 || ^7.0" - }, - "require-dev": { - "jeremeamia/superclosure": "^2.0", - "phpunit/phpunit": "^4.0|^5.0|^6.0|^7.0" - }, - "time": "2019-01-14T14:45:33+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.1.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Opis\\Closure\\": "src/" - }, - "files": [ - "functions.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marius Sarca", - "email": "marius.sarca@gmail.com" - }, - { - "name": "Sorin Sarca", - "email": "sarca_sorin@hotmail.com" - } - ], - "description": "A library that can be used to serialize closures (anonymous functions) and arbitrary objects.", - "homepage": "https://opis.io/closure", - "keywords": [ - "anonymous functions", - "closure", - "function", - "serializable", - "serialization", - "serialize" - ] - }, - { - "name": "symfony/translation", - "version": "v4.2.2", - "version_normalized": "4.2.2.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/translation.git", - "reference": "939fb792d73f2ce80e6ae9019d205fc480f1c9a0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/939fb792d73f2ce80e6ae9019d205fc480f1c9a0", - "reference": "939fb792d73f2ce80e6ae9019d205fc480f1c9a0", - "shasum": "" - }, - "require": { - "php": "^7.1.3", - "symfony/contracts": "^1.0.2", - "symfony/polyfill-mbstring": "~1.0" - }, - "conflict": { - "symfony/config": "<3.4", - "symfony/dependency-injection": "<3.4", - "symfony/yaml": "<3.4" - }, - "provide": { - "symfony/translation-contracts-implementation": "1.0" - }, - "require-dev": { - "psr/log": "~1.0", - "symfony/config": "~3.4|~4.0", - "symfony/console": "~3.4|~4.0", - "symfony/dependency-injection": "~3.4|~4.0", - "symfony/finder": "~2.8|~3.0|~4.0", - "symfony/intl": "~3.4|~4.0", - "symfony/yaml": "~3.4|~4.0" - }, - "suggest": { - "psr/log-implementation": "To use logging capability in translator", - "symfony/config": "", - "symfony/yaml": "" - }, - "time": "2019-01-03T09:07:35+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.2-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.36.2", - "version_normalized": "1.36.2.0", - "source": { - "type": "git", - "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "cd324b98bc30290f233dd0e75e6ce49f7ab2a6c9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/cd324b98bc30290f233dd0e75e6ce49f7ab2a6c9", - "reference": "cd324b98bc30290f233dd0e75e6ce49f7ab2a6c9", - "shasum": "" - }, - "require": { - "php": ">=5.3.9", - "symfony/translation": "~2.6 || ~3.0 || ~4.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7" - }, - "suggest": { - "friendsofphp/php-cs-fixer": "Needed for the `composer phpcs` command. Allow to automatically fix code style.", - "phpstan/phpstan": "Needed for the `composer phpstan` command. Allow to detect potential errors." - }, - "time": "2018-12-28T10:07:33+00:00", - "type": "library", - "extra": { - "laravel": { - "providers": [ - "Carbon\\Laravel\\ServiceProvider" - ] - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "": "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": "monolog/monolog", - "version": "1.24.0", - "version_normalized": "1.24.0.0", - "source": { - "type": "git", - "url": "https://github.com/Seldaek/monolog.git", - "reference": "bfc9ebb28f97e7a24c45bdc3f0ff482e47bb0266" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/bfc9ebb28f97e7a24c45bdc3f0ff482e47bb0266", - "reference": "bfc9ebb28f97e7a24c45bdc3f0ff482e47bb0266", - "shasum": "" - }, - "require": { - "php": ">=5.3.0", - "psr/log": "~1.0" - }, - "provide": { - "psr/log-implementation": "1.0.0" - }, - "require-dev": { - "aws/aws-sdk-php": "^2.4.9 || ^3.0", - "doctrine/couchdb": "~1.0@dev", - "graylog2/gelf-php": "~1.0", - "jakub-onderka/php-parallel-lint": "0.9", - "php-amqplib/php-amqplib": "~2.4", - "php-console/php-console": "^3.1.3", - "phpunit/phpunit": "~4.5", - "phpunit/phpunit-mock-objects": "2.3.0", - "ruflin/elastica": ">=0.90 <3.0", - "sentry/sentry": "^0.13", - "swiftmailer/swiftmailer": "^5.3|^6.0" - }, - "suggest": { - "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", - "doctrine/couchdb": "Allow sending log messages to a CouchDB server", - "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)", - "ext-mongo": "Allow sending log messages to a MongoDB server", - "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", - "mongodb/mongodb": "Allow sending log messages to a MongoDB server via PHP Driver", - "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib", - "php-console/php-console": "Allow sending log messages to Google Chrome", - "rollbar/rollbar": "Allow sending log messages to Rollbar", - "ruflin/elastica": "Allow sending log messages to an Elastic Search server", - "sentry/sentry": "Allow sending log messages to a Sentry server" - }, - "time": "2018-11-05T09:00:11+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Monolog\\": "src/Monolog" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - } - ], - "description": "Sends your logs to files, sockets, inboxes, databases and various web services", - "homepage": "http://github.com/Seldaek/monolog", - "keywords": [ - "log", - "logging", - "psr-3" - ] - }, - { - "name": "league/flysystem", - "version": "1.0.49", - "version_normalized": "1.0.49.0", - "source": { - "type": "git", - "url": "https://github.com/thephpleague/flysystem.git", - "reference": "a63cc83d8a931b271be45148fa39ba7156782ffd" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/a63cc83d8a931b271be45148fa39ba7156782ffd", - "reference": "a63cc83d8a931b271be45148fa39ba7156782ffd", - "shasum": "" - }, - "require": { - "ext-fileinfo": "*", - "php": ">=5.5.9" - }, - "conflict": { - "league/flysystem-sftp": "<1.0.6" - }, - "require-dev": { - "phpspec/phpspec": "^3.4", - "phpunit/phpunit": "^5.7.10" - }, - "suggest": { - "ext-fileinfo": "Required for MimeType", - "ext-ftp": "Allows you to use FTP server storage", - "ext-openssl": "Allows you to use FTPS server storage", - "league/flysystem-aws-s3-v2": "Allows you to use S3 storage with AWS SDK v2", - "league/flysystem-aws-s3-v3": "Allows you to use S3 storage with AWS SDK v3", - "league/flysystem-azure": "Allows you to use Windows Azure Blob storage", - "league/flysystem-cached-adapter": "Flysystem adapter decorator for metadata caching", - "league/flysystem-eventable-filesystem": "Allows you to use EventableFilesystem", - "league/flysystem-rackspace": "Allows you to use Rackspace Cloud Files", - "league/flysystem-sftp": "Allows you to use SFTP server storage via phpseclib", - "league/flysystem-webdav": "Allows you to use WebDAV storage", - "league/flysystem-ziparchive": "Allows you to use ZipArchive adapter", - "spatie/flysystem-dropbox": "Allows you to use Dropbox storage", - "srmklive/flysystem-dropbox-v2": "Allows you to use Dropbox storage for PHP 5 applications" - }, - "time": "2018-11-23T23:41:29+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "League\\Flysystem\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Frank de Jonge", - "email": "info@frenky.net" - } - ], - "description": "Filesystem abstraction: Many filesystems, one API.", - "keywords": [ - "Cloud Files", - "WebDAV", - "abstraction", - "aws", - "cloud", - "copy.com", - "dropbox", - "file systems", - "files", - "filesystem", - "filesystems", - "ftp", - "rackspace", - "remote", - "s3", - "sftp", - "storage" - ] - }, - { - "name": "ralouphie/getallheaders", - "version": "2.0.5", - "version_normalized": "2.0.5.0", - "source": { - "type": "git", - "url": "https://github.com/ralouphie/getallheaders.git", - "reference": "5601c8a83fbba7ef674a7369456d12f1e0d0eafa" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/5601c8a83fbba7ef674a7369456d12f1e0d0eafa", - "reference": "5601c8a83fbba7ef674a7369456d12f1e0d0eafa", - "shasum": "" - }, - "require": { - "php": ">=5.3" - }, - "require-dev": { - "phpunit/phpunit": "~3.7.0", - "satooshi/php-coveralls": ">=1.0" - }, - "time": "2016-02-11T07:05:27+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "files": [ - "src/getallheaders.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Ralph Khattar", - "email": "ralph.khattar@gmail.com" - } - ], - "description": "A polyfill for getallheaders." - }, - { - "name": "guzzlehttp/psr7", - "version": "1.5.2", - "version_normalized": "1.5.2.0", - "source": { - "type": "git", - "url": "https://github.com/guzzle/psr7.git", - "reference": "9f83dded91781a01c63574e387eaa769be769115" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/9f83dded91781a01c63574e387eaa769be769115", - "reference": "9f83dded91781a01c63574e387eaa769be769115", - "shasum": "" - }, - "require": { - "php": ">=5.4.0", - "psr/http-message": "~1.0", - "ralouphie/getallheaders": "^2.0.5" - }, - "provide": { - "psr/http-message-implementation": "1.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8" - }, - "time": "2018-12-04T20:46:45+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.5-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "GuzzleHttp\\Psr7\\": "src/" - }, - "files": [ - "src/functions_include.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - }, - { - "name": "Tobias Schultze", - "homepage": "https://github.com/Tobion" - } - ], - "description": "PSR-7 message implementation that also provides common utility methods", - "keywords": [ - "http", - "message", - "psr-7", - "request", - "response", - "stream", - "uri", - "url" - ] - }, - { - "name": "laravel/slack-notification-channel", - "version": "v1.0.3", - "version_normalized": "1.0.3.0", - "source": { - "type": "git", - "url": "https://github.com/laravel/slack-notification-channel.git", - "reference": "6e164293b754a95f246faf50ab2bbea3e4923cc9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laravel/slack-notification-channel/zipball/6e164293b754a95f246faf50ab2bbea3e4923cc9", - "reference": "6e164293b754a95f246faf50ab2bbea3e4923cc9", - "shasum": "" - }, - "require": { - "guzzlehttp/guzzle": "^6.0", - "php": "^7.1.3" - }, - "require-dev": { - "illuminate/notifications": "~5.7", - "mockery/mockery": "^1.0", - "phpunit/phpunit": "^7.0" - }, - "time": "2018-12-12T13:12:06+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - }, - "laravel": { - "providers": [ - "Illuminate\\Notifications\\SlackChannelServiceProvider" - ] - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Illuminate\\Notifications\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "Slack Notification Channel for laravel.", - "keywords": [ - "laravel", - "notifications", - "slack" - ] - }, - { - "name": "laravel/framework", - "version": "v5.7.21", - "version_normalized": "5.7.21.0", - "source": { - "type": "git", - "url": "https://github.com/laravel/framework.git", - "reference": "25f74458a242b61cc9e9c09d31f94fb13ed805f3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/25f74458a242b61cc9e9c09d31f94fb13ed805f3", - "reference": "25f74458a242b61cc9e9c09d31f94fb13ed805f3", - "shasum": "" - }, - "require": { - "doctrine/inflector": "^1.1", - "dragonmantank/cron-expression": "^2.0", - "erusev/parsedown": "^1.7", - "ext-mbstring": "*", - "ext-openssl": "*", - "laravel/nexmo-notification-channel": "^1.0", - "laravel/slack-notification-channel": "^1.0", - "league/flysystem": "^1.0.8", - "monolog/monolog": "^1.12", - "nesbot/carbon": "^1.26.3", - "opis/closure": "^3.1", - "php": "^7.1.3", - "psr/container": "^1.0", - "psr/simple-cache": "^1.0", - "ramsey/uuid": "^3.7", - "swiftmailer/swiftmailer": "^6.0", - "symfony/console": "^4.1", - "symfony/debug": "^4.1", - "symfony/finder": "^4.1", - "symfony/http-foundation": "^4.1", - "symfony/http-kernel": "^4.1", - "symfony/process": "^4.1", - "symfony/routing": "^4.1", - "symfony/var-dumper": "^4.1", - "tijsverkoyen/css-to-inline-styles": "^2.2.1", - "vlucas/phpdotenv": "^2.2" - }, - "conflict": { - "tightenco/collect": "<5.5.33" - }, - "replace": { - "illuminate/auth": "self.version", - "illuminate/broadcasting": "self.version", - "illuminate/bus": "self.version", - "illuminate/cache": "self.version", - "illuminate/config": "self.version", - "illuminate/console": "self.version", - "illuminate/container": "self.version", - "illuminate/contracts": "self.version", - "illuminate/cookie": "self.version", - "illuminate/database": "self.version", - "illuminate/encryption": "self.version", - "illuminate/events": "self.version", - "illuminate/filesystem": "self.version", - "illuminate/hashing": "self.version", - "illuminate/http": "self.version", - "illuminate/log": "self.version", - "illuminate/mail": "self.version", - "illuminate/notifications": "self.version", - "illuminate/pagination": "self.version", - "illuminate/pipeline": "self.version", - "illuminate/queue": "self.version", - "illuminate/redis": "self.version", - "illuminate/routing": "self.version", - "illuminate/session": "self.version", - "illuminate/support": "self.version", - "illuminate/translation": "self.version", - "illuminate/validation": "self.version", - "illuminate/view": "self.version" - }, - "require-dev": { - "aws/aws-sdk-php": "^3.0", - "doctrine/dbal": "^2.6", - "filp/whoops": "^2.1.4", - "guzzlehttp/guzzle": "^6.3", - "league/flysystem-cached-adapter": "^1.0", - "mockery/mockery": "^1.0", - "moontoast/math": "^1.1", - "orchestra/testbench-core": "3.7.*", - "pda/pheanstalk": "^3.0", - "phpunit/phpunit": "^7.5", - "predis/predis": "^1.1.1", - "symfony/css-selector": "^4.1", - "symfony/dom-crawler": "^4.1", - "true/punycode": "^2.1" - }, - "suggest": { - "aws/aws-sdk-php": "Required to use the SQS queue driver and SES mail driver (^3.0).", - "doctrine/dbal": "Required to rename columns and drop SQLite columns (^2.6).", - "ext-pcntl": "Required to use all features of the queue worker.", - "ext-posix": "Required to use all features of the queue worker.", - "filp/whoops": "Required for friendly error pages in development (^2.1.4).", - "fzaninotto/faker": "Required to use the eloquent factory builder (^1.4).", - "guzzlehttp/guzzle": "Required to use the Mailgun and Mandrill mail drivers and the ping methods on schedules (^6.0).", - "laravel/tinker": "Required to use the tinker console command (^1.0).", - "league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (^1.0).", - "league/flysystem-cached-adapter": "Required to use the Flysystem cache (^1.0).", - "league/flysystem-rackspace": "Required to use the Flysystem Rackspace driver (^1.0).", - "league/flysystem-sftp": "Required to use the Flysystem SFTP driver (^1.0).", - "moontoast/math": "Required to use ordered UUIDs (^1.1).", - "nexmo/client": "Required to use the Nexmo transport (^1.0).", - "pda/pheanstalk": "Required to use the beanstalk queue driver (^3.0).", - "predis/predis": "Required to use the redis cache and queue drivers (^1.0).", - "pusher/pusher-php-server": "Required to use the Pusher broadcast driver (^3.0).", - "symfony/css-selector": "Required to use some of the crawler integration testing tools (^4.1).", - "symfony/dom-crawler": "Required to use most of the crawler integration testing tools (^4.1).", - "symfony/psr-http-message-bridge": "Required to psr7 bridging features (^1.0)." - }, - "time": "2019-01-15T15:20:32+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.7-dev" - } - }, - "installation-source": "dist", - "autoload": { - "files": [ - "src/Illuminate/Foundation/helpers.php", - "src/Illuminate/Support/helpers.php" - ], - "psr-4": { - "Illuminate\\": "src/Illuminate/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Laravel Framework.", - "homepage": "https://laravel.com", - "keywords": [ - "framework", - "laravel" - ] - }, - { - "name": "lcobucci/jwt", - "version": "3.2.5", - "version_normalized": "3.2.5.0", - "source": { - "type": "git", - "url": "https://github.com/lcobucci/jwt.git", - "reference": "82be04b4753f8b7693b62852b7eab30f97524f9b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/lcobucci/jwt/zipball/82be04b4753f8b7693b62852b7eab30f97524f9b", - "reference": "82be04b4753f8b7693b62852b7eab30f97524f9b", - "shasum": "" - }, - "require": { - "ext-openssl": "*", - "php": ">=5.5" - }, - "require-dev": { - "mdanter/ecc": "~0.3.1", - "mikey179/vfsstream": "~1.5", - "phpmd/phpmd": "~2.2", - "phpunit/php-invoker": "~1.1", - "phpunit/phpunit": "~4.5", - "squizlabs/php_codesniffer": "~2.3" - }, - "suggest": { - "mdanter/ecc": "Required to use Elliptic Curves based algorithms." - }, - "time": "2018-11-11T12:22:26+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.1-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Lcobucci\\JWT\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Luís Otávio Cobucci Oblonczyk", - "email": "lcobucci@gmail.com", - "role": "developer" - } - ], - "description": "A simple library to work with JSON Web Token and JSON Web Signature", - "keywords": [ - "JWS", - "jwt" - ] - }, - { - "name": "zendframework/zend-diactoros", - "version": "1.8.6", - "version_normalized": "1.8.6.0", - "source": { - "type": "git", - "url": "https://github.com/zendframework/zend-diactoros.git", - "reference": "20da13beba0dde8fb648be3cc19765732790f46e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-diactoros/zipball/20da13beba0dde8fb648be3cc19765732790f46e", - "reference": "20da13beba0dde8fb648be3cc19765732790f46e", - "shasum": "" - }, - "require": { - "php": "^5.6 || ^7.0", - "psr/http-message": "^1.0" - }, - "provide": { - "psr/http-message-implementation": "1.0" - }, - "require-dev": { - "ext-dom": "*", - "ext-libxml": "*", - "php-http/psr7-integration-tests": "dev-master", - "phpunit/phpunit": "^5.7.16 || ^6.0.8 || ^7.2.7", - "zendframework/zend-coding-standard": "~1.0" - }, - "time": "2018-09-05T19:29:37+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.8.x-dev", - "dev-develop": "1.9.x-dev", - "dev-release-2.0": "2.0.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "files": [ - "src/functions/create_uploaded_file.php", - "src/functions/marshal_headers_from_sapi.php", - "src/functions/marshal_method_from_sapi.php", - "src/functions/marshal_protocol_version_from_sapi.php", - "src/functions/marshal_uri_from_sapi.php", - "src/functions/normalize_server.php", - "src/functions/normalize_uploaded_files.php", - "src/functions/parse_cookie_header.php" - ], - "psr-4": { - "Zend\\Diactoros\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-2-Clause" - ], - "description": "PSR HTTP Message implementations", - "homepage": "https://github.com/zendframework/zend-diactoros", - "keywords": [ - "http", - "psr", - "psr-7" - ] - }, - { - "name": "nexmo/client", - "version": "1.6.0", - "version_normalized": "1.6.0.0", - "source": { - "type": "git", - "url": "https://github.com/Nexmo/nexmo-php.git", - "reference": "01809cc1e17a5af275913c49bb5d444eb6cc06d4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Nexmo/nexmo-php/zipball/01809cc1e17a5af275913c49bb5d444eb6cc06d4", - "reference": "01809cc1e17a5af275913c49bb5d444eb6cc06d4", - "shasum": "" - }, - "require": { - "lcobucci/jwt": "^3.2", - "php": ">=5.6", - "php-http/client-implementation": "^1.0", - "php-http/guzzle6-adapter": "^1.0", - "zendframework/zend-diactoros": "^1.3" - }, - "require-dev": { - "estahn/phpunit-json-assertions": "^1.0.0", - "php-http/mock-client": "^0.3.0", - "phpunit/phpunit": "^5.7", - "squizlabs/php_codesniffer": "^3.1" - }, - "time": "2018-12-17T10:47:50+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Nexmo\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Tim Lytle", - "email": "tim@nexmo.com", - "homepage": "http://twitter.com/tjlytle", - "role": "Developer" - } - ], - "description": "PHP Client for using Nexmo's API." - }, - { - "name": "laravel/nexmo-notification-channel", - "version": "v1.0.1", - "version_normalized": "1.0.1.0", - "source": { - "type": "git", - "url": "https://github.com/laravel/nexmo-notification-channel.git", - "reference": "03edd42a55b306ff980c9950899d5a2b03260d48" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laravel/nexmo-notification-channel/zipball/03edd42a55b306ff980c9950899d5a2b03260d48", - "reference": "03edd42a55b306ff980c9950899d5a2b03260d48", - "shasum": "" - }, - "require": { - "nexmo/client": "^1.0", - "php": "^7.1.3" - }, - "require-dev": { - "illuminate/notifications": "~5.7", - "mockery/mockery": "^1.0", - "phpunit/phpunit": "^7.0" - }, - "time": "2018-12-04T12:57:08+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - }, - "laravel": { - "providers": [ - "Illuminate\\Notifications\\NexmoChannelServiceProvider" - ] - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Illuminate\\Notifications\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "Nexmo Notification Channel for laravel.", - "keywords": [ - "laravel", - "nexmo", - "notifications" - ] - }, - { - "name": "fideloper/proxy", - "version": "4.1.0", - "version_normalized": "4.1.0.0", - "source": { - "type": "git", - "url": "https://github.com/fideloper/TrustedProxy.git", - "reference": "177c79a2d1f9970f89ee2fb4c12b429af38b6dfb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/fideloper/TrustedProxy/zipball/177c79a2d1f9970f89ee2fb4c12b429af38b6dfb", - "reference": "177c79a2d1f9970f89ee2fb4c12b429af38b6dfb", - "shasum": "" - }, - "require": { - "illuminate/contracts": "~5.0", - "php": ">=5.4.0" - }, - "require-dev": { - "illuminate/http": "~5.6", - "mockery/mockery": "~1.0", - "phpunit/phpunit": "^6.0" - }, - "time": "2019-01-10T14:06:47+00:00", - "type": "library", - "extra": { - "laravel": { - "providers": [ - "Fideloper\\Proxy\\TrustedProxyServiceProvider" - ] - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Fideloper\\Proxy\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Chris Fidao", - "email": "fideloper@gmail.com" - } - ], - "description": "Set trusted proxies for Laravel", - "keywords": [ - "load balancing", - "proxy", - "trusted proxy" - ] - }, - { - "name": "filp/whoops", - "version": "2.3.1", - "version_normalized": "2.3.1.0", - "source": { - "type": "git", - "url": "https://github.com/filp/whoops.git", - "reference": "bc0fd11bc455cc20ee4b5edabc63ebbf859324c7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/filp/whoops/zipball/bc0fd11bc455cc20ee4b5edabc63ebbf859324c7", - "reference": "bc0fd11bc455cc20ee4b5edabc63ebbf859324c7", - "shasum": "" - }, - "require": { - "php": "^5.5.9 || ^7.0", - "psr/log": "^1.0.1" - }, - "require-dev": { - "mockery/mockery": "^0.9 || ^1.0", - "phpunit/phpunit": "^4.8.35 || ^5.7", - "symfony/var-dumper": "^2.6 || ^3.0 || ^4.0" - }, - "suggest": { - "symfony/var-dumper": "Pretty print complex values better with var-dumper available", - "whoops/soap": "Formats errors as SOAP responses" - }, - "time": "2018-10-23T09:00:00+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.2-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Whoops\\": "src/Whoops/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Filipe Dobreira", - "homepage": "https://github.com/filp", - "role": "Developer" - } - ], - "description": "php error handling for cool kids", - "homepage": "https://filp.github.io/whoops/", - "keywords": [ - "error", - "exception", - "handling", - "library", - "throwable", - "whoops" - ] - }, - { - "name": "symfony/options-resolver", - "version": "v4.2.2", - "version_normalized": "4.2.2.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/options-resolver.git", - "reference": "fbcb106aeee72f3450298bf73324d2cc00d083d1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/fbcb106aeee72f3450298bf73324d2cc00d083d1", - "reference": "fbcb106aeee72f3450298bf73324d2cc00d083d1", - "shasum": "" - }, - "require": { - "php": "^7.1.3" - }, - "time": "2019-01-03T09:07:35+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.2-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Component\\OptionsResolver\\": "" - }, - "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 OptionsResolver Component", - "homepage": "https://symfony.com", - "keywords": [ - "config", - "configuration", - "options" - ] - }, - { - "name": "php-http/message", - "version": "1.7.2", - "version_normalized": "1.7.2.0", - "source": { - "type": "git", - "url": "https://github.com/php-http/message.git", - "reference": "b159ffe570dffd335e22ef0b91a946eacb182fa1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-http/message/zipball/b159ffe570dffd335e22ef0b91a946eacb182fa1", - "reference": "b159ffe570dffd335e22ef0b91a946eacb182fa1", - "shasum": "" - }, - "require": { - "clue/stream-filter": "^1.4", - "php": "^5.4 || ^7.0", - "php-http/message-factory": "^1.0.2", - "psr/http-message": "^1.0" - }, - "provide": { - "php-http/message-factory-implementation": "1.0" - }, - "require-dev": { - "akeneo/phpspec-skip-example-extension": "^1.0", - "coduo/phpspec-data-provider-extension": "^1.0", - "ext-zlib": "*", - "guzzlehttp/psr7": "^1.0", - "henrikbjorn/phpspec-code-coverage": "^1.0", - "phpspec/phpspec": "^2.4", - "slim/slim": "^3.0", - "zendframework/zend-diactoros": "^1.0" - }, - "suggest": { - "ext-zlib": "Used with compressor/decompressor streams", - "guzzlehttp/psr7": "Used with Guzzle PSR-7 Factories", - "slim/slim": "Used with Slim Framework PSR-7 implementation", - "zendframework/zend-diactoros": "Used with Diactoros Factories" - }, - "time": "2018-11-01T09:32:41+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.6-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Http\\Message\\": "src/" - }, - "files": [ - "src/filters.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com" - } - ], - "description": "HTTP Message related tools", - "homepage": "http://php-http.org", - "keywords": [ - "http", - "message", - "psr-7" - ] - }, - { - "name": "php-http/client-common", - "version": "1.9.0", - "version_normalized": "1.9.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-http/client-common.git", - "reference": "9c21b6058caafdf2fcc99a0cabdf31b3ecb33961" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-http/client-common/zipball/9c21b6058caafdf2fcc99a0cabdf31b3ecb33961", - "reference": "9c21b6058caafdf2fcc99a0cabdf31b3ecb33961", - "shasum": "" - }, - "require": { - "php": "^5.4 || ^7.0", - "php-http/httplug": "^1.1", - "php-http/message": "^1.6", - "php-http/message-factory": "^1.0", - "symfony/options-resolver": "^2.6 || ^3.0 || ^4.0" - }, - "require-dev": { - "guzzlehttp/psr7": "^1.4", - "phpspec/phpspec": "^2.5 || ^3.4 || ^4.2" - }, - "suggest": { - "php-http/cache-plugin": "PSR-6 Cache plugin", - "php-http/logger-plugin": "PSR-3 Logger plugin", - "php-http/stopwatch-plugin": "Symfony Stopwatch plugin" - }, - "time": "2019-01-03T10:59:55+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.9.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Http\\Client\\Common\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com" - } - ], - "description": "Common HTTP Client implementations and tools for HTTPlug", - "homepage": "http://httplug.io", - "keywords": [ - "client", - "common", - "http", - "httplug" - ] - }, - { - "name": "php-http/discovery", - "version": "1.5.2", - "version_normalized": "1.5.2.0", - "source": { - "type": "git", - "url": "https://github.com/php-http/discovery.git", - "reference": "ffef11d54171336d841a34816a35bc035fb8cef0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-http/discovery/zipball/ffef11d54171336d841a34816a35bc035fb8cef0", - "reference": "ffef11d54171336d841a34816a35bc035fb8cef0", - "shasum": "" - }, - "require": { - "php": "^5.5 || ^7.0" - }, - "conflict": { - "nyholm/psr7": "<1.0" - }, - "require-dev": { - "henrikbjorn/phpspec-code-coverage": "^2.0.2", - "php-http/httplug": "^1.0|^2.0", - "php-http/message-factory": "^1.0", - "phpspec/phpspec": "^2.4", - "puli/composer-plugin": "1.0.0-beta10" - }, - "suggest": { - "php-http/message": "Allow to use Guzzle, Diactoros or Slim Framework factories", - "puli/composer-plugin": "Sets up Puli which is recommended for Discovery to work. Check http://docs.php-http.org/en/latest/discovery.html for more details." - }, - "time": "2018-12-31T07:31:26+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.5-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Http\\Discovery\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com" - } - ], - "description": "Finds installed HTTPlug implementations and PSR-7 message factories", - "homepage": "http://php-http.org", - "keywords": [ - "adapter", - "client", - "discovery", - "factory", - "http", - "message", - "psr7" - ] - }, - { - "name": "nikic/php-parser", - "version": "v4.2.0", - "version_normalized": "4.2.0.0", - "source": { - "type": "git", - "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "594bcae1fc0bccd3993d2f0d61a018e26ac2865a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/594bcae1fc0bccd3993d2f0d61a018e26ac2865a", - "reference": "594bcae1fc0bccd3993d2f0d61a018e26ac2865a", - "shasum": "" - }, - "require": { - "ext-tokenizer": "*", - "php": ">=7.0" - }, - "require-dev": { - "phpunit/phpunit": "^6.5 || ^7.0" - }, - "time": "2019-01-12T16:31:37+00:00", - "bin": [ - "bin/php-parse" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.2-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "PhpParser\\": "lib/PhpParser" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Nikita Popov" - } - ], - "description": "A PHP parser written in PHP", - "keywords": [ - "parser", - "php" - ] - }, { "name": "webmozart/assert", "version": "1.4.0", @@ -5869,5 +6294,73 @@ "check", "validate" ] + }, + { + "name": "zendframework/zend-diactoros", + "version": "2.1.2", + "version_normalized": "2.1.2.0", + "source": { + "type": "git", + "url": "https://github.com/zendframework/zend-diactoros.git", + "reference": "37bf68b428850ee26ed7c3be6c26236dd95a95f1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/zendframework/zend-diactoros/zipball/37bf68b428850ee26ed7c3be6c26236dd95a95f1", + "reference": "37bf68b428850ee26ed7c3be6c26236dd95a95f1", + "shasum": "" + }, + "require": { + "php": "^7.1", + "psr/http-factory": "^1.0", + "psr/http-message": "^1.0" + }, + "provide": { + "psr/http-factory-implementation": "1.0", + "psr/http-message-implementation": "1.0" + }, + "require-dev": { + "ext-dom": "*", + "ext-libxml": "*", + "http-interop/http-factory-tests": "^0.5.0", + "php-http/psr7-integration-tests": "dev-master", + "phpunit/phpunit": "^7.0.2", + "zendframework/zend-coding-standard": "~1.0.0" + }, + "time": "2019-04-29T21:11:00+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.1.x-dev", + "dev-develop": "2.2.x-dev", + "dev-release-1.8": "1.8.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "files": [ + "src/functions/create_uploaded_file.php", + "src/functions/marshal_headers_from_sapi.php", + "src/functions/marshal_method_from_sapi.php", + "src/functions/marshal_protocol_version_from_sapi.php", + "src/functions/marshal_uri_from_sapi.php", + "src/functions/normalize_server.php", + "src/functions/normalize_uploaded_files.php", + "src/functions/parse_cookie_header.php" + ], + "psr-4": { + "Zend\\Diactoros\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "PSR HTTP Message implementations", + "keywords": [ + "http", + "psr", + "psr-7" + ] } ] diff --git a/vendor/doctrine/instantiator/.doctrine-project.json b/vendor/doctrine/instantiator/.doctrine-project.json new file mode 100644 index 00000000..4fe86ee8 --- /dev/null +++ b/vendor/doctrine/instantiator/.doctrine-project.json @@ -0,0 +1,26 @@ +{ + "active": true, + "name": "Instantiator", + "slug": "instantiator", + "docsSlug": "doctrine-instantiator", + "codePath": "/src", + "versions": [ + { + "name": "1.1", + "branchName": "master", + "slug": "latest", + "aliases": [ + "current", + "stable" + ], + "maintained": true, + "current": true + }, + { + "name": "1.0", + "branchName": "1.0.x", + "slug": "1.0" + } + ] +} + diff --git a/vendor/doctrine/instantiator/CONTRIBUTING.md b/vendor/doctrine/instantiator/CONTRIBUTING.md index 75b84b2a..c1a2c42e 100644 --- a/vendor/doctrine/instantiator/CONTRIBUTING.md +++ b/vendor/doctrine/instantiator/CONTRIBUTING.md @@ -1,6 +1,6 @@ # Contributing - * Coding standard for the project is [PSR-2](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md) + * Follow the [Doctrine Coding Standard](https://github.com/doctrine/coding-standard) * The project will follow strict [object calisthenics](http://www.slideshare.net/guilhermeblanco/object-calisthenics-applied-to-php) * Any contribution must provide tests for additional introduced conditions * Any un-confirmed issue needs a failing test case before being accepted diff --git a/vendor/doctrine/instantiator/README.md b/vendor/doctrine/instantiator/README.md index b66064bf..eff5a0ca 100644 --- a/vendor/doctrine/instantiator/README.md +++ b/vendor/doctrine/instantiator/README.md @@ -6,7 +6,6 @@ This library provides a way of avoiding usage of constructors when instantiating [![Code Coverage](https://scrutinizer-ci.com/g/doctrine/instantiator/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/doctrine/instantiator/?branch=master) [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/doctrine/instantiator/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/doctrine/instantiator/?branch=master) [![Dependency Status](https://www.versioneye.com/package/php--doctrine--instantiator/badge.svg)](https://www.versioneye.com/package/php--doctrine--instantiator) -[![HHVM Status](http://hhvm.h4cc.de/badge/doctrine/instantiator.png)](http://hhvm.h4cc.de/package/doctrine/instantiator) [![Latest Stable Version](https://poser.pugx.org/doctrine/instantiator/v/stable.png)](https://packagist.org/packages/doctrine/instantiator) [![Latest Unstable Version](https://poser.pugx.org/doctrine/instantiator/v/unstable.png)](https://packagist.org/packages/doctrine/instantiator) diff --git a/vendor/doctrine/instantiator/composer.json b/vendor/doctrine/instantiator/composer.json index 403ee8e6..9002a91a 100644 --- a/vendor/doctrine/instantiator/composer.json +++ b/vendor/doctrine/instantiator/composer.json @@ -3,7 +3,7 @@ "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", "type": "library", "license": "MIT", - "homepage": "https://github.com/doctrine/instantiator", + "homepage": "https://www.doctrine-project.org/projects/instantiator.html", "keywords": [ "instantiate", "constructor" @@ -21,9 +21,11 @@ "require-dev": { "ext-phar": "*", "ext-pdo": "*", - "phpunit/phpunit": "^6.2.3", - "squizlabs/php_codesniffer": "^3.0.2", - "athletic/athletic": "~0.1.8" + "doctrine/coding-standard": "^6.0", + "phpbench/phpbench": "^0.13", + "phpstan/phpstan-phpunit": "^0.11", + "phpstan/phpstan-shim": "^0.11", + "phpunit/phpunit": "^7.0" }, "autoload": { "psr-4": { diff --git a/vendor/doctrine/instantiator/docs/en/index.rst b/vendor/doctrine/instantiator/docs/en/index.rst new file mode 100644 index 00000000..0c85da0b --- /dev/null +++ b/vendor/doctrine/instantiator/docs/en/index.rst @@ -0,0 +1,68 @@ +Introduction +============ + +This library provides a way of avoiding usage of constructors when instantiating PHP classes. + +Installation +============ + +The suggested installation method is via `composer`_: + +.. code-block:: console + + $ composer require doctrine/instantiator + +Usage +===== + +The instantiator is able to create new instances of any class without +using the constructor or any API of the class itself: + +.. code-block:: php + + instantiate(User::class); + +Contributing +============ + +- Follow the `Doctrine Coding Standard`_ +- The project will follow strict `object calisthenics`_ +- Any contribution must provide tests for additional introduced + conditions +- Any un-confirmed issue needs a failing test case before being + accepted +- Pull requests must be sent from a new hotfix/feature branch, not from + ``master``. + +Testing +======= + +The PHPUnit version to be used is the one installed as a dev- dependency +via composer: + +.. code-block:: console + + $ ./vendor/bin/phpunit + +Accepted coverage for new contributions is 80%. Any contribution not +satisfying this requirement won’t be merged. + +Credits +======= + +This library was migrated from `ocramius/instantiator`_, which has been +donated to the doctrine organization, and which is now deprecated in +favour of this package. + +.. _composer: https://getcomposer.org/ +.. _CONTRIBUTING.md: CONTRIBUTING.md +.. _ocramius/instantiator: https://github.com/Ocramius/Instantiator +.. _Doctrine Coding Standard: https://github.com/doctrine/coding-standard +.. _object calisthenics: http://www.slideshare.net/guilhermeblanco/object-calisthenics-applied-to-php diff --git a/vendor/doctrine/instantiator/docs/en/sidebar.rst b/vendor/doctrine/instantiator/docs/en/sidebar.rst new file mode 100644 index 00000000..0c364791 --- /dev/null +++ b/vendor/doctrine/instantiator/docs/en/sidebar.rst @@ -0,0 +1,4 @@ +.. toctree:: + :depth: 3 + + index diff --git a/vendor/doctrine/instantiator/phpbench.json b/vendor/doctrine/instantiator/phpbench.json new file mode 100644 index 00000000..fce5dd60 --- /dev/null +++ b/vendor/doctrine/instantiator/phpbench.json @@ -0,0 +1,4 @@ +{ + "bootstrap": "vendor/autoload.php", + "path": "tests/DoctrineTest/InstantiatorPerformance" +} diff --git a/vendor/doctrine/instantiator/phpcs.xml.dist b/vendor/doctrine/instantiator/phpcs.xml.dist new file mode 100644 index 00000000..1fcac4ab --- /dev/null +++ b/vendor/doctrine/instantiator/phpcs.xml.dist @@ -0,0 +1,35 @@ + + + + + + + + + + + + src + tests + + + + + + + + + + tests/DoctrineTest/InstantiatorTestAsset/AbstractClassAsset.php + + + + src/Doctrine/Instantiator/Exception/UnexpectedValueException.php + src/Doctrine/Instantiator/Exception/InvalidArgumentException.php + + + + src/Doctrine/Instantiator/Exception/ExceptionInterface.php + src/Doctrine/Instantiator/InstantiatorInterface.php + + diff --git a/vendor/doctrine/instantiator/phpstan.neon.dist b/vendor/doctrine/instantiator/phpstan.neon.dist new file mode 100644 index 00000000..ecc38eff --- /dev/null +++ b/vendor/doctrine/instantiator/phpstan.neon.dist @@ -0,0 +1,19 @@ +includes: + - vendor/phpstan/phpstan-phpunit/extension.neon + - vendor/phpstan/phpstan-phpunit/rules.neon + +parameters: + level: max + paths: + - src + - tests + + ignoreErrors: + - + message: '#::__construct\(\) does not call parent constructor from#' + path: '*/tests/DoctrineTest/InstantiatorTestAsset/*.php' + + # dynamic properties confuse static analysis + - + message: '#Access to an undefined property object::\$foo\.#' + path: '*/tests/DoctrineTest/InstantiatorTest/InstantiatorTest.php' diff --git a/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/ExceptionInterface.php b/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/ExceptionInterface.php index 3065375a..e6a5195f 100644 --- a/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/ExceptionInterface.php +++ b/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/ExceptionInterface.php @@ -1,29 +1,12 @@ . - */ namespace Doctrine\Instantiator\Exception; +use Throwable; + /** * Base exception marker interface for the instantiator component - * - * @author Marco Pivetta */ -interface ExceptionInterface +interface ExceptionInterface extends Throwable { } diff --git a/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/InvalidArgumentException.php b/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/InvalidArgumentException.php index cb57aa86..9188f0ba 100644 --- a/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/InvalidArgumentException.php +++ b/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/InvalidArgumentException.php @@ -1,31 +1,16 @@ . - */ namespace Doctrine\Instantiator\Exception; use InvalidArgumentException as BaseInvalidArgumentException; use ReflectionClass; +use const PHP_VERSION_ID; +use function interface_exists; +use function sprintf; +use function trait_exists; /** * Exception for invalid arguments provided to the instantiator - * - * @author Marco Pivetta */ class InvalidArgumentException extends BaseInvalidArgumentException implements ExceptionInterface { diff --git a/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/UnexpectedValueException.php b/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/UnexpectedValueException.php index 2b704b92..d946731b 100644 --- a/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/UnexpectedValueException.php +++ b/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/UnexpectedValueException.php @@ -1,32 +1,14 @@ . - */ namespace Doctrine\Instantiator\Exception; use Exception; use ReflectionClass; use UnexpectedValueException as BaseUnexpectedValueException; +use function sprintf; /** * Exception for given parameters causing invalid/unexpected state on instantiation - * - * @author Marco Pivetta */ class UnexpectedValueException extends BaseUnexpectedValueException implements ExceptionInterface { diff --git a/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Instantiator.php b/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Instantiator.php index 69fe65da..4364190e 100644 --- a/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Instantiator.php +++ b/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Instantiator.php @@ -1,21 +1,4 @@ . - */ namespace Doctrine\Instantiator; @@ -23,11 +6,16 @@ use Doctrine\Instantiator\Exception\InvalidArgumentException; use Doctrine\Instantiator\Exception\UnexpectedValueException; use Exception; use ReflectionClass; +use ReflectionException; +use function class_exists; +use function restore_error_handler; +use function set_error_handler; +use function sprintf; +use function strlen; +use function unserialize; /** * {@inheritDoc} - * - * @author Marco Pivetta */ final class Instantiator implements InstantiatorInterface { @@ -36,16 +24,20 @@ final class Instantiator implements InstantiatorInterface * the method {@see \Serializable::unserialize()} when dealing with classes implementing * the {@see \Serializable} interface. */ - const SERIALIZATION_FORMAT_USE_UNSERIALIZER = 'C'; - const SERIALIZATION_FORMAT_AVOID_UNSERIALIZER = 'O'; + public const SERIALIZATION_FORMAT_USE_UNSERIALIZER = 'C'; + public const SERIALIZATION_FORMAT_AVOID_UNSERIALIZER = 'O'; /** - * @var \callable[] used to instantiate specific classes, indexed by class name + * Used to instantiate specific classes, indexed by class name. + * + * @var callable[] */ private static $cachedInstantiators = []; /** - * @var object[] of objects that can directly be cloned, indexed by class name + * Array of objects that can directly be cloned, indexed by class name. + * + * @var object[] */ private static $cachedCloneables = []; @@ -90,7 +82,7 @@ final class Instantiator implements InstantiatorInterface * * @throws InvalidArgumentException * @throws UnexpectedValueException - * @throws \ReflectionException + * @throws ReflectionException */ private function buildFactory(string $className) : callable { @@ -109,7 +101,7 @@ final class Instantiator implements InstantiatorInterface $this->checkIfUnSerializationIsSupported($reflectionClass, $serializedString); - return function () use ($serializedString) { + return static function () use ($serializedString) { return unserialize($serializedString); }; } @@ -117,10 +109,8 @@ final class Instantiator implements InstantiatorInterface /** * @param string $className * - * @return ReflectionClass - * * @throws InvalidArgumentException - * @throws \ReflectionException + * @throws ReflectionException */ private function getReflectionClass($className) : ReflectionClass { @@ -138,16 +128,11 @@ final class Instantiator implements InstantiatorInterface } /** - * @param ReflectionClass $reflectionClass - * @param string $serializedString - * * @throws UnexpectedValueException - * - * @return void */ - private function checkIfUnSerializationIsSupported(ReflectionClass $reflectionClass, $serializedString) : void + private function checkIfUnSerializationIsSupported(ReflectionClass $reflectionClass, string $serializedString) : void { - set_error_handler(function ($code, $message, $file, $line) use ($reflectionClass, & $error) : void { + set_error_handler(static function ($code, $message, $file, $line) use ($reflectionClass, & $error) : void { $error = UnexpectedValueException::fromUncleanUnSerialization( $reflectionClass, $message, @@ -157,9 +142,11 @@ final class Instantiator implements InstantiatorInterface ); }); - $this->attemptInstantiationViaUnSerialization($reflectionClass, $serializedString); - - restore_error_handler(); + try { + $this->attemptInstantiationViaUnSerialization($reflectionClass, $serializedString); + } finally { + restore_error_handler(); + } if ($error) { throw $error; @@ -167,20 +154,13 @@ final class Instantiator implements InstantiatorInterface } /** - * @param ReflectionClass $reflectionClass - * @param string $serializedString - * * @throws UnexpectedValueException - * - * @return void */ - private function attemptInstantiationViaUnSerialization(ReflectionClass $reflectionClass, $serializedString) : void + private function attemptInstantiationViaUnSerialization(ReflectionClass $reflectionClass, string $serializedString) : void { try { unserialize($serializedString); } catch (Exception $exception) { - restore_error_handler(); - throw UnexpectedValueException::fromSerializationTriggeredException($reflectionClass, $exception); } } @@ -199,7 +179,9 @@ final class Instantiator implements InstantiatorInterface if ($reflectionClass->isInternal()) { return true; } - } while ($reflectionClass = $reflectionClass->getParentClass()); + + $reflectionClass = $reflectionClass->getParentClass(); + } while ($reflectionClass); return false; } diff --git a/vendor/doctrine/instantiator/src/Doctrine/Instantiator/InstantiatorInterface.php b/vendor/doctrine/instantiator/src/Doctrine/Instantiator/InstantiatorInterface.php index b665bea8..95299f4a 100644 --- a/vendor/doctrine/instantiator/src/Doctrine/Instantiator/InstantiatorInterface.php +++ b/vendor/doctrine/instantiator/src/Doctrine/Instantiator/InstantiatorInterface.php @@ -1,28 +1,11 @@ . - */ namespace Doctrine\Instantiator; +use Doctrine\Instantiator\Exception\ExceptionInterface; + /** * Instantiator provides utility methods to build objects without invoking their constructors - * - * @author Marco Pivetta */ interface InstantiatorInterface { @@ -31,7 +14,7 @@ interface InstantiatorInterface * * @return object * - * @throws \Doctrine\Instantiator\Exception\ExceptionInterface + * @throws ExceptionInterface */ public function instantiate($className); } diff --git a/vendor/doctrine/lexer/.doctrine-project.json b/vendor/doctrine/lexer/.doctrine-project.json new file mode 100644 index 00000000..01ccb778 --- /dev/null +++ b/vendor/doctrine/lexer/.doctrine-project.json @@ -0,0 +1,17 @@ +{ + "active": true, + "name": "Lexer", + "slug": "lexer", + "docsSlug": "doctrine-lexer", + "versions": [ + { + "name": "master", + "branchName": "master", + "slug": "latest", + "aliases": [ + "current", + "stable" + ] + } + ] +} diff --git a/vendor/doctrine/lexer/.github/FUNDING.yml b/vendor/doctrine/lexer/.github/FUNDING.yml new file mode 100644 index 00000000..e081a97a --- /dev/null +++ b/vendor/doctrine/lexer/.github/FUNDING.yml @@ -0,0 +1,3 @@ +patreon: phpdoctrine +tidelift: packagist/doctrine%2Flexer +custom: https://www.doctrine-project.org/sponsorship.html diff --git a/vendor/doctrine/lexer/.gitignore b/vendor/doctrine/lexer/.gitignore new file mode 100644 index 00000000..7579f743 --- /dev/null +++ b/vendor/doctrine/lexer/.gitignore @@ -0,0 +1,2 @@ +vendor +composer.lock diff --git a/vendor/doctrine/lexer/LICENSE b/vendor/doctrine/lexer/LICENSE index 5e781fce..e8fdec4a 100644 --- a/vendor/doctrine/lexer/LICENSE +++ b/vendor/doctrine/lexer/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2006-2013 Doctrine Project +Copyright (c) 2006-2018 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/lexer/README.md b/vendor/doctrine/lexer/README.md index 66f44308..3a74c1c3 100644 --- a/vendor/doctrine/lexer/README.md +++ b/vendor/doctrine/lexer/README.md @@ -3,3 +3,5 @@ Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers. This lexer is used in Doctrine Annotations and in Doctrine ORM (DQL). + +https://www.doctrine-project.org/projects/lexer.html diff --git a/vendor/doctrine/lexer/composer.json b/vendor/doctrine/lexer/composer.json index 8cd694c6..6ea83543 100644 --- a/vendor/doctrine/lexer/composer.json +++ b/vendor/doctrine/lexer/composer.json @@ -1,9 +1,15 @@ { "name": "doctrine/lexer", "type": "library", - "description": "Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.", - "keywords": ["lexer", "parser"], - "homepage": "http://www.doctrine-project.org", + "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.", + "keywords": [ + "php", + "parser", + "lexer", + "annotations", + "docblock" + ], + "homepage": "https://www.doctrine-project.org/projects/lexer.html", "license": "MIT", "authors": [ {"name": "Guilherme Blanco", "email": "guilhermeblanco@gmail.com"}, @@ -13,8 +19,14 @@ "require": { "php": ">=5.3.2" }, + "require-dev": { + "phpunit/phpunit": "^4.5" + }, "autoload": { - "psr-0": { "Doctrine\\Common\\Lexer\\": "lib/" } + "psr-4": { "Doctrine\\Common\\Lexer\\": "lib/Doctrine/Common/Lexer" } + }, + "autoload-dev": { + "psr-4": { "Doctrine\\Tests\\": "tests/Doctrine" } }, "extra": { "branch-alias": { diff --git a/vendor/doctrine/lexer/docs/en/dql-parser.rst b/vendor/doctrine/lexer/docs/en/dql-parser.rst new file mode 100644 index 00000000..c7d581da --- /dev/null +++ b/vendor/doctrine/lexer/docs/en/dql-parser.rst @@ -0,0 +1,294 @@ +DQL Lexer +========= + +Here is a more complicated example from the Doctrine ORM project. +The ``Doctrine\ORM\Query\Lexer`` implementation for DQL looks something +like the following: + +.. code-block:: php + + use Doctrine\Common\Lexer\AbstractLexer; + + class Lexer extends AbstractLexer + { + // All tokens that are not valid identifiers must be < 100 + public const T_NONE = 1; + public const T_INTEGER = 2; + public const T_STRING = 3; + public const T_INPUT_PARAMETER = 4; + public const T_FLOAT = 5; + public const T_CLOSE_PARENTHESIS = 6; + public const T_OPEN_PARENTHESIS = 7; + public const T_COMMA = 8; + public const T_DIVIDE = 9; + public const T_DOT = 10; + public const T_EQUALS = 11; + public const T_GREATER_THAN = 12; + public const T_LOWER_THAN = 13; + public const T_MINUS = 14; + public const T_MULTIPLY = 15; + public const T_NEGATE = 16; + public const T_PLUS = 17; + public const T_OPEN_CURLY_BRACE = 18; + public const T_CLOSE_CURLY_BRACE = 19; + + // All tokens that are identifiers or keywords that could be considered as identifiers should be >= 100 + public const T_ALIASED_NAME = 100; + public const T_FULLY_QUALIFIED_NAME = 101; + public const T_IDENTIFIER = 102; + + // All keyword tokens should be >= 200 + public const T_ALL = 200; + public const T_AND = 201; + public const T_ANY = 202; + public const T_AS = 203; + public const T_ASC = 204; + public const T_AVG = 205; + public const T_BETWEEN = 206; + public const T_BOTH = 207; + public const T_BY = 208; + public const T_CASE = 209; + public const T_COALESCE = 210; + public const T_COUNT = 211; + public const T_DELETE = 212; + public const T_DESC = 213; + public const T_DISTINCT = 214; + public const T_ELSE = 215; + public const T_EMPTY = 216; + public const T_END = 217; + public const T_ESCAPE = 218; + public const T_EXISTS = 219; + public const T_FALSE = 220; + public const T_FROM = 221; + public const T_GROUP = 222; + public const T_HAVING = 223; + public const T_HIDDEN = 224; + public const T_IN = 225; + public const T_INDEX = 226; + public const T_INNER = 227; + public const T_INSTANCE = 228; + public const T_IS = 229; + public const T_JOIN = 230; + public const T_LEADING = 231; + public const T_LEFT = 232; + public const T_LIKE = 233; + public const T_MAX = 234; + public const T_MEMBER = 235; + public const T_MIN = 236; + public const T_NEW = 237; + public const T_NOT = 238; + public const T_NULL = 239; + public const T_NULLIF = 240; + public const T_OF = 241; + public const T_OR = 242; + public const T_ORDER = 243; + public const T_OUTER = 244; + public const T_PARTIAL = 245; + public const T_SELECT = 246; + public const T_SET = 247; + public const T_SOME = 248; + public const T_SUM = 249; + public const T_THEN = 250; + public const T_TRAILING = 251; + public const T_TRUE = 252; + public const T_UPDATE = 253; + public const T_WHEN = 254; + public const T_WHERE = 255; + public const T_WITH = 256; + + /** + * Creates a new query scanner object. + * + * @param string $input A query string. + */ + public function __construct($input) + { + $this->setInput($input); + } + + /** + * {@inheritdoc} + */ + protected function getCatchablePatterns() + { + return [ + '[a-z_][a-z0-9_]*\:[a-z_][a-z0-9_]*(?:\\\[a-z_][a-z0-9_]*)*', // aliased name + '[a-z_\\\][a-z0-9_]*(?:\\\[a-z_][a-z0-9_]*)*', // identifier or qualified name + '(?:[0-9]+(?:[\.][0-9]+)*)(?:e[+-]?[0-9]+)?', // numbers + "'(?:[^']|'')*'", // quoted strings + '\?[0-9]*|:[a-z_][a-z0-9_]*', // parameters + ]; + } + + /** + * {@inheritdoc} + */ + protected function getNonCatchablePatterns() + { + return ['\s+', '(.)']; + } + + /** + * {@inheritdoc} + */ + protected function getType(&$value) + { + $type = self::T_NONE; + + switch (true) { + // Recognize numeric values + case (is_numeric($value)): + if (strpos($value, '.') !== false || stripos($value, 'e') !== false) { + return self::T_FLOAT; + } + + return self::T_INTEGER; + + // Recognize quoted strings + case ($value[0] === "'"): + $value = str_replace("''", "'", substr($value, 1, strlen($value) - 2)); + + return self::T_STRING; + + // Recognize identifiers, aliased or qualified names + case (ctype_alpha($value[0]) || $value[0] === '_' || $value[0] === '\\'): + $name = 'Doctrine\ORM\Query\Lexer::T_' . strtoupper($value); + + if (defined($name)) { + $type = constant($name); + + if ($type > 100) { + return $type; + } + } + + if (strpos($value, ':') !== false) { + return self::T_ALIASED_NAME; + } + + if (strpos($value, '\\') !== false) { + return self::T_FULLY_QUALIFIED_NAME; + } + + return self::T_IDENTIFIER; + + // Recognize input parameters + case ($value[0] === '?' || $value[0] === ':'): + return self::T_INPUT_PARAMETER; + + // Recognize symbols + case ($value === '.'): + return self::T_DOT; + case ($value === ','): + return self::T_COMMA; + case ($value === '('): + return self::T_OPEN_PARENTHESIS; + case ($value === ')'): + return self::T_CLOSE_PARENTHESIS; + case ($value === '='): + return self::T_EQUALS; + case ($value === '>'): + return self::T_GREATER_THAN; + case ($value === '<'): + return self::T_LOWER_THAN; + case ($value === '+'): + return self::T_PLUS; + case ($value === '-'): + return self::T_MINUS; + case ($value === '*'): + return self::T_MULTIPLY; + case ($value === '/'): + return self::T_DIVIDE; + case ($value === '!'): + return self::T_NEGATE; + case ($value === '{'): + return self::T_OPEN_CURLY_BRACE; + case ($value === '}'): + return self::T_CLOSE_CURLY_BRACE; + + // Default + default: + // Do nothing + } + + return $type; + } + } + +This is roughly what the DQL Parser looks like that uses the above +Lexer implementation: + +.. note:: + + You can see the full implementation `here `_. + +.. code-block:: php + + class Parser + { + private $lexer; + + public function __construct($dql) + { + $this->lexer = new Lexer(); + $this->lexer->setInput($dql); + } + + // ... + + public function getAST() + { + // Parse & build AST + $AST = $this->QueryLanguage(); + + // ... + + return $AST; + } + + public function QueryLanguage() + { + $this->lexer->moveNext(); + + switch ($this->lexer->lookahead['type']) { + case Lexer::T_SELECT: + $statement = $this->SelectStatement(); + break; + case Lexer::T_UPDATE: + $statement = $this->UpdateStatement(); + break; + case Lexer::T_DELETE: + $statement = $this->DeleteStatement(); + break; + default: + $this->syntaxError('SELECT, UPDATE or DELETE'); + break; + } + + // Check for end of string + if ($this->lexer->lookahead !== null) { + $this->syntaxError('end of string'); + } + + return $statement; + } + + // ... + } + +Now the AST is used to transform the DQL query in to portable SQL for whatever relational +database you are using! + +.. code-block:: php + + $parser = new Parser('SELECT u FROM User u'); + $AST = $parser->getAST(); // returns \Doctrine\ORM\Query\AST\SelectStatement + +What is an AST? +=============== + +AST stands for `Abstract syntax tree `_. +In computer science, an abstract syntax tree (AST), or just syntax tree, is a +tree representation of the abstract syntactic structure of source code written +in a programming language. Each node of the tree denotes a construct occurring in +the source code. diff --git a/vendor/doctrine/lexer/docs/en/index.rst b/vendor/doctrine/lexer/docs/en/index.rst new file mode 100644 index 00000000..2aa985be --- /dev/null +++ b/vendor/doctrine/lexer/docs/en/index.rst @@ -0,0 +1,53 @@ +Introduction +============ + +Doctrine Lexer is a library that can be used in Top-Down, Recursive +Descent Parsers. This lexer is used in Doctrine Annotations and in +Doctrine ORM (DQL). + +To write your own parser you just need to extend ``Doctrine\Common\Lexer\AbstractLexer`` +and implement the following three abstract methods. + +.. code-block:: php + + /** + * Lexical catchable patterns. + * + * @return array + */ + abstract protected function getCatchablePatterns(); + + /** + * Lexical non-catchable patterns. + * + * @return array + */ + abstract protected function getNonCatchablePatterns(); + + /** + * Retrieve token type. Also processes the token value if necessary. + * + * @param string $value + * @return integer + */ + abstract protected function getType(&$value); + +These methods define the `lexical `_ +catchable and non-catchable patterns and a method for returning the +type of a token and filtering the value if necessary. + +The Lexer is responsible for giving you an API to walk across a +string one character at a time and analyze the type of each character, value and position of +each token in the string. The low level API of the lexer is pretty simple: + +- ``setInput($input)`` - Sets the input data to be tokenized. The Lexer is immediately reset and the new input tokenized. +- ``reset()`` - Resets the lexer. +- ``resetPeek()`` - Resets the peek pointer to 0. +- ``resetPosition($position = 0)`` - Resets the lexer position on the input to the given position. +- ``isNextToken($token)`` - Checks whether a given token matches the current lookahead. +- ``isNextTokenAny(array $tokens)`` - Checks whether any of the given tokens matches the current lookahead. +- ``moveNext()`` - Moves to the next token in the input string. +- ``skipUntil($type)`` - Tells the lexer to skip input tokens until it sees a token with the given value. +- ``isA($value, $token)`` - Checks if given value is identical to the given token. +- ``peek()`` - Moves the lookahead token forward. +- ``glimpse()`` - Peeks at the next token, returns it and immediately resets the peek. diff --git a/vendor/doctrine/lexer/docs/en/sidebar.rst b/vendor/doctrine/lexer/docs/en/sidebar.rst new file mode 100644 index 00000000..9b04e244 --- /dev/null +++ b/vendor/doctrine/lexer/docs/en/sidebar.rst @@ -0,0 +1,6 @@ +.. toctree:: + :depth: 3 + + index + simple-parser-example + dql-parser diff --git a/vendor/doctrine/lexer/docs/en/simple-parser-example.rst b/vendor/doctrine/lexer/docs/en/simple-parser-example.rst new file mode 100644 index 00000000..ac142421 --- /dev/null +++ b/vendor/doctrine/lexer/docs/en/simple-parser-example.rst @@ -0,0 +1,102 @@ +Simple Parser Example +===================== + +Extend the ``Doctrine\Common\Lexer\AbstractLexer`` class and implement +the ``getCatchablePatterns``, ``getNonCatchablePatterns``, and ``getType`` +methods. Here is a very simple example lexer implementation named ``CharacterTypeLexer``. +It tokenizes a string to ``T_UPPER``, ``T_LOWER`` and``T_NUMBER`` tokens: + +.. code-block:: php + lexer = $lexer; + } + + public function getUpperCaseCharacters($string) + { + $this->lexer->setInput($string); + $this->lexer->moveNext(); + + $upperCaseChars = array(); + while (true) { + if (!$this->lexer->lookahead) { + break; + } + + $this->lexer->moveNext(); + + if ($this->lexer->token['type'] === CharacterTypeLexer::T_UPPER) { + $upperCaseChars[] = $this->lexer->token['value']; + } + } + + return $upperCaseChars; + } + } + + $upperCaseCharacterExtractor = new UpperCaseCharacterExtracter(new CharacterTypeLexer()); + $upperCaseCharacters = $upperCaseCharacterExtractor->getUpperCaseCharacters('1aBcdEfgHiJ12'); + + print_r($upperCaseCharacters); + +The variable ``$upperCaseCharacters`` contains all of the upper case +characters: + +.. code-block:: php + Array + ( + [0] => B + [1] => E + [2] => H + [3] => J + ) + +This is a simple example but it should demonstrate the low level API +that can be used to build more complex parsers. diff --git a/vendor/doctrine/lexer/lib/Doctrine/Common/Lexer/AbstractLexer.php b/vendor/doctrine/lexer/lib/Doctrine/Common/Lexer/AbstractLexer.php index 399a5523..317ff69d 100644 --- a/vendor/doctrine/lexer/lib/Doctrine/Common/Lexer/AbstractLexer.php +++ b/vendor/doctrine/lexer/lib/Doctrine/Common/Lexer/AbstractLexer.php @@ -132,7 +132,7 @@ abstract class AbstractLexer } /** - * Retrieve the original lexer's input until a given position. + * Retrieve the original lexer's input until a given position. * * @param integer $position * @@ -258,6 +258,11 @@ abstract class AbstractLexer $flags = PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_OFFSET_CAPTURE; $matches = preg_split($regex, $input, -1, $flags); + if (false === $matches) { + // Work around https://bugs.php.net/78122 + $matches = array(array($input, 0)); + } + foreach ($matches as $match) { // Must remain before 'value' assignment since it can change content $type = $this->getType($match[0]); diff --git a/vendor/doctrine/lexer/phpunit.xml.dist b/vendor/doctrine/lexer/phpunit.xml.dist new file mode 100644 index 00000000..d0a18466 --- /dev/null +++ b/vendor/doctrine/lexer/phpunit.xml.dist @@ -0,0 +1,26 @@ + + + + + + + + + + + tests + + + + + + lib/Doctrine + + + diff --git a/vendor/doctrine/lexer/tests/Doctrine/Common/Lexer/AbstractLexerTest.php b/vendor/doctrine/lexer/tests/Doctrine/Common/Lexer/AbstractLexerTest.php new file mode 100644 index 00000000..8a2a4e49 --- /dev/null +++ b/vendor/doctrine/lexer/tests/Doctrine/Common/Lexer/AbstractLexerTest.php @@ -0,0 +1,268 @@ +concreteLexer = new ConcreteLexer(); + } + + public function dataProvider() + { + return array( + array( + 'price=10', + array( + array( + 'value' => 'price', + 'type' => 'string', + 'position' => 0, + ), + array( + 'value' => '=', + 'type' => 'operator', + 'position' => 5, + ), + array( + 'value' => 10, + 'type' => 'int', + 'position' => 6, + ), + ), + ), + ); + } + + public function testResetPeek() + { + $expectedTokens = array( + array( + 'value' => 'price', + 'type' => 'string', + 'position' => 0, + ), + array( + 'value' => '=', + 'type' => 'operator', + 'position' => 5, + ), + array( + 'value' => 10, + 'type' => 'int', + 'position' => 6, + ), + ); + + $this->concreteLexer->setInput('price=10'); + + $this->assertEquals($expectedTokens[0], $this->concreteLexer->peek()); + $this->assertEquals($expectedTokens[1], $this->concreteLexer->peek()); + $this->concreteLexer->resetPeek(); + $this->assertEquals($expectedTokens[0], $this->concreteLexer->peek()); + } + + public function testResetPosition() + { + $expectedTokens = array( + array( + 'value' => 'price', + 'type' => 'string', + 'position' => 0, + ), + array( + 'value' => '=', + 'type' => 'operator', + 'position' => 5, + ), + array( + 'value' => 10, + 'type' => 'int', + 'position' => 6, + ), + ); + + $this->concreteLexer->setInput('price=10'); + $this->assertNull($this->concreteLexer->lookahead); + + $this->assertTrue($this->concreteLexer->moveNext()); + $this->assertEquals($expectedTokens[0], $this->concreteLexer->lookahead); + + $this->assertTrue($this->concreteLexer->moveNext()); + $this->assertEquals($expectedTokens[1], $this->concreteLexer->lookahead); + + $this->concreteLexer->resetPosition(0); + + $this->assertTrue($this->concreteLexer->moveNext()); + $this->assertEquals($expectedTokens[0], $this->concreteLexer->lookahead); + } + + /** + * @dataProvider dataProvider + * + * @param $input + * @param $expectedTokens + */ + public function testMoveNext($input, $expectedTokens) + { + $this->concreteLexer->setInput($input); + $this->assertNull($this->concreteLexer->lookahead); + + for ($i = 0; $i < count($expectedTokens); $i++) { + $this->assertTrue($this->concreteLexer->moveNext()); + $this->assertEquals($expectedTokens[$i], $this->concreteLexer->lookahead); + } + + $this->assertFalse($this->concreteLexer->moveNext()); + $this->assertNull($this->concreteLexer->lookahead); + } + + public function testSkipUntil() + { + $this->concreteLexer->setInput('price=10'); + + $this->assertTrue($this->concreteLexer->moveNext()); + $this->concreteLexer->skipUntil('operator'); + + $this->assertEquals( + array( + 'value' => '=', + 'type' => 'operator', + 'position' => 5, + ), + $this->concreteLexer->lookahead + ); + } + + public function testUtf8Mismatch() + { + $this->concreteLexer->setInput("\xE9=10"); + + $this->assertTrue($this->concreteLexer->moveNext()); + + $this->assertEquals( + array( + 'value' => "\xE9=10", + 'type' => 'string', + 'position' => 0, + ), + $this->concreteLexer->lookahead + ); + } + + /** + * @dataProvider dataProvider + * + * @param $input + * @param $expectedTokens + */ + public function testPeek($input, $expectedTokens) + { + $this->concreteLexer->setInput($input); + foreach ($expectedTokens as $expectedToken) { + $this->assertEquals($expectedToken, $this->concreteLexer->peek()); + } + + $this->assertNull($this->concreteLexer->peek()); + } + + /** + * @dataProvider dataProvider + * + * @param $input + * @param $expectedTokens + */ + public function testGlimpse($input, $expectedTokens) + { + $this->concreteLexer->setInput($input); + + foreach ($expectedTokens as $expectedToken) { + $this->assertEquals($expectedToken, $this->concreteLexer->glimpse()); + $this->concreteLexer->moveNext(); + } + + $this->assertNull($this->concreteLexer->peek()); + } + + public function inputUntilPositionDataProvider() + { + return array( + array('price=10', 5, 'price'), + ); + } + + /** + * @dataProvider inputUntilPositionDataProvider + * + * @param $input + * @param $position + * @param $expectedInput + */ + public function testGetInputUntilPosition($input, $position, $expectedInput) + { + $this->concreteLexer->setInput($input); + + $this->assertSame($expectedInput, $this->concreteLexer->getInputUntilPosition($position)); + } + + /** + * @dataProvider dataProvider + * + * @param $input + * @param $expectedTokens + */ + public function testIsNextToken($input, $expectedTokens) + { + $this->concreteLexer->setInput($input); + + $this->concreteLexer->moveNext(); + for ($i = 0; $i < count($expectedTokens); $i++) { + $this->assertTrue($this->concreteLexer->isNextToken($expectedTokens[$i]['type'])); + $this->concreteLexer->moveNext(); + } + } + + /** + * @dataProvider dataProvider + * + * @param $input + * @param $expectedTokens + */ + public function testIsNextTokenAny($input, $expectedTokens) + { + $allTokenTypes = array_map(function ($token) { + return $token['type']; + }, $expectedTokens); + + $this->concreteLexer->setInput($input); + + $this->concreteLexer->moveNext(); + for ($i = 0; $i < count($expectedTokens); $i++) { + $this->assertTrue($this->concreteLexer->isNextTokenAny(array($expectedTokens[$i]['type']))); + $this->assertTrue($this->concreteLexer->isNextTokenAny($allTokenTypes)); + $this->concreteLexer->moveNext(); + } + } + + public function testGetLiteral() + { + $this->assertSame('Doctrine\Tests\Common\Lexer\ConcreteLexer::INT', $this->concreteLexer->getLiteral('int')); + $this->assertSame('fake_token', $this->concreteLexer->getLiteral('fake_token')); + } + + public function testIsA() + { + $this->assertTrue($this->concreteLexer->isA(11, 'int')); + $this->assertTrue($this->concreteLexer->isA(1.1, 'int')); + $this->assertTrue($this->concreteLexer->isA('=', 'operator')); + $this->assertTrue($this->concreteLexer->isA('>', 'operator')); + $this->assertTrue($this->concreteLexer->isA('<', 'operator')); + $this->assertTrue($this->concreteLexer->isA('fake_text', 'string')); + } +} diff --git a/vendor/doctrine/lexer/tests/Doctrine/Common/Lexer/ConcreteLexer.php b/vendor/doctrine/lexer/tests/Doctrine/Common/Lexer/ConcreteLexer.php new file mode 100644 index 00000000..ed4d153d --- /dev/null +++ b/vendor/doctrine/lexer/tests/Doctrine/Common/Lexer/ConcreteLexer.php @@ -0,0 +1,49 @@ +', + '[a-z]+', + '\d+', + ); + } + + protected function getNonCatchablePatterns() + { + return array( + '\s+', + '(.)', + ); + } + + protected function getType(&$value) + { + if (is_numeric($value)) { + $value = (int)$value; + + return 'int'; + } + if (in_array($value, array('=', '<', '>'))) { + return 'operator'; + } + if (is_string($value)) { + return 'string'; + } + + return; + } + + protected function getModifiers() + { + return parent::getModifiers().'u'; + } +} diff --git a/vendor/dragonmantank/cron-expression/CHANGELOG.md b/vendor/dragonmantank/cron-expression/CHANGELOG.md index 8cb3a084..e3939df5 100644 --- a/vendor/dragonmantank/cron-expression/CHANGELOG.md +++ b/vendor/dragonmantank/cron-expression/CHANGELOG.md @@ -1,5 +1,15 @@ # Change Log +## [2.3.0] - 2019-03-30 +### Added +- Added support for DateTimeImmutable via DateTimeInterface +- Added support for PHP 7.3 +- Started listing projects that use the library +### Changed +- Errors should now report a human readable position in the cron expression, instead of starting at 0 +### Fixed +- N/A + ## [2.2.0] - 2018-06-05 ### Added - Added support for steps larger than field ranges (#6) diff --git a/vendor/dragonmantank/cron-expression/README.md b/vendor/dragonmantank/cron-expression/README.md index 67992c7d..8e8021b2 100644 --- a/vendor/dragonmantank/cron-expression/README.md +++ b/vendor/dragonmantank/cron-expression/README.md @@ -6,11 +6,11 @@ PHP Cron Expression Parser The PHP cron expression parser can parse a CRON expression, determine if it is due to run, calculate the next run date of the expression, and calculate the previous run date of the expression. You can calculate dates far into the future or past by -skipping n number of matching dates. +skipping **n** number of matching dates. The parser can handle increments of ranges (e.g. */12, 2-59/3), intervals (e.g. 0-9), -lists (e.g. 1,2,3), W to find the nearest weekday for a given day of the month, L to -find the last day of the month, L to find the last given weekday of a month, and hash +lists (e.g. 1,2,3), **W** to find the nearest weekday for a given day of the month, **L** to +find the last day of the month, **L** to find the last given weekday of a month, and hash (#) to find the nth weekday of a given month. More information about this fork can be found in the blog post [here](http://ctankersley.com/2017/10/12/cron-expression-update/). tl;dr - v2.0.0 is a major breaking change, and @dragonmantank can better take care of the project in a separate fork. @@ -71,3 +71,8 @@ Requirements - PHP 7.0+ - PHPUnit is required to run the unit tests - Composer is required to run the unit tests + +Projects that Use cron-expression +================================= +* Part of the [Laravel Framework](https://github.com/laravel/framework/) +* Available as a [Symfony Bundle - setono/cron-expression-bundle](https://github.com/Setono/CronExpressionBundle) \ No newline at end of file diff --git a/vendor/dragonmantank/cron-expression/composer.json b/vendor/dragonmantank/cron-expression/composer.json index d9997ead..c0b7903f 100644 --- a/vendor/dragonmantank/cron-expression/composer.json +++ b/vendor/dragonmantank/cron-expression/composer.json @@ -17,10 +17,10 @@ } ], "require": { - "php": ">=7.0.0" + "php": "^7.0" }, "require-dev": { - "phpunit/phpunit": "~6.4" + "phpunit/phpunit": "^6.4|^7.0" }, "autoload": { "psr-4": { @@ -31,5 +31,10 @@ "psr-4": { "Tests\\": "tests/Cron/" } + }, + "extra": { + "branch-alias": { + "dev-master": "2.3-dev" + } } } diff --git a/vendor/dragonmantank/cron-expression/src/Cron/AbstractField.php b/vendor/dragonmantank/cron-expression/src/Cron/AbstractField.php index 262ab63c..8b1072ab 100644 --- a/vendor/dragonmantank/cron-expression/src/Cron/AbstractField.php +++ b/vendor/dragonmantank/cron-expression/src/Cron/AbstractField.php @@ -31,7 +31,9 @@ abstract class AbstractField implements FieldInterface */ protected $rangeEnd; - + /** + * Constructor + */ public function __construct() { $this->fullRange = range($this->rangeStart, $this->rangeEnd); @@ -204,12 +206,18 @@ abstract class AbstractField implements FieldInterface return $values; } + /** + * Convert literal + * + * @param string $value + * @return string + */ protected function convertLiterals($value) { if (count($this->literals)) { $key = array_search($value, $this->literals); if ($key !== false) { - return $key; + return (string) $key; } } diff --git a/vendor/dragonmantank/cron-expression/src/Cron/CronExpression.php b/vendor/dragonmantank/cron-expression/src/Cron/CronExpression.php index b7ba7da0..594b4358 100644 --- a/vendor/dragonmantank/cron-expression/src/Cron/CronExpression.php +++ b/vendor/dragonmantank/cron-expression/src/Cron/CronExpression.php @@ -4,6 +4,7 @@ namespace Cron; use DateTime; use DateTimeImmutable; +use DateTimeInterface; use DateTimeZone; use Exception; use InvalidArgumentException; @@ -62,7 +63,7 @@ class CronExpression * `@weekly` - Run once a week, midnight on Sun - 0 0 * * 0 * `@daily` - Run once a day, midnight - 0 0 * * * * `@hourly` - Run once an hour, first minute - 0 * * * * - * @param FieldFactory $fieldFactory Field factory to use + * @param FieldFactory|null $fieldFactory Field factory to use * * @return CronExpression */ @@ -107,9 +108,9 @@ class CronExpression * Parse a CRON expression * * @param string $expression CRON expression (e.g. '8 * * * *') - * @param FieldFactory $fieldFactory Factory to create cron fields + * @param FieldFactory|null $fieldFactory Factory to create cron fields */ - public function __construct($expression, FieldFactory $fieldFactory) + public function __construct($expression, FieldFactory $fieldFactory = null) { $this->fieldFactory = $fieldFactory; $this->setExpression($expression); @@ -178,16 +179,17 @@ class CronExpression /** * Get a next run date relative to the current date or a specific date * - * @param string|\DateTime $currentTime Relative calculation date - * @param int $nth Number of matches to skip before returning a - * matching next run date. 0, the default, will return the current - * date and time if the next run date falls on the current date and - * time. Setting this value to 1 will skip the first match and go to - * the second match. Setting this value to 2 will skip the first 2 - * matches and so on. - * @param bool $allowCurrentDate Set to TRUE to return the current date if - * it matches the cron expression. - * @param null|string $timeZone TimeZone to use instead of the system default + * @param string|\DateTimeInterface $currentTime Relative calculation date + * @param int $nth Number of matches to skip before returning a + * matching next run date. 0, the default, will return the + * current date and time if the next run date falls on the + * current date and time. Setting this value to 1 will + * skip the first match and go to the second match. + * Setting this value to 2 will skip the first 2 + * matches and so on. + * @param bool $allowCurrentDate Set to TRUE to return the current date if + * it matches the cron expression. + * @param null|string $timeZone TimeZone to use instead of the system default * * @return \DateTime * @throws \RuntimeException on too many iterations @@ -200,11 +202,11 @@ class CronExpression /** * Get a previous run date relative to the current date or a specific date * - * @param string|\DateTime $currentTime Relative calculation date - * @param int $nth Number of matches to skip before returning - * @param bool $allowCurrentDate Set to TRUE to return the - * current date if it matches the cron expression - * @param null|string $timeZone TimeZone to use instead of the system default + * @param string|\DateTimeInterface $currentTime Relative calculation date + * @param int $nth Number of matches to skip before returning + * @param bool $allowCurrentDate Set to TRUE to return the + * current date if it matches the cron expression + * @param null|string $timeZone TimeZone to use instead of the system default * * @return \DateTime * @throws \RuntimeException on too many iterations @@ -218,14 +220,14 @@ class CronExpression /** * Get multiple run dates starting at the current date or a specific date * - * @param int $total Set the total number of dates to calculate - * @param string|\DateTime $currentTime Relative calculation date - * @param bool $invert Set to TRUE to retrieve previous dates - * @param bool $allowCurrentDate Set to TRUE to return the - * current date if it matches the cron expression - * @param null|string $timeZone TimeZone to use instead of the system default + * @param int $total Set the total number of dates to calculate + * @param string|\DateTimeInterface $currentTime Relative calculation date + * @param bool $invert Set to TRUE to retrieve previous dates + * @param bool $allowCurrentDate Set to TRUE to return the + * current date if it matches the cron expression + * @param null|string $timeZone TimeZone to use instead of the system default * - * @return array Returns an array of run dates + * @return \DateTime[] Returns an array of run dates */ public function getMultipleRunDates($total, $currentTime = 'now', $invert = false, $allowCurrentDate = false, $timeZone = null) { @@ -276,8 +278,8 @@ class CronExpression * specific date. This method assumes that the current number of * seconds are irrelevant, and should be called once per minute. * - * @param string|\DateTime $currentTime Relative calculation date - * @param null|string $timeZone TimeZone to use instead of the system default + * @param string|\DateTimeInterface $currentTime Relative calculation date + * @param null|string $timeZone TimeZone to use instead of the system default * * @return bool Returns TRUE if the cron is due to run or FALSE if not */ @@ -309,12 +311,12 @@ class CronExpression /** * Get the next or previous run date of the expression relative to a date * - * @param string|\DateTime $currentTime Relative calculation date - * @param int $nth Number of matches to skip before returning - * @param bool $invert Set to TRUE to go backwards in time - * @param bool $allowCurrentDate Set to TRUE to return the - * current date if it matches the cron expression - * @param string|null $timeZone TimeZone to use instead of the system default + * @param string|\DateTimeInterface $currentTime Relative calculation date + * @param int $nth Number of matches to skip before returning + * @param bool $invert Set to TRUE to go backwards in time + * @param bool $allowCurrentDate Set to TRUE to return the + * current date if it matches the cron expression + * @param string|null $timeZone TimeZone to use instead of the system default * * @return \DateTime * @throws \RuntimeException on too many iterations @@ -391,8 +393,8 @@ class CronExpression /** * Workout what timeZone should be used. * - * @param string|\DateTime $currentTime Relative calculation date - * @param string|null $timeZone TimeZone to use instead of the system default + * @param string|\DateTimeInterface $currentTime Relative calculation date + * @param string|null $timeZone TimeZone to use instead of the system default * * @return string */ @@ -402,7 +404,7 @@ class CronExpression return $timeZone; } - if ($currentTime instanceOf Datetime) { + if ($currentTime instanceOf DateTimeInterface) { return $currentTime->getTimeZone()->getName(); } diff --git a/vendor/dragonmantank/cron-expression/src/Cron/DayOfMonthField.php b/vendor/dragonmantank/cron-expression/src/Cron/DayOfMonthField.php index abf59690..d4552e06 100644 --- a/vendor/dragonmantank/cron-expression/src/Cron/DayOfMonthField.php +++ b/vendor/dragonmantank/cron-expression/src/Cron/DayOfMonthField.php @@ -3,6 +3,7 @@ namespace Cron; use DateTime; +use DateTimeInterface; /** * Day of month field. Allows: * , / - ? L W @@ -24,7 +25,14 @@ use DateTime; */ class DayOfMonthField extends AbstractField { + /** + * @inheritDoc + */ protected $rangeStart = 1; + + /** + * @inheritDoc + */ protected $rangeEnd = 31; /** @@ -59,7 +67,10 @@ class DayOfMonthField extends AbstractField } } - public function isSatisfiedBy(DateTime $date, $value) + /** + * @inheritDoc + */ + public function isSatisfiedBy(DateTimeInterface $date, $value) { // ? states that the field value is to be skipped if ($value == '?') { @@ -88,14 +99,17 @@ class DayOfMonthField extends AbstractField return $this->isSatisfied($date->format('d'), $value); } - public function increment(DateTime $date, $invert = false) + /** + * @inheritDoc + * + * @param \DateTime|\DateTimeImmutable &$date + */ + public function increment(DateTimeInterface &$date, $invert = false) { if ($invert) { - $date->modify('previous day'); - $date->setTime(23, 59); + $date = $date->modify('previous day')->setTime(23, 59); } else { - $date->modify('next day'); - $date->setTime(0, 0); + $date = $date->modify('next day')->setTime(0, 0); } return $this; diff --git a/vendor/dragonmantank/cron-expression/src/Cron/DayOfWeekField.php b/vendor/dragonmantank/cron-expression/src/Cron/DayOfWeekField.php index e1780134..9db9e956 100644 --- a/vendor/dragonmantank/cron-expression/src/Cron/DayOfWeekField.php +++ b/vendor/dragonmantank/cron-expression/src/Cron/DayOfWeekField.php @@ -3,9 +3,9 @@ namespace Cron; use DateTime; +use DateTimeInterface; use InvalidArgumentException; - /** * Day of week field. Allows: * / , - ? L # * @@ -21,20 +21,41 @@ use InvalidArgumentException; */ class DayOfWeekField extends AbstractField { + /** + * @inheritDoc + */ protected $rangeStart = 0; + + /** + * @inheritDoc + */ protected $rangeEnd = 7; + /** + * @var array Weekday range + */ protected $nthRange; + /** + * @inheritDoc + */ protected $literals = [1 => 'MON', 2 => 'TUE', 3 => 'WED', 4 => 'THU', 5 => 'FRI', 6 => 'SAT', 7 => 'SUN']; + /** + * Constructor + */ public function __construct() { $this->nthRange = range(1, 5); parent::__construct(); } - public function isSatisfiedBy(DateTime $date, $value) + /** + * @inheritDoc + * + * @param \DateTime|\DateTimeImmutable $date + */ + public function isSatisfiedBy(DateTimeInterface $date, $value) { if ($value == '?') { return true; @@ -49,9 +70,11 @@ class DayOfWeekField extends AbstractField // Find out if this is the last specific weekday of the month if (strpos($value, 'L')) { - $weekday = str_replace('7', '0', substr($value, 0, strpos($value, 'L'))); + $weekday = $this->convertLiterals(substr($value, 0, strpos($value, 'L'))); + $weekday = str_replace('7', '0', $weekday); + $tdate = clone $date; - $tdate->setDate($currentYear, $currentMonth, $lastDayOfMonth); + $tdate = $tdate->setDate($currentYear, $currentMonth, $lastDayOfMonth); while ($tdate->format('w') != $weekday) { $tdateClone = new DateTime(); $tdate = $tdateClone @@ -94,7 +117,7 @@ class DayOfWeekField extends AbstractField } $tdate = clone $date; - $tdate->setDate($currentYear, $currentMonth, 1); + $tdate = $tdate->setDate($currentYear, $currentMonth, 1); $dayCount = 0; $currentDay = 1; while ($currentDay < $lastDayOfMonth + 1) { @@ -103,7 +126,7 @@ class DayOfWeekField extends AbstractField break; } } - $tdate->setDate($currentYear, $currentMonth, ++$currentDay); + $tdate = $tdate->setDate($currentYear, $currentMonth, ++$currentDay); } return $date->format('j') == $currentDay; @@ -127,14 +150,17 @@ class DayOfWeekField extends AbstractField return $this->isSatisfied($fieldValue, $value); } - public function increment(DateTime $date, $invert = false) + /** + * @inheritDoc + * + * @param \DateTime|\DateTimeImmutable &$date + */ + public function increment(DateTimeInterface &$date, $invert = false) { if ($invert) { - $date->modify('-1 day'); - $date->setTime(23, 59, 0); + $date = $date->modify('-1 day')->setTime(23, 59, 0); } else { - $date->modify('+1 day'); - $date->setTime(0, 0, 0); + $date = $date->modify('+1 day')->setTime(0, 0, 0); } return $this; diff --git a/vendor/dragonmantank/cron-expression/src/Cron/FieldFactory.php b/vendor/dragonmantank/cron-expression/src/Cron/FieldFactory.php index fd27352d..545e4b83 100644 --- a/vendor/dragonmantank/cron-expression/src/Cron/FieldFactory.php +++ b/vendor/dragonmantank/cron-expression/src/Cron/FieldFactory.php @@ -44,7 +44,7 @@ class FieldFactory break; default: throw new InvalidArgumentException( - $position . ' is not a valid position' + ($position + 1) . ' is not a valid position' ); } } diff --git a/vendor/dragonmantank/cron-expression/src/Cron/FieldInterface.php b/vendor/dragonmantank/cron-expression/src/Cron/FieldInterface.php index be37b938..f8366eae 100644 --- a/vendor/dragonmantank/cron-expression/src/Cron/FieldInterface.php +++ b/vendor/dragonmantank/cron-expression/src/Cron/FieldInterface.php @@ -1,7 +1,8 @@ isSatisfied($date->format('H'), $value); } - public function increment(DateTime $date, $invert = false, $parts = null) + /** + * {@inheritDoc} + * + * @param \DateTime|\DateTimeImmutable &$date + * @param string|null $parts + */ + public function increment(DateTimeInterface &$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. 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 = $date->setTimezone(new DateTimeZone('UTC')); + $date = $date->modify(($invert ? '-' : '+') . '1 hour'); + $date = $date->setTimezone($timezone); - $date->setTime($date->format('H'), $invert ? 59 : 0); + $date = $date->setTime($date->format('H'), $invert ? 59 : 0); return $this; } @@ -57,11 +73,11 @@ class HoursField extends AbstractField $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); + $date = $date->modify(($invert ? '-' : '+') . '1 day'); + $date = $date->setTime($invert ? 23 : 0, $invert ? 59 : 0); } else { - $date->setTime($hour, $invert ? 59 : 0); + $date = $date->setTime($hour, $invert ? 59 : 0); } return $this; diff --git a/vendor/dragonmantank/cron-expression/src/Cron/MinutesField.php b/vendor/dragonmantank/cron-expression/src/Cron/MinutesField.php index 59bb386f..fecc9b6d 100644 --- a/vendor/dragonmantank/cron-expression/src/Cron/MinutesField.php +++ b/vendor/dragonmantank/cron-expression/src/Cron/MinutesField.php @@ -2,30 +2,45 @@ namespace Cron; -use DateTime; - +use DateTimeInterface; /** * Minutes field. Allows: * , / - */ class MinutesField extends AbstractField { + /** + * @inheritDoc + */ protected $rangeStart = 0; + + /** + * @inheritDoc + */ protected $rangeEnd = 59; - public function isSatisfiedBy(DateTime $date, $value) + /** + * @inheritDoc + */ + public function isSatisfiedBy(DateTimeInterface $date, $value) { + if ($value == '?') { + return true; + } + return $this->isSatisfied($date->format('i'), $value); } - public function increment(DateTime $date, $invert = false, $parts = null) + /** + * {@inheritDoc} + * + * @param \DateTime|\DateTimeImmutable &$date + * @param string|null $parts + */ + public function increment(DateTimeInterface &$date, $invert = false, $parts = null) { if (is_null($parts)) { - if ($invert) { - $date->modify('-1 minute'); - } else { - $date->modify('+1 minute'); - } + $date = $date->modify(($invert ? '-' : '+') . '1 minute'); return $this; } @@ -48,11 +63,11 @@ class MinutesField extends AbstractField } if ((!$invert && $current_minute >= $minutes[$position]) || ($invert && $current_minute <= $minutes[$position])) { - $date->modify(($invert ? '-' : '+') . '1 hour'); - $date->setTime($date->format('H'), $invert ? 59 : 0); + $date = $date->modify(($invert ? '-' : '+') . '1 hour'); + $date = $date->setTime($date->format('H'), $invert ? 59 : 0); } else { - $date->setTime($date->format('H'), $minutes[$position]); + $date = $date->setTime($date->format('H'), $minutes[$position]); } return $this; diff --git a/vendor/dragonmantank/cron-expression/src/Cron/MonthField.php b/vendor/dragonmantank/cron-expression/src/Cron/MonthField.php index 79fdf3cf..afc9caff 100644 --- a/vendor/dragonmantank/cron-expression/src/Cron/MonthField.php +++ b/vendor/dragonmantank/cron-expression/src/Cron/MonthField.php @@ -2,33 +2,54 @@ namespace Cron; -use DateTime; +use DateTimeInterface; /** * Month field. Allows: * , / - */ class MonthField extends AbstractField { + /** + * @inheritDoc + */ protected $rangeStart = 1; + + /** + * @inheritDoc + */ protected $rangeEnd = 12; + + /** + * @inheritDoc + */ protected $literals = [1 => 'JAN', 2 => 'FEB', 3 => 'MAR', 4 => 'APR', 5 => 'MAY', 6 => 'JUN', 7 => 'JUL', 8 => 'AUG', 9 => 'SEP', 10 => 'OCT', 11 => 'NOV', 12 => 'DEC']; - public function isSatisfiedBy(DateTime $date, $value) + /** + * @inheritDoc + */ + public function isSatisfiedBy(DateTimeInterface $date, $value) { + if ($value == '?') { + return true; + } + $value = $this->convertLiterals($value); return $this->isSatisfied($date->format('m'), $value); } - public function increment(DateTime $date, $invert = false) + /** + * @inheritDoc + * + * @param \DateTime|\DateTimeImmutable &$date + */ + public function increment(DateTimeInterface &$date, $invert = false) { if ($invert) { - $date->modify('last day of previous month'); - $date->setTime(23, 59); + $date = $date->modify('last day of previous month')->setTime(23, 59); } else { - $date->modify('first day of next month'); - $date->setTime(0, 0); + $date = $date->modify('first day of next month')->setTime(0, 0); } return $this; diff --git a/vendor/dragonmantank/cron-expression/tests/Cron/CronExpressionTest.php b/vendor/dragonmantank/cron-expression/tests/Cron/CronExpressionTest.php index 5d46644b..9b82ae5b 100644 --- a/vendor/dragonmantank/cron-expression/tests/Cron/CronExpressionTest.php +++ b/vendor/dragonmantank/cron-expression/tests/Cron/CronExpressionTest.php @@ -5,6 +5,7 @@ namespace Cron\Tests; use Cron\CronExpression; use Cron\MonthField; use DateTime; +use DateTimeImmutable; use DateTimeZone; use InvalidArgumentException; use PHPUnit\Framework\TestCase; @@ -228,6 +229,7 @@ class CronExpressionTest extends TestCase $this->assertTrue($cron->isDue('now')); $this->assertTrue($cron->isDue(new DateTime('now'))); $this->assertTrue($cron->isDue(date('Y-m-d H:i'))); + $this->assertTrue($cron->isDue(new DateTimeImmutable('now'))); } /** @@ -407,6 +409,18 @@ class CronExpressionTest extends TestCase $this->assertEquals($nextRun, new DateTime("2008-11-30 00:00:00")); } + /** + * @covers \Cron\CronExpression::getRunDate + */ + public function testGetRunDateHandlesDifferentDates() + { + $cron = CronExpression::factory('@weekly'); + $date = new DateTime("2019-03-10 00:00:00"); + $this->assertEquals($date, $cron->getNextRunDate("2019-03-03 08:00:00")); + $this->assertEquals($date, $cron->getNextRunDate(new DateTime("2019-03-03 08:00:00"))); + $this->assertEquals($date, $cron->getNextRunDate(new DateTimeImmutable("2019-03-03 08:00:00"))); + } + /** * @covers \Cron\CronExpression::getRunDate */ @@ -557,4 +571,16 @@ class CronExpressionTest extends TestCase $nextRunDate = $e->getNextRunDate(new DateTime('2014-05-07 00:00:00')); $this->assertSame('2015-04-01 00:00:00', $nextRunDate->format('Y-m-d H:i:s')); } + + /** + * When there is an issue with a field, we should report the human readable position + * + * @see https://github.com/dragonmantank/cron-expression/issues/29 + */ + public function testFieldPositionIsHumanAdjusted() + { + $this->expectException(InvalidArgumentException::class); + $this->expectExceptionMessage("6 is not a valid position"); + $e = CronExpression::factory('0 * * * * ? *'); + } } diff --git a/vendor/dragonmantank/cron-expression/tests/Cron/DayOfMonthFieldTest.php b/vendor/dragonmantank/cron-expression/tests/Cron/DayOfMonthFieldTest.php index 0dae4ed6..2191b6bf 100644 --- a/vendor/dragonmantank/cron-expression/tests/Cron/DayOfMonthFieldTest.php +++ b/vendor/dragonmantank/cron-expression/tests/Cron/DayOfMonthFieldTest.php @@ -4,6 +4,7 @@ namespace Cron\Tests; use Cron\DayOfMonthField; use DateTime; +use DateTimeImmutable; use PHPUnit\Framework\TestCase; /** @@ -33,6 +34,7 @@ class DayOfMonthFieldTest extends TestCase { $f = new DayOfMonthField(); $this->assertTrue($f->isSatisfiedBy(new DateTime(), '?')); + $this->assertTrue($f->isSatisfiedBy(new DateTimeImmutable(), '?')); } /** @@ -50,6 +52,17 @@ class DayOfMonthFieldTest extends TestCase $this->assertSame('2011-03-14 23:59:00', $d->format('Y-m-d H:i:s')); } + /** + * @covers \Cron\DayOfMonthField::increment + */ + public function testIncrementsDateTimeImmutable() + { + $d = new DateTimeImmutable('2011-03-15 11:15:00'); + $f = new DayOfMonthField(); + $f->increment($d); + $this->assertSame('2011-03-16 00:00:00', $d->format('Y-m-d H:i:s')); + } + /** * Day of the month cannot accept a 0 value, it must be between 1 and 31 * See Github issue #120 diff --git a/vendor/dragonmantank/cron-expression/tests/Cron/DayOfWeekFieldTest.php b/vendor/dragonmantank/cron-expression/tests/Cron/DayOfWeekFieldTest.php index d27c34df..ef89b47f 100644 --- a/vendor/dragonmantank/cron-expression/tests/Cron/DayOfWeekFieldTest.php +++ b/vendor/dragonmantank/cron-expression/tests/Cron/DayOfWeekFieldTest.php @@ -4,6 +4,7 @@ namespace Cron\Tests; use Cron\DayOfWeekField; use DateTime; +use DateTimeImmutable; use PHPUnit\Framework\TestCase; /** @@ -33,6 +34,7 @@ class DayOfWeekFieldTest extends TestCase { $f = new DayOfWeekField(); $this->assertTrue($f->isSatisfiedBy(new DateTime(), '?')); + $this->assertTrue($f->isSatisfiedBy(new DateTimeImmutable(), '?')); } /** @@ -50,6 +52,17 @@ class DayOfWeekFieldTest extends TestCase $this->assertSame('2011-03-14 23:59:00', $d->format('Y-m-d H:i:s')); } + /** + * @covers \Cron\DayOfWeekField::increment + */ + public function testIncrementsDateTimeImmutable() + { + $d = new DateTimeImmutable('2011-03-15 11:15:00'); + $f = new DayOfWeekField(); + $f->increment($d); + $this->assertSame('2011-03-16 00:00:00', $d->format('Y-m-d H:i:s')); + } + /** * @covers \Cron\DayOfWeekField::isSatisfiedBy * @expectedException InvalidArgumentException @@ -103,6 +116,18 @@ class DayOfWeekFieldTest extends TestCase $this->assertTrue($f->isSatisfiedBy(new DateTime('2014-04-20 00:00:00'), '7#3')); } + /** + * @covers \Cron\DayOfWeekField::isSatisfiedBy + */ + public function testHandlesLastWeekdayOfTheMonth() + { + $f = new DayOfWeekField(); + $this->assertTrue($f->isSatisfiedBy(new DateTime('2018-12-28 00:00:00'), 'FRIL')); + $this->assertTrue($f->isSatisfiedBy(new DateTime('2018-12-28 00:00:00'), '5L')); + $this->assertFalse($f->isSatisfiedBy(new DateTime('2018-12-21 00:00:00'), 'FRIL')); + $this->assertFalse($f->isSatisfiedBy(new DateTime('2018-12-21 00:00:00'), '5L')); + } + /** * @see https://github.com/mtdowling/cron-expression/issues/47 */ diff --git a/vendor/dragonmantank/cron-expression/tests/Cron/HoursFieldTest.php b/vendor/dragonmantank/cron-expression/tests/Cron/HoursFieldTest.php index e936d11a..1849f28b 100644 --- a/vendor/dragonmantank/cron-expression/tests/Cron/HoursFieldTest.php +++ b/vendor/dragonmantank/cron-expression/tests/Cron/HoursFieldTest.php @@ -4,6 +4,7 @@ namespace Cron\Tests; use Cron\HoursField; use DateTime; +use DateTimeImmutable; use PHPUnit\Framework\TestCase; /** @@ -22,7 +23,17 @@ class HoursFieldTest extends TestCase $this->assertTrue($f->validate('01')); $this->assertTrue($f->validate('*')); $this->assertFalse($f->validate('*/3,1,1-12')); - } + } + + /** + * @covers \Cron\HoursField::isSatisfiedBy + */ + public function testChecksIfSatisfied() + { + $f = new HoursField(); + $this->assertTrue($f->isSatisfiedBy(new DateTime(), '?')); + $this->assertTrue($f->isSatisfiedBy(new DateTimeImmutable(), '?')); + } /** * @covers \Cron\HoursField::increment @@ -39,6 +50,17 @@ class HoursFieldTest extends TestCase $this->assertSame('2011-03-15 10:59:00', $d->format('Y-m-d H:i:s')); } + /** + * @covers \Cron\HoursField::increment + */ + public function testIncrementsDateTimeImmutable() + { + $d = new DateTimeImmutable('2011-03-15 11:15:00'); + $f = new HoursField(); + $f->increment($d); + $this->assertSame('2011-03-15 12:00:00', $d->format('Y-m-d H:i:s')); + } + /** * @covers \Cron\HoursField::increment */ diff --git a/vendor/dragonmantank/cron-expression/tests/Cron/MinutesFieldTest.php b/vendor/dragonmantank/cron-expression/tests/Cron/MinutesFieldTest.php index b91bffac..41a536d6 100644 --- a/vendor/dragonmantank/cron-expression/tests/Cron/MinutesFieldTest.php +++ b/vendor/dragonmantank/cron-expression/tests/Cron/MinutesFieldTest.php @@ -4,6 +4,7 @@ namespace Cron\Tests; use Cron\MinutesField; use DateTime; +use DateTimeImmutable; use PHPUnit\Framework\TestCase; /** @@ -22,6 +23,16 @@ class MinutesFieldTest extends TestCase $this->assertFalse($f->validate('*/3,1,1-12')); } + /** + * @covers \Cron\MinutesField::isSatisfiedBy + */ + public function testChecksIfSatisfied() + { + $f = new MinutesField(); + $this->assertTrue($f->isSatisfiedBy(new DateTime(), '?')); + $this->assertTrue($f->isSatisfiedBy(new DateTimeImmutable(), '?')); + } + /** * @covers \Cron\MinutesField::increment */ @@ -35,6 +46,17 @@ class MinutesFieldTest extends TestCase $this->assertSame('2011-03-15 11:15:00', $d->format('Y-m-d H:i:s')); } + /** + * @covers \Cron\MinutesField::increment + */ + public function testIncrementsDateTimeImmutable() + { + $d = new DateTimeImmutable('2011-03-15 11:15:00'); + $f = new MinutesField(); + $f->increment($d); + $this->assertSame('2011-03-15 11:16:00', $d->format('Y-m-d H:i:s')); + } + /** * Various bad syntaxes that are reported to work, but shouldn't. * diff --git a/vendor/dragonmantank/cron-expression/tests/Cron/MonthFieldTest.php b/vendor/dragonmantank/cron-expression/tests/Cron/MonthFieldTest.php index 83f0f164..f329f4c1 100644 --- a/vendor/dragonmantank/cron-expression/tests/Cron/MonthFieldTest.php +++ b/vendor/dragonmantank/cron-expression/tests/Cron/MonthFieldTest.php @@ -4,6 +4,7 @@ namespace Cron\Tests; use Cron\MonthField; use DateTime; +use DateTimeImmutable; use PHPUnit\Framework\TestCase; /** @@ -23,6 +24,16 @@ class MonthFieldTest extends TestCase $this->assertFalse($f->validate('1.fix-regexp')); } + /** + * @covers \Cron\MonthField::isSatisfiedBy + */ + public function testChecksIfSatisfied() + { + $f = new MonthField(); + $this->assertTrue($f->isSatisfiedBy(new DateTime(), '?')); + $this->assertTrue($f->isSatisfiedBy(new DateTimeImmutable(), '?')); + } + /** * @covers \Cron\MonthField::increment */ @@ -38,6 +49,17 @@ class MonthFieldTest extends TestCase $this->assertSame('2011-02-28 23:59:00', $d->format('Y-m-d H:i:s')); } + /** + * @covers \Cron\MonthField::increment + */ + public function testIncrementsDateTimeImmutable() + { + $d = new DateTimeImmutable('2011-03-15 11:15:00'); + $f = new MonthField(); + $f->increment($d); + $this->assertSame('2011-04-01 00:00:00', $d->format('Y-m-d H:i:s')); + } + /** * @covers \Cron\MonthField::increment */ diff --git a/vendor/egulias/email-validator/EmailValidator/EmailLexer.php b/vendor/egulias/email-validator/EmailValidator/EmailLexer.php index 882c9681..38e4714a 100644 --- a/vendor/egulias/email-validator/EmailValidator/EmailLexer.php +++ b/vendor/egulias/email-validator/EmailValidator/EmailLexer.php @@ -89,7 +89,7 @@ class EmailLexer extends AbstractLexer } /** - * @param $type + * @param string $type * @throws \UnexpectedValueException * @return boolean */ @@ -189,7 +189,7 @@ class EmailLexer extends AbstractLexer } /** - * @param $value + * @param string $value * @return bool */ protected function isNullType($value) @@ -202,7 +202,7 @@ class EmailLexer extends AbstractLexer } /** - * @param $value + * @param string $value * @return bool */ protected function isUTF8Invalid($value) diff --git a/vendor/egulias/email-validator/EmailValidator/EmailParser.php b/vendor/egulias/email-validator/EmailValidator/EmailParser.php index d0627d82..5bf605ac 100644 --- a/vendor/egulias/email-validator/EmailValidator/EmailParser.php +++ b/vendor/egulias/email-validator/EmailValidator/EmailParser.php @@ -33,7 +33,7 @@ class EmailParser } /** - * @param $str + * @param string $str * @return array */ public function parse($str) diff --git a/vendor/egulias/email-validator/EmailValidator/EmailValidator.php b/vendor/egulias/email-validator/EmailValidator/EmailValidator.php index 44b4b93c..1c277072 100644 --- a/vendor/egulias/email-validator/EmailValidator/EmailValidator.php +++ b/vendor/egulias/email-validator/EmailValidator/EmailValidator.php @@ -28,7 +28,7 @@ class EmailValidator } /** - * @param $email + * @param string $email * @param EmailValidation $emailValidation * @return bool */ diff --git a/vendor/egulias/email-validator/EmailValidator/Exception/ExpectingQPair.php b/vendor/egulias/email-validator/EmailValidator/Exception/ExpectingQPair.php index 2502811c..a738eeb6 100644 --- a/vendor/egulias/email-validator/EmailValidator/Exception/ExpectingQPair.php +++ b/vendor/egulias/email-validator/EmailValidator/Exception/ExpectingQPair.php @@ -2,7 +2,7 @@ namespace Egulias\EmailValidator\Exception; -class ExpectedQPair extends InvalidEmail +class ExpectingQPair extends InvalidEmail { const CODE = 136; const REASON = "Expecting QPAIR"; diff --git a/vendor/egulias/email-validator/EmailValidator/Exception/NoDNSRecord.php b/vendor/egulias/email-validator/EmailValidator/Exception/NoDNSRecord.php index 86ca21d5..0aa5fa78 100644 --- a/vendor/egulias/email-validator/EmailValidator/Exception/NoDNSRecord.php +++ b/vendor/egulias/email-validator/EmailValidator/Exception/NoDNSRecord.php @@ -2,8 +2,6 @@ namespace Egulias\EmailValidator\Exception; -use Egulias\EmailValidator\Exception\InvalidEmail; - class NoDNSRecord extends InvalidEmail { const CODE = 5; diff --git a/vendor/egulias/email-validator/EmailValidator/Parser/Parser.php b/vendor/egulias/email-validator/EmailValidator/Parser/Parser.php index e5042e1a..fa7bd44b 100644 --- a/vendor/egulias/email-validator/EmailValidator/Parser/Parser.php +++ b/vendor/egulias/email-validator/EmailValidator/Parser/Parser.php @@ -8,7 +8,7 @@ use Egulias\EmailValidator\Exception\ConsecutiveDot; use Egulias\EmailValidator\Exception\CRLFAtTheEnd; use Egulias\EmailValidator\Exception\CRLFX2; use Egulias\EmailValidator\Exception\CRNoLF; -use Egulias\EmailValidator\Exception\ExpectedQPair; +use Egulias\EmailValidator\Exception\ExpectingQPair; use Egulias\EmailValidator\Exception\ExpectingATEXT; use Egulias\EmailValidator\Exception\ExpectingCTEXT; use Egulias\EmailValidator\Exception\UnclosedComment; @@ -50,7 +50,7 @@ abstract class Parser { if (!($this->lexer->token['type'] === EmailLexer::INVALID || $this->lexer->token['type'] === EmailLexer::C_DEL)) { - throw new ExpectedQPair(); + throw new ExpectingQPair(); } $this->warnings[QuotedPart::CODE] = diff --git a/vendor/egulias/email-validator/README.md b/vendor/egulias/email-validator/README.md index 008669c8..b5b0d85f 100644 --- a/vendor/egulias/email-validator/README.md +++ b/vendor/egulias/email-validator/README.md @@ -1,5 +1,5 @@ # EmailValidator -[![Build Status](https://travis-ci.org/egulias/EmailValidator.png?branch=master)](https://travis-ci.org/egulias/EmailValidator) [![Coverage Status](https://coveralls.io/repos/egulias/EmailValidator/badge.png?branch=master)](https://coveralls.io/r/egulias/EmailValidator?branch=master) [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/egulias/EmailValidator/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/egulias/EmailValidator/?branch=master) [![SensioLabsInsight](https://insight.sensiolabs.com/projects/22ba6692-9c02-42e5-a65d-1c5696bfffc6/small.png)](https://insight.sensiolabs.com/projects/22ba6692-9c02-42e5-a65d-1c5696bfffc6) +[![Build Status](https://travis-ci.org/egulias/EmailValidator.svg?branch=master)](https://travis-ci.org/egulias/EmailValidator) [![Coverage Status](https://coveralls.io/repos/egulias/EmailValidator/badge.svg?branch=master)](https://coveralls.io/r/egulias/EmailValidator?branch=master) [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/egulias/EmailValidator/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/egulias/EmailValidator/?branch=master) [![SensioLabsInsight](https://insight.sensiolabs.com/projects/22ba6692-9c02-42e5-a65d-1c5696bfffc6/small.png)](https://insight.sensiolabs.com/projects/22ba6692-9c02-42e5-a65d-1c5696bfffc6) ============================= ## Suported RFCs ## This library aims to support: @@ -16,7 +16,7 @@ RFC 5321, 5322, 6530, 6531, 6532. Run the command below to install via Composer ```shell -composer require egulias/email-validator "~2.1" +composer require egulias/email-validator ``` ## Getting Started ## diff --git a/vendor/erusev/parsedown/Parsedown.php b/vendor/erusev/parsedown/Parsedown.php index 87d612ab..a34b44f0 100644 --- a/vendor/erusev/parsedown/Parsedown.php +++ b/vendor/erusev/parsedown/Parsedown.php @@ -17,7 +17,7 @@ class Parsedown { # ~ - const version = '1.7.1'; + const version = '1.7.3'; # ~ @@ -429,7 +429,21 @@ class Parsedown if (isset($matches[1])) { - $class = 'language-'.$matches[1]; + /** + * https://www.w3.org/TR/2011/WD-html5-20110525/elements.html#classes + * Every HTML element may have a class attribute specified. + * The attribute, if specified, must have a value that is a set + * of space-separated tokens representing the various classes + * that the element belongs to. + * [...] + * The space characters, for the purposes of this specification, + * are U+0020 SPACE, U+0009 CHARACTER TABULATION (tab), + * U+000A LINE FEED (LF), U+000C FORM FEED (FF), and + * U+000D CARRIAGE RETURN (CR). + */ + $language = substr($matches[1], 0, strcspn($matches[1], " \t\n\f\r")); + + $class = 'language-'.$language; $Element['attributes'] = array( 'class' => $class, diff --git a/vendor/graham-campbell/cache-plugin/LICENSE b/vendor/graham-campbell/cache-plugin/LICENSE index 07accd10..c09c5e45 100644 --- a/vendor/graham-campbell/cache-plugin/LICENSE +++ b/vendor/graham-campbell/cache-plugin/LICENSE @@ -1,7 +1,7 @@ The MIT License (MIT) -Copyright (c) 2015-2018 PHP HTTP Team -Copyright (c) 2018 Graham Campbell +Copyright (c) 2015-2019 PHP HTTP Team +Copyright (c) 2018-2019 Graham Campbell 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/graham-campbell/cache-plugin/composer.json b/vendor/graham-campbell/cache-plugin/composer.json index 4fae2d70..0aa27d60 100644 --- a/vendor/graham-campbell/cache-plugin/composer.json +++ b/vendor/graham-campbell/cache-plugin/composer.json @@ -12,12 +12,12 @@ "require": { "php": "^7.0", "psr/cache": "^1.0", - "php-http/cache-plugin": "^1.5", - "php-http/client-common": "^1.7", + "php-http/cache-plugin": "^1.6", + "php-http/client-common": "^1.9|^2.0", "php-http/message-factory": "^1.0" }, "require-dev": { - "graham-campbell/analyzer": "^2.0", + "graham-campbell/analyzer": "^2.1", "phpunit/phpunit": "^6.5|^7.0" }, "autoload": { @@ -35,7 +35,7 @@ }, "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-master": "1.1-dev" } }, "minimum-stability": "dev", diff --git a/vendor/graham-campbell/cache-plugin/src/CachePlugin.php b/vendor/graham-campbell/cache-plugin/src/CachePlugin.php index e60f85b6..821634a4 100644 --- a/vendor/graham-campbell/cache-plugin/src/CachePlugin.php +++ b/vendor/graham-campbell/cache-plugin/src/CachePlugin.php @@ -18,6 +18,7 @@ use Http\Client\Common\Plugin; use Http\Client\Common\Plugin\Cache\Generator\CacheKeyGenerator; use Http\Client\Common\Plugin\Cache\Generator\HeaderCacheKeyGenerator; use Http\Client\Common\Plugin\Exception\RewindStreamException; +use Http\Client\Common\Plugin\VersionBridgePlugin; use Http\Message\StreamFactory; use Psr\Cache\CacheItemInterface; use Psr\Cache\CacheItemPoolInterface; @@ -32,6 +33,8 @@ use Psr\Http\Message\ResponseInterface; */ class CachePlugin implements Plugin { + use VersionBridgePlugin; + /** * The cache item pool instance. * @@ -87,7 +90,7 @@ class CachePlugin implements Plugin * * @return \Http\Promise\Promise */ - public function handleRequest(RequestInterface $request, callable $next, callable $first) + protected function doHandleRequest(RequestInterface $request, callable $next, callable $first) { $method = strtoupper($request->getMethod()); // If the request not is cachable, move to $next diff --git a/vendor/graham-campbell/github/LICENSE b/vendor/graham-campbell/github/LICENSE index b2472059..bf9b4208 100644 --- a/vendor/graham-campbell/github/LICENSE +++ b/vendor/graham-campbell/github/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2014-2018 Graham Campbell +Copyright (c) 2014-2019 Graham Campbell 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/graham-campbell/github/composer.json b/vendor/graham-campbell/github/composer.json index 1301bb31..95e29490 100644 --- a/vendor/graham-campbell/github/composer.json +++ b/vendor/graham-campbell/github/composer.json @@ -11,18 +11,18 @@ ], "require": { "php": "^7.1.3", - "illuminate/contracts": "5.5.*|5.6.*|5.7.*", - "illuminate/support": "5.5.*|5.6.*|5.7.*", + "illuminate/contracts": "5.5.*|5.6.*|5.7.*|5.8.*", + "illuminate/support": "5.5.*|5.6.*|5.7.*|5.8.*", "graham-campbell/cache-plugin": "^1.0", - "graham-campbell/manager": "^4.1", - "knplabs/github-api": "2.7.*|2.8.*|2.9.*|2.10.*" + "graham-campbell/manager": "^4.2", + "knplabs/github-api": "2.11.*" }, "require-dev": { "graham-campbell/analyzer": "^2.1", - "graham-campbell/testbench": "^5.1", + "graham-campbell/testbench": "^5.2", "madewithlove/illuminate-psr-cache-bridge": "^1.0", "mockery/mockery": "^1.0", - "phpunit/phpunit": "^6.5|^7.0", + "phpunit/phpunit": "^6.5|^7.0|^8.0", "php-http/guzzle6-adapter": "^1.0" }, "suggest": { @@ -43,7 +43,7 @@ }, "extra": { "branch-alias": { - "dev-master": "7.5-dev" + "dev-master": "7.7-dev" }, "laravel": { "providers": [ diff --git a/vendor/graham-campbell/manager/LICENSE b/vendor/graham-campbell/manager/LICENSE index b2472059..bf9b4208 100644 --- a/vendor/graham-campbell/manager/LICENSE +++ b/vendor/graham-campbell/manager/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2014-2018 Graham Campbell +Copyright (c) 2014-2019 Graham Campbell 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/graham-campbell/manager/composer.json b/vendor/graham-campbell/manager/composer.json index 3b6412b4..0fa699bd 100644 --- a/vendor/graham-campbell/manager/composer.json +++ b/vendor/graham-campbell/manager/composer.json @@ -11,14 +11,14 @@ ], "require": { "php": "^7.1.3", - "illuminate/contracts": "5.5.*|5.6.*|5.7.*", - "illuminate/support": "5.5.*|5.6.*|5.7.*" + "illuminate/contracts": "5.5.*|5.6.*|5.7.*|5.8.*", + "illuminate/support": "5.5.*|5.6.*|5.7.*|5.8.*" }, "require-dev": { "graham-campbell/analyzer": "^2.1", "graham-campbell/testbench-core": "^3.0", "mockery/mockery": "^1.0", - "phpunit/phpunit": "^6.5|^7.0" + "phpunit/phpunit": "^6.5|^7.0|^8.0" }, "autoload": { "psr-4": { @@ -35,7 +35,7 @@ }, "extra": { "branch-alias": { - "dev-master": "4.1-dev" + "dev-master": "4.2-dev" } }, "minimum-stability": "dev", diff --git a/vendor/knplabs/github-api/CHANGELOG.md b/vendor/knplabs/github-api/CHANGELOG.md index d370a032..0424c953 100644 --- a/vendor/knplabs/github-api/CHANGELOG.md +++ b/vendor/knplabs/github-api/CHANGELOG.md @@ -2,6 +2,28 @@ The change log describes what is "Added", "Removed", "Changed" or "Fixed" between each release. +## 2.11.0 + +### Added + +- Support for Miscellaneous Licenses (#744) +- Structured Limit objects for rate limiting API (#733) +- Support for getting star creation timestamps in activity/starring endpoint (#729) + +### Fixed + +- Added missing has_projects parameter to repo create (#752) +- Proper type hinting for magic methods (#758) +- Allow symlink to files to be downloaded (#751) + +### Changed + +- Fix of PHP version in readme (#747) +- Fix documentation to get release for a tag (#755) +- Declare all used properties in RateLimitResource class (#762) +- Set correct property and return types (#764) +- Fixed install docs broken after 2.0 release of httplug lib (#767) + ## 2.10.1 ### Fixed diff --git a/vendor/knplabs/github-api/README.md b/vendor/knplabs/github-api/README.md index 86bcb041..aa6bdc9b 100644 --- a/vendor/knplabs/github-api/README.md +++ b/vendor/knplabs/github-api/README.md @@ -8,7 +8,7 @@ [![Monthly Downloads](https://poser.pugx.org/knplabs/github-api/d/monthly)](https://packagist.org/packages/knplabs/github-api) [![Daily Downloads](https://poser.pugx.org/knplabs/github-api/d/daily)](https://packagist.org/packages/knplabs/github-api) -A simple Object Oriented wrapper for GitHub API, written with PHP5. +A simple Object Oriented wrapper for GitHub API, written with PHP. Uses [GitHub API v3](http://developer.github.com/v3/) & supports [GitHub API v4](http://developer.github.com/v4). The object API (v3) is very similar to the RESTful API. @@ -29,7 +29,7 @@ Uses [GitHub API v3](http://developer.github.com/v3/) & supports [GitHub API v4] Via Composer: ```bash -$ composer require knplabs/github-api php-http/guzzle6-adapter +$ composer require knplabs/github-api php-http/guzzle6-adapter "^1.1" ``` Why `php-http/guzzle6-adapter`? We are decoupled from any HTTP messaging client with help by [HTTPlug](http://httplug.io/). Read about clients in our [docs](doc/customize.md). diff --git a/vendor/knplabs/github-api/composer.json b/vendor/knplabs/github-api/composer.json index d3641f47..4c1fcea4 100644 --- a/vendor/knplabs/github-api/composer.json +++ b/vendor/knplabs/github-api/composer.json @@ -43,7 +43,7 @@ "prefer-stable": true, "extra": { "branch-alias": { - "dev-master": "2.10.x-dev" + "dev-master": "2.11.x-dev" } } } diff --git a/vendor/knplabs/github-api/lib/Github/Api/AbstractApi.php b/vendor/knplabs/github-api/lib/Github/Api/AbstractApi.php index 135ac2b2..492e44ca 100644 --- a/vendor/knplabs/github-api/lib/Github/Api/AbstractApi.php +++ b/vendor/knplabs/github-api/lib/Github/Api/AbstractApi.php @@ -98,7 +98,7 @@ abstract class AbstractApi implements ApiInterface if (null !== $this->perPage && !isset($parameters['per_page'])) { $parameters['per_page'] = $this->perPage; } - if (array_key_exists('ref', $parameters) && is_null($parameters['ref'])) { + if (array_key_exists('ref', $parameters) && null === $parameters['ref']) { unset($parameters['ref']); } @@ -122,7 +122,7 @@ abstract class AbstractApi implements ApiInterface */ protected function head($path, array $parameters = [], array $requestHeaders = []) { - if (array_key_exists('ref', $parameters) && is_null($parameters['ref'])) { + if (array_key_exists('ref', $parameters) && null === $parameters['ref']) { unset($parameters['ref']); } diff --git a/vendor/knplabs/github-api/lib/Github/Api/AcceptHeaderTrait.php b/vendor/knplabs/github-api/lib/Github/Api/AcceptHeaderTrait.php index 4a7e7a46..e788fd1c 100644 --- a/vendor/knplabs/github-api/lib/Github/Api/AcceptHeaderTrait.php +++ b/vendor/knplabs/github-api/lib/Github/Api/AcceptHeaderTrait.php @@ -9,7 +9,7 @@ namespace Github\Api; */ trait AcceptHeaderTrait { - protected $acceptHeaderValue = null; + protected $acceptHeaderValue; protected function get($path, array $parameters = [], array $requestHeaders = []) { diff --git a/vendor/knplabs/github-api/lib/Github/Api/Authorizations.php b/vendor/knplabs/github-api/lib/Github/Api/Authorizations.php index fd8e9b23..f53b9eb4 100644 --- a/vendor/knplabs/github-api/lib/Github/Api/Authorizations.php +++ b/vendor/knplabs/github-api/lib/Github/Api/Authorizations.php @@ -24,7 +24,7 @@ class Authorizations extends AbstractApi /** * Show a single authorization. * - * @param $clientId + * @param string $clientId * * @return array */ @@ -51,8 +51,8 @@ class Authorizations extends AbstractApi /** * Update an authorization. * - * @param $clientId - * @param array $params + * @param string $clientId + * @param array $params * * @return array */ @@ -64,7 +64,7 @@ class Authorizations extends AbstractApi /** * Remove an authorization. * - * @param $clientId + * @param string $clientId * * @return array */ @@ -76,8 +76,8 @@ class Authorizations extends AbstractApi /** * Check an authorization. * - * @param $clientId - * @param $token + * @param string $clientId + * @param string $token * * @return array */ @@ -89,8 +89,8 @@ class Authorizations extends AbstractApi /** * Reset an authorization. * - * @param $clientId - * @param $token + * @param string $clientId + * @param string $token * * @return array */ @@ -102,8 +102,8 @@ class Authorizations extends AbstractApi /** * Remove an authorization. * - * @param $clientId - * @param $token + * @param string $clientId + * @param string $token */ public function revoke($clientId, $token) { @@ -113,7 +113,7 @@ class Authorizations extends AbstractApi /** * Revoke all authorizations. * - * @param $clientId + * @param string $clientId */ public function revokeAll($clientId) { diff --git a/vendor/knplabs/github-api/lib/Github/Api/CurrentUser/Emails.php b/vendor/knplabs/github-api/lib/Github/Api/CurrentUser/Emails.php index 15d4fad0..23f2ab24 100644 --- a/vendor/knplabs/github-api/lib/Github/Api/CurrentUser/Emails.php +++ b/vendor/knplabs/github-api/lib/Github/Api/CurrentUser/Emails.php @@ -52,7 +52,7 @@ class Emails extends AbstractApi if (is_string($emails)) { $emails = [$emails]; } elseif (0 === count($emails)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException('The user emails parameter should be a single email or an array of emails'); } return $this->post('/user/emails', $emails); @@ -74,7 +74,7 @@ class Emails extends AbstractApi if (is_string($emails)) { $emails = [$emails]; } elseif (0 === count($emails)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException('The user emails parameter should be a single email or an array of emails'); } return $this->delete('/user/emails', $emails); diff --git a/vendor/knplabs/github-api/lib/Github/Api/CurrentUser/Starring.php b/vendor/knplabs/github-api/lib/Github/Api/CurrentUser/Starring.php index d823c0bf..5fb6435f 100644 --- a/vendor/knplabs/github-api/lib/Github/Api/CurrentUser/Starring.php +++ b/vendor/knplabs/github-api/lib/Github/Api/CurrentUser/Starring.php @@ -3,6 +3,7 @@ namespace Github\Api\CurrentUser; use Github\Api\AbstractApi; +use Github\Api\AcceptHeaderTrait; /** * @link https://developer.github.com/v3/activity/starring/ @@ -11,6 +12,26 @@ use Github\Api\AbstractApi; */ class Starring extends AbstractApi { + use AcceptHeaderTrait; + + /** + * Configure the body type. + * + * @see https://developer.github.com/v3/activity/starring/#list-stargazers + * + * @param string $bodyType + * + * @return self + */ + public function configure($bodyType = null) + { + if ('star' === $bodyType) { + $this->acceptHeaderValue = sprintf('application/vnd.github.%s.star+json', $this->client->getApiVersion()); + } + + return $this; + } + /** * List repositories starred by the authenticated user. * diff --git a/vendor/knplabs/github-api/lib/Github/Api/Gists.php b/vendor/knplabs/github-api/lib/Github/Api/Gists.php index e6bdc430..a6f4ffa6 100644 --- a/vendor/knplabs/github-api/lib/Github/Api/Gists.php +++ b/vendor/knplabs/github-api/lib/Github/Api/Gists.php @@ -28,7 +28,7 @@ class Gists extends AbstractApi */ public function configure($bodyType = null) { - if (!in_array($bodyType, ['base64'])) { + if ('base64' !== $bodyType) { $bodyType = 'raw'; } diff --git a/vendor/knplabs/github-api/lib/Github/Api/Issue/Events.php b/vendor/knplabs/github-api/lib/Github/Api/Issue/Events.php index 8b70ec79..c846147e 100644 --- a/vendor/knplabs/github-api/lib/Github/Api/Issue/Events.php +++ b/vendor/knplabs/github-api/lib/Github/Api/Issue/Events.php @@ -41,9 +41,9 @@ class Events extends AbstractApi * * @link https://developer.github.com/v3/issues/events/#get-a-single-event * - * @param $username - * @param $repository - * @param $event + * @param string $username + * @param string $repository + * @param string $event * * @return array */ diff --git a/vendor/knplabs/github-api/lib/Github/Api/Issue/Labels.php b/vendor/knplabs/github-api/lib/Github/Api/Issue/Labels.php index 1159e153..f1f68b76 100644 --- a/vendor/knplabs/github-api/lib/Github/Api/Issue/Labels.php +++ b/vendor/knplabs/github-api/lib/Github/Api/Issue/Labels.php @@ -120,10 +120,10 @@ class Labels extends AbstractApi * * @link https://developer.github.com/v3/issues/labels/#remove-a-label-from-an-issue * - * @param string $username - * @param string $repository - * @param int $issue - * @param string $labels + * @param string $username + * @param string $repository + * @param int $issue + * @param string|array $labels * * @return array * @@ -134,7 +134,7 @@ class Labels extends AbstractApi if (is_string($labels)) { $labels = [$labels]; } elseif (0 === count($labels)) { - throw new InvalidArgumentException(); + throw new InvalidArgumentException('The labels parameter should be a single label or an array of labels'); } return $this->post('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/issues/'.rawurlencode($issue).'/labels', $labels); @@ -167,7 +167,7 @@ class Labels extends AbstractApi * @param string $issue * @param string $label * - * @return null + * @return array|string */ public function remove($username, $repository, $issue, $label) { @@ -183,7 +183,7 @@ class Labels extends AbstractApi * @param string $repository * @param string $issue * - * @return null + * @return array|string */ public function clear($username, $repository, $issue) { diff --git a/vendor/knplabs/github-api/lib/Github/Api/Issue/Milestones.php b/vendor/knplabs/github-api/lib/Github/Api/Issue/Milestones.php index 11f0e94c..0e0e067c 100644 --- a/vendor/knplabs/github-api/lib/Github/Api/Issue/Milestones.php +++ b/vendor/knplabs/github-api/lib/Github/Api/Issue/Milestones.php @@ -114,7 +114,7 @@ class Milestones extends AbstractApi * @param string $repository * @param int $id * - * @return null + * @return array|string */ public function remove($username, $repository, $id) { diff --git a/vendor/knplabs/github-api/lib/Github/Api/Miscellaneous/Licenses.php b/vendor/knplabs/github-api/lib/Github/Api/Miscellaneous/Licenses.php new file mode 100644 index 00000000..f8e55782 --- /dev/null +++ b/vendor/knplabs/github-api/lib/Github/Api/Miscellaneous/Licenses.php @@ -0,0 +1,34 @@ +get('/licenses'); + } + + /** + * Get an individual license by its license key. + * + * @link https://developer.github.com/v3/licenses/#get-an-individual-license + * + * @param string $license + * + * @return array + */ + public function show($license) + { + return $this->get('/licenses/'.rawurlencode($license)); + } +} diff --git a/vendor/knplabs/github-api/lib/Github/Api/Organization.php b/vendor/knplabs/github-api/lib/Github/Api/Organization.php index 49ca5c91..29b71d14 100644 --- a/vendor/knplabs/github-api/lib/Github/Api/Organization.php +++ b/vendor/knplabs/github-api/lib/Github/Api/Organization.php @@ -91,9 +91,9 @@ class Organization extends AbstractApi /** * @link http://developer.github.com/v3/issues/#list-issues * - * @param $organization - * @param array $params - * @param int $page + * @param string $organization + * @param array $params + * @param int $page * * @return array */ diff --git a/vendor/knplabs/github-api/lib/Github/Api/Organization/Hooks.php b/vendor/knplabs/github-api/lib/Github/Api/Organization/Hooks.php index b68a43bc..fc9318a3 100644 --- a/vendor/knplabs/github-api/lib/Github/Api/Organization/Hooks.php +++ b/vendor/knplabs/github-api/lib/Github/Api/Organization/Hooks.php @@ -87,7 +87,7 @@ class Hooks extends AbstractApi * @param string $organization * @param int $id * - * @return null + * @return array|string */ public function ping($organization, $id) { @@ -102,7 +102,7 @@ class Hooks extends AbstractApi * @param string $organization * @param int $id * - * @return null + * @return array|string */ public function remove($organization, $id) { diff --git a/vendor/knplabs/github-api/lib/Github/Api/PullRequest.php b/vendor/knplabs/github-api/lib/Github/Api/PullRequest.php index 933dd7b1..1f22137a 100644 --- a/vendor/knplabs/github-api/lib/Github/Api/PullRequest.php +++ b/vendor/knplabs/github-api/lib/Github/Api/PullRequest.php @@ -31,7 +31,7 @@ class PullRequest extends AbstractApi */ public function configure($bodyType = null, $apiVersion = null) { - if (!in_array($apiVersion, [])) { + if (null === $apiVersion) { $apiVersion = $this->client->getApiVersion(); } diff --git a/vendor/knplabs/github-api/lib/Github/Api/PullRequest/Comments.php b/vendor/knplabs/github-api/lib/Github/Api/PullRequest/Comments.php index 183bfbe0..992fcd93 100644 --- a/vendor/knplabs/github-api/lib/Github/Api/PullRequest/Comments.php +++ b/vendor/knplabs/github-api/lib/Github/Api/PullRequest/Comments.php @@ -21,13 +21,13 @@ class Comments extends AbstractApi * @link https://developer.github.com/v3/pulls/comments/#custom-media-types * * @param string|null $bodyType - * @param string|null @apiVersion + * @param string|null $apiVersion * * @return self */ public function configure($bodyType = null, $apiVersion = null) { - if (!in_array($apiVersion, ['squirrel-girl-preview'])) { + if ($apiVersion !== 'squirrel-girl-preview') { $apiVersion = $this->client->getApiVersion(); } diff --git a/vendor/knplabs/github-api/lib/Github/Api/RateLimit.php b/vendor/knplabs/github-api/lib/Github/Api/RateLimit.php index ba5301df..e0550899 100644 --- a/vendor/knplabs/github-api/lib/Github/Api/RateLimit.php +++ b/vendor/knplabs/github-api/lib/Github/Api/RateLimit.php @@ -2,6 +2,8 @@ namespace Github\Api; +use Github\Api\RateLimit\RateLimitResource; + /** * Get rate limits. * @@ -12,36 +14,93 @@ namespace Github\Api; class RateLimit extends AbstractApi { /** - * Get rate limits. + * @var RateLimitResource[] + */ + protected $resources = []; + + /** + * Get rate limits data in an array. + * + * @deprecated since 2.11.0 Use `->getResources()` instead * * @return array */ public function getRateLimits() { - return $this->get('/rate_limit'); + return $this->fetchLimits(); + } + + /** + * Gets the rate limit resource objects. + * + * @return RateLimitResource[] + */ + public function getResources() + { + $this->fetchLimits(); + + return $this->resources; + } + + /** + * Returns a rate limit resource object by the given name. + * + * @param string $name + * + * @return RateLimitResource|false + */ + public function getResource($name) + { + // Fetch once per instance + if (empty($this->resources)) { + $this->fetchLimits(); + } + + if (!isset($this->resources[$name])) { + return false; + } + + return $this->resources[$name]; + } + + /** + * Returns the data directly from the GitHub API endpoint. + * + * @return array + */ + protected function fetchLimits() + { + $result = $this->get('/rate_limit') ?: []; + + // Assemble Limit instances + foreach ($result['resources'] as $resourceName => $resource) { + $this->resources[$resourceName] = new RateLimitResource($resourceName, $resource); + } + + return $result; } /** * Get core rate limit. * + * @deprecated since 2.11.0 Use `->getResource('core')->getLimit()` instead + * * @return int */ public function getCoreLimit() { - $response = $this->getRateLimits(); - - return $response['resources']['core']['limit']; + return $this->getResource('core')->getLimit(); } /** * Get search rate limit. * + * @deprecated since 2.11.0 Use `->getResource('core')->getLimit()` instead + * * @return int */ public function getSearchLimit() { - $response = $this->getRateLimits(); - - return $response['resources']['search']['limit']; + return $this->getResource('search')->getLimit(); } } diff --git a/vendor/knplabs/github-api/lib/Github/Api/RateLimit/RateLimitResource.php b/vendor/knplabs/github-api/lib/Github/Api/RateLimit/RateLimitResource.php new file mode 100644 index 00000000..661a4e52 --- /dev/null +++ b/vendor/knplabs/github-api/lib/Github/Api/RateLimit/RateLimitResource.php @@ -0,0 +1,73 @@ +name = $name; + $this->limit = $data['limit']; + $this->remaining = $data['remaining']; + $this->reset = $data['reset']; + } + + /** + * The name of the Limit, e.g. "core", "graphql", "search". + * + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The rate limit amount. + * + * @return int + */ + public function getLimit() + { + return $this->limit; + } + + /** + * Number of requests remaining in time period before hitting the rate limit. + * + * @return int + */ + public function getRemaining() + { + return $this->remaining; + } + + /** + * Timestamp for when the rate limit will be reset. + * + * @return int + */ + public function getReset() + { + return $this->reset; + } +} diff --git a/vendor/knplabs/github-api/lib/Github/Api/Repo.php b/vendor/knplabs/github-api/lib/Github/Api/Repo.php index c0c54a95..c8e6a24d 100644 --- a/vendor/knplabs/github-api/lib/Github/Api/Repo.php +++ b/vendor/knplabs/github-api/lib/Github/Api/Repo.php @@ -187,6 +187,7 @@ class Repo extends AbstractApi * @param bool $hasDownloads `true` to enable downloads for this repository, `false` to disable them * @param int $teamId The id of the team that will be granted access to this repository. This is only valid when creating a repo in an organization. * @param bool $autoInit `true` to create an initial commit with empty README, `false` for no initial commit + * @param bool $hasProjects `true` to enable projects for this repository or false to disable them. * * @return array returns repository data */ @@ -200,7 +201,8 @@ class Repo extends AbstractApi $hasWiki = false, $hasDownloads = false, $teamId = null, - $autoInit = false + $autoInit = false, + $hasProjects = true ) { $path = null !== $organization ? '/orgs/'.$organization.'/repos' : '/user/repos'; @@ -213,6 +215,7 @@ class Repo extends AbstractApi 'has_wiki' => $hasWiki, 'has_downloads' => $hasDownloads, 'auto_init' => $autoInit, + 'has_projects' => $hasProjects, ]; if ($organization && $teamId) { diff --git a/vendor/knplabs/github-api/lib/Github/Api/Repository/Collaborators.php b/vendor/knplabs/github-api/lib/Github/Api/Repository/Collaborators.php index 34411884..5c61b9bf 100644 --- a/vendor/knplabs/github-api/lib/Github/Api/Repository/Collaborators.php +++ b/vendor/knplabs/github-api/lib/Github/Api/Repository/Collaborators.php @@ -14,9 +14,9 @@ class Collaborators extends AbstractApi /** * @link https://developer.github.com/v3/repos/collaborators/#list-collaborators * - * @param $username - * @param $repository - * @param array $params + * @param string $username + * @param string $repository + * @param array $params * * @return array|string */ @@ -28,9 +28,9 @@ class Collaborators extends AbstractApi /** * @link https://developer.github.com/v3/repos/collaborators/#check-if-a-user-is-a-collaborator * - * @param $username - * @param $repository - * @param $collaborator + * @param string $username + * @param string $repository + * @param string $collaborator * * @return array|string */ @@ -42,10 +42,10 @@ class Collaborators extends AbstractApi /** * @link https://developer.github.com/v3/repos/collaborators/#add-user-as-a-collaborator * - * @param $username - * @param $repository - * @param $collaborator - * @param array $params + * @param string $username + * @param string $repository + * @param string $collaborator + * @param array $params * * @return array|string */ @@ -57,9 +57,9 @@ class Collaborators extends AbstractApi /** * @link https://developer.github.com/v3/repos/collaborators/#remove-user-as-a-collaborator * - * @param $username - * @param $repository - * @param $collaborator + * @param string $username + * @param string $repository + * @param string $collaborator * * @return array|string */ @@ -71,9 +71,9 @@ class Collaborators extends AbstractApi /** * @link https://developer.github.com/v3/repos/collaborators/#review-a-users-permission-level * - * @param $username - * @param $repository - * @param $collaborator + * @param string $username + * @param string $repository + * @param string $collaborator * * @return array|string */ diff --git a/vendor/knplabs/github-api/lib/Github/Api/Repository/Contents.php b/vendor/knplabs/github-api/lib/Github/Api/Repository/Contents.php index 64346e62..631fff2c 100644 --- a/vendor/knplabs/github-api/lib/Github/Api/Repository/Contents.php +++ b/vendor/knplabs/github-api/lib/Github/Api/Repository/Contents.php @@ -143,7 +143,7 @@ class Contents extends AbstractApi 'ref' => $reference, ]); - if ($response->getStatusCode() != 200) { + if ($response->getStatusCode() !== 200) { return false; } } catch (TwoFactorAuthenticationRequiredException $ex) { @@ -276,8 +276,8 @@ class Contents extends AbstractApi { $file = $this->show($username, $repository, $path, $reference); - if (!isset($file['type']) || 'file' !== $file['type']) { - throw new InvalidArgumentException(sprintf('Path "%s" is not a file.', $path)); + if (!isset($file['type']) || !in_array($file['type'], ['file', 'symlink'], true)) { + throw new InvalidArgumentException(sprintf('Path "%s" is not a file or a symlink to a file.', $path)); } if (!isset($file['content'])) { diff --git a/vendor/knplabs/github-api/lib/Github/Api/Repository/Releases.php b/vendor/knplabs/github-api/lib/Github/Api/Repository/Releases.php index 73fd080b..4657bfa7 100644 --- a/vendor/knplabs/github-api/lib/Github/Api/Repository/Releases.php +++ b/vendor/knplabs/github-api/lib/Github/Api/Repository/Releases.php @@ -16,8 +16,8 @@ class Releases extends AbstractApi /** * Get the latest release. * - * @param $username - * @param $repository + * @param string $username + * @param string $repository * * @return array */ @@ -29,9 +29,9 @@ class Releases extends AbstractApi /** * List releases for a tag. * - * @param $username - * @param $repository - * @param $tag + * @param string $username + * @param string $repository + * @param string $tag * * @return array */ diff --git a/vendor/knplabs/github-api/lib/Github/Client.php b/vendor/knplabs/github-api/lib/Github/Client.php index 8e2ea275..e20df96a 100644 --- a/vendor/knplabs/github-api/lib/Github/Client.php +++ b/vendor/knplabs/github-api/lib/Github/Client.php @@ -25,6 +25,7 @@ use Psr\Cache\CacheItemPoolInterface; * @method Api\Enterprise enterprise() * @method Api\Miscellaneous\CodeOfConduct codeOfConduct() * @method Api\Miscellaneous\Emojis emojis() + * @method Api\Miscellaneous\Licenses licenses() * @method Api\GitData git() * @method Api\GitData gitData() * @method Api\Gists gist() @@ -53,8 +54,8 @@ use Psr\Cache\CacheItemPoolInterface; * @method Api\Repo repository() * @method Api\Repo repositories() * @method Api\Search search() - * @method Api\Organization team() - * @method Api\Organization teams() + * @method Api\Organization\Teams team() + * @method Api\Organization\Teams teams() * @method Api\User user() * @method Api\User users() * @method Api\Authorizations authorization() @@ -221,6 +222,10 @@ class Client $api = new Api\Markdown($this); break; + case 'licenses': + $api = new Api\Miscellaneous\Licenses($this); + break; + case 'notification': case 'notifications': $api = new Api\Notification($this); @@ -317,7 +322,7 @@ class Client throw new InvalidArgumentException('You need to specify authentication method!'); } - if (null === $authMethod && in_array($password, [self::AUTH_URL_TOKEN, self::AUTH_URL_CLIENT_ID, self::AUTH_HTTP_PASSWORD, self::AUTH_HTTP_TOKEN, self::AUTH_JWT])) { + if (null === $authMethod && in_array($password, [self::AUTH_URL_TOKEN, self::AUTH_URL_CLIENT_ID, self::AUTH_HTTP_PASSWORD, self::AUTH_HTTP_TOKEN, self::AUTH_JWT], true)) { $authMethod = $password; $password = null; } @@ -356,7 +361,7 @@ class Client /** * Add a cache plugin to cache responses locally. * - * @param CacheItemPoolInterface $cache + * @param CacheItemPoolInterface $cachePool * @param array $config */ public function addCache(CacheItemPoolInterface $cachePool, array $config = []) diff --git a/vendor/knplabs/github-api/lib/Github/HttpClient/Builder.php b/vendor/knplabs/github-api/lib/Github/HttpClient/Builder.php index 6a635b2d..3b05b8fe 100644 --- a/vendor/knplabs/github-api/lib/Github/HttpClient/Builder.php +++ b/vendor/knplabs/github-api/lib/Github/HttpClient/Builder.php @@ -10,7 +10,6 @@ use Http\Client\HttpClient; use Http\Discovery\HttpClientDiscovery; use Http\Discovery\MessageFactoryDiscovery; use Http\Discovery\StreamFactoryDiscovery; -use Http\Message\MessageFactory; use Http\Message\RequestFactory; use Http\Message\StreamFactory; use Psr\Cache\CacheItemPoolInterface; @@ -38,7 +37,7 @@ class Builder private $pluginClient; /** - * @var MessageFactory + * @var RequestFactory */ private $requestFactory; @@ -62,7 +61,7 @@ class Builder /** * This plugin is special treated because it has to be the very last plugin. * - * @var Plugin\CachePlugin + * @var Plugin\CachePlugin|null */ private $cachePlugin; diff --git a/vendor/knplabs/github-api/lib/Github/HttpClient/Message/ResponseMediator.php b/vendor/knplabs/github-api/lib/Github/HttpClient/Message/ResponseMediator.php index 6b944165..dcab5b4a 100644 --- a/vendor/knplabs/github-api/lib/Github/HttpClient/Message/ResponseMediator.php +++ b/vendor/knplabs/github-api/lib/Github/HttpClient/Message/ResponseMediator.php @@ -28,7 +28,7 @@ class ResponseMediator /** * @param ResponseInterface $response * - * @return array|null + * @return array|void */ public static function getPagination(ResponseInterface $response) { diff --git a/vendor/knplabs/github-api/lib/Github/HttpClient/Plugin/GithubExceptionThrower.php b/vendor/knplabs/github-api/lib/Github/HttpClient/Plugin/GithubExceptionThrower.php index 7d46fe9c..a0593924 100644 --- a/vendor/knplabs/github-api/lib/Github/HttpClient/Plugin/GithubExceptionThrower.php +++ b/vendor/knplabs/github-api/lib/Github/HttpClient/Plugin/GithubExceptionThrower.php @@ -30,26 +30,26 @@ class GithubExceptionThrower implements Plugin // If error: $remaining = ResponseMediator::getHeader($response, 'X-RateLimit-Remaining'); - if (null != $remaining && 1 > $remaining && 'rate_limit' !== substr($request->getRequestTarget(), 1, 10)) { + if (null !== $remaining && 1 > $remaining && 'rate_limit' !== substr($request->getRequestTarget(), 1, 10)) { $limit = ResponseMediator::getHeader($response, 'X-RateLimit-Limit'); $reset = ResponseMediator::getHeader($response, 'X-RateLimit-Reset'); throw new ApiLimitExceedException($limit, $reset); } - if (401 === $response->getStatusCode()) { - if ($response->hasHeader('X-GitHub-OTP') && 0 === strpos((string) ResponseMediator::getHeader($response, 'X-GitHub-OTP'), 'required;')) { - $type = substr((string) ResponseMediator::getHeader($response, 'X-GitHub-OTP'), 9); + if ((401 === $response->getStatusCode()) && $response->hasHeader('X-GitHub-OTP') && 0 === strpos((string) ResponseMediator::getHeader($response, 'X-GitHub-OTP'), 'required;')) { + $type = substr((string) ResponseMediator::getHeader($response, 'X-GitHub-OTP'), 9); - throw new TwoFactorAuthenticationRequiredException($type); - } + throw new TwoFactorAuthenticationRequiredException($type); } $content = ResponseMediator::getContent($response); if (is_array($content) && isset($content['message'])) { - if (400 == $response->getStatusCode()) { + if (400 === $response->getStatusCode()) { throw new ErrorException($content['message'], 400); - } elseif (422 == $response->getStatusCode() && isset($content['errors'])) { + } + + if (422 === $response->getStatusCode() && isset($content['errors'])) { $errors = []; foreach ($content['errors'] as $error) { switch ($error['code']) { @@ -84,6 +84,17 @@ class GithubExceptionThrower implements Plugin } } + if (502 == $response->getStatusCode() && isset($content['errors']) && is_array($content['errors'])) { + $errors = []; + foreach ($content['errors'] as $error) { + if (isset($error['message'])) { + $errors[] = $error['message']; + } + } + + throw new RuntimeException(implode(', ', $errors), 502); + } + throw new RuntimeException(isset($content['message']) ? $content['message'] : $content, $response->getStatusCode()); }); } diff --git a/vendor/kylekatarnls/update-helper/LICENSE b/vendor/kylekatarnls/update-helper/LICENSE new file mode 100644 index 00000000..d55dee54 --- /dev/null +++ b/vendor/kylekatarnls/update-helper/LICENSE @@ -0,0 +1,22 @@ +MIT License + +Copyright (c) 2017 https://github.com/pug-php +Copyright (c) 2017 https://github.com/kylekatarnls + +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 the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/vendor/kylekatarnls/update-helper/composer.json b/vendor/kylekatarnls/update-helper/composer.json new file mode 100644 index 00000000..3b57d856 --- /dev/null +++ b/vendor/kylekatarnls/update-helper/composer.json @@ -0,0 +1,43 @@ +{ + "name": "kylekatarnls/update-helper", + "description": "Update helper", + "type": "composer-plugin", + "license": "MIT", + "authors": [ + { + "name": "Kyle", + "email": "kylekatarnls@gmail.com" + } + ], + "require": { + "php": ">=5.3.0", + "composer-plugin-api": "^1.1.0" + }, + "require-dev": { + "composer/composer": "^2.0.x-dev", + "phpunit/phpunit": ">=4.8.35 <6.0", + "codeclimate/php-test-reporter": "dev-master" + }, + "autoload": { + "psr-0": { + "UpdateHelper\\": "src/" + } + }, + "scripts": { + "post-install-cmd": [ + "UpdateHelper\\UpdateHelper::check" + ], + "post-update-cmd": [ + "UpdateHelper\\UpdateHelper::check" + ], + "post-package-install": [ + "UpdateHelper\\UpdateHelper::check" + ], + "post-package-update": [ + "UpdateHelper\\UpdateHelper::check" + ] + }, + "extra": { + "class": "UpdateHelper\\ComposerPlugin" + } +} diff --git a/vendor/kylekatarnls/update-helper/src/UpdateHelper/ComposerPlugin.php b/vendor/kylekatarnls/update-helper/src/UpdateHelper/ComposerPlugin.php new file mode 100644 index 00000000..f0e23138 --- /dev/null +++ b/vendor/kylekatarnls/update-helper/src/UpdateHelper/ComposerPlugin.php @@ -0,0 +1,37 @@ +io = $io; + } + + public static function getSubscribedEvents() + { + return array( + 'post-autoload-dump' => array( + array('onAutoloadDump', 0), + ), + ); + } + + public function onAutoloadDump(Event $event) + { + if (!class_exists('UpdateHelper\\UpdateHelper')) { + return; + } + + UpdateHelper::check($event); + } +} diff --git a/vendor/kylekatarnls/update-helper/src/UpdateHelper/UpdateHelper.php b/vendor/kylekatarnls/update-helper/src/UpdateHelper/UpdateHelper.php new file mode 100644 index 00000000..2ed2d9e7 --- /dev/null +++ b/vendor/kylekatarnls/update-helper/src/UpdateHelper/UpdateHelper.php @@ -0,0 +1,349 @@ +read(); + } catch (\RuntimeException $e) { + $dependencyConfig = null; + } + + if (is_array($dependencyConfig) && isset($dependencyConfig['extra'], $dependencyConfig['extra'][$key])) { + $classes[$file] = $dependencyConfig['extra'][$key]; + } + } + + protected static function getUpdateHelperConfig(Composer $composer, $key = null) + { + $vendorDir = $composer->getConfig()->get('vendor-dir'); + + $npm = array(); + + foreach (scandir($vendorDir) as $namespace) { + if ($namespace === '.' || $namespace === '..' || !is_dir($directory = $vendorDir.DIRECTORY_SEPARATOR.$namespace)) { + continue; + } + + foreach (scandir($directory) as $dependency) { + if ($dependency === '.' || $dependency === '..' || !is_dir($subDirectory = $directory.DIRECTORY_SEPARATOR.$dependency)) { + continue; + } + + static::appendConfig($npm, $subDirectory, $key); + } + } + + static::appendConfig($npm, dirname($vendorDir), $key); + + return $npm; + } + + public static function check(Event $event) + { + if ($event instanceof ScriptEvent || $event instanceof PackageEvent) { + $io = $event->getIO(); + $composer = $event->getComposer(); + $autoload = __DIR__.'/../../../../autoload.php'; + + if (file_exists($autoload)) { + include_once $autoload; + } + + $classes = static::getUpdateHelperConfig($composer); + + foreach ($classes as $file => $class) { + $error = null; + + if (is_string($class) && class_exists($class)) { + try { + $helper = new $class(); + } catch (\Exception $e) { + $error = $e->getMessage()."\nFile: ".$e->getFile()."\nLine:".$e->getLine()."\n\n".$e->getTraceAsString(); + } catch (\Throwable $e) { + $error = $e->getMessage()."\nFile: ".$e->getFile()."\nLine:".$e->getLine()."\n\n".$e->getTraceAsString(); + } + + if (!$error && $helper instanceof UpdateHelperInterface) { + $helper->check(new static($event, $io, $composer)); + + continue; + } + } + + if (!$error) { + $error = JsonFile::encode($class).' is not an instance of UpdateHelperInterface.'; + } + + $io->writeError('UpdateHelper error in '.$file.":\n".$error); + } + } + } + + public function __construct(Event $event, IOInterface $io = null, Composer $composer = null) + { + $this->event = $event; + $this->io = $io ?: (method_exists($event, 'getIO') ? $event->getIO() : null); + $this->composer = $composer ?: (method_exists($event, 'getComposer') ? $event->getComposer() : null); + + if ($this->composer && + ($directory = $this->composer->getConfig()->get('archive-dir')) && + file_exists($file = $directory.'/composer.json') + ) { + $this->composerFilePath = $file; + $this->file = new JsonFile($this->composerFilePath); + $this->dependencies = $this->file->read(); + } + } + + /** + * @return JsonFile + */ + public function getFile() + { + return $this->file; + } + + /** + * @return string + */ + public function getComposerFilePath() + { + return $this->composerFilePath; + } + + /** + * @return Composer + */ + public function getComposer() + { + return $this->composer; + } + + /** + * @return Event + */ + public function getEvent() + { + return $this->event; + } + + /** + * @return IOInterface + */ + public function getIo() + { + return $this->io; + } + + /** + * @return array + */ + public function getDependencies() + { + return $this->dependencies; + } + + /** + * @return array + */ + public function getDevDependencies() + { + return isset($this->dependencies['require-dev']) ? $this->dependencies['require-dev'] : array(); + } + + /** + * @return array + */ + public function getProdDependencies() + { + return isset($this->dependencies['require']) ? $this->dependencies['require'] : array(); + } + + /** + * @return array + */ + public function getFlattenDependencies() + { + return array_merge($this->getDevDependencies(), $this->getProdDependencies()); + } + + /** + * @param string $dependency + * + * @return bool + */ + public function hasAsDevDependency($dependency) + { + return isset($this->dependencies['require-dev'][$dependency]); + } + + /** + * @param string $dependency + * + * @return bool + */ + public function hasAsProdDependency($dependency) + { + return isset($this->dependencies['require'][$dependency]); + } + + /** + * @param string $dependency + * + * @return bool + */ + public function hasAsDependency($dependency) + { + return $this->hasAsDevDependency($dependency) || $this->hasAsProdDependency($dependency); + } + + /** + * @param string $dependency + * @param string $version + * + * @return bool + */ + public function isDependencyAtLeast($dependency, $version) + { + if ($this->hasAsProdDependency($dependency)) { + return Semver::satisfies($version, $this->dependencies['require'][$dependency]); + } + + if ($this->hasAsDevDependency($dependency)) { + return Semver::satisfies($version, $this->dependencies['require-dev'][$dependency]); + } + + return false; + } + + /** + * @param string $dependency + * @param string $version + * + * @return bool + */ + public function isDependencyLesserThan($dependency, $version) + { + return !$this->isDependencyAtLeast($dependency, $version); + } + + /** + * @param string $dependency + * @param string $version + * @param array $environments + * + * @throws \Exception + * + * @return $this + */ + public function setDependencyVersion($dependency, $version, $environments = array('require', 'require-dev')) + { + return $this->setDependencyVersions(array($dependency => $version), $environments); + } + + /** + * @param array $dependencies + * @param array $environments + * + * @throws \Exception + * + * @return $this + */ + public function setDependencyVersions($dependencies, $environments = array('require', 'require-dev')) + { + if (!$this->composerFilePath) { + throw new \RuntimeException('No composer instance detected.'); + } + + $touched = false; + + foreach ($environments as $environment) { + foreach ($dependencies as $dependency => $version) { + if (isset($this->dependencies[$environment], $this->dependencies[$environment][$dependency])) { + $this->dependencies[$environment][$dependency] = $version; + $touched = true; + } + } + } + + if ($touched) { + if (!$this->composerFilePath) { + throw new \RuntimeException('composer.json not found (custom vendor-dir are not yet supported).'); + } + + $file = new JsonFile($this->composerFilePath); + $file->write($this->dependencies); + } + + return $this; + } + + /** + * @return $this + */ + public function update() + { + $output = shell_exec('composer update --no-scripts'); + + if (!empty($output)) { + $this->write($output); + } + + return $this; + } + + /** + * @param string|array $text + */ + public function write($text) + { + if ($this->io) { + $this->io->write($text); + + return; + } + + if (is_array($text)) { + $text = implode("\n", $text); + } + + echo $text; + } + + /** + * @return bool + */ + public function isInteractive() + { + return $this->io && $this->io->isInteractive(); + } +} diff --git a/vendor/kylekatarnls/update-helper/src/UpdateHelper/UpdateHelperInterface.php b/vendor/kylekatarnls/update-helper/src/UpdateHelper/UpdateHelperInterface.php new file mode 100644 index 00000000..3809dc0f --- /dev/null +++ b/vendor/kylekatarnls/update-helper/src/UpdateHelper/UpdateHelperInterface.php @@ -0,0 +1,8 @@ +createUserProvider($config['provider'] ?? null), - $this->app['request'] + $this->app['request'], + $config['input_key'] ?? 'api_token', + $config['storage_key'] ?? 'api_token' ); $this->app->refresh('request', $guard, 'setRequest'); diff --git a/vendor/laravel/framework/src/Illuminate/Auth/LICENSE.md b/vendor/laravel/framework/src/Illuminate/Auth/LICENSE.md new file mode 100644 index 00000000..79810c84 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Auth/LICENSE.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Taylor Otwell + +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 the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Middleware/AuthenticateWithBasicAuth.php b/vendor/laravel/framework/src/Illuminate/Auth/Middleware/AuthenticateWithBasicAuth.php index c51df906..92c81e68 100644 --- a/vendor/laravel/framework/src/Illuminate/Auth/Middleware/AuthenticateWithBasicAuth.php +++ b/vendor/laravel/framework/src/Illuminate/Auth/Middleware/AuthenticateWithBasicAuth.php @@ -33,9 +33,13 @@ class AuthenticateWithBasicAuth * @param string|null $guard * @param string|null $field * @return mixed + * + * @throws \Symfony\Component\HttpKernel\Exception\UnauthorizedHttpException */ public function handle($request, Closure $next, $guard = null, $field = null) { - return $this->auth->guard($guard)->basic($field ?: 'email') ?: $next($request); + $this->auth->guard($guard)->basic($field ?: 'email'); + + return $next($request); } } diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Notifications/ResetPassword.php b/vendor/laravel/framework/src/Illuminate/Auth/Notifications/ResetPassword.php index c2978fe6..7a6cdff5 100644 --- a/vendor/laravel/framework/src/Illuminate/Auth/Notifications/ResetPassword.php +++ b/vendor/laravel/framework/src/Illuminate/Auth/Notifications/ResetPassword.php @@ -60,6 +60,7 @@ class ResetPassword extends Notification ->subject(Lang::getFromJson('Reset Password Notification')) ->line(Lang::getFromJson('You are receiving this email because we received a password reset request for your account.')) ->action(Lang::getFromJson('Reset Password'), url(config('app.url').route('password.reset', $this->token, false))) + ->line(Lang::getFromJson('This password reset link will expire in :count minutes.', ['count' => config('auth.passwords.users.expire')])) ->line(Lang::getFromJson('If you did not request a password reset, no further action is required.')); } diff --git a/vendor/laravel/framework/src/Illuminate/Broadcasting/BroadcastController.php b/vendor/laravel/framework/src/Illuminate/Broadcasting/BroadcastController.php index f71c9237..486a6023 100644 --- a/vendor/laravel/framework/src/Illuminate/Broadcasting/BroadcastController.php +++ b/vendor/laravel/framework/src/Illuminate/Broadcasting/BroadcastController.php @@ -16,6 +16,10 @@ class BroadcastController extends Controller */ public function authenticate(Request $request) { + if ($request->hasSession()) { + $request->session()->reflash(); + } + return Broadcast::auth($request); } } diff --git a/vendor/laravel/framework/src/Illuminate/Broadcasting/LICENSE.md b/vendor/laravel/framework/src/Illuminate/Broadcasting/LICENSE.md new file mode 100644 index 00000000..79810c84 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Broadcasting/LICENSE.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Taylor Otwell + +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 the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/vendor/laravel/framework/src/Illuminate/Bus/LICENSE.md b/vendor/laravel/framework/src/Illuminate/Bus/LICENSE.md new file mode 100644 index 00000000..79810c84 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Bus/LICENSE.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Taylor Otwell + +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 the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/vendor/laravel/framework/src/Illuminate/Cache/CacheManager.php b/vendor/laravel/framework/src/Illuminate/Cache/CacheManager.php index 6c2e6d8f..2d8f7c4a 100755 --- a/vendor/laravel/framework/src/Illuminate/Cache/CacheManager.php +++ b/vendor/laravel/framework/src/Illuminate/Cache/CacheManager.php @@ -46,7 +46,7 @@ class CacheManager implements FactoryContract } /** - * Get a cache store instance by name. + * Get a cache store instance by name, wrapped in a repository. * * @param string|null $name * @return \Illuminate\Contracts\Cache\Repository @@ -124,7 +124,7 @@ class CacheManager implements FactoryContract * Create an instance of the APC cache driver. * * @param array $config - * @return \Illuminate\Cache\ApcStore + * @return \Illuminate\Cache\Repository */ protected function createApcDriver(array $config) { @@ -136,7 +136,7 @@ class CacheManager implements FactoryContract /** * Create an instance of the array cache driver. * - * @return \Illuminate\Cache\ArrayStore + * @return \Illuminate\Cache\Repository */ protected function createArrayDriver() { @@ -147,7 +147,7 @@ class CacheManager implements FactoryContract * Create an instance of the file cache driver. * * @param array $config - * @return \Illuminate\Cache\FileStore + * @return \Illuminate\Cache\Repository */ protected function createFileDriver(array $config) { @@ -158,7 +158,7 @@ class CacheManager implements FactoryContract * Create an instance of the Memcached cache driver. * * @param array $config - * @return \Illuminate\Cache\MemcachedStore + * @return \Illuminate\Cache\Repository */ protected function createMemcachedDriver(array $config) { @@ -177,7 +177,7 @@ class CacheManager implements FactoryContract /** * Create an instance of the Null cache driver. * - * @return \Illuminate\Cache\NullStore + * @return \Illuminate\Cache\Repository */ protected function createNullDriver() { @@ -188,7 +188,7 @@ class CacheManager implements FactoryContract * Create an instance of the Redis cache driver. * * @param array $config - * @return \Illuminate\Cache\RedisStore + * @return \Illuminate\Cache\Repository */ protected function createRedisDriver(array $config) { @@ -203,7 +203,7 @@ class CacheManager implements FactoryContract * Create an instance of the database cache driver. * * @param array $config - * @return \Illuminate\Cache\DatabaseStore + * @return \Illuminate\Cache\Repository */ protected function createDatabaseDriver(array $config) { @@ -300,7 +300,7 @@ class CacheManager implements FactoryContract /** * Register a custom driver creator Closure. * - * @param string $driver + * @param string $driver * @param \Closure $callback * @return $this */ @@ -315,7 +315,7 @@ class CacheManager implements FactoryContract * Dynamically call the default driver instance. * * @param string $method - * @param array $parameters + * @param array $parameters * @return mixed */ public function __call($method, $parameters) diff --git a/vendor/laravel/framework/src/Illuminate/Cache/LICENSE.md b/vendor/laravel/framework/src/Illuminate/Cache/LICENSE.md new file mode 100644 index 00000000..79810c84 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Cache/LICENSE.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Taylor Otwell + +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 the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/vendor/laravel/framework/src/Illuminate/Cache/TaggedCache.php b/vendor/laravel/framework/src/Illuminate/Cache/TaggedCache.php index 88f1f8e3..28e1d990 100644 --- a/vendor/laravel/framework/src/Illuminate/Cache/TaggedCache.php +++ b/vendor/laravel/framework/src/Illuminate/Cache/TaggedCache.php @@ -94,4 +94,14 @@ class TaggedCache extends Repository { parent::event($event->setTags($this->tags->getNames())); } + + /** + * Get the tag set instance. + * + * @return \Illuminate\Cache\TagSet + */ + public function getTags() + { + return $this->tags; + } } diff --git a/vendor/laravel/framework/src/Illuminate/Config/LICENSE.md b/vendor/laravel/framework/src/Illuminate/Config/LICENSE.md new file mode 100644 index 00000000..79810c84 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Config/LICENSE.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Taylor Otwell + +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 the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/vendor/laravel/framework/src/Illuminate/Console/Command.php b/vendor/laravel/framework/src/Illuminate/Console/Command.php index b35fcf02..48fc84a1 100755 --- a/vendor/laravel/framework/src/Illuminate/Console/Command.php +++ b/vendor/laravel/framework/src/Illuminate/Console/Command.php @@ -299,7 +299,7 @@ class Command extends SymfonyCommand * Get the value of a command option. * * @param string|null $key - * @return string|array|null + * @return string|array|bool|null */ public function option($key = null) { diff --git a/vendor/laravel/framework/src/Illuminate/Console/LICENSE.md b/vendor/laravel/framework/src/Illuminate/Console/LICENSE.md new file mode 100644 index 00000000..79810c84 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Console/LICENSE.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Taylor Otwell + +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 the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/vendor/laravel/framework/src/Illuminate/Container/LICENSE.md b/vendor/laravel/framework/src/Illuminate/Container/LICENSE.md new file mode 100644 index 00000000..79810c84 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Container/LICENSE.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Taylor Otwell + +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 the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/vendor/laravel/framework/src/Illuminate/Contracts/Foundation/Application.php b/vendor/laravel/framework/src/Illuminate/Contracts/Foundation/Application.php index e2e03cf6..d8e505a8 100644 --- a/vendor/laravel/framework/src/Illuminate/Contracts/Foundation/Application.php +++ b/vendor/laravel/framework/src/Illuminate/Contracts/Foundation/Application.php @@ -83,7 +83,7 @@ interface Application extends Container /** * Register a new boot listener. * - * @param mixed $callback + * @param callable $callback * @return void */ public function booting($callback); @@ -91,7 +91,7 @@ interface Application extends Container /** * Register a new "booted" listener. * - * @param mixed $callback + * @param callable $callback * @return void */ public function booted($callback); diff --git a/vendor/laravel/framework/src/Illuminate/Contracts/LICENSE.md b/vendor/laravel/framework/src/Illuminate/Contracts/LICENSE.md new file mode 100644 index 00000000..79810c84 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Contracts/LICENSE.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Taylor Otwell + +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 the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/vendor/laravel/framework/src/Illuminate/Contracts/Mail/Mailer.php b/vendor/laravel/framework/src/Illuminate/Contracts/Mail/Mailer.php index 5e68c32b..75f6f701 100644 --- a/vendor/laravel/framework/src/Illuminate/Contracts/Mail/Mailer.php +++ b/vendor/laravel/framework/src/Illuminate/Contracts/Mail/Mailer.php @@ -21,7 +21,7 @@ interface Mailer public function bcc($users); /** - * Send a new message when only a raw text part. + * Send a new message with only a raw text part. * * @param string $text * @param mixed $callback diff --git a/vendor/laravel/framework/src/Illuminate/Contracts/Queue/Job.php b/vendor/laravel/framework/src/Illuminate/Contracts/Queue/Job.php index 972cc1fe..9449d07c 100644 --- a/vendor/laravel/framework/src/Illuminate/Contracts/Queue/Job.php +++ b/vendor/laravel/framework/src/Illuminate/Contracts/Queue/Job.php @@ -28,6 +28,8 @@ interface Job /** * Release the job back into the queue. * + * Accepts a delay specified in seconds. + * * @param int $delay * @return void */ diff --git a/vendor/laravel/framework/src/Illuminate/Cookie/LICENSE.md b/vendor/laravel/framework/src/Illuminate/Cookie/LICENSE.md new file mode 100644 index 00000000..79810c84 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Cookie/LICENSE.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Taylor Otwell + +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 the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/vendor/laravel/framework/src/Illuminate/Database/Concerns/BuildsQueries.php b/vendor/laravel/framework/src/Illuminate/Database/Concerns/BuildsQueries.php index c712bbef..54b18ed8 100644 --- a/vendor/laravel/framework/src/Illuminate/Database/Concerns/BuildsQueries.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Concerns/BuildsQueries.php @@ -99,7 +99,7 @@ trait BuildsQueries /** * Pass the query to a given callback. * - * @param \Closure $callback + * @param callable $callback * @return \Illuminate\Database\Query\Builder */ public function tap($callback) diff --git a/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/StatusCommand.php b/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/StatusCommand.php index 520f6c7f..2e9f4f36 100644 --- a/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/StatusCommand.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/StatusCommand.php @@ -52,7 +52,7 @@ class StatusCommand extends BaseCommand $this->migrator->setConnection($this->option('database')); if (! $this->migrator->repositoryExists()) { - return $this->error('No migrations found.'); + return $this->error('Migration table not found.'); } $ran = $this->migrator->getRepository()->getRan(); diff --git a/vendor/laravel/framework/src/Illuminate/Database/DetectsLostConnections.php b/vendor/laravel/framework/src/Illuminate/Database/DetectsLostConnections.php index e1fe5e6f..7a69bec0 100644 --- a/vendor/laravel/framework/src/Illuminate/Database/DetectsLostConnections.php +++ b/vendor/laravel/framework/src/Illuminate/Database/DetectsLostConnections.php @@ -34,10 +34,10 @@ trait DetectsLostConnections 'reset by peer', 'Physical connection is not usable', 'TCP Provider: Error code 0x68', - 'php_network_getaddresses: getaddrinfo failed: Name or service not known', 'ORA-03114', 'Packets out of order. Expected', 'Adaptive Server connection failed', + 'Communication link failure', ]); } } diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php index 2d530a7d..bbe5c0f3 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php @@ -3,6 +3,7 @@ namespace Illuminate\Database\Eloquent; use Closure; +use Exception; use BadMethodCallException; use Illuminate\Support\Arr; use Illuminate\Support\Str; @@ -14,6 +15,8 @@ use Illuminate\Database\Eloquent\Relations\Relation; use Illuminate\Database\Query\Builder as QueryBuilder; /** + * @property-read HigherOrderBuilderProxy $orWhere + * * @mixin \Illuminate\Database\Query\Builder */ class Builder @@ -904,7 +907,7 @@ class Builder * Call the given local model scopes. * * @param array $scopes - * @return mixed + * @return static|mixed */ public function scopes(array $scopes) { @@ -933,7 +936,7 @@ class Builder /** * Apply the scopes to the Eloquent builder instance and return it. * - * @return \Illuminate\Database\Eloquent\Builder|static + * @return static */ public function applyScopes() { @@ -1281,6 +1284,23 @@ class Builder return Arr::get($this->localMacros, $name); } + /** + * Dynamically access builder proxies. + * + * @param string $key + * @return mixed + * + * @throws \Exception + */ + public function __get($key) + { + if ($key === 'orWhere') { + return new HigherOrderBuilderProxy($this, $key); + } + + throw new Exception("Property [{$key}] does not exist on the Eloquent builder instance."); + } + /** * Dynamically handle calls into the query instance. * diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Collection.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Collection.php index 44690fb1..29914cba 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Collection.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Collection.php @@ -6,7 +6,7 @@ use LogicException; use Illuminate\Support\Arr; use Illuminate\Support\Str; use Illuminate\Contracts\Support\Arrayable; -use Illuminate\Database\Eloquent\Relations\Pivot; +use Illuminate\Contracts\Queue\QueueableEntity; use Illuminate\Contracts\Queue\QueueableCollection; use Illuminate\Support\Collection as BaseCollection; @@ -541,7 +541,7 @@ class Collection extends BaseCollection implements QueueableCollection return []; } - return $this->first() instanceof Pivot + return $this->first() instanceof QueueableEntity ? $this->map->getQueueableId()->all() : $this->modelKeys(); } diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasEvents.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasEvents.php index 720266d0..7f1ffd7a 100644 --- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasEvents.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasEvents.php @@ -351,4 +351,25 @@ trait HasEvents { static::$dispatcher = null; } + + /** + * Execute a callback without firing any model events for any model type. + * + * @param callable $callback + * @return mixed + */ + public static function withoutEvents(callable $callback) + { + $dispatcher = static::getEventDispatcher(); + + static::unsetEventDispatcher(); + + try { + return $callback(); + } finally { + if ($dispatcher) { + static::setEventDispatcher($dispatcher); + } + } + } } diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/HigherOrderBuilderProxy.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/HigherOrderBuilderProxy.php new file mode 100644 index 00000000..179d4a38 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/HigherOrderBuilderProxy.php @@ -0,0 +1,49 @@ +method = $method; + $this->builder = $builder; + } + + /** + * Proxy a scope call onto the query builder. + * + * @param string $method + * @param array $parameters + * @return mixed + */ + public function __call($method, $parameters) + { + return $this->builder->{$this->method}(function ($value) use ($method, $parameters) { + return $value->{$method}(...$parameters); + }); + } +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php index 6faf855a..f6568e73 100644 --- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php @@ -544,7 +544,7 @@ abstract class Model implements ArrayAccess, Arrayable, Jsonable, JsonSerializab */ protected function incrementOrDecrement($column, $amount, $extra, $method) { - $query = $this->newModelQuery(); + $query = $this->newQueryWithoutRelationships(); if (! $this->exists) { return $query->{$method}($column, $amount, $extra); @@ -1408,10 +1408,12 @@ abstract class Model implements ArrayAccess, Arrayable, Jsonable, JsonSerializab $relations = []; foreach ($this->getRelations() as $key => $relation) { - if (method_exists($this, $key)) { - $relations[] = $key; + if (! method_exists($this, $key)) { + continue; } + $relations[] = $key; + if ($relation instanceof QueueableCollection) { foreach ($relation->getQueueableRelations() as $collectionValue) { $relations[] = $key.'.'.$collectionValue; diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/BelongsToMany.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/BelongsToMany.php index 2eebe421..89d547a3 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/BelongsToMany.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/BelongsToMany.php @@ -821,7 +821,7 @@ class BelongsToMany extends Relation // the related model's timestamps, to make sure these all reflect the changes // to the parent models. This will help us keep any caching synced up here. if (count($ids = $this->allRelatedIds()) > 0) { - $this->getRelated()->newModelQuery()->whereIn($key, $ids)->update($columns); + $this->getRelated()->newQueryWithoutRelationships()->whereIn($key, $ids)->update($columns); } } diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Concerns/AsPivot.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Concerns/AsPivot.php index 58f5430e..7fe75e6d 100644 --- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Concerns/AsPivot.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Concerns/AsPivot.php @@ -124,7 +124,7 @@ trait AsPivot */ protected function getDeleteQuery() { - return $this->newModelQuery()->where([ + return $this->newQueryWithoutRelationships()->where([ $this->foreignKey => $this->getOriginal($this->foreignKey, $this->getAttribute($this->foreignKey)), $this->relatedKey => $this->getOriginal($this->relatedKey, $this->getAttribute($this->relatedKey)), ]); diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasOneOrMany.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasOneOrMany.php index 13e1bbae..af59df96 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasOneOrMany.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasOneOrMany.php @@ -255,8 +255,8 @@ abstract class HasOneOrMany extends Relation /** * Attach a collection of models to the parent instance. * - * @param \Traversable|array $models - * @return \Traversable|array + * @param iterable $models + * @return iterable */ public function saveMany($models) { diff --git a/vendor/laravel/framework/src/Illuminate/Database/LICENSE.md b/vendor/laravel/framework/src/Illuminate/Database/LICENSE.md new file mode 100644 index 00000000..79810c84 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/LICENSE.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Taylor Otwell + +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 the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php b/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php index b8332efe..4fa3c6db 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php @@ -467,7 +467,7 @@ class Builder * Add a "join where" clause to the query. * * @param string $table - * @param string $first + * @param \Closure|string $first * @param string $operator * @param string $second * @return \Illuminate\Database\Query\Builder|static @@ -482,7 +482,7 @@ class Builder * * @param \Closure|\Illuminate\Database\Query\Builder|string $query * @param string $as - * @param string $first + * @param \Closure|string $first * @param string|null $operator * @param string|null $second * @return \Illuminate\Database\Query\Builder|static @@ -510,7 +510,7 @@ class Builder * Add a "right join where" clause to the query. * * @param string $table - * @param string $first + * @param \Closure|string $first * @param string $operator * @param string $second * @return \Illuminate\Database\Query\Builder|static @@ -525,7 +525,7 @@ class Builder * * @param \Closure|\Illuminate\Database\Query\Builder|string $query * @param string $as - * @param string $first + * @param \Closure|string $first * @param string|null $operator * @param string|null $second * @return \Illuminate\Database\Query\Builder|static diff --git a/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/PostgresGrammar.php b/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/PostgresGrammar.php index be5b882d..b3f8b477 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/PostgresGrammar.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/PostgresGrammar.php @@ -8,6 +8,25 @@ use Illuminate\Database\Query\Builder; class PostgresGrammar extends Grammar { + /** + * The components that make up a select clause. + * + * @var array + */ + protected $selectComponents = [ + 'aggregate', + 'columns', + 'from', + 'joins', + 'wheres', + 'groups', + 'havings', + 'orders', + 'limit', + 'offset', + 'lock', + ]; + /** * All of the available clause operators. * @@ -85,6 +104,40 @@ class PostgresGrammar extends Grammar return 'extract('.$type.' from '.$this->wrap($where['column']).') '.$where['operator'].' '.$value; } + /** + * Compile a select query into SQL. + * + * @param \Illuminate\Database\Query\Builder $query + * @return string + */ + public function compileSelect(Builder $query) + { + if ($query->unions && $query->aggregate) { + return $this->compileUnionAggregate($query); + } + + $sql = parent::compileSelect($query); + + if ($query->unions) { + $sql = '('.$sql.') '.$this->compileUnions($query); + } + + return $sql; + } + + /** + * Compile a single union statement. + * + * @param array $union + * @return string + */ + protected function compileUnion(array $union) + { + $conjunction = $union['all'] ? ' union all ' : ' union '; + + return $conjunction.'('.$union['query']->toSql().')'; + } + /** * Compile a "JSON contains" statement into SQL. * diff --git a/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/SqlServerGrammar.php b/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/SqlServerGrammar.php index b2aff7b1..ed7f1761 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/SqlServerGrammar.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/SqlServerGrammar.php @@ -415,16 +415,6 @@ class SqlServerGrammar extends Grammar ); } - /** - * Determine if the grammar supports savepoints. - * - * @return bool - */ - public function supportsSavepoints() - { - return true; - } - /** * Compile the SQL statement to define a savepoint. * diff --git a/vendor/laravel/framework/src/Illuminate/Database/Schema/Blueprint.php b/vendor/laravel/framework/src/Illuminate/Database/Schema/Blueprint.php index ff58904a..88317154 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Schema/Blueprint.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Schema/Blueprint.php @@ -1157,6 +1157,18 @@ class Blueprint return $this->addColumn('multipolygon', $column); } + /** + * Create a new generated, computed column on the table. + * + * @param string $column + * @param string $expression + * @return \Illuminate\Database\Schema\ColumnDefinition + */ + public function computed($column, $expression) + { + return $this->addColumn('computed', $column, compact('expression')); + } + /** * Add the proper columns for a polymorphic table. * diff --git a/vendor/laravel/framework/src/Illuminate/Database/Schema/ColumnDefinition.php b/vendor/laravel/framework/src/Illuminate/Database/Schema/ColumnDefinition.php index dbd3425b..25166a1e 100644 --- a/vendor/laravel/framework/src/Illuminate/Database/Schema/ColumnDefinition.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Schema/ColumnDefinition.php @@ -15,7 +15,7 @@ use Illuminate\Support\Fluent; * @method ColumnDefinition default(mixed $value) Specify a "default" value for the column * @method ColumnDefinition first() Place the column "first" in the table (MySQL) * @method ColumnDefinition generatedAs(string $expression) Create a SQL compliant identity column (PostgreSQL) - * @method ColumnDefinition index(string $indexName) Add an index + * @method ColumnDefinition index(string $indexName = null) Add an index * @method ColumnDefinition nullable(bool $value = true) Allow NULL values to be inserted into the column * @method ColumnDefinition primary() Add a primary index * @method ColumnDefinition spatialIndex() Add a spatial index @@ -24,6 +24,7 @@ use Illuminate\Support\Fluent; * @method ColumnDefinition unsigned() Set the INTEGER column as UNSIGNED (MySQL) * @method ColumnDefinition useCurrent() Set the TIMESTAMP column to use CURRENT_TIMESTAMP as default value * @method ColumnDefinition virtualAs(string $expression) Create a virtual generated column (MySQL) + * @method ColumnDefinition persisted() Mark the computed generated column as persistent (SQL Server) */ class ColumnDefinition extends Fluent { diff --git a/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/Grammar.php b/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/Grammar.php index 1ea4dabc..0f81731b 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/Grammar.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/Grammar.php @@ -2,6 +2,7 @@ namespace Illuminate\Database\Schema\Grammars; +use RuntimeException; use Illuminate\Support\Fluent; use Doctrine\DBAL\Schema\TableDiff; use Illuminate\Database\Connection; @@ -127,6 +128,19 @@ abstract class Grammar extends BaseGrammar return $this->{'type'.ucfirst($column->type)}($column); } + /** + * Create the column definition for a generated, computed column type. + * + * @param \Illuminate\Support\Fluent $column + * @return void + * + * @throws \RuntimeException + */ + protected function typeComputed(Fluent $column) + { + throw new RuntimeException('This database driver does not support the computed type.'); + } + /** * Add the column modifiers to the definition. * diff --git a/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/MySqlGrammar.php b/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/MySqlGrammar.php index 2e5ec247..b7dedf62 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/MySqlGrammar.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/MySqlGrammar.php @@ -2,6 +2,7 @@ namespace Illuminate\Database\Schema\Grammars; +use RuntimeException; use Illuminate\Support\Fluent; use Illuminate\Database\Connection; use Illuminate\Database\Schema\Blueprint; @@ -833,6 +834,19 @@ class MySqlGrammar extends Grammar return 'multipolygon'; } + /** + * Create the column definition for a generated, computed column type. + * + * @param \Illuminate\Support\Fluent $column + * @return void + * + * @throws \RuntimeException + */ + protected function typeComputed(Fluent $column) + { + throw new RuntimeException('This database driver requires a type, see the virtualAs / storedAs modifiers.'); + } + /** * Get the SQL for a generated virtual column modifier. * diff --git a/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/SqlServerGrammar.php b/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/SqlServerGrammar.php index 38f55fcf..dfcc52fa 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/SqlServerGrammar.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/SqlServerGrammar.php @@ -19,7 +19,7 @@ class SqlServerGrammar extends Grammar * * @var array */ - protected $modifiers = ['Increment', 'Collate', 'Nullable', 'Default']; + protected $modifiers = ['Increment', 'Collate', 'Nullable', 'Default', 'Persisted']; /** * The columns available as serials. @@ -733,6 +733,17 @@ class SqlServerGrammar extends Grammar return 'geography'; } + /** + * Create the column definition for a generated, computed column type. + * + * @param \Illuminate\Support\Fluent $column + * @return string|null + */ + protected function typeComputed(Fluent $column) + { + return "as ({$column->expression})"; + } + /** * Get the SQL for a collation column modifier. * @@ -756,7 +767,9 @@ class SqlServerGrammar extends Grammar */ protected function modifyNullable(Blueprint $blueprint, Fluent $column) { - return $column->nullable ? ' null' : ' not null'; + if ($column->type !== 'computed') { + return $column->nullable ? ' null' : ' not null'; + } } /** @@ -787,6 +800,20 @@ class SqlServerGrammar extends Grammar } } + /** + * Get the SQL for a generated stored column modifier. + * + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $column + * @return string|null + */ + protected function modifyPersisted(Blueprint $blueprint, Fluent $column) + { + if ($column->persisted) { + return ' persisted'; + } + } + /** * Wrap a table in keyword identifiers. * diff --git a/vendor/laravel/framework/src/Illuminate/Encryption/LICENSE.md b/vendor/laravel/framework/src/Illuminate/Encryption/LICENSE.md new file mode 100644 index 00000000..79810c84 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Encryption/LICENSE.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Taylor Otwell + +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 the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/vendor/laravel/framework/src/Illuminate/Events/LICENSE.md b/vendor/laravel/framework/src/Illuminate/Events/LICENSE.md new file mode 100644 index 00000000..79810c84 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Events/LICENSE.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Taylor Otwell + +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 the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/vendor/laravel/framework/src/Illuminate/Filesystem/LICENSE.md b/vendor/laravel/framework/src/Illuminate/Filesystem/LICENSE.md new file mode 100644 index 00000000..79810c84 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Filesystem/LICENSE.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Taylor Otwell + +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 the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Application.php b/vendor/laravel/framework/src/Illuminate/Foundation/Application.php index 62f35996..c225dac7 100755 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Application.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Application.php @@ -29,7 +29,7 @@ class Application extends Container implements ApplicationContract, HttpKernelIn * * @var string */ - const VERSION = '5.7.21'; + const VERSION = '5.7.28'; /** * The base path for the Laravel installation. @@ -55,28 +55,28 @@ class Application extends Container implements ApplicationContract, HttpKernelIn /** * The array of booting callbacks. * - * @var array + * @var callable[] */ protected $bootingCallbacks = []; /** * The array of booted callbacks. * - * @var array + * @var callable[] */ protected $bootedCallbacks = []; /** * The array of terminating callbacks. * - * @var array + * @var callable[] */ protected $terminatingCallbacks = []; /** * All of the registered service providers. * - * @var array + * @var \Illuminate\Support\ServiceProvider[] */ protected $serviceProviders = []; @@ -94,6 +94,13 @@ class Application extends Container implements ApplicationContract, HttpKernelIn */ protected $deferredServices = []; + /** + * The custom application path defined by the developer. + * + * @var string + */ + protected $appPath; + /** * The custom database path defined by the developer. * @@ -191,7 +198,7 @@ class Application extends Container implements ApplicationContract, HttpKernelIn /** * Run the given array of bootstrap classes. * - * @param array $bootstrappers + * @param string[] $bootstrappers * @return void */ public function bootstrapWith(array $bootstrappers) @@ -290,12 +297,29 @@ class Application extends Container implements ApplicationContract, HttpKernelIn /** * Get the path to the application "app" directory. * - * @param string $path Optionally, a path to append to the app path + * @param string $path * @return string */ public function path($path = '') { - return $this->basePath.DIRECTORY_SEPARATOR.'app'.($path ? DIRECTORY_SEPARATOR.$path : $path); + $appPath = $this->appPath ?: $this->basePath.DIRECTORY_SEPARATOR.'app'; + + return $appPath.($path ? DIRECTORY_SEPARATOR.$path : $path); + } + + /** + * Set the application directory. + * + * @param string $path + * @return $this + */ + public function useAppPath($path) + { + $this->appPath = $path; + + $this->instance('path', $path); + + return $this; } /** @@ -799,7 +823,7 @@ class Application extends Container implements ApplicationContract, HttpKernelIn /** * Register a new boot listener. * - * @param mixed $callback + * @param callable $callback * @return void */ public function booting($callback) @@ -810,7 +834,7 @@ class Application extends Container implements ApplicationContract, HttpKernelIn /** * Register a new "booted" listener. * - * @param mixed $callback + * @param callable $callback * @return void */ public function booted($callback) @@ -825,7 +849,7 @@ class Application extends Container implements ApplicationContract, HttpKernelIn /** * Call the booting callbacks for the application. * - * @param array $callbacks + * @param callable[] $callbacks * @return void */ protected function fireAppCallbacks(array $callbacks) @@ -861,7 +885,7 @@ class Application extends Container implements ApplicationContract, HttpKernelIn */ public function getCachedServicesPath() { - return $this->bootstrapPath().'/cache/services.php'; + return $_ENV['APP_SERVICES_CACHE'] ?? $this->bootstrapPath().'/cache/services.php'; } /** @@ -871,7 +895,7 @@ class Application extends Container implements ApplicationContract, HttpKernelIn */ public function getCachedPackagesPath() { - return $this->bootstrapPath().'/cache/packages.php'; + return $_ENV['APP_PACKAGES_CACHE'] ?? $this->bootstrapPath().'/cache/packages.php'; } /** @@ -911,7 +935,7 @@ class Application extends Container implements ApplicationContract, HttpKernelIn */ public function getCachedRoutesPath() { - return $this->bootstrapPath().'/cache/routes.php'; + return $_ENV['APP_ROUTES_CACHE'] ?? $this->bootstrapPath().'/cache/routes.php'; } /** diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/None.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/None.php index bc93a2a9..f3203c4e 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/None.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/None.php @@ -38,7 +38,7 @@ class None extends Preset $packages['jquery'], $packages['popper.js'], $packages['vue'], - $packages['babel-preset-react'], + $packages['@babel/preset-react'], $packages['react'], $packages['react-dom'] ); diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/React.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/React.php index e7f3b3b6..b86851f9 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/React.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/React.php @@ -31,7 +31,7 @@ class React extends Preset protected static function updatePackageArray(array $packages) { return [ - 'babel-preset-react' => '^6.23.0', + '@babel/preset-react' => '^7.0.0', 'react' => '^16.2.0', 'react-dom' => '^16.2.0', ] + Arr::except($packages, ['vue']); diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/Vue.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/Vue.php index d25ffb8d..6d79fa1f 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/Vue.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/Vue.php @@ -31,7 +31,7 @@ class Vue extends Preset protected static function updatePackageArray(array $packages) { return ['vue' => '^2.5.17'] + Arr::except($packages, [ - 'babel-preset-react', + '@babel/preset-react', 'react', 'react-dom', ]); diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/vue-stubs/app.js b/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/vue-stubs/app.js index 98eca79f..32d79b48 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/vue-stubs/app.js +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/vue-stubs/app.js @@ -9,14 +9,25 @@ require('./bootstrap'); window.Vue = require('vue'); +/** + * The following block of code may be used to automatically register your + * Vue components. It will recursively scan this directory for the Vue + * components and automatically register them with their "basename". + * + * Eg. ./components/ExampleComponent.vue -> + */ + +// const files = require.context('./', true, /\.vue$/i) +// files.keys().map(key => Vue.component(key.split('/').pop().split('.')[0], files(key).default)) + +Vue.component('example-component', require('./components/ExampleComponent.vue').default); + /** * Next, we will create a fresh Vue application instance and attach it to * the page. Then, you may begin adding components to this application * or customize the JavaScript scaffolding to fit your unique needs. */ -Vue.component('example-component', require('./components/ExampleComponent.vue')); - const app = new Vue({ el: '#app' }); diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/provider.stub b/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/provider.stub index 23b237c9..fcd5d124 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/provider.stub +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/provider.stub @@ -6,16 +6,6 @@ use Illuminate\Support\ServiceProvider; class DummyClass extends ServiceProvider { - /** - * Bootstrap services. - * - * @return void - */ - public function boot() - { - // - } - /** * Register services. * @@ -25,4 +15,14 @@ class DummyClass extends ServiceProvider { // } + + /** + * Bootstrap services. + * + * @return void + */ + public function boot() + { + // + } } diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/test.stub b/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/test.stub index 173fb8d8..9de1d020 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/test.stub +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/test.stub @@ -9,12 +9,14 @@ use Illuminate\Foundation\Testing\RefreshDatabase; class DummyClass extends TestCase { /** - * A basic test example. + * A basic feature test example. * * @return void */ public function testExample() { - $this->assertTrue(true); + $response = $this->get('/'); + + $response->assertStatus(200); } } diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/unit-test.stub b/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/unit-test.stub index 173fb8d8..00deed88 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/unit-test.stub +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/unit-test.stub @@ -9,7 +9,7 @@ use Illuminate\Foundation\Testing\RefreshDatabase; class DummyClass extends TestCase { /** - * A basic test example. + * A basic unit test example. * * @return void */ diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php b/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php index 4a2d2853..bd40a3ac 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php @@ -212,7 +212,7 @@ class Handler implements ExceptionHandlerContract * * @param \Illuminate\Http\Request $request * @param \Illuminate\Auth\AuthenticationException $exception - * @return \Illuminate\Http\Response + * @return \Symfony\Component\HttpFoundation\Response */ protected function unauthenticated($request, AuthenticationException $exception) { @@ -249,7 +249,7 @@ class Handler implements ExceptionHandlerContract protected function invalid($request, ValidationException $exception) { return redirect($exception->redirectTo ?? url()->previous()) - ->withInput($request->except($this->dontFlash)) + ->withInput(array_except($request->input(), $this->dontFlash)) ->withErrors($exception->errors(), $exception->errorBag); } diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/views/illustrated-layout.blade.php b/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/views/illustrated-layout.blade.php index 3730d05a..5fab02b9 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/views/illustrated-layout.blade.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/views/illustrated-layout.blade.php @@ -470,7 +470,7 @@ @yield('message')

- + diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Testing/RefreshDatabase.php b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/RefreshDatabase.php index 50fb3916..be336051 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Testing/RefreshDatabase.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/RefreshDatabase.php @@ -25,9 +25,9 @@ trait RefreshDatabase */ protected function usingInMemoryDatabase() { - return config('database.connections')[ - config('database.default') - ]['database'] === ':memory:'; + $default = config('database.default'); + + return config("database.connections.$default.database") === ':memory:'; } /** diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Testing/TestResponse.php b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/TestResponse.php index 6e459d9b..948294fa 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Testing/TestResponse.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/TestResponse.php @@ -638,12 +638,22 @@ class TestResponse */ public function assertJsonValidationErrors($keys) { - $errors = $this->json()['errors']; + $keys = Arr::wrap($keys); - foreach (Arr::wrap($keys) as $key) { - PHPUnit::assertTrue( - isset($errors[$key]), - "Failed to find a validation error in the response for key: '{$key}'" + PHPUnit::assertNotEmpty($keys, 'No keys were provided.'); + + $errors = $this->json()['errors'] ?? []; + + $errorMessage = $errors + ? 'Response has the following JSON validation errors:'. + PHP_EOL.PHP_EOL.json_encode($errors, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE).PHP_EOL + : 'Response does not have JSON validation errors.'; + + foreach ($keys as $key) { + PHPUnit::assertArrayHasKey( + $key, + $errors, + "Failed to find a validation error in the response for key: '{$key}'".PHP_EOL.PHP_EOL.$errorMessage ); } @@ -656,7 +666,7 @@ class TestResponse * @param string|array $keys * @return $this */ - public function assertJsonMissingValidationErrors($keys) + public function assertJsonMissingValidationErrors($keys = null) { $json = $this->json(); @@ -668,6 +678,13 @@ class TestResponse $errors = $json['errors']; + if (is_null($keys) && count($errors) > 0) { + PHPUnit::fail( + 'Response has unexpected validation errors: '.PHP_EOL.PHP_EOL. + json_encode($errors, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE) + ); + } + foreach (Arr::wrap($keys) as $key) { PHPUnit::assertFalse( isset($errors[$key]), @@ -934,7 +951,7 @@ class TestResponse PHPUnit::assertFalse( $hasErrors, 'Session has unexpected errors: '.PHP_EOL.PHP_EOL. - json_encode($errors, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) + json_encode($errors, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE) ); return $this; diff --git a/vendor/laravel/framework/src/Illuminate/Hashing/LICENSE.md b/vendor/laravel/framework/src/Illuminate/Hashing/LICENSE.md new file mode 100644 index 00000000..79810c84 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Hashing/LICENSE.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Taylor Otwell + +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 the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/vendor/laravel/framework/src/Illuminate/Http/LICENSE.md b/vendor/laravel/framework/src/Illuminate/Http/LICENSE.md new file mode 100644 index 00000000..79810c84 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Http/LICENSE.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Taylor Otwell + +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 the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/vendor/laravel/framework/src/Illuminate/Http/Resources/MergeValue.php b/vendor/laravel/framework/src/Illuminate/Http/Resources/MergeValue.php index 61858035..45701702 100644 --- a/vendor/laravel/framework/src/Illuminate/Http/Resources/MergeValue.php +++ b/vendor/laravel/framework/src/Illuminate/Http/Resources/MergeValue.php @@ -17,7 +17,7 @@ class MergeValue /** * Create new merge value instance. * - * @param \Illuminate\Support\Collection|array $data + * @param \Illuminate\Support\Collection|\JsonSerializable|array $data * @return void */ public function __construct($data) diff --git a/vendor/laravel/framework/src/Illuminate/Http/ResponseTrait.php b/vendor/laravel/framework/src/Illuminate/Http/ResponseTrait.php index d6237d3d..21cd4c51 100644 --- a/vendor/laravel/framework/src/Illuminate/Http/ResponseTrait.php +++ b/vendor/laravel/framework/src/Illuminate/Http/ResponseTrait.php @@ -116,6 +116,16 @@ trait ResponseTrait return $this; } + /** + * Get the callback of the response. + * + * @return string|null + */ + public function getCallback() + { + return $this->callback ?? null; + } + /** * Set the exception to attach to the response. * diff --git a/vendor/laravel/framework/src/Illuminate/Log/LICENSE.md b/vendor/laravel/framework/src/Illuminate/Log/LICENSE.md new file mode 100644 index 00000000..79810c84 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Log/LICENSE.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Taylor Otwell + +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 the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/vendor/laravel/framework/src/Illuminate/Log/LogManager.php b/vendor/laravel/framework/src/Illuminate/Log/LogManager.php index 49efe285..a6fe765b 100644 --- a/vendor/laravel/framework/src/Illuminate/Log/LogManager.php +++ b/vendor/laravel/framework/src/Illuminate/Log/LogManager.php @@ -15,6 +15,7 @@ use Monolog\Handler\ErrorLogHandler; use Monolog\Handler\HandlerInterface; use Monolog\Handler\RotatingFileHandler; use Monolog\Handler\SlackWebhookHandler; +use Monolog\Handler\WhatFailureGroupHandler; class LogManager implements LoggerInterface { @@ -216,6 +217,10 @@ class LogManager implements LoggerInterface return $this->channel($channel)->getHandlers(); })->all(); + if ($config['ignore_exceptions'] ?? false) { + $handlers = [new WhatFailureGroupHandler($handlers)]; + } + return new Monolog($this->parseChannel($config), $handlers); } diff --git a/vendor/laravel/framework/src/Illuminate/Mail/LICENSE.md b/vendor/laravel/framework/src/Illuminate/Mail/LICENSE.md new file mode 100644 index 00000000..79810c84 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Mail/LICENSE.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Taylor Otwell + +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 the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/vendor/laravel/framework/src/Illuminate/Mail/Mailer.php b/vendor/laravel/framework/src/Illuminate/Mail/Mailer.php index cb56d040..7455540b 100755 --- a/vendor/laravel/framework/src/Illuminate/Mail/Mailer.php +++ b/vendor/laravel/framework/src/Illuminate/Mail/Mailer.php @@ -62,9 +62,9 @@ class Mailer implements MailerContract, MailQueueContract protected $to; /** - * The queue implementation. + * The queue factory implementation. * - * @var \Illuminate\Contracts\Queue\Queue + * @var \Illuminate\Contracts\Queue\Factory */ protected $queue; @@ -172,7 +172,7 @@ class Mailer implements MailerContract, MailQueueContract } /** - * Send a new message when only a raw text part. + * Send a new message with only a raw text part. * * @param string $text * @param mixed $callback @@ -184,7 +184,7 @@ class Mailer implements MailerContract, MailQueueContract } /** - * Send a new message when only a plain part. + * Send a new message with only a plain part. * * @param string $view * @param array $data @@ -271,7 +271,7 @@ class Mailer implements MailerContract, MailQueueContract protected function sendMailable(MailableContract $mailable) { return $mailable instanceof ShouldQueue - ? $mailable->queue($this->queue) : $mailable->send($this); + ? $mailable->queue($this->queue) : $mailable->send($this); } /** @@ -368,7 +368,7 @@ class Mailer implements MailerContract, MailQueueContract /** * Queue a new e-mail message for sending. * - * @param string|array|\Illuminate\Contracts\Mail\Mailable $view + * @param \Illuminate\Contracts\Mail\Mailable $view * @param string|null $queue * @return mixed * @@ -380,14 +380,18 @@ class Mailer implements MailerContract, MailQueueContract throw new InvalidArgumentException('Only mailables may be queued.'); } - return $view->queue(is_null($queue) ? $this->queue : $queue); + if (is_string($queue)) { + $view->onQueue($queue); + } + + return $view->queue($this->queue); } /** * Queue a new e-mail message for sending on the given queue. * * @param string $queue - * @param string|array $view + * @param \Illuminate\Contracts\Mail\Mailable $view * @return mixed */ public function onQueue($queue, $view) @@ -401,7 +405,7 @@ class Mailer implements MailerContract, MailQueueContract * This method didn't match rest of framework's "onQueue" phrasing. Added "onQueue". * * @param string $queue - * @param string|array $view + * @param \Illuminate\Contracts\Mail\Mailable $view * @return mixed */ public function queueOn($queue, $view) @@ -413,7 +417,7 @@ class Mailer implements MailerContract, MailQueueContract * Queue a new e-mail message for sending after (n) seconds. * * @param \DateTimeInterface|\DateInterval|int $delay - * @param string|array|\Illuminate\Contracts\Mail\Mailable $view + * @param \Illuminate\Contracts\Mail\Mailable $view * @param string|null $queue * @return mixed * @@ -433,7 +437,7 @@ class Mailer implements MailerContract, MailQueueContract * * @param string $queue * @param \DateTimeInterface|\DateInterval|int $delay - * @param string|array $view + * @param \Illuminate\Contracts\Mail\Mailable $view * @return mixed */ public function laterOn($queue, $delay, $view) diff --git a/vendor/laravel/framework/src/Illuminate/Notifications/LICENSE.md b/vendor/laravel/framework/src/Illuminate/Notifications/LICENSE.md new file mode 100644 index 00000000..79810c84 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Notifications/LICENSE.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Taylor Otwell + +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 the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/vendor/laravel/framework/src/Illuminate/Pagination/AbstractPaginator.php b/vendor/laravel/framework/src/Illuminate/Pagination/AbstractPaginator.php index 1cf3a977..cf0c42c6 100644 --- a/vendor/laravel/framework/src/Illuminate/Pagination/AbstractPaginator.php +++ b/vendor/laravel/framework/src/Illuminate/Pagination/AbstractPaginator.php @@ -72,6 +72,13 @@ abstract class AbstractPaginator implements Htmlable */ public $onEachSide = 3; + /** + * The paginator options. + * + * @var array + */ + protected $options; + /** * The current path resolver callback. * @@ -563,6 +570,16 @@ abstract class AbstractPaginator implements Htmlable return $this; } + /** + * Get the paginator options. + * + * @return array + */ + public function getOptions() + { + return $this->options; + } + /** * Determine if the given item exists. * diff --git a/vendor/laravel/framework/src/Illuminate/Pagination/LICENSE.md b/vendor/laravel/framework/src/Illuminate/Pagination/LICENSE.md new file mode 100644 index 00000000..79810c84 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Pagination/LICENSE.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Taylor Otwell + +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 the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/vendor/laravel/framework/src/Illuminate/Pagination/LengthAwarePaginator.php b/vendor/laravel/framework/src/Illuminate/Pagination/LengthAwarePaginator.php index 5a7094ea..5ce4042a 100644 --- a/vendor/laravel/framework/src/Illuminate/Pagination/LengthAwarePaginator.php +++ b/vendor/laravel/framework/src/Illuminate/Pagination/LengthAwarePaginator.php @@ -40,6 +40,8 @@ class LengthAwarePaginator extends AbstractPaginator implements Arrayable, Array */ public function __construct($items, $total, $perPage, $currentPage = null, array $options = []) { + $this->options = $options; + foreach ($options as $key => $value) { $this->{$key} = $value; } diff --git a/vendor/laravel/framework/src/Illuminate/Pagination/Paginator.php b/vendor/laravel/framework/src/Illuminate/Pagination/Paginator.php index a159d041..89c8fca6 100644 --- a/vendor/laravel/framework/src/Illuminate/Pagination/Paginator.php +++ b/vendor/laravel/framework/src/Illuminate/Pagination/Paginator.php @@ -32,6 +32,8 @@ class Paginator extends AbstractPaginator implements Arrayable, ArrayAccess, Cou */ public function __construct($items, $perPage, $currentPage = null, array $options = []) { + $this->options = $options; + foreach ($options as $key => $value) { $this->{$key} = $value; } diff --git a/vendor/laravel/framework/src/Illuminate/Pipeline/LICENSE.md b/vendor/laravel/framework/src/Illuminate/Pipeline/LICENSE.md new file mode 100644 index 00000000..79810c84 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Pipeline/LICENSE.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Taylor Otwell + +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 the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php b/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php index 2949c26e..626f87be 100644 --- a/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php +++ b/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php @@ -104,6 +104,18 @@ class Pipeline implements PipelineContract return $pipeline($this->passable); } + /** + * Run the pipeline and return the result. + * + * @return mixed + */ + public function thenReturn() + { + return $this->then(function ($passable) { + return $passable; + }); + } + /** * Get the final piece of the Closure onion. * @@ -152,7 +164,7 @@ class Pipeline implements PipelineContract : $pipe(...$parameters); return $response instanceof Responsable - ? $response->toResponse($this->container->make(Request::class)) + ? $response->toResponse($this->getContainer()->make(Request::class)) : $response; }; }; diff --git a/vendor/laravel/framework/src/Illuminate/Queue/BeanstalkdQueue.php b/vendor/laravel/framework/src/Illuminate/Queue/BeanstalkdQueue.php index 28f7f306..c013f5e1 100755 --- a/vendor/laravel/framework/src/Illuminate/Queue/BeanstalkdQueue.php +++ b/vendor/laravel/framework/src/Illuminate/Queue/BeanstalkdQueue.php @@ -5,6 +5,7 @@ namespace Illuminate\Queue; use Pheanstalk\Pheanstalk; use Pheanstalk\Job as PheanstalkJob; use Illuminate\Queue\Jobs\BeanstalkdJob; +use Pheanstalk\Contract\PheanstalkInterface; use Illuminate\Contracts\Queue\Queue as QueueContract; class BeanstalkdQueue extends Queue implements QueueContract @@ -117,7 +118,11 @@ class BeanstalkdQueue extends Queue implements QueueContract { $queue = $this->getQueue($queue); - $job = $this->pheanstalk->watchOnly($queue)->reserve(0); + $this->pheanstalk->watchOnly($queue); + + $job = interface_exists(PheanstalkInterface::class) + ? $this->pheanstalk->reserveWithTimeout(0) + : $this->pheanstalk->reserve(0); if ($job instanceof PheanstalkJob) { return new BeanstalkdJob( diff --git a/vendor/laravel/framework/src/Illuminate/Queue/Connectors/BeanstalkdConnector.php b/vendor/laravel/framework/src/Illuminate/Queue/Connectors/BeanstalkdConnector.php index ae0e6265..46fc746a 100755 --- a/vendor/laravel/framework/src/Illuminate/Queue/Connectors/BeanstalkdConnector.php +++ b/vendor/laravel/framework/src/Illuminate/Queue/Connectors/BeanstalkdConnector.php @@ -4,8 +4,8 @@ namespace Illuminate\Queue\Connectors; use Pheanstalk\Connection; use Pheanstalk\Pheanstalk; -use Pheanstalk\PheanstalkInterface; use Illuminate\Queue\BeanstalkdQueue; +use Pheanstalk\Contract\PheanstalkInterface; class BeanstalkdConnector implements ConnectorInterface { @@ -30,9 +30,17 @@ class BeanstalkdConnector implements ConnectorInterface */ protected function pheanstalk(array $config) { + if (interface_exists(PheanstalkInterface::class)) { + return Pheanstalk::create( + $config['host'], + $config['port'] ?? Pheanstalk::DEFAULT_PORT, + $config['timeout'] ?? Connection::DEFAULT_CONNECT_TIMEOUT + ); + } + return new Pheanstalk( $config['host'], - $config['port'] ?? PheanstalkInterface::DEFAULT_PORT, + $config['port'] ?? Pheanstalk::DEFAULT_PORT, $config['timeout'] ?? Connection::DEFAULT_CONNECT_TIMEOUT, $config['persistent'] ?? false ); diff --git a/vendor/laravel/framework/src/Illuminate/Queue/LICENSE.md b/vendor/laravel/framework/src/Illuminate/Queue/LICENSE.md new file mode 100644 index 00000000..79810c84 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Queue/LICENSE.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Taylor Otwell + +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 the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/vendor/laravel/framework/src/Illuminate/Queue/composer.json b/vendor/laravel/framework/src/Illuminate/Queue/composer.json index 8ef7982f..c27e2eca 100644 --- a/vendor/laravel/framework/src/Illuminate/Queue/composer.json +++ b/vendor/laravel/framework/src/Illuminate/Queue/composer.json @@ -40,7 +40,7 @@ "ext-posix": "Required to use all features of the queue worker.", "aws/aws-sdk-php": "Required to use the SQS queue driver (^3.0).", "illuminate/redis": "Required to use the Redis queue driver (5.7.*).", - "pda/pheanstalk": "Required to use the Beanstalk queue driver (^3.0)." + "pda/pheanstalk": "Required to use the Beanstalk queue driver (^3.0|^4.0)." }, "config": { "sort-packages": true diff --git a/vendor/laravel/framework/src/Illuminate/Redis/LICENSE.md b/vendor/laravel/framework/src/Illuminate/Redis/LICENSE.md new file mode 100644 index 00000000..79810c84 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Redis/LICENSE.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Taylor Otwell + +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 the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/vendor/laravel/framework/src/Illuminate/Routing/LICENSE.md b/vendor/laravel/framework/src/Illuminate/Routing/LICENSE.md new file mode 100644 index 00000000..79810c84 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Routing/LICENSE.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Taylor Otwell + +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 the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/vendor/laravel/framework/src/Illuminate/Session/LICENSE.md b/vendor/laravel/framework/src/Illuminate/Session/LICENSE.md new file mode 100644 index 00000000..79810c84 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Session/LICENSE.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Taylor Otwell + +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 the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/vendor/laravel/framework/src/Illuminate/Support/Collection.php b/vendor/laravel/framework/src/Illuminate/Support/Collection.php index 7b5c58e6..2def4205 100644 --- a/vendor/laravel/framework/src/Illuminate/Support/Collection.php +++ b/vendor/laravel/framework/src/Illuminate/Support/Collection.php @@ -312,6 +312,7 @@ class Collection implements ArrayAccess, Arrayable, Countable, IteratorAggregate /** * Dump the collection and end the script. * + * @param mixed ...$args * @return void */ public function dd(...$args) @@ -1345,7 +1346,7 @@ class Collection implements ArrayAccess, Arrayable, Countable, IteratorAggregate /** * Push all of the given items onto the collection. * - * @param \Traversable|array $source + * @param iterable $source * @return static */ public function concat($source) diff --git a/vendor/laravel/framework/src/Illuminate/Support/Facades/URL.php b/vendor/laravel/framework/src/Illuminate/Support/Facades/URL.php index 6915928f..2dd66e7d 100755 --- a/vendor/laravel/framework/src/Illuminate/Support/Facades/URL.php +++ b/vendor/laravel/framework/src/Illuminate/Support/Facades/URL.php @@ -12,8 +12,8 @@ namespace Illuminate\Support\Facades; * @method static string route(string $name, $parameters = [], bool $absolute = true) * @method static string action(string $action, $parameters = [], bool $absolute = true) * @method static \Illuminate\Contracts\Routing\UrlGenerator setRootControllerNamespace(string $rootNamespace) - * @method static string signedRoute(string $name, array $parameters = [], \DateTimeInterface|int $expiration = null) - * @method static string temporarySignedRoute(string $name, \DateTimeInterface|int $expiration, array $parameters = []) + * @method static string signedRoute(string $name, array $parameters = [], \DateTimeInterface|\DateInterval|int $expiration = null) + * @method static string temporarySignedRoute(string $name, \DateTimeInterface|\DateInterval|int $expiration, array $parameters = []) * @method static string hasValidSignature(\Illuminate\Http\Request $request, bool $absolute) * @method static void defaults(array $defaults) * diff --git a/vendor/laravel/framework/src/Illuminate/Support/LICENSE.md b/vendor/laravel/framework/src/Illuminate/Support/LICENSE.md new file mode 100644 index 00000000..79810c84 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Support/LICENSE.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Taylor Otwell + +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 the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/vendor/laravel/framework/src/Illuminate/Support/Testing/Fakes/EventFake.php b/vendor/laravel/framework/src/Illuminate/Support/Testing/Fakes/EventFake.php index 57e47c89..1fc09db0 100644 --- a/vendor/laravel/framework/src/Illuminate/Support/Testing/Fakes/EventFake.php +++ b/vendor/laravel/framework/src/Illuminate/Support/Testing/Fakes/EventFake.php @@ -211,7 +211,7 @@ class EventFake implements Dispatcher if ($this->shouldFakeEvent($name, $payload)) { $this->events[$name][] = func_get_args(); } else { - $this->dispatcher->dispatch($event, $payload, $halt); + return $this->dispatcher->dispatch($event, $payload, $halt); } } diff --git a/vendor/laravel/framework/src/Illuminate/Support/Testing/Fakes/MailFake.php b/vendor/laravel/framework/src/Illuminate/Support/Testing/Fakes/MailFake.php index b6f4b813..e0a886f0 100644 --- a/vendor/laravel/framework/src/Illuminate/Support/Testing/Fakes/MailFake.php +++ b/vendor/laravel/framework/src/Illuminate/Support/Testing/Fakes/MailFake.php @@ -263,7 +263,7 @@ class MailFake implements Mailer, MailQueue } /** - * Send a new message when only a raw text part. + * Send a new message with only a raw text part. * * @param string $text * @param \Closure|string $callback diff --git a/vendor/laravel/framework/src/Illuminate/Translation/LICENSE.md b/vendor/laravel/framework/src/Illuminate/Translation/LICENSE.md new file mode 100644 index 00000000..79810c84 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Translation/LICENSE.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Taylor Otwell + +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 the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/vendor/laravel/framework/src/Illuminate/Translation/Translator.php b/vendor/laravel/framework/src/Illuminate/Translation/Translator.php index 49d79d7d..190f3bbc 100755 --- a/vendor/laravel/framework/src/Illuminate/Translation/Translator.php +++ b/vendor/laravel/framework/src/Illuminate/Translation/Translator.php @@ -244,6 +244,10 @@ class Translator extends NamespacedItemResolver implements TranslatorContract if (is_string($line)) { return $this->makeReplacements($line, $replace); } elseif (is_array($line) && count($line) > 0) { + foreach ($line as $key => $value) { + $line[$key] = $this->makeReplacements($value, $replace); + } + return $line; } } diff --git a/vendor/laravel/framework/src/Illuminate/Validation/Concerns/ReplacesAttributes.php b/vendor/laravel/framework/src/Illuminate/Validation/Concerns/ReplacesAttributes.php index 0d97fa57..fd2c1665 100644 --- a/vendor/laravel/framework/src/Illuminate/Validation/Concerns/ReplacesAttributes.php +++ b/vendor/laravel/framework/src/Illuminate/Validation/Concerns/ReplacesAttributes.php @@ -385,11 +385,11 @@ trait ReplacesAttributes */ protected function replaceBefore($message, $attribute, $rule, $parameters) { - if (! (strtotime($parameters[0]))) { + if (! strtotime($parameters[0])) { return str_replace(':date', $this->getDisplayableAttribute($parameters[0]), $message); } - return str_replace(':date', $parameters[0], $message); + return str_replace(':date', $this->getDisplayableValue($attribute, $parameters[0]), $message); } /** diff --git a/vendor/laravel/framework/src/Illuminate/Validation/Factory.php b/vendor/laravel/framework/src/Illuminate/Validation/Factory.php index 3660af0c..7660ea5c 100755 --- a/vendor/laravel/framework/src/Illuminate/Validation/Factory.php +++ b/vendor/laravel/framework/src/Illuminate/Validation/Factory.php @@ -76,7 +76,7 @@ class Factory implements FactoryContract /** * Create a new Validator factory instance. * - * @param \Illuminate\Contracts\Translation\Translator $translator + * @param \Illuminate\Contracts\Translation\Translator $translator * @param \Illuminate\Contracts\Container\Container $container * @return void */ @@ -97,13 +97,13 @@ class Factory implements FactoryContract */ public function make(array $data, array $rules, array $messages = [], array $customAttributes = []) { - // The presence verifier is responsible for checking the unique and exists data - // for the validator. It is behind an interface so that multiple versions of - // it may be written besides database. We'll inject it into the validator. $validator = $this->resolve( $data, $rules, $messages, $customAttributes ); + // The presence verifier is responsible for checking the unique and exists data + // for the validator. It is behind an interface so that multiple versions of + // it may be written besides database. We'll inject it into the validator. if (! is_null($this->verifier)) { $validator->setPresenceVerifier($this->verifier); } @@ -196,7 +196,7 @@ class Factory implements FactoryContract /** * Register a custom implicit validator extension. * - * @param string $rule + * @param string $rule * @param \Closure|string $extension * @param string $message * @return void @@ -213,7 +213,7 @@ class Factory implements FactoryContract /** * Register a custom dependent validator extension. * - * @param string $rule + * @param string $rule * @param \Closure|string $extension * @param string $message * @return void @@ -230,7 +230,7 @@ class Factory implements FactoryContract /** * Register a custom validator message replacer. * - * @param string $rule + * @param string $rule * @param \Closure|string $replacer * @return void */ diff --git a/vendor/laravel/framework/src/Illuminate/Validation/LICENSE.md b/vendor/laravel/framework/src/Illuminate/Validation/LICENSE.md new file mode 100644 index 00000000..79810c84 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Validation/LICENSE.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Taylor Otwell + +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 the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/vendor/laravel/framework/src/Illuminate/Validation/Validator.php b/vendor/laravel/framework/src/Illuminate/Validation/Validator.php index 4bde9dd1..f899d04a 100755 --- a/vendor/laravel/framework/src/Illuminate/Validation/Validator.php +++ b/vendor/laravel/framework/src/Illuminate/Validation/Validator.php @@ -470,7 +470,7 @@ class Validator implements ValidatorContract * * @param object|string $rule * @param string $attribute - * @param mixed $value + * @param mixed $value * @return bool */ protected function isValidatable($rule, $attribute, $value) @@ -486,7 +486,7 @@ class Validator implements ValidatorContract * * @param object|string $rule * @param string $attribute - * @param mixed $value + * @param mixed $value * @return bool */ protected function presentOrRuleIsImplicit($rule, $attribute, $value) @@ -526,7 +526,7 @@ class Validator implements ValidatorContract $data = ValidationData::initializeAndGatherData($attribute, $this->data); return array_key_exists($attribute, $data) - || array_key_exists($attribute, $this->data); + || array_key_exists($attribute, $this->data); } /** @@ -612,7 +612,7 @@ class Validator implements ValidatorContract * * @param string $attribute * @param string $rule - * @param array $parameters + * @param array $parameters * @return void */ public function addFailure($attribute, $rule, $parameters = []) @@ -931,7 +931,7 @@ class Validator implements ValidatorContract /** * Register a custom implicit validator extension. * - * @param string $rule + * @param string $rule * @param \Closure|string $extension * @return void */ @@ -945,7 +945,7 @@ class Validator implements ValidatorContract /** * Register a custom dependent validator extension. * - * @param string $rule + * @param string $rule * @param \Closure|string $extension * @return void */ @@ -1139,7 +1139,7 @@ class Validator implements ValidatorContract * Call a custom validator extension. * * @param string $rule - * @param array $parameters + * @param array $parameters * @return bool|null */ protected function callExtension($rule, $parameters) @@ -1157,7 +1157,7 @@ class Validator implements ValidatorContract * Call a class based validator extension. * * @param string $callback - * @param array $parameters + * @param array $parameters * @return bool */ protected function callClassBasedExtension($callback, $parameters) @@ -1171,7 +1171,7 @@ class Validator implements ValidatorContract * Handle dynamic calls to class methods. * * @param string $method - * @param array $parameters + * @param array $parameters * @return mixed * * @throws \BadMethodCallException diff --git a/vendor/laravel/framework/src/Illuminate/View/LICENSE.md b/vendor/laravel/framework/src/Illuminate/View/LICENSE.md new file mode 100644 index 00000000..79810c84 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/View/LICENSE.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Taylor Otwell + +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 the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/vendor/lcobucci/jwt/.gitignore b/vendor/lcobucci/jwt/.gitignore index 5556efb4..096b48c3 100644 --- a/vendor/lcobucci/jwt/.gitignore +++ b/vendor/lcobucci/jwt/.gitignore @@ -1,2 +1,3 @@ -vendor -phpunit.xml +/vendor +/phpunit.xml +/composer.lock diff --git a/vendor/lcobucci/jwt/.travis.yml b/vendor/lcobucci/jwt/.travis.yml index a79c894b..0f83c08e 100644 --- a/vendor/lcobucci/jwt/.travis.yml +++ b/vendor/lcobucci/jwt/.travis.yml @@ -1,22 +1,15 @@ language: php php: - - 5.5 - 5.6 - 7.0 - 7.1 - 7.2 + - 7.3 - nightly - - hhvm - - hhvm-nightly matrix: allow_failures: - - php: 7.1 - - php: 7.2 - php: nightly - - php: hhvm - - php: hhvm-nightly before_script: - - composer selfupdate - composer install --prefer-dist -o diff --git a/vendor/lcobucci/jwt/README.md b/vendor/lcobucci/jwt/README.md index 2ca29ad3..c74803ae 100644 --- a/vendor/lcobucci/jwt/README.md +++ b/vendor/lcobucci/jwt/README.md @@ -6,8 +6,8 @@ [![Scrutinizer Code Quality](https://img.shields.io/scrutinizer/g/lcobucci/jwt/master.svg?style=flat-square)](https://scrutinizer-ci.com/g/lcobucci/jwt/?branch=master) [![Code Coverage](https://img.shields.io/scrutinizer/coverage/g/lcobucci/jwt/master.svg?style=flat-square)](https://scrutinizer-ci.com/g/lcobucci/jwt/?branch=master) -A simple library to work with JSON Web Token and JSON Web Signature (requires PHP 5.5+). -The implementation is based on the [current draft](http://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32). +A simple library to work with JSON Web Token and JSON Web Signature (requires PHP 5.6+). +The implementation is based on the [RFC 7519](https://tools.ietf.org/html/rfc7519). ## Installation @@ -20,7 +20,7 @@ composer require lcobucci/jwt ### Dependencies -- PHP 5.5+ +- PHP 5.6+ - OpenSSL Extension ## Basic usage @@ -32,13 +32,14 @@ Just use the builder to create a new JWT/JWS tokens: ```php use Lcobucci\JWT\Builder; -$token = (new Builder())->setIssuer('http://example.com') // Configures the issuer (iss claim) - ->setAudience('http://example.org') // Configures the audience (aud claim) - ->setId('4f1g23a12aa', true) // Configures the id (jti claim), replicating as a header item - ->setIssuedAt(time()) // Configures the time that the token was issue (iat claim) - ->setNotBefore(time() + 60) // Configures the time that the token can be used (nbf claim) - ->setExpiration(time() + 3600) // Configures the expiration time of the token (exp claim) - ->set('uid', 1) // Configures a new claim, called "uid" +$time = time(); +$token = (new Builder())->issuedBy('http://example.com') // Configures the issuer (iss claim) + ->permittedFor('http://example.org') // Configures the audience (aud claim) + ->identifiedBy('4f1g23a12aa', true) // Configures the id (jti claim), replicating as a header item + ->issuedAt($time) // Configures the time that the token was issue (iat claim) + ->canOnlyBeUsedAfter($time + 60) // Configures the time that the token can be used (nbf claim) + ->expiresAt($time + 3600) // Configures the expiration time of the token (exp claim) + ->withClaim('uid', 1) // Configures a new claim, called "uid" ->getToken(); // Retrieves the generated token @@ -69,7 +70,7 @@ echo $token->getClaim('uid'); // will print "1" ### Validating -We can easily validate if the token is valid (using the previous token as example): +We can easily validate if the token is valid (using the previous token and time as example): ```php use Lcobucci\JWT\ValidationData; @@ -79,40 +80,84 @@ $data->setIssuer('http://example.com'); $data->setAudience('http://example.org'); $data->setId('4f1g23a12aa'); -var_dump($token->validate($data)); // false, because we created a token that cannot be used before of `time() + 60` +var_dump($token->validate($data)); // false, because token cannot be used before now() + 60 -$data->setCurrentTime(time() + 60); // changing the validation time to future +$data->setCurrentTime($time + 61); // changing the validation time to future -var_dump($token->validate($data)); // true, because validation information is equals to data contained on the token +var_dump($token->validate($data)); // true, because current time is between "nbf" and "exp" claims -$data->setCurrentTime(time() + 4000); // changing the validation time to future +$data->setCurrentTime($time + 4000); // changing the validation time to future var_dump($token->validate($data)); // false, because token is expired since current time is greater than exp + +// We can also use the $leeway parameter to deal with clock skew (see notes below) +// If token's claimed time is invalid but the difference between that and the validation time is less than $leeway, +// then token is still considered valid +$dataWithLeeway = new ValidationData($time, 20); +$dataWithLeeway->setIssuer('http://example.com'); +$dataWithLeeway->setAudience('http://example.org'); +$dataWithLeeway->setId('4f1g23a12aa'); + +var_dump($token->validate($dataWithLeeway)); // false, because token can't be used before now() + 60, not within leeway + +$dataWithLeeway->setCurrentTime($time + 51); // changing the validation time to future + +var_dump($token->validate($dataWithLeeway)); // true, because current time plus leeway is between "nbf" and "exp" claims + +$dataWithLeeway->setCurrentTime($time + 3610); // changing the validation time to future but within leeway + +var_dump($token->validate($dataWithLeeway)); // true, because current time - 20 seconds leeway is less than exp + +$dataWithLeeway->setCurrentTime($time + 4000); // changing the validation time to future outside of leeway + +var_dump($token->validate($dataWithLeeway)); // false, because token is expired since current time is greater than exp ``` +#### Important + +- You have to configure ```ValidationData``` informing all claims you want to validate the token. +- If ```ValidationData``` contains claims that are not being used in token or token has claims that are not +configured in ```ValidationData``` they will be ignored by ```Token::validate()```. +- ```exp```, ```nbf``` and ```iat``` claims are configured by default in ```ValidationData::__construct()``` +with the current UNIX time (```time()```). +- The optional ```$leeway``` parameter of ```ValidationData``` will cause us to use that number of seconds of leeway +when validating the time-based claims, pretending we are further in the future for the "Issued At" (```iat```) and "Not +Before" (```nbf```) claims and pretending we are further in the past for the "Expiration Time" (```exp```) claim. This +allows for situations where the clock of the issuing server has a different time than the clock of the verifying server, +as mentioned in [section 4.1 of RFC 7519](https://tools.ietf.org/html/rfc7519#section-4.1). + ## Token signature We can use signatures to be able to verify if the token was not modified after its generation. This library implements Hmac, RSA and ECDSA signatures (using 256, 384 and 512). +### Important + +Do not allow the string sent to the Parser to dictate which signature algorithm +to use, or else your application will be vulnerable to a [critical JWT security vulnerability](https://auth0.com/blog/2015/03/31/critical-vulnerabilities-in-json-web-token-libraries). + +The examples below are safe because the choice in `Signer` is hard-coded and +cannot be influenced by malicious users. + ### Hmac Hmac signatures are really simple to be used: ```php use Lcobucci\JWT\Builder; +use Lcobucci\JWT\Signer\Key; use Lcobucci\JWT\Signer\Hmac\Sha256; $signer = new Sha256(); +$time = time(); -$token = (new Builder())->setIssuer('http://example.com') // Configures the issuer (iss claim) - ->setAudience('http://example.org') // Configures the audience (aud claim) - ->setId('4f1g23a12aa', true) // Configures the id (jti claim), replicating as a header item - ->setIssuedAt(time()) // Configures the time that the token was issue (iat claim) - ->setNotBefore(time() + 60) // Configures the time that the token can be used (nbf claim) - ->setExpiration(time() + 3600) // Configures the expiration time of the token (exp claim) - ->set('uid', 1) // Configures a new claim, called "uid" - ->sign($signer, 'testing') // creates a signature using "testing" as key - ->getToken(); // Retrieves the generated token +$token = (new Builder())->issuedBy('http://example.com') // Configures the issuer (iss claim) + ->permittedFor('http://example.org') // Configures the audience (aud claim) + ->identifiedBy('4f1g23a12aa', true) // Configures the id (jti claim), replicating as a header item + ->issuedAt($time) // Configures the time that the token was issue (iat claim) + ->canOnlyBeUsedAfter($time + 60) // Configures the time that the token can be used (nbf claim) + ->expiresAt($time + 3600) // Configures the expiration time of the token (exp claim) + ->withClaim('uid', 1) // Configures a new claim, called "uid" + ->getToken($signer, new Key('testing')); // Retrieves the generated token var_dump($token->verify($signer, 'testing 1')); // false, because the key is different @@ -125,25 +170,25 @@ RSA and ECDSA signatures are based on public and private keys so you have to gen ```php use Lcobucci\JWT\Builder; -use Lcobucci\JWT\Signer\Keychain; // just to make our life simpler +use Lcobucci\JWT\Signer\Key; use Lcobucci\JWT\Signer\Rsa\Sha256; // you can use Lcobucci\JWT\Signer\Ecdsa\Sha256 if you're using ECDSA keys $signer = new Sha256(); +$privateKey = new Key('file://{path to your private key}'); +$time = time(); -$keychain = new Keychain(); +$token = (new Builder())->issuedBy('http://example.com') // Configures the issuer (iss claim) + ->permittedFor('http://example.org') // Configures the audience (aud claim) + ->identifiedBy('4f1g23a12aa', true) // Configures the id (jti claim), replicating as a header item + ->issuedAt($time) // Configures the time that the token was issue (iat claim) + ->canOnlyBeUsedAfter($time + 60) // Configures the time that the token can be used (nbf claim) + ->expiresAt($time + 3600) // Configures the expiration time of the token (exp claim) + ->withClaim('uid', 1) // Configures a new claim, called "uid" + ->getToken($signer, $privateKey); // Retrieves the generated token -$token = (new Builder())->setIssuer('http://example.com') // Configures the issuer (iss claim) - ->setAudience('http://example.org') // Configures the audience (aud claim) - ->setId('4f1g23a12aa', true) // Configures the id (jti claim), replicating as a header item - ->setIssuedAt(time()) // Configures the time that the token was issue (iat claim) - ->setNotBefore(time() + 60) // Configures the time that the token can be used (nbf claim) - ->setExpiration(time() + 3600) // Configures the expiration time of the token (nbf claim) - ->set('uid', 1) // Configures a new claim, called "uid" - ->sign($signer, $keychain->getPrivateKey('file://{path to your private key}')) // creates a signature using your private key - ->getToken(); // Retrieves the generated token +$publicKey = new Key('file://{path to your public key}'); - -var_dump($token->verify($signer, $keychain->getPublicKey('file://{path to your public key}'))); // true when the public key was generated by the private one =) +var_dump($token->verify($signer, $publicKey)); // true when the public key was generated by the private one =) ``` **It's important to say that if you're using RSA keys you shouldn't invoke ECDSA signers (and vice-versa), otherwise ```sign()``` and ```verify()``` will raise an exception!** diff --git a/vendor/lcobucci/jwt/composer.json b/vendor/lcobucci/jwt/composer.json index 93cf7ce7..5823bf8b 100644 --- a/vendor/lcobucci/jwt/composer.json +++ b/vendor/lcobucci/jwt/composer.json @@ -17,19 +17,16 @@ "BSD-3-Clause" ], "require": { - "php": ">=5.5", + "php": "^5.6 || ^7.0", + "ext-mbstring": "*", "ext-openssl": "*" }, "require-dev": { - "phpunit/phpunit": "~4.5", + "phpunit/phpunit": "^5.7 || ^7.3", "squizlabs/php_codesniffer": "~2.3", "phpmd/phpmd": "~2.2", "phpunit/php-invoker": "~1.1", - "mikey179/vfsStream": "~1.5", - "mdanter/ecc": "~0.3.1" - }, - "suggest":{ - "mdanter/ecc": "Required to use Elliptic Curves based algorithms." + "mikey179/vfsstream": "~1.5" }, "autoload": { "psr-4": { @@ -39,7 +36,7 @@ "autoload-dev": { "psr-4": { "Lcobucci\\JWT\\": [ - "test/unit", + "test/unit", "test/functional" ] } diff --git a/vendor/lcobucci/jwt/composer.lock b/vendor/lcobucci/jwt/composer.lock deleted file mode 100644 index 0b7d7cca..00000000 --- a/vendor/lcobucci/jwt/composer.lock +++ /dev/null @@ -1,1898 +0,0 @@ -{ - "_readme": [ - "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", - "This file is @generated automatically" - ], - "hash": "82547d7474ec5fcbf6718c4f2dca46d6", - "content-hash": "1c87e501c8e2df5e27eac6bfefe0c1f9", - "packages": [], - "packages-dev": [ - { - "name": "doctrine/instantiator", - "version": "1.0.5", - "source": { - "type": "git", - "url": "https://github.com/doctrine/instantiator.git", - "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d", - "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d", - "shasum": "" - }, - "require": { - "php": ">=5.3,<8.0-DEV" - }, - "require-dev": { - "athletic/athletic": "~0.1.8", - "ext-pdo": "*", - "ext-phar": "*", - "phpunit/phpunit": "~4.0", - "squizlabs/php_codesniffer": "~2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "http://ocramius.github.com/" - } - ], - "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://github.com/doctrine/instantiator", - "keywords": [ - "constructor", - "instantiate" - ], - "time": "2015-06-14 21:17:01" - }, - { - "name": "fgrosse/phpasn1", - "version": "1.3.2", - "source": { - "type": "git", - "url": "https://github.com/fgrosse/PHPASN1.git", - "reference": "ee6d1abd18f8bcbaf0b55563ba87e5ed16cd0c98" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/fgrosse/PHPASN1/zipball/ee6d1abd18f8bcbaf0b55563ba87e5ed16cd0c98", - "reference": "ee6d1abd18f8bcbaf0b55563ba87e5ed16cd0c98", - "shasum": "" - }, - "require": { - "ext-gmp": "*", - "php": ">=5.3.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3.x-dev" - } - }, - "autoload": { - "psr-4": { - "FG\\": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Friedrich Große", - "email": "friedrich.grosse@gmail.com", - "homepage": "https://github.com/FGrosse", - "role": "Author" - }, - { - "name": "All contributors", - "homepage": "https://github.com/FGrosse/PHPASN1/contributors" - } - ], - "description": "A PHP Framework that allows you to encode and decode arbitrary ASN.1 structures using the ITU-T X.690 Encoding Rules.", - "homepage": "https://github.com/FGrosse/PHPASN1", - "time": "2015-07-15 21:26:40" - }, - { - "name": "mdanter/ecc", - "version": "v0.3.1", - "source": { - "type": "git", - "url": "https://github.com/phpecc/phpecc.git", - "reference": "182d94bc3bbeee6a8591bde36e66a80d8b07ae4b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpecc/phpecc/zipball/182d94bc3bbeee6a8591bde36e66a80d8b07ae4b", - "reference": "182d94bc3bbeee6a8591bde36e66a80d8b07ae4b", - "shasum": "" - }, - "require": { - "ext-gmp": "*", - "ext-mcrypt": "*", - "fgrosse/phpasn1": "~1.3.1", - "php": ">=5.4.0", - "symfony/console": "~2.6" - }, - "require-dev": { - "phpunit/phpunit": "~4.1", - "squizlabs/php_codesniffer": "~2", - "symfony/yaml": "~2.6" - }, - "type": "library", - "autoload": { - "psr-4": { - "Mdanter\\Ecc\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Matyas Danter", - "homepage": "http://matejdanter.com/", - "role": "Author" - }, - { - "name": "Thibaud Fabre", - "email": "thibaud@aztech.io", - "homepage": "http://aztech.io", - "role": "Maintainer" - }, - { - "name": "Drak", - "email": "drak@zikula.org", - "homepage": "http://zikula.org", - "role": "Maintainer" - } - ], - "description": "PHP Elliptic Curve Cryptography library", - "homepage": "https://github.com/mdanter/phpecc", - "time": "2014-07-07 12:44:15" - }, - { - "name": "mikey179/vfsStream", - "version": "v1.6.4", - "source": { - "type": "git", - "url": "https://github.com/mikey179/vfsStream.git", - "reference": "0247f57b2245e8ad2e689d7cee754b45fbabd592" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/mikey179/vfsStream/zipball/0247f57b2245e8ad2e689d7cee754b45fbabd592", - "reference": "0247f57b2245e8ad2e689d7cee754b45fbabd592", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.6.x-dev" - } - }, - "autoload": { - "psr-0": { - "org\\bovigo\\vfs\\": "src/main/php" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Frank Kleine", - "homepage": "http://frankkleine.de/", - "role": "Developer" - } - ], - "description": "Virtual file system to mock the real file system in unit tests.", - "homepage": "http://vfs.bovigo.org/", - "time": "2016-07-18 14:02:57" - }, - { - "name": "pdepend/pdepend", - "version": "2.2.4", - "source": { - "type": "git", - "url": "https://github.com/pdepend/pdepend.git", - "reference": "b086687f3a01dc6bb92d633aef071d2c5dd0db06" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/pdepend/pdepend/zipball/b086687f3a01dc6bb92d633aef071d2c5dd0db06", - "reference": "b086687f3a01dc6bb92d633aef071d2c5dd0db06", - "shasum": "" - }, - "require": { - "php": ">=5.3.7", - "symfony/config": "^2.3.0|^3", - "symfony/dependency-injection": "^2.3.0|^3", - "symfony/filesystem": "^2.3.0|^3" - }, - "require-dev": { - "phpunit/phpunit": "^4.4.0,<4.8", - "squizlabs/php_codesniffer": "^2.0.0" - }, - "bin": [ - "src/bin/pdepend" - ], - "type": "library", - "autoload": { - "psr-4": { - "PDepend\\": "src/main/php/PDepend" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "Official version of pdepend to be handled with Composer", - "time": "2016-03-10 15:15:04" - }, - { - "name": "phpdocumentor/reflection-common", - "version": "1.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/144c307535e82c8fdcaacbcfc1d6d8eeb896687c", - "reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c", - "shasum": "" - }, - "require": { - "php": ">=5.5" - }, - "require-dev": { - "phpunit/phpunit": "^4.6" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jaap van Otterdijk", - "email": "opensource@ijaap.nl" - } - ], - "description": "Common reflection classes used by phpdocumentor to reflect the code structure", - "homepage": "http://www.phpdoc.org", - "keywords": [ - "FQSEN", - "phpDocumentor", - "phpdoc", - "reflection", - "static analysis" - ], - "time": "2015-12-27 11:43:31" - }, - { - "name": "phpdocumentor/reflection-docblock", - "version": "3.1.1", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "8331b5efe816ae05461b7ca1e721c01b46bafb3e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/8331b5efe816ae05461b7ca1e721c01b46bafb3e", - "reference": "8331b5efe816ae05461b7ca1e721c01b46bafb3e", - "shasum": "" - }, - "require": { - "php": ">=5.5", - "phpdocumentor/reflection-common": "^1.0@dev", - "phpdocumentor/type-resolver": "^0.2.0", - "webmozart/assert": "^1.0" - }, - "require-dev": { - "mockery/mockery": "^0.9.4", - "phpunit/phpunit": "^4.4" - }, - "type": "library", - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src/" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - } - ], - "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "time": "2016-09-30 07:12:33" - }, - { - "name": "phpdocumentor/type-resolver", - "version": "0.2", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "b39c7a5b194f9ed7bd0dd345c751007a41862443" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/b39c7a5b194f9ed7bd0dd345c751007a41862443", - "reference": "b39c7a5b194f9ed7bd0dd345c751007a41862443", - "shasum": "" - }, - "require": { - "php": ">=5.5", - "phpdocumentor/reflection-common": "^1.0" - }, - "require-dev": { - "mockery/mockery": "^0.9.4", - "phpunit/phpunit": "^5.2||^4.8.24" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src/" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - } - ], - "time": "2016-06-10 07:14:17" - }, - { - "name": "phpmd/phpmd", - "version": "2.4.3", - "source": { - "type": "git", - "url": "https://github.com/phpmd/phpmd.git", - "reference": "2b9c2417a18696dfb578b38c116cd0ddc19b256e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpmd/phpmd/zipball/2b9c2417a18696dfb578b38c116cd0ddc19b256e", - "reference": "2b9c2417a18696dfb578b38c116cd0ddc19b256e", - "shasum": "" - }, - "require": { - "pdepend/pdepend": "^2.0.4", - "php": ">=5.3.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.0", - "squizlabs/php_codesniffer": "^2.0" - }, - "bin": [ - "src/bin/phpmd" - ], - "type": "project", - "autoload": { - "psr-0": { - "PHPMD\\": "src/main/php" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Manuel Pichler", - "email": "github@manuel-pichler.de", - "homepage": "https://github.com/manuelpichler", - "role": "Project Founder" - }, - { - "name": "Other contributors", - "homepage": "https://github.com/phpmd/phpmd/graphs/contributors", - "role": "Contributors" - }, - { - "name": "Marc Würth", - "email": "ravage@bluewin.ch", - "homepage": "https://github.com/ravage84", - "role": "Project Maintainer" - } - ], - "description": "PHPMD is a spin-off project of PHP Depend and aims to be a PHP equivalent of the well known Java tool PMD.", - "homepage": "http://phpmd.org/", - "keywords": [ - "mess detection", - "mess detector", - "pdepend", - "phpmd", - "pmd" - ], - "time": "2016-04-04 11:52:04" - }, - { - "name": "phpspec/prophecy", - "version": "v1.6.1", - "source": { - "type": "git", - "url": "https://github.com/phpspec/prophecy.git", - "reference": "58a8137754bc24b25740d4281399a4a3596058e0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/58a8137754bc24b25740d4281399a4a3596058e0", - "reference": "58a8137754bc24b25740d4281399a4a3596058e0", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.0.2", - "php": "^5.3|^7.0", - "phpdocumentor/reflection-docblock": "^2.0|^3.0.2", - "sebastian/comparator": "^1.1", - "sebastian/recursion-context": "^1.0" - }, - "require-dev": { - "phpspec/phpspec": "^2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.6.x-dev" - } - }, - "autoload": { - "psr-0": { - "Prophecy\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - }, - { - "name": "Marcello Duarte", - "email": "marcello.duarte@gmail.com" - } - ], - "description": "Highly opinionated mocking framework for PHP 5.3+", - "homepage": "https://github.com/phpspec/prophecy", - "keywords": [ - "Double", - "Dummy", - "fake", - "mock", - "spy", - "stub" - ], - "time": "2016-06-07 08:13:47" - }, - { - "name": "phpunit/php-code-coverage", - "version": "2.2.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/eabf68b476ac7d0f73793aada060f1c1a9bf8979", - "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "phpunit/php-file-iterator": "~1.3", - "phpunit/php-text-template": "~1.2", - "phpunit/php-token-stream": "~1.3", - "sebastian/environment": "^1.3.2", - "sebastian/version": "~1.0" - }, - "require-dev": { - "ext-xdebug": ">=2.1.4", - "phpunit/phpunit": "~4" - }, - "suggest": { - "ext-dom": "*", - "ext-xdebug": ">=2.2.1", - "ext-xmlwriter": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.2.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", - "homepage": "https://github.com/sebastianbergmann/php-code-coverage", - "keywords": [ - "coverage", - "testing", - "xunit" - ], - "time": "2015-10-06 15:47:00" - }, - { - "name": "phpunit/php-file-iterator", - "version": "1.4.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "6150bf2c35d3fc379e50c7602b75caceaa39dbf0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/6150bf2c35d3fc379e50c7602b75caceaa39dbf0", - "reference": "6150bf2c35d3fc379e50c7602b75caceaa39dbf0", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "FilterIterator implementation that filters files based on a list of suffixes.", - "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", - "keywords": [ - "filesystem", - "iterator" - ], - "time": "2015-06-21 13:08:43" - }, - { - "name": "phpunit/php-invoker", - "version": "1.1.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-invoker.git", - "reference": "86074bf0fc2caf02ec8819a93f65a37cd0b44c8e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/86074bf0fc2caf02ec8819a93f65a37cd0b44c8e", - "reference": "86074bf0fc2caf02ec8819a93f65a37cd0b44c8e", - "shasum": "" - }, - "require": { - "ext-pcntl": "*", - "php": ">=5.3.3", - "phpunit/php-timer": ">=1.0.6" - }, - "require-dev": { - "phpunit/phpunit": "~4" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Utility class for invoking callables with a timeout.", - "homepage": "https://github.com/sebastianbergmann/php-invoker/", - "keywords": [ - "process" - ], - "time": "2015-06-21 13:32:55" - }, - { - "name": "phpunit/php-text-template", - "version": "1.2.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Simple template engine.", - "homepage": "https://github.com/sebastianbergmann/php-text-template/", - "keywords": [ - "template" - ], - "time": "2015-06-21 13:50:34" - }, - { - "name": "phpunit/php-timer", - "version": "1.0.8", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "38e9124049cf1a164f1e4537caf19c99bf1eb260" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/38e9124049cf1a164f1e4537caf19c99bf1eb260", - "reference": "38e9124049cf1a164f1e4537caf19c99bf1eb260", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4|~5" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "Utility class for timing", - "homepage": "https://github.com/sebastianbergmann/php-timer/", - "keywords": [ - "timer" - ], - "time": "2016-05-12 18:03:57" - }, - { - "name": "phpunit/php-token-stream", - "version": "1.4.8", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da", - "reference": "3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da", - "shasum": "" - }, - "require": { - "ext-tokenizer": "*", - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Wrapper around PHP's tokenizer extension.", - "homepage": "https://github.com/sebastianbergmann/php-token-stream/", - "keywords": [ - "tokenizer" - ], - "time": "2015-09-15 10:49:45" - }, - { - "name": "phpunit/phpunit", - "version": "4.8.27", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "c062dddcb68e44b563f66ee319ddae2b5a322a90" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c062dddcb68e44b563f66ee319ddae2b5a322a90", - "reference": "c062dddcb68e44b563f66ee319ddae2b5a322a90", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-json": "*", - "ext-pcre": "*", - "ext-reflection": "*", - "ext-spl": "*", - "php": ">=5.3.3", - "phpspec/prophecy": "^1.3.1", - "phpunit/php-code-coverage": "~2.1", - "phpunit/php-file-iterator": "~1.4", - "phpunit/php-text-template": "~1.2", - "phpunit/php-timer": "^1.0.6", - "phpunit/phpunit-mock-objects": "~2.3", - "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", - "symfony/yaml": "~2.1|~3.0" - }, - "suggest": { - "phpunit/php-invoker": "~1.1" - }, - "bin": [ - "phpunit" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.8.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "The PHP Unit Testing framework.", - "homepage": "https://phpunit.de/", - "keywords": [ - "phpunit", - "testing", - "xunit" - ], - "time": "2016-07-21 06:48:14" - }, - { - "name": "phpunit/phpunit-mock-objects", - "version": "2.3.8", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/ac8e7a3db35738d56ee9a76e78a4e03d97628983", - "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.0.2", - "php": ">=5.3.3", - "phpunit/php-text-template": "~1.2", - "sebastian/exporter": "~1.2" - }, - "require-dev": { - "phpunit/phpunit": "~4.4" - }, - "suggest": { - "ext-soap": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.3.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "Mock Object library for PHPUnit", - "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", - "keywords": [ - "mock", - "xunit" - ], - "time": "2015-10-02 06:51:40" - }, - { - "name": "psr/log", - "version": "1.0.2", - "source": { - "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", - "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Log\\": "Psr/Log/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for logging libraries", - "homepage": "https://github.com/php-fig/log", - "keywords": [ - "log", - "psr", - "psr-3" - ], - "time": "2016-10-10 12:19:37" - }, - { - "name": "sebastian/comparator", - "version": "1.2.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "937efb279bd37a375bcadf584dec0726f84dbf22" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/937efb279bd37a375bcadf584dec0726f84dbf22", - "reference": "937efb279bd37a375bcadf584dec0726f84dbf22", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "sebastian/diff": "~1.2", - "sebastian/exporter": "~1.2" - }, - "require-dev": { - "phpunit/phpunit": "~4.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides the functionality to compare PHP values for equality", - "homepage": "http://www.github.com/sebastianbergmann/comparator", - "keywords": [ - "comparator", - "compare", - "equality" - ], - "time": "2015-07-26 15:48:44" - }, - { - "name": "sebastian/diff", - "version": "1.4.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/13edfd8706462032c2f52b4b862974dd46b71c9e", - "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.8" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Diff implementation", - "homepage": "https://github.com/sebastianbergmann/diff", - "keywords": [ - "diff" - ], - "time": "2015-12-08 07:14:41" - }, - { - "name": "sebastian/environment", - "version": "1.3.8", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/be2c607e43ce4c89ecd60e75c6a85c126e754aea", - "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea", - "shasum": "" - }, - "require": { - "php": "^5.3.3 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.8 || ^5.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3.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 functionality to handle HHVM/PHP environments", - "homepage": "http://www.github.com/sebastianbergmann/environment", - "keywords": [ - "Xdebug", - "environment", - "hhvm" - ], - "time": "2016-08-18 05:49:44" - }, - { - "name": "sebastian/exporter", - "version": "1.2.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/42c4c2eec485ee3e159ec9884f95b431287edde4", - "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "sebastian/recursion-context": "~1.0" - }, - "require-dev": { - "ext-mbstring": "*", - "phpunit/phpunit": "~4.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - } - ], - "description": "Provides the functionality to export PHP variables for visualization", - "homepage": "http://www.github.com/sebastianbergmann/exporter", - "keywords": [ - "export", - "exporter" - ], - "time": "2016-06-17 09:04:28" - }, - { - "name": "sebastian/global-state", - "version": "1.1.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bc37d50fea7d017d3d340f230811c9f1d7280af4", - "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.2" - }, - "suggest": { - "ext-uopz": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Snapshotting of global state", - "homepage": "http://www.github.com/sebastianbergmann/global-state", - "keywords": [ - "global state" - ], - "time": "2015-10-12 03:26:01" - }, - { - "name": "sebastian/recursion-context", - "version": "1.0.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "913401df809e99e4f47b27cdd781f4a258d58791" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/913401df809e99e4f47b27cdd781f4a258d58791", - "reference": "913401df809e99e4f47b27cdd781f4a258d58791", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.4" - }, - "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": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - } - ], - "description": "Provides functionality to recursively process PHP variables", - "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "time": "2015-11-11 19:50:13" - }, - { - "name": "sebastian/version", - "version": "1.0.6", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/version.git", - "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", - "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", - "shasum": "" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "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" - }, - { - "name": "squizlabs/php_codesniffer", - "version": "2.7.0", - "source": { - "type": "git", - "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "571e27b6348e5b3a637b2abc82ac0d01e6d7bbed" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/571e27b6348e5b3a637b2abc82ac0d01e6d7bbed", - "reference": "571e27b6348e5b3a637b2abc82ac0d01e6d7bbed", - "shasum": "" - }, - "require": { - "ext-simplexml": "*", - "ext-tokenizer": "*", - "ext-xmlwriter": "*", - "php": ">=5.1.2" - }, - "require-dev": { - "phpunit/phpunit": "~4.0" - }, - "bin": [ - "scripts/phpcs", - "scripts/phpcbf" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.x-dev" - } - }, - "autoload": { - "classmap": [ - "CodeSniffer.php", - "CodeSniffer/CLI.php", - "CodeSniffer/Exception.php", - "CodeSniffer/File.php", - "CodeSniffer/Fixer.php", - "CodeSniffer/Report.php", - "CodeSniffer/Reporting.php", - "CodeSniffer/Sniff.php", - "CodeSniffer/Tokens.php", - "CodeSniffer/Reports/", - "CodeSniffer/Tokenizers/", - "CodeSniffer/DocGenerators/", - "CodeSniffer/Standards/AbstractPatternSniff.php", - "CodeSniffer/Standards/AbstractScopeSniff.php", - "CodeSniffer/Standards/AbstractVariableSniff.php", - "CodeSniffer/Standards/IncorrectPatternException.php", - "CodeSniffer/Standards/Generic/Sniffs/", - "CodeSniffer/Standards/MySource/Sniffs/", - "CodeSniffer/Standards/PEAR/Sniffs/", - "CodeSniffer/Standards/PSR1/Sniffs/", - "CodeSniffer/Standards/PSR2/Sniffs/", - "CodeSniffer/Standards/Squiz/Sniffs/", - "CodeSniffer/Standards/Zend/Sniffs/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Greg Sherwood", - "role": "lead" - } - ], - "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", - "homepage": "http://www.squizlabs.com/php-codesniffer", - "keywords": [ - "phpcs", - "standards" - ], - "time": "2016-09-01 23:53:02" - }, - { - "name": "symfony/config", - "version": "v3.1.6", - "source": { - "type": "git", - "url": "https://github.com/symfony/config.git", - "reference": "949e7e846743a7f9e46dc50eb639d5fde1f53341" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/config/zipball/949e7e846743a7f9e46dc50eb639d5fde1f53341", - "reference": "949e7e846743a7f9e46dc50eb639d5fde1f53341", - "shasum": "" - }, - "require": { - "php": ">=5.5.9", - "symfony/filesystem": "~2.8|~3.0" - }, - "suggest": { - "symfony/yaml": "To use the yaml reference dumper" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.1-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Config\\": "" - }, - "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 Config Component", - "homepage": "https://symfony.com", - "time": "2016-09-25 08:27:07" - }, - { - "name": "symfony/console", - "version": "v2.8.13", - "source": { - "type": "git", - "url": "https://github.com/symfony/console.git", - "reference": "7350016c8abcab897046f1aead2b766b84d3eff8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/7350016c8abcab897046f1aead2b766b84d3eff8", - "reference": "7350016c8abcab897046f1aead2b766b84d3eff8", - "shasum": "" - }, - "require": { - "php": ">=5.3.9", - "symfony/debug": "~2.7,>=2.7.2|~3.0.0", - "symfony/polyfill-mbstring": "~1.0" - }, - "require-dev": { - "psr/log": "~1.0", - "symfony/event-dispatcher": "~2.1|~3.0.0", - "symfony/process": "~2.1|~3.0.0" - }, - "suggest": { - "psr/log": "For using the console logger", - "symfony/event-dispatcher": "", - "symfony/process": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.8-dev" - } - }, - "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", - "time": "2016-10-06 01:43:09" - }, - { - "name": "symfony/debug", - "version": "v3.0.9", - "source": { - "type": "git", - "url": "https://github.com/symfony/debug.git", - "reference": "697c527acd9ea1b2d3efac34d9806bf255278b0a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/697c527acd9ea1b2d3efac34d9806bf255278b0a", - "reference": "697c527acd9ea1b2d3efac34d9806bf255278b0a", - "shasum": "" - }, - "require": { - "php": ">=5.5.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.8|~3.0", - "symfony/http-kernel": "~2.8|~3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "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", - "time": "2016-07-30 07:22:48" - }, - { - "name": "symfony/dependency-injection", - "version": "v3.1.6", - "source": { - "type": "git", - "url": "https://github.com/symfony/dependency-injection.git", - "reference": "c578891216090069cd6d2e573402e13e39b3ad5c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/c578891216090069cd6d2e573402e13e39b3ad5c", - "reference": "c578891216090069cd6d2e573402e13e39b3ad5c", - "shasum": "" - }, - "require": { - "php": ">=5.5.9" - }, - "require-dev": { - "symfony/config": "~2.8|~3.0", - "symfony/expression-language": "~2.8|~3.0", - "symfony/yaml": "~2.8.7|~3.0.7|~3.1.1|~3.2" - }, - "suggest": { - "symfony/config": "", - "symfony/expression-language": "For using expressions in service container configuration", - "symfony/proxy-manager-bridge": "Generate service proxies to lazy load them", - "symfony/yaml": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.1-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\DependencyInjection\\": "" - }, - "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 DependencyInjection Component", - "homepage": "https://symfony.com", - "time": "2016-10-24 15:52:44" - }, - { - "name": "symfony/filesystem", - "version": "v3.1.6", - "source": { - "type": "git", - "url": "https://github.com/symfony/filesystem.git", - "reference": "0565b61bf098cb4dc09f4f103f033138ae4f42c6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/0565b61bf098cb4dc09f4f103f033138ae4f42c6", - "reference": "0565b61bf098cb4dc09f4f103f033138ae4f42c6", - "shasum": "" - }, - "require": { - "php": ">=5.5.9" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.1-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Filesystem\\": "" - }, - "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 Filesystem Component", - "homepage": "https://symfony.com", - "time": "2016-10-18 04:30:12" - }, - { - "name": "symfony/polyfill-mbstring", - "version": "v1.2.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "dff51f72b0706335131b00a7f49606168c582594" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/dff51f72b0706335131b00a7f49606168c582594", - "reference": "dff51f72b0706335131b00a7f49606168c582594", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "suggest": { - "ext-mbstring": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" - }, - "files": [ - "bootstrap.php" - ] - }, - "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 polyfill for the Mbstring extension", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "mbstring", - "polyfill", - "portable", - "shim" - ], - "time": "2016-05-18 14:26:46" - }, - { - "name": "symfony/yaml", - "version": "v3.1.6", - "source": { - "type": "git", - "url": "https://github.com/symfony/yaml.git", - "reference": "7ff51b06c6c3d5cc6686df69004a42c69df09e27" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/7ff51b06c6c3d5cc6686df69004a42c69df09e27", - "reference": "7ff51b06c6c3d5cc6686df69004a42c69df09e27", - "shasum": "" - }, - "require": { - "php": ">=5.5.9" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.1-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Yaml\\": "" - }, - "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 Yaml Component", - "homepage": "https://symfony.com", - "time": "2016-10-24 18:41:13" - }, - { - "name": "webmozart/assert", - "version": "1.1.0", - "source": { - "type": "git", - "url": "https://github.com/webmozart/assert.git", - "reference": "bb2d123231c095735130cc8f6d31385a44c7b308" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/bb2d123231c095735130cc8f6d31385a44c7b308", - "reference": "bb2d123231c095735130cc8f6d31385a44c7b308", - "shasum": "" - }, - "require": { - "php": "^5.3.3|^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.6", - "sebastian/version": "^1.0.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2-dev" - } - }, - "autoload": { - "psr-4": { - "Webmozart\\Assert\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "Assertions to validate method input/output with nice error messages.", - "keywords": [ - "assert", - "check", - "validate" - ], - "time": "2016-08-09 15:02:57" - } - ], - "aliases": [], - "minimum-stability": "stable", - "stability-flags": [], - "prefer-stable": false, - "prefer-lowest": false, - "platform": { - "php": ">=5.5", - "ext-openssl": "*" - }, - "platform-dev": [] -} diff --git a/vendor/lcobucci/jwt/phpunit.xml.dist b/vendor/lcobucci/jwt/phpunit.xml.dist index 5a722b36..e84d0f23 100644 --- a/vendor/lcobucci/jwt/phpunit.xml.dist +++ b/vendor/lcobucci/jwt/phpunit.xml.dist @@ -1,16 +1,14 @@ @@ -20,14 +18,10 @@ test/functional - + src - - - vendor - diff --git a/vendor/lcobucci/jwt/src/Builder.php b/vendor/lcobucci/jwt/src/Builder.php index af1f643a..f7aa9b65 100644 --- a/vendor/lcobucci/jwt/src/Builder.php +++ b/vendor/lcobucci/jwt/src/Builder.php @@ -7,10 +7,10 @@ namespace Lcobucci\JWT; -use BadMethodCallException; use Lcobucci\JWT\Claim\Factory as ClaimFactory; use Lcobucci\JWT\Parsing\Encoder; use Lcobucci\JWT\Signer\Key; +use function implode; /** * This class makes easier the token creation process @@ -25,21 +25,14 @@ class Builder * * @var array */ - private $headers; + private $headers = ['typ'=> 'JWT', 'alg' => 'none']; /** * The token claim set * * @var array */ - private $claims; - - /** - * The token signature - * - * @var Signature - */ - private $signature; + private $claims = []; /** * The data encoder @@ -55,6 +48,16 @@ class Builder */ private $claimFactory; + /** + * @var Signer|null + */ + private $signer; + + /** + * @var Key|null + */ + private $key; + /** * Initializes a new builder * @@ -67,13 +70,43 @@ class Builder ) { $this->encoder = $encoder ?: new Encoder(); $this->claimFactory = $claimFactory ?: new ClaimFactory(); - $this->headers = ['typ'=> 'JWT', 'alg' => 'none']; - $this->claims = []; } /** * Configures the audience * + * @deprecated This method has been wrongly added and doesn't exist on v4 + * @see Builder::permittedFor() + * + * @param string $audience + * @param bool $replicateAsHeader + * + * @return Builder + */ + public function canOnlyBeUsedBy($audience, $replicateAsHeader = false) + { + return $this->setRegisteredClaim('aud', (string) $audience, $replicateAsHeader); + } + + /** + * Configures the audience + * + * @param string $audience + * @param bool $replicateAsHeader + * + * @return Builder + */ + public function permittedFor($audience, $replicateAsHeader = false) + { + return $this->setRegisteredClaim('aud', (string) $audience, $replicateAsHeader); + } + + /** + * Configures the audience + * + * @deprecated This method will be removed on v4 + * @see Builder::permittedFor() + * * @param string $audience * @param boolean $replicateAsHeader * @@ -92,6 +125,22 @@ class Builder * * @return Builder */ + public function expiresAt($expiration, $replicateAsHeader = false) + { + return $this->setRegisteredClaim('exp', (int) $expiration, $replicateAsHeader); + } + + /** + * Configures the expiration time + * + * @deprecated This method will be removed on v4 + * @see Builder::expiresAt() + * + * @param int $expiration + * @param boolean $replicateAsHeader + * + * @return Builder + */ public function setExpiration($expiration, $replicateAsHeader = false) { return $this->setRegisteredClaim('exp', (int) $expiration, $replicateAsHeader); @@ -105,11 +154,27 @@ class Builder * * @return Builder */ - public function setId($id, $replicateAsHeader = false) + public function identifiedBy($id, $replicateAsHeader = false) { return $this->setRegisteredClaim('jti', (string) $id, $replicateAsHeader); } + /** + * Configures the token id + * + * @deprecated This method will be removed on v4 + * @see Builder::identifiedBy() + * + * @param string $id + * @param boolean $replicateAsHeader + * + * @return Builder + */ + public function setId($id, $replicateAsHeader = false) + { + return $this->identifiedBy($id, $replicateAsHeader); + } + /** * Configures the time that the token was issued * @@ -118,11 +183,27 @@ class Builder * * @return Builder */ - public function setIssuedAt($issuedAt, $replicateAsHeader = false) + public function issuedAt($issuedAt, $replicateAsHeader = false) { return $this->setRegisteredClaim('iat', (int) $issuedAt, $replicateAsHeader); } + /** + * Configures the time that the token was issued + * + * @deprecated This method will be removed on v4 + * @see Builder::issuedAt() + * + * @param int $issuedAt + * @param boolean $replicateAsHeader + * + * @return Builder + */ + public function setIssuedAt($issuedAt, $replicateAsHeader = false) + { + return $this->issuedAt($issuedAt, $replicateAsHeader); + } + /** * Configures the issuer * @@ -131,11 +212,27 @@ class Builder * * @return Builder */ - public function setIssuer($issuer, $replicateAsHeader = false) + public function issuedBy($issuer, $replicateAsHeader = false) { return $this->setRegisteredClaim('iss', (string) $issuer, $replicateAsHeader); } + /** + * Configures the issuer + * + * @deprecated This method will be removed on v4 + * @see Builder::issuedBy() + * + * @param string $issuer + * @param boolean $replicateAsHeader + * + * @return Builder + */ + public function setIssuer($issuer, $replicateAsHeader = false) + { + return $this->issuedBy($issuer, $replicateAsHeader); + } + /** * Configures the time before which the token cannot be accepted * @@ -144,11 +241,27 @@ class Builder * * @return Builder */ - public function setNotBefore($notBefore, $replicateAsHeader = false) + public function canOnlyBeUsedAfter($notBefore, $replicateAsHeader = false) { return $this->setRegisteredClaim('nbf', (int) $notBefore, $replicateAsHeader); } + /** + * Configures the time before which the token cannot be accepted + * + * @deprecated This method will be removed on v4 + * @see Builder::canOnlyBeUsedAfter() + * + * @param int $notBefore + * @param boolean $replicateAsHeader + * + * @return Builder + */ + public function setNotBefore($notBefore, $replicateAsHeader = false) + { + return $this->canOnlyBeUsedAfter($notBefore, $replicateAsHeader); + } + /** * Configures the subject * @@ -157,13 +270,29 @@ class Builder * * @return Builder */ - public function setSubject($subject, $replicateAsHeader = false) + public function relatedTo($subject, $replicateAsHeader = false) { return $this->setRegisteredClaim('sub', (string) $subject, $replicateAsHeader); } /** - * Configures a registed claim + * Configures the subject + * + * @deprecated This method will be removed on v4 + * @see Builder::relatedTo() + * + * @param string $subject + * @param boolean $replicateAsHeader + * + * @return Builder + */ + public function setSubject($subject, $replicateAsHeader = false) + { + return $this->relatedTo($subject, $replicateAsHeader); + } + + /** + * Configures a registered claim * * @param string $name * @param mixed $value @@ -173,7 +302,7 @@ class Builder */ protected function setRegisteredClaim($name, $value, $replicate) { - $this->set($name, $value); + $this->withClaim($name, $value); if ($replicate) { $this->headers[$name] = $this->claims[$name]; @@ -189,20 +318,46 @@ class Builder * @param mixed $value * * @return Builder - * - * @throws BadMethodCallException When data has been already signed */ - public function setHeader($name, $value) + public function withHeader($name, $value) { - if ($this->signature) { - throw new BadMethodCallException('You must unsign before make changes'); - } - $this->headers[(string) $name] = $this->claimFactory->create($name, $value); return $this; } + /** + * Configures a header item + * + * @deprecated This method will be removed on v4 + * @see Builder::withHeader() + * + * @param string $name + * @param mixed $value + * + * @return Builder + */ + public function setHeader($name, $value) + { + return $this->withHeader($name, $value); + } + + /** + * Configures a claim item + * + * @deprecated This method has been wrongly added and doesn't exist on v4 + * @see Builder::withClaim() + * + * @param string $name + * @param mixed $value + * + * @return Builder + */ + public function with($name, $value) + { + return $this->withClaim($name, $value); + } + /** * Configures a claim item * @@ -210,23 +365,36 @@ class Builder * @param mixed $value * * @return Builder - * - * @throws BadMethodCallException When data has been already signed */ - public function set($name, $value) + public function withClaim($name, $value) { - if ($this->signature) { - throw new BadMethodCallException('You must unsign before making changes'); - } - $this->claims[(string) $name] = $this->claimFactory->create($name, $value); return $this; } + /** + * Configures a claim item + * + * @deprecated This method will be removed on v4 + * @see Builder::withClaim() + * + * @param string $name + * @param mixed $value + * + * @return Builder + */ + public function set($name, $value) + { + return $this->withClaim($name, $value); + } + /** * Signs the data * + * @deprecated This method will be removed on v4 + * @see Builder::getToken() + * * @param Signer $signer * @param Key|string $key * @@ -234,12 +402,12 @@ class Builder */ public function sign(Signer $signer, $key) { - $signer->modifyHeader($this->headers); + if (! $key instanceof Key) { + $key = new Key($key); + } - $this->signature = $signer->sign( - $this->getToken()->getPayload(), - $key - ); + $this->signer = $signer; + $this->key = $key; return $this; } @@ -247,11 +415,15 @@ class Builder /** * Removes the signature from the builder * + * @deprecated This method will be removed on v4 + * @see Builder::getToken() + * * @return Builder */ public function unsign() { - $this->signature = null; + $this->signer = null; + $this->key = null; return $this; } @@ -261,17 +433,40 @@ class Builder * * @return Token */ - public function getToken() + public function getToken(Signer $signer = null, Key $key = null) { + $signer = $signer ?: $this->signer; + $key = $key ?: $this->key; + + if ($signer instanceof Signer) { + $signer->modifyHeader($this->headers); + } + $payload = [ $this->encoder->base64UrlEncode($this->encoder->jsonEncode($this->headers)), $this->encoder->base64UrlEncode($this->encoder->jsonEncode($this->claims)) ]; - if ($this->signature !== null) { - $payload[] = $this->encoder->base64UrlEncode($this->signature); + $signature = $this->createSignature($payload, $signer, $key); + + if ($signature !== null) { + $payload[] = $this->encoder->base64UrlEncode($signature); } - return new Token($this->headers, $this->claims, $this->signature, $payload); + return new Token($this->headers, $this->claims, $signature, $payload); + } + + /** + * @param string[] $payload + * + * @return Signature|null + */ + private function createSignature(array $payload, Signer $signer = null, Key $key = null) + { + if ($signer === null || $key === null) { + return null; + } + + return $signer->sign(implode('.', $payload), $key); } } diff --git a/vendor/lcobucci/jwt/src/Claim/Basic.php b/vendor/lcobucci/jwt/src/Claim/Basic.php index 96a8cd34..3626d1b7 100644 --- a/vendor/lcobucci/jwt/src/Claim/Basic.php +++ b/vendor/lcobucci/jwt/src/Claim/Basic.php @@ -12,6 +12,8 @@ use Lcobucci\JWT\Claim; /** * The default claim * + * @deprecated This class will be removed on v4 + * * @author Luís Otávio Cobucci Oblonczyk * @since 2.0.0 */ diff --git a/vendor/lcobucci/jwt/src/Claim/EqualsTo.php b/vendor/lcobucci/jwt/src/Claim/EqualsTo.php index 071b74ae..b6cc49b9 100644 --- a/vendor/lcobucci/jwt/src/Claim/EqualsTo.php +++ b/vendor/lcobucci/jwt/src/Claim/EqualsTo.php @@ -13,6 +13,8 @@ use Lcobucci\JWT\ValidationData; /** * Validatable claim that checks if value is strictly equals to the given data * + * @deprecated This class will be removed on v4 + * * @author Luís Otávio Cobucci Oblonczyk * @since 2.0.0 */ diff --git a/vendor/lcobucci/jwt/src/Claim/Factory.php b/vendor/lcobucci/jwt/src/Claim/Factory.php index 9c1c2b06..6a941057 100644 --- a/vendor/lcobucci/jwt/src/Claim/Factory.php +++ b/vendor/lcobucci/jwt/src/Claim/Factory.php @@ -12,6 +12,8 @@ use Lcobucci\JWT\Claim; /** * Class that create claims * + * @deprecated This class will be removed on v4 + * * @author Luís Otávio Cobucci Oblonczyk * @since 2.0.0 */ diff --git a/vendor/lcobucci/jwt/src/Claim/GreaterOrEqualsTo.php b/vendor/lcobucci/jwt/src/Claim/GreaterOrEqualsTo.php index 0a4c2466..550e21e0 100644 --- a/vendor/lcobucci/jwt/src/Claim/GreaterOrEqualsTo.php +++ b/vendor/lcobucci/jwt/src/Claim/GreaterOrEqualsTo.php @@ -13,6 +13,8 @@ use Lcobucci\JWT\ValidationData; /** * Validatable claim that checks if value is greater or equals the given data * + * @deprecated This class will be removed on v4 + * * @author Luís Otávio Cobucci Oblonczyk * @since 2.0.0 */ diff --git a/vendor/lcobucci/jwt/src/Claim/LesserOrEqualsTo.php b/vendor/lcobucci/jwt/src/Claim/LesserOrEqualsTo.php index 3d89ccf7..962edc89 100644 --- a/vendor/lcobucci/jwt/src/Claim/LesserOrEqualsTo.php +++ b/vendor/lcobucci/jwt/src/Claim/LesserOrEqualsTo.php @@ -13,6 +13,8 @@ use Lcobucci\JWT\ValidationData; /** * Validatable claim that checks if value is lesser or equals to the given data * + * @deprecated This class will be removed on v4 + * * @author Luís Otávio Cobucci Oblonczyk * @since 2.0.0 */ diff --git a/vendor/lcobucci/jwt/src/Claim/Validatable.php b/vendor/lcobucci/jwt/src/Claim/Validatable.php index 0e49cf22..63a27744 100644 --- a/vendor/lcobucci/jwt/src/Claim/Validatable.php +++ b/vendor/lcobucci/jwt/src/Claim/Validatable.php @@ -12,6 +12,8 @@ use Lcobucci\JWT\ValidationData; /** * Basic interface for validatable token claims * + * @deprecated This interface will be removed on v4 + * * @author Luís Otávio Cobucci Oblonczyk * @since 2.0.0 */ diff --git a/vendor/lcobucci/jwt/src/Signer/BaseSigner.php b/vendor/lcobucci/jwt/src/Signer/BaseSigner.php index c65076fd..dc659aa0 100644 --- a/vendor/lcobucci/jwt/src/Signer/BaseSigner.php +++ b/vendor/lcobucci/jwt/src/Signer/BaseSigner.php @@ -13,6 +13,8 @@ use Lcobucci\JWT\Signer; /** * Base class for signers * + * @deprecated This class will be removed on v4 + * * @author Luís Otávio Cobucci Oblonczyk * @since 0.1.0 */ diff --git a/vendor/lcobucci/jwt/src/Signer/Ecdsa.php b/vendor/lcobucci/jwt/src/Signer/Ecdsa.php index e1d52532..ccb029ec 100644 --- a/vendor/lcobucci/jwt/src/Signer/Ecdsa.php +++ b/vendor/lcobucci/jwt/src/Signer/Ecdsa.php @@ -7,13 +7,9 @@ namespace Lcobucci\JWT\Signer; -use Lcobucci\JWT\Signer\Ecdsa\KeyParser; -use Mdanter\Ecc\Crypto\Signature\Signature; -use Mdanter\Ecc\Crypto\Signature\Signer; -use Mdanter\Ecc\EccFactory; -use Mdanter\Ecc\Math\MathAdapterInterface as Adapter; -use Mdanter\Ecc\Random\RandomGeneratorFactory; -use Mdanter\Ecc\Random\RandomNumberGeneratorInterface; +use Lcobucci\JWT\Signer\Ecdsa\MultibyteStringConverter; +use Lcobucci\JWT\Signer\Ecdsa\SignatureConverter; +use const OPENSSL_KEYTYPE_EC; /** * Base class for ECDSA signers @@ -21,133 +17,53 @@ use Mdanter\Ecc\Random\RandomNumberGeneratorInterface; * @author Luís Otávio Cobucci Oblonczyk * @since 2.1.0 */ -abstract class Ecdsa extends BaseSigner +abstract class Ecdsa extends OpenSSL { /** - * @var Adapter + * @var SignatureConverter */ - private $adapter; + private $converter; - /** - * @var Signer - */ - private $signer; - - /** - * @var KeyParser - */ - private $parser; - - /** - * @param Adapter $adapter - * @param EcdsaSigner $signer - * @param KeyParser $parser - */ - public function __construct(Adapter $adapter = null, Signer $signer = null, KeyParser $parser = null) + public function __construct(SignatureConverter $converter = null) { - $this->adapter = $adapter ?: EccFactory::getAdapter(); - $this->signer = $signer ?: EccFactory::getSigner($this->adapter); - $this->parser = $parser ?: new KeyParser($this->adapter); + $this->converter = $converter ?: new MultibyteStringConverter(); } /** * {@inheritdoc} */ - public function createHash( - $payload, - Key $key, - RandomNumberGeneratorInterface $generator = null - ) { - $privateKey = $this->parser->getPrivateKey($key); - $generator = $generator ?: RandomGeneratorFactory::getRandomGenerator(); - - return $this->createSignatureHash( - $this->signer->sign( - $privateKey, - $this->createSigningHash($payload), - $generator->generate($privateKey->getPoint()->getOrder()) - ) - ); - } - - /** - * Creates a binary signature with R and S coordinates - * - * @param Signature $signature - * - * @return string - */ - private function createSignatureHash(Signature $signature) + public function createHash($payload, Key $key) { - $length = $this->getSignatureLength(); - - return pack( - 'H*', - sprintf( - '%s%s', - str_pad($this->adapter->decHex($signature->getR()), $length, '0', STR_PAD_LEFT), - str_pad($this->adapter->decHex($signature->getS()), $length, '0', STR_PAD_LEFT) - ) + return $this->converter->fromAsn1( + parent::createHash($payload, $key), + $this->getKeyLength() ); } - /** - * Creates a hash using the signer algorithm with given payload - * - * @param string $payload - * - * @return int|string - */ - private function createSigningHash($payload) - { - return $this->adapter->hexDec(hash($this->getAlgorithm(), $payload)); - } - /** * {@inheritdoc} */ public function doVerify($expected, $payload, Key $key) { - return $this->signer->verify( - $this->parser->getPublicKey($key), - $this->extractSignature($expected), - $this->createSigningHash($payload) + return parent::doVerify( + $this->converter->toAsn1($expected, $this->getKeyLength()), + $payload, + $key ); } /** - * Extracts R and S values from given data + * Returns the length of each point in the signature, so that we can calculate and verify R and S points properly * - * @param string $value - * - * @return \Mdanter\Ecc\Crypto\Signature\Signature + * @internal */ - private function extractSignature($value) + abstract public function getKeyLength(); + + /** + * {@inheritdoc} + */ + final public function getKeyType() { - $length = $this->getSignatureLength(); - $value = unpack('H*', $value)[1]; - - return new Signature( - $this->adapter->hexDec(substr($value, 0, $length)), - $this->adapter->hexDec(substr($value, $length)) - ); + return OPENSSL_KEYTYPE_EC; } - - /** - * Returns the length of signature parts - * - * @internal - * - * @return int - */ - abstract public function getSignatureLength(); - - /** - * Returns the name of algorithm to be used to create the signing hash - * - * @internal - * - * @return string - */ - abstract public function getAlgorithm(); } diff --git a/vendor/lcobucci/jwt/src/Signer/Ecdsa/KeyParser.php b/vendor/lcobucci/jwt/src/Signer/Ecdsa/KeyParser.php deleted file mode 100644 index 7d7c1976..00000000 --- a/vendor/lcobucci/jwt/src/Signer/Ecdsa/KeyParser.php +++ /dev/null @@ -1,104 +0,0 @@ - - * @since 3.0.4 - */ -class KeyParser -{ - /** - * @var PrivateKeySerializerInterface - */ - private $privateKeySerializer; - - /** - * @var PublicKeySerializerInterface - */ - private $publicKeySerializer; - - /** - * @param MathAdapterInterface $adapter - * @param PrivateKeySerializerInterface $privateKeySerializer - * @param PublicKeySerializerInterface $publicKeySerializer - */ - public function __construct( - MathAdapterInterface $adapter, - PrivateKeySerializerInterface $privateKeySerializer = null, - PublicKeySerializerInterface $publicKeySerializer = null - ) { - $this->privateKeySerializer = $privateKeySerializer ?: new PemPrivateKeySerializer(new DerPrivateKeySerializer($adapter)); - $this->publicKeySerializer = $publicKeySerializer ?: new PemPublicKeySerializer(new DerPublicKeySerializer($adapter)); - } - - /** - * Parses a public key from the given PEM content - * - * @param Key $key - * - * @return \Mdanter\Ecc\Crypto\Key\PublicKeyInterface - */ - public function getPublicKey(Key $key) - { - return $this->publicKeySerializer->parse($this->getKeyContent($key, 'PUBLIC KEY')); - } - - /** - * Parses a private key from the given PEM content - * - * @param Key $key - * - * @return \Mdanter\Ecc\Crypto\Key\PrivateKeyInterface - */ - public function getPrivateKey(Key $key) - { - return $this->privateKeySerializer->parse($this->getKeyContent($key, 'EC PRIVATE KEY')); - } - - /** - * Extracts the base 64 value from the PEM certificate - * - * @param Key $key - * @param string $header - * - * @return string - * - * @throws InvalidArgumentException When given key is not a ECDSA key - */ - private function getKeyContent(Key $key, $header) - { - $match = null; - - preg_match( - '/[\-]{5}BEGIN ' . $header . '[\-]{5}(.*)[\-]{5}END ' . $header . '[\-]{5}/', - str_replace([PHP_EOL, "\n", "\r"], '', $key->getContent()), - $match - ); - - if (isset($match[1])) { - return $match[1]; - } - - throw new InvalidArgumentException('This is not a valid ECDSA key.'); - } -} diff --git a/vendor/lcobucci/jwt/src/Signer/Ecdsa/MultibyteStringConverter.php b/vendor/lcobucci/jwt/src/Signer/Ecdsa/MultibyteStringConverter.php new file mode 100644 index 00000000..729267ee --- /dev/null +++ b/vendor/lcobucci/jwt/src/Signer/Ecdsa/MultibyteStringConverter.php @@ -0,0 +1,134 @@ + self::ASN1_MAX_SINGLE_BYTE ? self::ASN1_LENGTH_2BYTES : ''; + + $asn1 = hex2bin( + self::ASN1_SEQUENCE + . $lengthPrefix . dechex($totalLength) + . self::ASN1_INTEGER . dechex($lengthR) . $pointR + . self::ASN1_INTEGER . dechex($lengthS) . $pointS + ); + + return $asn1; + } + + private static function octetLength($data) + { + return (int) (mb_strlen($data, '8bit') / self::BYTE_SIZE); + } + + private static function preparePositiveInteger($data) + { + if (mb_substr($data, 0, self::BYTE_SIZE, '8bit') > self::ASN1_BIG_INTEGER_LIMIT) { + return self::ASN1_NEGATIVE_INTEGER . $data; + } + + while (mb_substr($data, 0, self::BYTE_SIZE, '8bit') === self::ASN1_NEGATIVE_INTEGER + && mb_substr($data, 2, self::BYTE_SIZE, '8bit') <= self::ASN1_BIG_INTEGER_LIMIT) { + $data = mb_substr($data, 2, null, '8bit'); + } + + return $data; + } + + public function fromAsn1($signature, $length) + { + $message = bin2hex($signature); + $position = 0; + + if (self::readAsn1Content($message, $position, self::BYTE_SIZE) !== self::ASN1_SEQUENCE) { + throw new InvalidArgumentException('Invalid data. Should start with a sequence.'); + } + + if (self::readAsn1Content($message, $position, self::BYTE_SIZE) === self::ASN1_LENGTH_2BYTES) { + $position += self::BYTE_SIZE; + } + + $pointR = self::retrievePositiveInteger(self::readAsn1Integer($message, $position)); + $pointS = self::retrievePositiveInteger(self::readAsn1Integer($message, $position)); + + $points = hex2bin(str_pad($pointR, $length, '0', STR_PAD_LEFT) . str_pad($pointS, $length, '0', STR_PAD_LEFT)); + + return $points; + } + + private static function readAsn1Content($message, &$position, $length) + { + $content = mb_substr($message, $position, $length, '8bit'); + $position += $length; + + return $content; + } + + private static function readAsn1Integer($message, &$position) + { + if (self::readAsn1Content($message, $position, self::BYTE_SIZE) !== self::ASN1_INTEGER) { + throw new InvalidArgumentException('Invalid data. Should contain an integer.'); + } + + $length = (int) hexdec(self::readAsn1Content($message, $position, self::BYTE_SIZE)); + + return self::readAsn1Content($message, $position, $length * self::BYTE_SIZE); + } + + private static function retrievePositiveInteger($data) + { + while (mb_substr($data, 0, self::BYTE_SIZE, '8bit') === self::ASN1_NEGATIVE_INTEGER + && mb_substr($data, 2, self::BYTE_SIZE, '8bit') > self::ASN1_BIG_INTEGER_LIMIT) { + $data = mb_substr($data, 2, null, '8bit'); + } + + return $data; + } +} diff --git a/vendor/lcobucci/jwt/src/Signer/Ecdsa/Sha256.php b/vendor/lcobucci/jwt/src/Signer/Ecdsa/Sha256.php index 4e1887c6..16a010ff 100644 --- a/vendor/lcobucci/jwt/src/Signer/Ecdsa/Sha256.php +++ b/vendor/lcobucci/jwt/src/Signer/Ecdsa/Sha256.php @@ -36,7 +36,7 @@ class Sha256 extends Ecdsa /** * {@inheritdoc} */ - public function getSignatureLength() + public function getKeyLength() { return 64; } diff --git a/vendor/lcobucci/jwt/src/Signer/Ecdsa/Sha384.php b/vendor/lcobucci/jwt/src/Signer/Ecdsa/Sha384.php index bc235aaf..ee56c244 100644 --- a/vendor/lcobucci/jwt/src/Signer/Ecdsa/Sha384.php +++ b/vendor/lcobucci/jwt/src/Signer/Ecdsa/Sha384.php @@ -36,7 +36,7 @@ class Sha384 extends Ecdsa /** * {@inheritdoc} */ - public function getSignatureLength() + public function getKeyLength() { return 96; } diff --git a/vendor/lcobucci/jwt/src/Signer/Ecdsa/Sha512.php b/vendor/lcobucci/jwt/src/Signer/Ecdsa/Sha512.php index 20286da3..e0bf4d60 100644 --- a/vendor/lcobucci/jwt/src/Signer/Ecdsa/Sha512.php +++ b/vendor/lcobucci/jwt/src/Signer/Ecdsa/Sha512.php @@ -36,7 +36,7 @@ class Sha512 extends Ecdsa /** * {@inheritdoc} */ - public function getSignatureLength() + public function getKeyLength() { return 132; } diff --git a/vendor/lcobucci/jwt/src/Signer/Ecdsa/SignatureConverter.php b/vendor/lcobucci/jwt/src/Signer/Ecdsa/SignatureConverter.php new file mode 100644 index 00000000..b411dd35 --- /dev/null +++ b/vendor/lcobucci/jwt/src/Signer/Ecdsa/SignatureConverter.php @@ -0,0 +1,38 @@ +getPrivateKey($key->getContent(), $key->getPassphrase()); + + try { + $signature = ''; + + if (! openssl_sign($payload, $signature, $privateKey, $this->getAlgorithm())) { + throw new InvalidArgumentException( + 'There was an error while creating the signature: ' . openssl_error_string() + ); + } + + return $signature; + } finally { + openssl_free_key($privateKey); + } + } + + /** + * @param string $pem + * @param string $passphrase + * + * @return resource + */ + private function getPrivateKey($pem, $passphrase) + { + $privateKey = openssl_pkey_get_private($pem, $passphrase); + $this->validateKey($privateKey); + + return $privateKey; + } + + /** + * @param $expected + * @param $payload + * @param $pem + * @return bool + */ + public function doVerify($expected, $payload, Key $key) + { + $publicKey = $this->getPublicKey($key->getContent()); + $result = openssl_verify($payload, $expected, $publicKey, $this->getAlgorithm()); + openssl_free_key($publicKey); + + return $result === 1; + } + + /** + * @param string $pem + * + * @return resource + */ + private function getPublicKey($pem) + { + $publicKey = openssl_pkey_get_public($pem); + $this->validateKey($publicKey); + + return $publicKey; + } + + /** + * Raises an exception when the key type is not the expected type + * + * @param resource|bool $key + * + * @throws InvalidArgumentException + */ + private function validateKey($key) + { + if (! is_resource($key)) { + throw new InvalidArgumentException( + 'It was not possible to parse your key, reason: ' . openssl_error_string() + ); + } + + $details = openssl_pkey_get_details($key); + + if (! isset($details['key']) || $details['type'] !== $this->getKeyType()) { + throw new InvalidArgumentException('This key is not compatible with this signer'); + } + } + + /** + * Returns the type of key to be used to create/verify the signature (using OpenSSL constants) + * + * @internal + */ + abstract public function getKeyType(); + + /** + * Returns which algorithm to be used to create/verify the signature (using OpenSSL constants) + * + * @internal + */ + abstract public function getAlgorithm(); +} diff --git a/vendor/lcobucci/jwt/src/Signer/Rsa.php b/vendor/lcobucci/jwt/src/Signer/Rsa.php index 40257dcb..55cc3611 100644 --- a/vendor/lcobucci/jwt/src/Signer/Rsa.php +++ b/vendor/lcobucci/jwt/src/Signer/Rsa.php @@ -7,7 +7,7 @@ namespace Lcobucci\JWT\Signer; -use InvalidArgumentException; +use const OPENSSL_KEYTYPE_RSA; /** * Base class for RSASSA-PKCS1 signers @@ -15,66 +15,10 @@ use InvalidArgumentException; * @author Luís Otávio Cobucci Oblonczyk * @since 2.1.0 */ -abstract class Rsa extends BaseSigner +abstract class Rsa extends OpenSSL { - /** - * {@inheritdoc} - */ - public function createHash($payload, Key $key) + final public function getKeyType() { - $key = openssl_get_privatekey($key->getContent(), $key->getPassphrase()); - $this->validateKey($key); - - $signature = ''; - - if (!openssl_sign($payload, $signature, $key, $this->getAlgorithm())) { - throw new InvalidArgumentException( - 'There was an error while creating the signature: ' . openssl_error_string() - ); - } - - return $signature; + return OPENSSL_KEYTYPE_RSA; } - - /** - * {@inheritdoc} - */ - public function doVerify($expected, $payload, Key $key) - { - $key = openssl_get_publickey($key->getContent()); - $this->validateKey($key); - - return openssl_verify($payload, $expected, $key, $this->getAlgorithm()) === 1; - } - - /** - * Validates if the given key is a valid RSA public/private key - * - * @param resource $key - * - * @throws InvalidArgumentException - */ - private function validateKey($key) - { - if ($key === false) { - throw new InvalidArgumentException( - 'It was not possible to parse your key, reason: ' . openssl_error_string() - ); - } - - $details = openssl_pkey_get_details($key); - - if (!isset($details['key']) || $details['type'] !== OPENSSL_KEYTYPE_RSA) { - throw new InvalidArgumentException('This key is not compatible with RSA signatures'); - } - } - - /** - * Returns the algorithm name - * - * @internal - * - * @return string - */ - abstract public function getAlgorithm(); } diff --git a/vendor/lcobucci/jwt/src/ValidationData.php b/vendor/lcobucci/jwt/src/ValidationData.php index 6302d0be..6052ee50 100644 --- a/vendor/lcobucci/jwt/src/ValidationData.php +++ b/vendor/lcobucci/jwt/src/ValidationData.php @@ -22,24 +22,31 @@ class ValidationData */ private $items; + /** + * The leeway (in seconds) to use when validating time claims + * @var int + */ + private $leeway; + /** * Initializes the object * * @param int $currentTime + * @param int $leeway */ - public function __construct($currentTime = null) + public function __construct($currentTime = null, $leeway = 0) { - $currentTime = $currentTime ?: time(); + $currentTime = $currentTime ?: time(); + $this->leeway = (int) $leeway; $this->items = [ 'jti' => null, 'iss' => null, 'aud' => null, - 'sub' => null, - 'iat' => $currentTime, - 'nbf' => $currentTime, - 'exp' => $currentTime + 'sub' => null ]; + + $this->setCurrentTime($currentTime); } /** @@ -89,9 +96,11 @@ class ValidationData */ public function setCurrentTime($currentTime) { - $this->items['iat'] = (int) $currentTime; - $this->items['nbf'] = (int) $currentTime; - $this->items['exp'] = (int) $currentTime; + $currentTime = (int) $currentTime; + + $this->items['iat'] = $currentTime + $this->leeway; + $this->items['nbf'] = $currentTime + $this->leeway; + $this->items['exp'] = $currentTime - $this->leeway; } /** diff --git a/vendor/lcobucci/jwt/test/functional/EcdsaTokenTest.php b/vendor/lcobucci/jwt/test/functional/EcdsaTokenTest.php index 1e20f813..5a18f952 100644 --- a/vendor/lcobucci/jwt/test/functional/EcdsaTokenTest.php +++ b/vendor/lcobucci/jwt/test/functional/EcdsaTokenTest.php @@ -21,7 +21,7 @@ use Lcobucci\JWT\Keys; * @author Luís Otávio Cobucci Oblonczyk * @since 2.1.0 */ -class EcdsaTokenTest extends \PHPUnit_Framework_TestCase +class EcdsaTokenTest extends \PHPUnit\Framework\TestCase { use Keys; @@ -52,8 +52,9 @@ class EcdsaTokenTest extends \PHPUnit_Framework_TestCase * @covers Lcobucci\JWT\Signer\Key * @covers Lcobucci\JWT\Signer\BaseSigner * @covers Lcobucci\JWT\Signer\Ecdsa - * @covers Lcobucci\JWT\Signer\Ecdsa\KeyParser + * @covers \Lcobucci\JWT\Signer\Ecdsa\MultibyteStringConverter * @covers Lcobucci\JWT\Signer\Ecdsa\Sha256 + * @covers \Lcobucci\JWT\Signer\OpenSSL */ public function builderShouldRaiseExceptionWhenKeyIsInvalid() { @@ -63,7 +64,7 @@ class EcdsaTokenTest extends \PHPUnit_Framework_TestCase ->setAudience('http://client.abc.com') ->setIssuer('http://api.abc.com') ->set('user', $user) - ->sign($this->signer, new Key('testing')); + ->getToken($this->signer, new Key('testing')); } /** @@ -80,8 +81,9 @@ class EcdsaTokenTest extends \PHPUnit_Framework_TestCase * @covers Lcobucci\JWT\Signer\Key * @covers Lcobucci\JWT\Signer\BaseSigner * @covers Lcobucci\JWT\Signer\Ecdsa - * @covers Lcobucci\JWT\Signer\Ecdsa\KeyParser + * @covers \Lcobucci\JWT\Signer\Ecdsa\MultibyteStringConverter * @covers Lcobucci\JWT\Signer\Ecdsa\Sha256 + * @covers \Lcobucci\JWT\Signer\OpenSSL */ public function builderShouldRaiseExceptionWhenKeyIsNotEcdsaCompatible() { @@ -91,7 +93,7 @@ class EcdsaTokenTest extends \PHPUnit_Framework_TestCase ->setAudience('http://client.abc.com') ->setIssuer('http://api.abc.com') ->set('user', $user) - ->sign($this->signer, static::$rsaKeys['private']); + ->getToken($this->signer, static::$rsaKeys['private']); } /** @@ -106,8 +108,9 @@ class EcdsaTokenTest extends \PHPUnit_Framework_TestCase * @covers Lcobucci\JWT\Signer\Key * @covers Lcobucci\JWT\Signer\BaseSigner * @covers Lcobucci\JWT\Signer\Ecdsa - * @covers Lcobucci\JWT\Signer\Ecdsa\KeyParser + * @covers \Lcobucci\JWT\Signer\Ecdsa\MultibyteStringConverter * @covers Lcobucci\JWT\Signer\Ecdsa\Sha256 + * @covers \Lcobucci\JWT\Signer\OpenSSL */ public function builderCanGenerateAToken() { @@ -144,7 +147,6 @@ class EcdsaTokenTest extends \PHPUnit_Framework_TestCase * @covers Lcobucci\JWT\Parsing\Encoder * @covers Lcobucci\JWT\Parsing\Decoder * @covers Lcobucci\JWT\Signer\Ecdsa - * @covers Lcobucci\JWT\Signer\Ecdsa\KeyParser */ public function parserCanReadAToken(Token $generated) { @@ -169,8 +171,9 @@ class EcdsaTokenTest extends \PHPUnit_Framework_TestCase * @covers Lcobucci\JWT\Signer\Key * @covers Lcobucci\JWT\Signer\BaseSigner * @covers Lcobucci\JWT\Signer\Ecdsa - * @covers Lcobucci\JWT\Signer\Ecdsa\KeyParser + * @covers \Lcobucci\JWT\Signer\Ecdsa\MultibyteStringConverter * @covers Lcobucci\JWT\Signer\Ecdsa\Sha256 + * @covers \Lcobucci\JWT\Signer\OpenSSL */ public function verifyShouldReturnFalseWhenKeyIsNotRight(Token $token) { @@ -192,9 +195,10 @@ class EcdsaTokenTest extends \PHPUnit_Framework_TestCase * @covers Lcobucci\JWT\Signer\Key * @covers Lcobucci\JWT\Signer\BaseSigner * @covers Lcobucci\JWT\Signer\Ecdsa - * @covers Lcobucci\JWT\Signer\Ecdsa\KeyParser + * @covers \Lcobucci\JWT\Signer\Ecdsa\MultibyteStringConverter * @covers Lcobucci\JWT\Signer\Ecdsa\Sha256 * @covers Lcobucci\JWT\Signer\Ecdsa\Sha512 + * @covers \Lcobucci\JWT\Signer\OpenSSL */ public function verifyShouldReturnFalseWhenAlgorithmIsDifferent(Token $token) { @@ -204,7 +208,7 @@ class EcdsaTokenTest extends \PHPUnit_Framework_TestCase /** * @test * - * @expectedException \RuntimeException + * @expectedException \InvalidArgumentException * * @depends builderCanGenerateAToken * @@ -218,8 +222,9 @@ class EcdsaTokenTest extends \PHPUnit_Framework_TestCase * @covers Lcobucci\JWT\Signer\Key * @covers Lcobucci\JWT\Signer\BaseSigner * @covers Lcobucci\JWT\Signer\Ecdsa - * @covers Lcobucci\JWT\Signer\Ecdsa\KeyParser + * @covers \Lcobucci\JWT\Signer\Ecdsa\MultibyteStringConverter * @covers Lcobucci\JWT\Signer\Ecdsa\Sha256 + * @covers \Lcobucci\JWT\Signer\OpenSSL */ public function verifyShouldRaiseExceptionWhenKeyIsNotEcdsaCompatible(Token $token) { @@ -241,8 +246,9 @@ class EcdsaTokenTest extends \PHPUnit_Framework_TestCase * @covers Lcobucci\JWT\Signer\Key * @covers Lcobucci\JWT\Signer\BaseSigner * @covers Lcobucci\JWT\Signer\Ecdsa - * @covers Lcobucci\JWT\Signer\Ecdsa\KeyParser + * @covers \Lcobucci\JWT\Signer\Ecdsa\MultibyteStringConverter * @covers Lcobucci\JWT\Signer\Ecdsa\Sha256 + * @covers \Lcobucci\JWT\Signer\OpenSSL */ public function verifyShouldReturnTrueWhenKeyIsRight(Token $token) { @@ -261,8 +267,9 @@ class EcdsaTokenTest extends \PHPUnit_Framework_TestCase * @covers Lcobucci\JWT\Signer\Key * @covers Lcobucci\JWT\Signer\BaseSigner * @covers Lcobucci\JWT\Signer\Ecdsa - * @covers Lcobucci\JWT\Signer\Ecdsa\KeyParser + * @covers \Lcobucci\JWT\Signer\Ecdsa\MultibyteStringConverter * @covers Lcobucci\JWT\Signer\Ecdsa\Sha256 + * @covers \Lcobucci\JWT\Signer\OpenSSL */ public function everythingShouldWorkWithAKeyWithParams() { @@ -289,8 +296,9 @@ class EcdsaTokenTest extends \PHPUnit_Framework_TestCase * @covers Lcobucci\JWT\Signer\Key * @covers Lcobucci\JWT\Signer\BaseSigner * @covers Lcobucci\JWT\Signer\Ecdsa - * @covers Lcobucci\JWT\Signer\Ecdsa\KeyParser + * @covers \Lcobucci\JWT\Signer\Ecdsa\MultibyteStringConverter * @covers Lcobucci\JWT\Signer\Ecdsa\Sha512 + * @covers \Lcobucci\JWT\Signer\OpenSSL * @covers Lcobucci\JWT\Signer\Keychain * @covers Lcobucci\JWT\Claim\Factory * @covers Lcobucci\JWT\Claim\Basic diff --git a/vendor/lcobucci/jwt/test/functional/HmacTokenTest.php b/vendor/lcobucci/jwt/test/functional/HmacTokenTest.php index 60d8f3bf..20101dd9 100644 --- a/vendor/lcobucci/jwt/test/functional/HmacTokenTest.php +++ b/vendor/lcobucci/jwt/test/functional/HmacTokenTest.php @@ -18,7 +18,7 @@ use Lcobucci\JWT\Signer\Hmac\Sha512; * @author Luís Otávio Cobucci Oblonczyk * @since 2.1.0 */ -class HmacTokenTest extends \PHPUnit_Framework_TestCase +class HmacTokenTest extends \PHPUnit\Framework\TestCase { /** * @var Sha256 diff --git a/vendor/lcobucci/jwt/test/functional/RFC6978VectorTest.php b/vendor/lcobucci/jwt/test/functional/RFC6978VectorTest.php new file mode 100644 index 00000000..0076b6d8 --- /dev/null +++ b/vendor/lcobucci/jwt/test/functional/RFC6978VectorTest.php @@ -0,0 +1,154 @@ +verify($signature, $payload, $key)); + } + + /** + * @return mixed[] + */ + public function dataRFC6979() + { + return $this->sha256Data() + $this->sha384Data() + $this->sha512Data(); + } + + /** + * @return mixed[] + */ + public function sha256Data() + { + $signer = new Sha256(); + $key = new Key( + '-----BEGIN PUBLIC KEY-----' . PHP_EOL + . 'MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEYP7UuiVanTHJYet0xjVtaMBJuJI7' . PHP_EOL + . 'Yfps5mliLmDyn7Z5A/4QCLi8maQa6elWKLxk8vGyDC1+n1F3o8KU1EYimQ==' . PHP_EOL + . '-----END PUBLIC KEY-----' + ); + + return [ + 'SHA-256 (sample)' => [ + $signer, + $key, + 'sample', + 'EFD48B2AACB6A8FD1140DD9CD45E81D69D2C877B56AAF991C34D0EA84EAF3716', + 'F7CB1C942D657C41D436C7A1B6E29F65F3E900DBB9AFF4064DC4AB2F843ACDA8', + ], + 'SHA-256 (test)' => [ + $signer, + $key, + 'test', + 'F1ABB023518351CD71D881567B1EA663ED3EFCF6C5132B354F28D3B0B7D38367', + '019F4113742A2B14BD25926B49C649155F267E60D3814B4C0CC84250E46F0083', + ] + ]; + } + + /** + * @return mixed[] + */ + public function sha384Data() + { + $signer = new Sha384(); + $key = new Key( + '-----BEGIN PUBLIC KEY-----' . PHP_EOL + . 'MHYwEAYHKoZIzj0CAQYFK4EEACIDYgAE7DpOQVtOGaRWhhgCn0J/pdqai8SukuAu' . PHP_EOL + . 'BqrlKGswDGTe+PDqkFWGYGSiVFFUgLwTgBXZty19VyROqO+awMYhiWcIpZNn+d+5' . PHP_EOL + . '9UyoSz8cnbEoiyMcOuDU/nNE/SUzJkcg' . PHP_EOL + . '-----END PUBLIC KEY-----' + ); + + return [ + 'SHA-384 (sample)' => [ + $signer, + $key, + 'sample', + '94EDBB92A5ECB8AAD4736E56C691916B3F88140666CE9FA73D64C4EA95AD133C81A648152E44ACF96E36DD1E80FABE46', + '99EF4AEB15F178CEA1FE40DB2603138F130E740A19624526203B6351D0A3A94FA329C145786E679E7B82C71A38628AC8', + ], + 'SHA-384 (test)' => [ + $signer, + $key, + 'test', + '8203B63D3C853E8D77227FB377BCF7B7B772E97892A80F36AB775D509D7A5FEB0542A7F0812998DA8F1DD3CA3CF023DB', + 'DDD0760448D42D8A43AF45AF836FCE4DE8BE06B485E9B61B827C2F13173923E06A739F040649A667BF3B828246BAA5A5', + ] + ]; + } + + /** + * @return mixed[] + */ + public function sha512Data() + { + $signer = new Sha512(); + $key = new Key( + '-----BEGIN PUBLIC KEY-----' . PHP_EOL + . 'MIGbMBAGByqGSM49AgEGBSuBBAAjA4GGAAQBiUVQ0HhZMuAOqiO2lPIT+MMSH4bc' . PHP_EOL + . 'l6BOWnFn205bzTcRI9RuRdtrXVNwp/IPtjMVXTj/oW0r12HcrEdLmi9QI6QASTEB' . PHP_EOL + . 'yWLNTS/d94IoXmRYQTnC+RtH+H/4I1TWYw90aiig2yV0G1s0qCgAiyKswj+ST6r7' . PHP_EOL + . '1NM/gepmlW3+qiv9/PU=' . PHP_EOL + . '-----END PUBLIC KEY-----' + ); + + return [ + 'SHA-512 (sample)' => [ + $signer, + $key, + 'sample', + '00C328FAFCBD79DD77850370C46325D987CB525569FB63C5D3BC53950E6D4C5F174E25A1EE9017B5D450606ADD152B534931D7D4E8' + . '455CC91F9B15BF05EC36E377FA', + '00617CCE7CF5064806C467F678D3B4080D6F1CC50AF26CA209417308281B68AF282623EAA63E5B5C0723D8B8C37FF0777B1A20F8CC' + . 'B1DCCC43997F1EE0E44DA4A67A', + ], + 'SHA-512 (test)' => [ + $signer, + $key, + 'test', + '013E99020ABF5CEE7525D16B69B229652AB6BDF2AFFCAEF38773B4B7D08725F10CDB93482FDCC54EDCEE91ECA4166B2A7C6265EF0C' + . 'E2BD7051B7CEF945BABD47EE6D', + '01FBD0013C674AA79CB39849527916CE301C66EA7CE8B80682786AD60F98F7E78A19CA69EFF5C57400E3B3A0AD66CE0978214D13BA' + . 'F4E9AC60752F7B155E2DE4DCE3', + ], + ]; + } +} diff --git a/vendor/lcobucci/jwt/test/functional/RsaTokenTest.php b/vendor/lcobucci/jwt/test/functional/RsaTokenTest.php index c241f78c..99931836 100644 --- a/vendor/lcobucci/jwt/test/functional/RsaTokenTest.php +++ b/vendor/lcobucci/jwt/test/functional/RsaTokenTest.php @@ -20,7 +20,7 @@ use Lcobucci\JWT\Signer\Rsa\Sha512; * @author Luís Otávio Cobucci Oblonczyk * @since 2.1.0 */ -class RsaTokenTest extends \PHPUnit_Framework_TestCase +class RsaTokenTest extends \PHPUnit\Framework\TestCase { use Keys; @@ -50,8 +50,9 @@ class RsaTokenTest extends \PHPUnit_Framework_TestCase * @covers Lcobucci\JWT\Parsing\Encoder * @covers Lcobucci\JWT\Signer\Key * @covers Lcobucci\JWT\Signer\BaseSigner - * @covers Lcobucci\JWT\Signer\Rsa - * @covers Lcobucci\JWT\Signer\Rsa\Sha256 + * @covers \Lcobucci\JWT\Signer\OpenSSL + * @covers \Lcobucci\JWT\Signer\Rsa + * @covers \Lcobucci\JWT\Signer\Rsa\Sha256 */ public function builderShouldRaiseExceptionWhenKeyIsInvalid() { @@ -61,7 +62,7 @@ class RsaTokenTest extends \PHPUnit_Framework_TestCase ->setAudience('http://client.abc.com') ->setIssuer('http://api.abc.com') ->set('user', $user) - ->sign($this->signer, new Key('testing')); + ->getToken($this->signer, new Key('testing')); } /** @@ -77,8 +78,9 @@ class RsaTokenTest extends \PHPUnit_Framework_TestCase * @covers Lcobucci\JWT\Parsing\Encoder * @covers Lcobucci\JWT\Signer\Key * @covers Lcobucci\JWT\Signer\BaseSigner - * @covers Lcobucci\JWT\Signer\Rsa - * @covers Lcobucci\JWT\Signer\Rsa\Sha256 + * @covers \Lcobucci\JWT\Signer\OpenSSL + * @covers \Lcobucci\JWT\Signer\Rsa + * @covers \Lcobucci\JWT\Signer\Rsa\Sha256 */ public function builderShouldRaiseExceptionWhenKeyIsNotRsaCompatible() { @@ -88,7 +90,7 @@ class RsaTokenTest extends \PHPUnit_Framework_TestCase ->setAudience('http://client.abc.com') ->setIssuer('http://api.abc.com') ->set('user', $user) - ->sign($this->signer, static::$ecdsaKeys['private']); + ->getToken($this->signer, static::$ecdsaKeys['private']); } /** @@ -102,8 +104,9 @@ class RsaTokenTest extends \PHPUnit_Framework_TestCase * @covers Lcobucci\JWT\Parsing\Encoder * @covers Lcobucci\JWT\Signer\Key * @covers Lcobucci\JWT\Signer\BaseSigner - * @covers Lcobucci\JWT\Signer\Rsa - * @covers Lcobucci\JWT\Signer\Rsa\Sha256 + * @covers \Lcobucci\JWT\Signer\OpenSSL + * @covers \Lcobucci\JWT\Signer\Rsa + * @covers \Lcobucci\JWT\Signer\Rsa\Sha256 */ public function builderCanGenerateAToken() { @@ -162,8 +165,9 @@ class RsaTokenTest extends \PHPUnit_Framework_TestCase * @covers Lcobucci\JWT\Claim\Basic * @covers Lcobucci\JWT\Signer\Key * @covers Lcobucci\JWT\Signer\BaseSigner - * @covers Lcobucci\JWT\Signer\Rsa - * @covers Lcobucci\JWT\Signer\Rsa\Sha256 + * @covers \Lcobucci\JWT\Signer\OpenSSL + * @covers \Lcobucci\JWT\Signer\Rsa + * @covers \Lcobucci\JWT\Signer\Rsa\Sha256 */ public function verifyShouldReturnFalseWhenKeyIsNotRight(Token $token) { @@ -184,9 +188,10 @@ class RsaTokenTest extends \PHPUnit_Framework_TestCase * @covers Lcobucci\JWT\Claim\Basic * @covers Lcobucci\JWT\Signer\Key * @covers Lcobucci\JWT\Signer\BaseSigner - * @covers Lcobucci\JWT\Signer\Rsa - * @covers Lcobucci\JWT\Signer\Rsa\Sha256 - * @covers Lcobucci\JWT\Signer\Rsa\Sha512 + * @covers \Lcobucci\JWT\Signer\OpenSSL + * @covers \Lcobucci\JWT\Signer\Rsa + * @covers \Lcobucci\JWT\Signer\Rsa\Sha256 + * @covers \Lcobucci\JWT\Signer\Rsa\Sha512 */ public function verifyShouldReturnFalseWhenAlgorithmIsDifferent(Token $token) { @@ -209,8 +214,9 @@ class RsaTokenTest extends \PHPUnit_Framework_TestCase * @covers Lcobucci\JWT\Claim\Basic * @covers Lcobucci\JWT\Signer\Key * @covers Lcobucci\JWT\Signer\BaseSigner - * @covers Lcobucci\JWT\Signer\Rsa - * @covers Lcobucci\JWT\Signer\Rsa\Sha256 + * @covers \Lcobucci\JWT\Signer\OpenSSL + * @covers \Lcobucci\JWT\Signer\Rsa + * @covers \Lcobucci\JWT\Signer\Rsa\Sha256 */ public function verifyShouldRaiseExceptionWhenKeyIsNotRsaCompatible(Token $token) { @@ -231,8 +237,9 @@ class RsaTokenTest extends \PHPUnit_Framework_TestCase * @covers Lcobucci\JWT\Claim\Basic * @covers Lcobucci\JWT\Signer\Key * @covers Lcobucci\JWT\Signer\BaseSigner - * @covers Lcobucci\JWT\Signer\Rsa - * @covers Lcobucci\JWT\Signer\Rsa\Sha256 + * @covers \Lcobucci\JWT\Signer\OpenSSL + * @covers \Lcobucci\JWT\Signer\Rsa + * @covers \Lcobucci\JWT\Signer\Rsa\Sha256 */ public function verifyShouldReturnTrueWhenKeyIsRight(Token $token) { @@ -248,8 +255,9 @@ class RsaTokenTest extends \PHPUnit_Framework_TestCase * @covers Lcobucci\JWT\Signature * @covers Lcobucci\JWT\Signer\Key * @covers Lcobucci\JWT\Signer\BaseSigner - * @covers Lcobucci\JWT\Signer\Rsa - * @covers Lcobucci\JWT\Signer\Rsa\Sha256 + * @covers \Lcobucci\JWT\Signer\OpenSSL + * @covers \Lcobucci\JWT\Signer\Rsa + * @covers \Lcobucci\JWT\Signer\Rsa\Sha256 * @covers Lcobucci\JWT\Claim\Factory * @covers Lcobucci\JWT\Claim\Basic * @covers Lcobucci\JWT\Parsing\Encoder diff --git a/vendor/lcobucci/jwt/test/functional/UnsignedTokenTest.php b/vendor/lcobucci/jwt/test/functional/UnsignedTokenTest.php index 089cb5da..6e26fdff 100644 --- a/vendor/lcobucci/jwt/test/functional/UnsignedTokenTest.php +++ b/vendor/lcobucci/jwt/test/functional/UnsignedTokenTest.php @@ -16,7 +16,7 @@ use Lcobucci\JWT\ValidationData; * @author Luís Otávio Cobucci Oblonczyk * @since 2.1.0 */ -class UnsignedTokenTest extends \PHPUnit_Framework_TestCase +class UnsignedTokenTest extends \PHPUnit\Framework\TestCase { const CURRENT_TIME = 100000; @@ -118,6 +118,30 @@ class UnsignedTokenTest extends \PHPUnit_Framework_TestCase $this->assertFalse($generated->validate($data)); } + /** + * @test + * + * @depends builderCanGenerateAToken + * + * @covers Lcobucci\JWT\Builder + * @covers Lcobucci\JWT\Parser + * @covers Lcobucci\JWT\Token + * @covers Lcobucci\JWT\ValidationData + * @covers Lcobucci\JWT\Claim\Factory + * @covers Lcobucci\JWT\Claim\Basic + * @covers Lcobucci\JWT\Claim\EqualsTo + * @covers Lcobucci\JWT\Claim\GreaterOrEqualsTo + * @covers Lcobucci\JWT\Parsing\Encoder + * @covers Lcobucci\JWT\Parsing\Decoder + */ + public function tokenValidationShouldReturnTrueWhenExpectedDataMatchBecauseOfLeeway(Token $generated) + { + $notExpiredDueToLeeway = new ValidationData(self::CURRENT_TIME + 3020, 50); + $notExpiredDueToLeeway->setAudience('http://client.abc.com'); + $notExpiredDueToLeeway->setIssuer('http://api.abc.com'); + $this->assertTrue($generated->validate($notExpiredDueToLeeway)); + } + public function invalidValidationData() { $expired = new ValidationData(self::CURRENT_TIME + 3020); diff --git a/vendor/lcobucci/jwt/test/unit/BuilderTest.php b/vendor/lcobucci/jwt/test/unit/BuilderTest.php index de6b61f9..30c43b66 100644 --- a/vendor/lcobucci/jwt/test/unit/BuilderTest.php +++ b/vendor/lcobucci/jwt/test/unit/BuilderTest.php @@ -9,12 +9,13 @@ namespace Lcobucci\JWT; use Lcobucci\JWT\Claim\Factory as ClaimFactory; use Lcobucci\JWT\Parsing\Encoder; +use Lcobucci\JWT\Signer\Key; /** * @author Luís Otávio Cobucci Oblonczyk * @since 0.1.0 */ -class BuilderTest extends \PHPUnit_Framework_TestCase +class BuilderTest extends \PHPUnit\Framework\TestCase { /** * @var Encoder|\PHPUnit_Framework_MockObject_MockObject @@ -36,9 +37,9 @@ class BuilderTest extends \PHPUnit_Framework_TestCase */ protected function setUp() { - $this->encoder = $this->getMock(Encoder::class); - $this->claimFactory = $this->getMock(ClaimFactory::class, [], [], '', false); - $this->defaultClaim = $this->getMock(Claim::class); + $this->encoder = $this->createMock(Encoder::class); + $this->claimFactory = $this->createMock(ClaimFactory::class); + $this->defaultClaim = $this->createMock(Claim::class); $this->claimFactory->expects($this->any()) ->method('create') @@ -64,7 +65,6 @@ class BuilderTest extends \PHPUnit_Framework_TestCase $this->assertAttributeEquals(['alg' => 'none', 'typ' => 'JWT'], 'headers', $builder); $this->assertAttributeEquals([], 'claims', $builder); - $this->assertAttributeEquals(null, 'signature', $builder); $this->assertAttributeSame($this->encoder, 'encoder', $builder); $this->assertAttributeSame($this->claimFactory, 'claimFactory', $builder); } @@ -73,15 +73,15 @@ class BuilderTest extends \PHPUnit_Framework_TestCase * @test * * @uses Lcobucci\JWT\Builder::__construct - * @uses Lcobucci\JWT\Builder::set + * @uses Lcobucci\JWT\Builder::withClaim * - * @covers Lcobucci\JWT\Builder::setAudience + * @covers Lcobucci\JWT\Builder::permittedFor * @covers Lcobucci\JWT\Builder::setRegisteredClaim */ - public function setAudienceMustChangeTheAudClaim() + public function permittedForMustChangeTheAudClaim() { $builder = $this->createBuilder(); - $builder->setAudience('test'); + $builder->permittedFor('test'); $this->assertAttributeEquals(['alg' => 'none', 'typ' => 'JWT'], 'headers', $builder); $this->assertAttributeEquals(['aud' => $this->defaultClaim], 'claims', $builder); @@ -91,15 +91,15 @@ class BuilderTest extends \PHPUnit_Framework_TestCase * @test * * @uses Lcobucci\JWT\Builder::__construct - * @uses Lcobucci\JWT\Builder::set + * @uses Lcobucci\JWT\Builder::withClaim * - * @covers Lcobucci\JWT\Builder::setAudience + * @covers Lcobucci\JWT\Builder::permittedFor * @covers Lcobucci\JWT\Builder::setRegisteredClaim */ - public function setAudienceCanReplicateItemOnHeader() + public function permittedForCanReplicateItemOnHeader() { $builder = $this->createBuilder(); - $builder->setAudience('test', true); + $builder->permittedFor('test', true); $this->assertAttributeEquals(['aud' => $this->defaultClaim], 'claims', $builder); @@ -114,31 +114,31 @@ class BuilderTest extends \PHPUnit_Framework_TestCase * @test * * @uses Lcobucci\JWT\Builder::__construct - * @uses Lcobucci\JWT\Builder::set + * @uses Lcobucci\JWT\Builder::withClaim * - * @covers Lcobucci\JWT\Builder::setAudience + * @covers Lcobucci\JWT\Builder::permittedFor * @covers Lcobucci\JWT\Builder::setRegisteredClaim */ - public function setAudienceMustKeepAFluentInterface() + public function permittedForMustKeepAFluentInterface() { $builder = $this->createBuilder(); - $this->assertSame($builder, $builder->setAudience('test')); + $this->assertSame($builder, $builder->permittedFor('test')); } /** * @test * * @uses Lcobucci\JWT\Builder::__construct - * @uses Lcobucci\JWT\Builder::set + * @uses Lcobucci\JWT\Builder::withClaim * - * @covers Lcobucci\JWT\Builder::setExpiration + * @covers Lcobucci\JWT\Builder::expiresAt * @covers Lcobucci\JWT\Builder::setRegisteredClaim */ - public function setExpirationMustChangeTheExpClaim() + public function expiresAtMustChangeTheExpClaim() { $builder = $this->createBuilder(); - $builder->setExpiration('2'); + $builder->expiresAt('2'); $this->assertAttributeEquals(['alg' => 'none', 'typ' => 'JWT'], 'headers', $builder); $this->assertAttributeEquals(['exp' => $this->defaultClaim], 'claims', $builder); @@ -148,15 +148,15 @@ class BuilderTest extends \PHPUnit_Framework_TestCase * @test * * @uses Lcobucci\JWT\Builder::__construct - * @uses Lcobucci\JWT\Builder::set + * @uses Lcobucci\JWT\Builder::withClaim * - * @covers Lcobucci\JWT\Builder::setExpiration + * @covers Lcobucci\JWT\Builder::expiresAt * @covers Lcobucci\JWT\Builder::setRegisteredClaim */ - public function setExpirationCanReplicateItemOnHeader() + public function expiresAtCanReplicateItemOnHeader() { $builder = $this->createBuilder(); - $builder->setExpiration('2', true); + $builder->expiresAt('2', true); $this->assertAttributeEquals(['exp' => $this->defaultClaim], 'claims', $builder); @@ -171,31 +171,31 @@ class BuilderTest extends \PHPUnit_Framework_TestCase * @test * * @uses Lcobucci\JWT\Builder::__construct - * @uses Lcobucci\JWT\Builder::set + * @uses Lcobucci\JWT\Builder::withClaim * - * @covers Lcobucci\JWT\Builder::setExpiration + * @covers Lcobucci\JWT\Builder::expiresAt * @covers Lcobucci\JWT\Builder::setRegisteredClaim */ - public function setExpirationMustKeepAFluentInterface() + public function expiresAtMustKeepAFluentInterface() { $builder = $this->createBuilder(); - $this->assertSame($builder, $builder->setExpiration('2')); + $this->assertSame($builder, $builder->expiresAt('2')); } /** * @test * * @uses Lcobucci\JWT\Builder::__construct - * @uses Lcobucci\JWT\Builder::set + * @uses Lcobucci\JWT\Builder::withClaim * - * @covers Lcobucci\JWT\Builder::setId + * @covers Lcobucci\JWT\Builder::identifiedBy * @covers Lcobucci\JWT\Builder::setRegisteredClaim */ - public function setIdMustChangeTheJtiClaim() + public function identifiedByMustChangeTheJtiClaim() { $builder = $this->createBuilder(); - $builder->setId('2'); + $builder->identifiedBy('2'); $this->assertAttributeEquals(['alg' => 'none', 'typ' => 'JWT'], 'headers', $builder); $this->assertAttributeEquals(['jti' => $this->defaultClaim], 'claims', $builder); @@ -205,15 +205,15 @@ class BuilderTest extends \PHPUnit_Framework_TestCase * @test * * @uses Lcobucci\JWT\Builder::__construct - * @uses Lcobucci\JWT\Builder::set + * @uses Lcobucci\JWT\Builder::withClaim * - * @covers Lcobucci\JWT\Builder::setId + * @covers Lcobucci\JWT\Builder::identifiedBy * @covers Lcobucci\JWT\Builder::setRegisteredClaim */ - public function setIdCanReplicateItemOnHeader() + public function identifiedByCanReplicateItemOnHeader() { $builder = $this->createBuilder(); - $builder->setId('2', true); + $builder->identifiedBy('2', true); $this->assertAttributeEquals(['jti' => $this->defaultClaim], 'claims', $builder); @@ -228,31 +228,31 @@ class BuilderTest extends \PHPUnit_Framework_TestCase * @test * * @uses Lcobucci\JWT\Builder::__construct - * @uses Lcobucci\JWT\Builder::set + * @uses Lcobucci\JWT\Builder::withClaim * - * @covers Lcobucci\JWT\Builder::setId + * @covers Lcobucci\JWT\Builder::identifiedBy * @covers Lcobucci\JWT\Builder::setRegisteredClaim */ - public function setIdMustKeepAFluentInterface() + public function identifiedByMustKeepAFluentInterface() { $builder = $this->createBuilder(); - $this->assertSame($builder, $builder->setId('2')); + $this->assertSame($builder, $builder->identifiedBy('2')); } /** * @test * * @uses Lcobucci\JWT\Builder::__construct - * @uses Lcobucci\JWT\Builder::set + * @uses Lcobucci\JWT\Builder::withClaim * - * @covers Lcobucci\JWT\Builder::setIssuedAt + * @covers Lcobucci\JWT\Builder::issuedAt * @covers Lcobucci\JWT\Builder::setRegisteredClaim */ - public function setIssuedAtMustChangeTheIatClaim() + public function issuedAtMustChangeTheIatClaim() { $builder = $this->createBuilder(); - $builder->setIssuedAt('2'); + $builder->issuedAt('2'); $this->assertAttributeEquals(['alg' => 'none', 'typ' => 'JWT'], 'headers', $builder); $this->assertAttributeEquals(['iat' => $this->defaultClaim], 'claims', $builder); @@ -262,15 +262,15 @@ class BuilderTest extends \PHPUnit_Framework_TestCase * @test * * @uses Lcobucci\JWT\Builder::__construct - * @uses Lcobucci\JWT\Builder::set + * @uses Lcobucci\JWT\Builder::withClaim * - * @covers Lcobucci\JWT\Builder::setIssuedAt + * @covers Lcobucci\JWT\Builder::issuedAt * @covers Lcobucci\JWT\Builder::setRegisteredClaim */ - public function setIssuedAtCanReplicateItemOnHeader() + public function issuedAtCanReplicateItemOnHeader() { $builder = $this->createBuilder(); - $builder->setIssuedAt('2', true); + $builder->issuedAt('2', true); $this->assertAttributeEquals(['iat' => $this->defaultClaim], 'claims', $builder); @@ -285,31 +285,31 @@ class BuilderTest extends \PHPUnit_Framework_TestCase * @test * * @uses Lcobucci\JWT\Builder::__construct - * @uses Lcobucci\JWT\Builder::set + * @uses Lcobucci\JWT\Builder::withClaim * - * @covers Lcobucci\JWT\Builder::setIssuedAt + * @covers Lcobucci\JWT\Builder::issuedAt * @covers Lcobucci\JWT\Builder::setRegisteredClaim */ - public function setIssuedAtMustKeepAFluentInterface() + public function issuedAtMustKeepAFluentInterface() { $builder = $this->createBuilder(); - $this->assertSame($builder, $builder->setIssuedAt('2')); + $this->assertSame($builder, $builder->issuedAt('2')); } /** * @test * * @uses Lcobucci\JWT\Builder::__construct - * @uses Lcobucci\JWT\Builder::set + * @uses Lcobucci\JWT\Builder::withClaim * - * @covers Lcobucci\JWT\Builder::setIssuer + * @covers Lcobucci\JWT\Builder::issuedBy * @covers Lcobucci\JWT\Builder::setRegisteredClaim */ - public function setIssuerMustChangeTheIssClaim() + public function issuedByMustChangeTheIssClaim() { $builder = $this->createBuilder(); - $builder->setIssuer('2'); + $builder->issuedBy('2'); $this->assertAttributeEquals(['alg' => 'none', 'typ' => 'JWT'], 'headers', $builder); $this->assertAttributeEquals(['iss' => $this->defaultClaim], 'claims', $builder); @@ -319,15 +319,15 @@ class BuilderTest extends \PHPUnit_Framework_TestCase * @test * * @uses Lcobucci\JWT\Builder::__construct - * @uses Lcobucci\JWT\Builder::set + * @uses Lcobucci\JWT\Builder::withClaim * - * @covers Lcobucci\JWT\Builder::setIssuer + * @covers Lcobucci\JWT\Builder::issuedBy * @covers Lcobucci\JWT\Builder::setRegisteredClaim */ - public function setIssuerCanReplicateItemOnHeader() + public function issuedByCanReplicateItemOnHeader() { $builder = $this->createBuilder(); - $builder->setIssuer('2', true); + $builder->issuedBy('2', true); $this->assertAttributeEquals(['iss' => $this->defaultClaim], 'claims', $builder); @@ -342,31 +342,31 @@ class BuilderTest extends \PHPUnit_Framework_TestCase * @test * * @uses Lcobucci\JWT\Builder::__construct - * @uses Lcobucci\JWT\Builder::set + * @uses Lcobucci\JWT\Builder::withClaim * - * @covers Lcobucci\JWT\Builder::setIssuer + * @covers Lcobucci\JWT\Builder::issuedBy * @covers Lcobucci\JWT\Builder::setRegisteredClaim */ - public function setIssuerMustKeepAFluentInterface() + public function issuedByMustKeepAFluentInterface() { $builder = $this->createBuilder(); - $this->assertSame($builder, $builder->setIssuer('2')); + $this->assertSame($builder, $builder->issuedBy('2')); } /** * @test * * @uses Lcobucci\JWT\Builder::__construct - * @uses Lcobucci\JWT\Builder::set + * @uses Lcobucci\JWT\Builder::withClaim * - * @covers Lcobucci\JWT\Builder::setNotBefore + * @covers Lcobucci\JWT\Builder::canOnlyBeUsedAfter * @covers Lcobucci\JWT\Builder::setRegisteredClaim */ - public function setNotBeforeMustChangeTheNbfClaim() + public function canOnlyBeUsedAfterMustChangeTheNbfClaim() { $builder = $this->createBuilder(); - $builder->setNotBefore('2'); + $builder->canOnlyBeUsedAfter('2'); $this->assertAttributeEquals(['alg' => 'none', 'typ' => 'JWT'], 'headers', $builder); $this->assertAttributeEquals(['nbf' => $this->defaultClaim], 'claims', $builder); @@ -376,15 +376,15 @@ class BuilderTest extends \PHPUnit_Framework_TestCase * @test * * @uses Lcobucci\JWT\Builder::__construct - * @uses Lcobucci\JWT\Builder::set + * @uses Lcobucci\JWT\Builder::withClaim * - * @covers Lcobucci\JWT\Builder::setNotBefore + * @covers Lcobucci\JWT\Builder::canOnlyBeUsedAfter * @covers Lcobucci\JWT\Builder::setRegisteredClaim */ - public function setNotBeforeCanReplicateItemOnHeader() + public function canOnlyBeUsedAfterCanReplicateItemOnHeader() { $builder = $this->createBuilder(); - $builder->setNotBefore('2', true); + $builder->canOnlyBeUsedAfter('2', true); $this->assertAttributeEquals(['nbf' => $this->defaultClaim], 'claims', $builder); @@ -399,31 +399,31 @@ class BuilderTest extends \PHPUnit_Framework_TestCase * @test * * @uses Lcobucci\JWT\Builder::__construct - * @uses Lcobucci\JWT\Builder::set + * @uses Lcobucci\JWT\Builder::withClaim * - * @covers Lcobucci\JWT\Builder::setNotBefore + * @covers Lcobucci\JWT\Builder::canOnlyBeUsedAfter * @covers Lcobucci\JWT\Builder::setRegisteredClaim */ - public function setNotBeforeMustKeepAFluentInterface() + public function canOnlyBeUsedAfterMustKeepAFluentInterface() { $builder = $this->createBuilder(); - $this->assertSame($builder, $builder->setNotBefore('2')); + $this->assertSame($builder, $builder->canOnlyBeUsedAfter('2')); } /** * @test * * @uses Lcobucci\JWT\Builder::__construct - * @uses Lcobucci\JWT\Builder::set + * @uses Lcobucci\JWT\Builder::withClaim * - * @covers Lcobucci\JWT\Builder::setSubject + * @covers Lcobucci\JWT\Builder::relatedTo * @covers Lcobucci\JWT\Builder::setRegisteredClaim */ - public function setSubjectMustChangeTheSubClaim() + public function relatedToMustChangeTheSubClaim() { $builder = $this->createBuilder(); - $builder->setSubject('2'); + $builder->relatedTo('2'); $this->assertAttributeEquals(['alg' => 'none', 'typ' => 'JWT'], 'headers', $builder); $this->assertAttributeEquals(['sub' => $this->defaultClaim], 'claims', $builder); @@ -433,15 +433,15 @@ class BuilderTest extends \PHPUnit_Framework_TestCase * @test * * @uses Lcobucci\JWT\Builder::__construct - * @uses Lcobucci\JWT\Builder::set + * @uses Lcobucci\JWT\Builder::withClaim * - * @covers Lcobucci\JWT\Builder::setSubject + * @covers Lcobucci\JWT\Builder::relatedTo * @covers Lcobucci\JWT\Builder::setRegisteredClaim */ - public function setSubjectCanReplicateItemOnHeader() + public function relatedToCanReplicateItemOnHeader() { $builder = $this->createBuilder(); - $builder->setSubject('2', true); + $builder->relatedTo('2', true); $this->assertAttributeEquals(['sub' => $this->defaultClaim], 'claims', $builder); @@ -456,16 +456,16 @@ class BuilderTest extends \PHPUnit_Framework_TestCase * @test * * @uses Lcobucci\JWT\Builder::__construct - * @uses Lcobucci\JWT\Builder::set + * @uses Lcobucci\JWT\Builder::withClaim * - * @covers Lcobucci\JWT\Builder::setSubject + * @covers Lcobucci\JWT\Builder::relatedTo * @covers Lcobucci\JWT\Builder::setRegisteredClaim */ - public function setSubjectMustKeepAFluentInterface() + public function relatedToMustKeepAFluentInterface() { $builder = $this->createBuilder(); - $this->assertSame($builder, $builder->setSubject('2')); + $this->assertSame($builder, $builder->relatedTo('2')); } /** @@ -473,12 +473,12 @@ class BuilderTest extends \PHPUnit_Framework_TestCase * * @uses Lcobucci\JWT\Builder::__construct * - * @covers Lcobucci\JWT\Builder::set + * @covers Lcobucci\JWT\Builder::withClaim */ - public function setMustConfigureTheGivenClaim() + public function withClaimMustConfigureTheGivenClaim() { $builder = $this->createBuilder(); - $builder->set('userId', 2); + $builder->withClaim('userId', 2); $this->assertAttributeEquals(['userId' => $this->defaultClaim], 'claims', $builder); } @@ -488,13 +488,13 @@ class BuilderTest extends \PHPUnit_Framework_TestCase * * @uses Lcobucci\JWT\Builder::__construct * - * @covers Lcobucci\JWT\Builder::set + * @covers Lcobucci\JWT\Builder::withClaim */ - public function setMustKeepAFluentInterface() + public function withClaimMustKeepAFluentInterface() { $builder = $this->createBuilder(); - $this->assertSame($builder, $builder->set('userId', 2)); + $this->assertSame($builder, $builder->withClaim('userId', 2)); } /** @@ -502,12 +502,12 @@ class BuilderTest extends \PHPUnit_Framework_TestCase * * @uses Lcobucci\JWT\Builder::__construct * - * @covers Lcobucci\JWT\Builder::setHeader + * @covers Lcobucci\JWT\Builder::withHeader */ - public function setHeaderMustConfigureTheGivenClaim() + public function withHeaderMustConfigureTheGivenClaim() { $builder = $this->createBuilder(); - $builder->setHeader('userId', 2); + $builder->withHeader('userId', 2); $this->assertAttributeEquals( ['alg' => 'none', 'typ' => 'JWT', 'userId' => $this->defaultClaim], @@ -521,13 +521,13 @@ class BuilderTest extends \PHPUnit_Framework_TestCase * * @uses Lcobucci\JWT\Builder::__construct * - * @covers Lcobucci\JWT\Builder::setHeader + * @covers Lcobucci\JWT\Builder::withHeader */ - public function setHeaderMustKeepAFluentInterface() + public function withHeaderMustKeepAFluentInterface() { $builder = $this->createBuilder(); - $this->assertSame($builder, $builder->setHeader('userId', 2)); + $this->assertSame($builder, $builder->withHeader('userId', 2)); } /** @@ -539,19 +539,15 @@ class BuilderTest extends \PHPUnit_Framework_TestCase * * @covers Lcobucci\JWT\Builder::sign */ - public function signMustChangeTheSignature() + public function signMustConfigureSignerAndKey() { - $signer = $this->getMock(Signer::class); - $signature = $this->getMock(Signature::class, [], [], '', false); - - $signer->expects($this->any()) - ->method('sign') - ->willReturn($signature); + $signer = $this->createMock(Signer::class); $builder = $this->createBuilder(); $builder->sign($signer, 'test'); - $this->assertAttributeSame($signature, 'signature', $builder); + $this->assertAttributeSame($signer, 'signer', $builder); + $this->assertAttributeEquals(new Key('test'), 'key', $builder); } /** @@ -565,13 +561,7 @@ class BuilderTest extends \PHPUnit_Framework_TestCase */ public function signMustKeepAFluentInterface() { - $signer = $this->getMock(Signer::class); - $signature = $this->getMock(Signature::class, [], [], '', false); - - $signer->expects($this->any()) - ->method('sign') - ->willReturn($signature); - + $signer = $this->createMock(Signer::class); $builder = $this->createBuilder(); $this->assertSame($builder, $builder->sign($signer, 'test')); @@ -586,11 +576,12 @@ class BuilderTest extends \PHPUnit_Framework_TestCase * * @covers Lcobucci\JWT\Builder::unsign */ - public function unsignMustRemoveTheSignature(Builder $builder) + public function unsignMustRemoveTheSignerAndKey(Builder $builder) { $builder->unsign(); - $this->assertAttributeSame(null, 'signature', $builder); + $this->assertAttributeSame(null, 'signer', $builder); + $this->assertAttributeSame(null, 'key', $builder); } /** @@ -609,66 +600,17 @@ class BuilderTest extends \PHPUnit_Framework_TestCase * @test * * @uses Lcobucci\JWT\Builder::__construct - * @uses Lcobucci\JWT\Builder::sign - * @uses Lcobucci\JWT\Builder::getToken - * @uses Lcobucci\JWT\Token - * - * @covers Lcobucci\JWT\Builder::set - * - * @expectedException BadMethodCallException - */ - public function setMustRaiseExceptionWhenTokenHasBeenSigned() - { - $signer = $this->getMock(Signer::class); - $signature = $this->getMock(Signature::class, [], [], '', false); - - $signer->expects($this->any()) - ->method('sign') - ->willReturn($signature); - - $builder = $this->createBuilder(); - $builder->sign($signer, 'test'); - $builder->set('test', 123); - } - - /** - * @test - * - * @uses Lcobucci\JWT\Builder::__construct - * @uses Lcobucci\JWT\Builder::sign - * @uses Lcobucci\JWT\Builder::getToken - * @uses Lcobucci\JWT\Token - * - * @covers Lcobucci\JWT\Builder::setHeader - * - * @expectedException BadMethodCallException - */ - public function setHeaderMustRaiseExceptionWhenTokenHasBeenSigned() - { - $signer = $this->getMock(Signer::class); - $signature = $this->getMock(Signature::class, [], [], '', false); - - $signer->expects($this->any()) - ->method('sign') - ->willReturn($signature); - - $builder = $this->createBuilder(); - $builder->sign($signer, 'test'); - $builder->setHeader('test', 123); - } - - /** - * @test - * - * @uses Lcobucci\JWT\Builder::__construct - * @uses Lcobucci\JWT\Builder::set + * @uses Lcobucci\JWT\Builder::withClaim * @uses Lcobucci\JWT\Token * * @covers Lcobucci\JWT\Builder::getToken */ public function getTokenMustReturnANewTokenWithCurrentConfiguration() { - $signature = $this->getMock(Signature::class, [], [], '', false); + $signer = $this->createMock(Signer::class); + $signature = $this->createMock(Signature::class); + + $signer->method('sign')->willReturn($signature); $this->encoder->expects($this->exactly(2)) ->method('jsonEncode') @@ -680,20 +622,12 @@ class BuilderTest extends \PHPUnit_Framework_TestCase ->withConsecutive(['1'], ['2'], [$signature]) ->willReturnOnConsecutiveCalls('1', '2', '3'); - $builder = $this->createBuilder()->set('test', 123); - - $builderSign = new \ReflectionProperty($builder, 'signature'); - $builderSign->setAccessible(true); - $builderSign->setValue($builder, $signature); - - $token = $builder->getToken(); - - $tokenSign = new \ReflectionProperty($token, 'signature'); - $tokenSign->setAccessible(true); + $builder = $this->createBuilder()->withClaim('test', 123); + $token = $builder->getToken($signer, new Key('testing')); $this->assertAttributeEquals(['1', '2', '3'], 'payload', $token); $this->assertAttributeEquals($token->getHeaders(), 'headers', $builder); $this->assertAttributeEquals($token->getClaims(), 'claims', $builder); - $this->assertAttributeSame($tokenSign->getValue($token), 'signature', $builder); + $this->assertAttributeSame($signature, 'signature', $token); } } diff --git a/vendor/lcobucci/jwt/test/unit/Claim/BasicTest.php b/vendor/lcobucci/jwt/test/unit/Claim/BasicTest.php index a7b67fa9..3a0d928b 100644 --- a/vendor/lcobucci/jwt/test/unit/Claim/BasicTest.php +++ b/vendor/lcobucci/jwt/test/unit/Claim/BasicTest.php @@ -11,7 +11,7 @@ namespace Lcobucci\JWT\Claim; * @author Luís Otávio Cobucci Oblonczyk * @since 2.0.0 */ -class BasicTest extends \PHPUnit_Framework_TestCase +class BasicTest extends \PHPUnit\Framework\TestCase { /** * @test diff --git a/vendor/lcobucci/jwt/test/unit/Claim/EqualsToTest.php b/vendor/lcobucci/jwt/test/unit/Claim/EqualsToTest.php index ab061698..aef76a9d 100644 --- a/vendor/lcobucci/jwt/test/unit/Claim/EqualsToTest.php +++ b/vendor/lcobucci/jwt/test/unit/Claim/EqualsToTest.php @@ -13,7 +13,7 @@ use Lcobucci\JWT\ValidationData; * @author Luís Otávio Cobucci Oblonczyk * @since 2.0.0 */ -class EqualsToTest extends \PHPUnit_Framework_TestCase +class EqualsToTest extends \PHPUnit\Framework\TestCase { /** * @test @@ -22,6 +22,7 @@ class EqualsToTest extends \PHPUnit_Framework_TestCase * @uses Lcobucci\JWT\Claim\Basic::getName * @uses Lcobucci\JWT\ValidationData::__construct * @uses Lcobucci\JWT\ValidationData::has + * @uses Lcobucci\JWT\ValidationData::setCurrentTime * * @covers Lcobucci\JWT\Claim\EqualsTo::validate */ @@ -42,6 +43,7 @@ class EqualsToTest extends \PHPUnit_Framework_TestCase * @uses Lcobucci\JWT\ValidationData::setIssuer * @uses Lcobucci\JWT\ValidationData::has * @uses Lcobucci\JWT\ValidationData::get + * @uses Lcobucci\JWT\ValidationData::setCurrentTime * * @covers Lcobucci\JWT\Claim\EqualsTo::validate */ @@ -65,6 +67,7 @@ class EqualsToTest extends \PHPUnit_Framework_TestCase * @uses Lcobucci\JWT\ValidationData::setIssuer * @uses Lcobucci\JWT\ValidationData::has * @uses Lcobucci\JWT\ValidationData::get + * @uses Lcobucci\JWT\ValidationData::setCurrentTime * * @covers Lcobucci\JWT\Claim\EqualsTo::validate */ diff --git a/vendor/lcobucci/jwt/test/unit/Claim/FactoryTest.php b/vendor/lcobucci/jwt/test/unit/Claim/FactoryTest.php index e7cca2cb..7569257d 100644 --- a/vendor/lcobucci/jwt/test/unit/Claim/FactoryTest.php +++ b/vendor/lcobucci/jwt/test/unit/Claim/FactoryTest.php @@ -11,7 +11,7 @@ namespace Lcobucci\JWT\Claim; * @author Luís Otávio Cobucci Oblonczyk * @since 2.0.0 */ -class FactoryTest extends \PHPUnit_Framework_TestCase +class FactoryTest extends \PHPUnit\Framework\TestCase { /** * @test diff --git a/vendor/lcobucci/jwt/test/unit/Claim/GreaterOrEqualsToTest.php b/vendor/lcobucci/jwt/test/unit/Claim/GreaterOrEqualsToTest.php index 83d94bda..38abc758 100644 --- a/vendor/lcobucci/jwt/test/unit/Claim/GreaterOrEqualsToTest.php +++ b/vendor/lcobucci/jwt/test/unit/Claim/GreaterOrEqualsToTest.php @@ -13,7 +13,7 @@ use Lcobucci\JWT\ValidationData; * @author Luís Otávio Cobucci Oblonczyk * @since 2.0.0 */ -class GreaterOrEqualsToTest extends \PHPUnit_Framework_TestCase +class GreaterOrEqualsToTest extends \PHPUnit\Framework\TestCase { /** * @test @@ -22,6 +22,7 @@ class GreaterOrEqualsToTest extends \PHPUnit_Framework_TestCase * @uses Lcobucci\JWT\Claim\Basic::getName * @uses Lcobucci\JWT\ValidationData::__construct * @uses Lcobucci\JWT\ValidationData::has + * @uses Lcobucci\JWT\ValidationData::setCurrentTime * * @covers Lcobucci\JWT\Claim\GreaterOrEqualsTo::validate */ @@ -42,6 +43,7 @@ class GreaterOrEqualsToTest extends \PHPUnit_Framework_TestCase * @uses Lcobucci\JWT\ValidationData::setIssuer * @uses Lcobucci\JWT\ValidationData::has * @uses Lcobucci\JWT\ValidationData::get + * @uses Lcobucci\JWT\ValidationData::setCurrentTime * * @covers Lcobucci\JWT\Claim\GreaterOrEqualsTo::validate */ @@ -65,6 +67,7 @@ class GreaterOrEqualsToTest extends \PHPUnit_Framework_TestCase * @uses Lcobucci\JWT\ValidationData::setIssuer * @uses Lcobucci\JWT\ValidationData::has * @uses Lcobucci\JWT\ValidationData::get + * @uses Lcobucci\JWT\ValidationData::setCurrentTime * * @covers Lcobucci\JWT\Claim\GreaterOrEqualsTo::validate */ @@ -88,6 +91,7 @@ class GreaterOrEqualsToTest extends \PHPUnit_Framework_TestCase * @uses Lcobucci\JWT\ValidationData::setIssuer * @uses Lcobucci\JWT\ValidationData::has * @uses Lcobucci\JWT\ValidationData::get + * @uses Lcobucci\JWT\ValidationData::setCurrentTime * * @covers Lcobucci\JWT\Claim\GreaterOrEqualsTo::validate */ diff --git a/vendor/lcobucci/jwt/test/unit/Claim/LesserOrEqualsToTest.php b/vendor/lcobucci/jwt/test/unit/Claim/LesserOrEqualsToTest.php index fc4e0ed0..edb32d9b 100644 --- a/vendor/lcobucci/jwt/test/unit/Claim/LesserOrEqualsToTest.php +++ b/vendor/lcobucci/jwt/test/unit/Claim/LesserOrEqualsToTest.php @@ -13,7 +13,7 @@ use Lcobucci\JWT\ValidationData; * @author Luís Otávio Cobucci Oblonczyk * @since 2.0.0 */ -class LesserOrEqualsToTest extends \PHPUnit_Framework_TestCase +class LesserOrEqualsToTest extends \PHPUnit\Framework\TestCase { /** * @test @@ -22,6 +22,7 @@ class LesserOrEqualsToTest extends \PHPUnit_Framework_TestCase * @uses Lcobucci\JWT\Claim\Basic::getName * @uses Lcobucci\JWT\ValidationData::__construct * @uses Lcobucci\JWT\ValidationData::has + * @uses Lcobucci\JWT\ValidationData::setCurrentTime * * @covers Lcobucci\JWT\Claim\LesserOrEqualsTo::validate */ @@ -42,6 +43,7 @@ class LesserOrEqualsToTest extends \PHPUnit_Framework_TestCase * @uses Lcobucci\JWT\ValidationData::setIssuer * @uses Lcobucci\JWT\ValidationData::has * @uses Lcobucci\JWT\ValidationData::get + * @uses Lcobucci\JWT\ValidationData::setCurrentTime * * @covers Lcobucci\JWT\Claim\LesserOrEqualsTo::validate */ @@ -65,6 +67,7 @@ class LesserOrEqualsToTest extends \PHPUnit_Framework_TestCase * @uses Lcobucci\JWT\ValidationData::setIssuer * @uses Lcobucci\JWT\ValidationData::has * @uses Lcobucci\JWT\ValidationData::get + * @uses Lcobucci\JWT\ValidationData::setCurrentTime * * @covers Lcobucci\JWT\Claim\LesserOrEqualsTo::validate */ @@ -88,6 +91,7 @@ class LesserOrEqualsToTest extends \PHPUnit_Framework_TestCase * @uses Lcobucci\JWT\ValidationData::setIssuer * @uses Lcobucci\JWT\ValidationData::has * @uses Lcobucci\JWT\ValidationData::get + * @uses Lcobucci\JWT\ValidationData::setCurrentTime * * @covers Lcobucci\JWT\Claim\LesserOrEqualsTo::validate */ diff --git a/vendor/lcobucci/jwt/test/unit/ParserTest.php b/vendor/lcobucci/jwt/test/unit/ParserTest.php index 6a07f05a..664a7313 100644 --- a/vendor/lcobucci/jwt/test/unit/ParserTest.php +++ b/vendor/lcobucci/jwt/test/unit/ParserTest.php @@ -15,7 +15,7 @@ use RuntimeException; * @author Luís Otávio Cobucci Oblonczyk * @since 0.1.0 */ -class ParserTest extends \PHPUnit_Framework_TestCase +class ParserTest extends \PHPUnit\Framework\TestCase { /** * @var Decoder|\PHPUnit_Framework_MockObject_MockObject @@ -37,9 +37,9 @@ class ParserTest extends \PHPUnit_Framework_TestCase */ protected function setUp() { - $this->decoder = $this->getMock(Decoder::class); - $this->claimFactory = $this->getMock(ClaimFactory::class, [], [], '', false); - $this->defaultClaim = $this->getMock(Claim::class); + $this->decoder = $this->createMock(Decoder::class); + $this->claimFactory = $this->createMock(ClaimFactory::class, [], [], '', false); + $this->defaultClaim = $this->createMock(Claim::class); $this->claimFactory->expects($this->any()) ->method('create') diff --git a/vendor/lcobucci/jwt/test/unit/Parsing/DecoderTest.php b/vendor/lcobucci/jwt/test/unit/Parsing/DecoderTest.php index 51d727bd..04b8d5d5 100644 --- a/vendor/lcobucci/jwt/test/unit/Parsing/DecoderTest.php +++ b/vendor/lcobucci/jwt/test/unit/Parsing/DecoderTest.php @@ -11,7 +11,7 @@ namespace Lcobucci\JWT\Parsing; * @author Luís Otávio Cobucci Oblonczyk * @since 0.1.0 */ -class DecoderTest extends \PHPUnit_Framework_TestCase +class DecoderTest extends \PHPUnit\Framework\TestCase { /** * @test diff --git a/vendor/lcobucci/jwt/test/unit/Parsing/EncoderTest.php b/vendor/lcobucci/jwt/test/unit/Parsing/EncoderTest.php index 6628b248..4aed3184 100644 --- a/vendor/lcobucci/jwt/test/unit/Parsing/EncoderTest.php +++ b/vendor/lcobucci/jwt/test/unit/Parsing/EncoderTest.php @@ -11,7 +11,7 @@ namespace Lcobucci\JWT\Parsing; * @author Luís Otávio Cobucci Oblonczyk * @since 0.1.0 */ -class EncoderTest extends \PHPUnit_Framework_TestCase +class EncoderTest extends \PHPUnit\Framework\TestCase { /** * @test diff --git a/vendor/lcobucci/jwt/test/unit/SignatureTest.php b/vendor/lcobucci/jwt/test/unit/SignatureTest.php index c29787e1..7a87e9de 100644 --- a/vendor/lcobucci/jwt/test/unit/SignatureTest.php +++ b/vendor/lcobucci/jwt/test/unit/SignatureTest.php @@ -11,7 +11,7 @@ namespace Lcobucci\JWT; * @author Luís Otávio Cobucci Oblonczyk * @since 0.1.0 */ -class SignatureTest extends \PHPUnit_Framework_TestCase +class SignatureTest extends \PHPUnit\Framework\TestCase { /** * @var Signer|\PHPUnit_Framework_MockObject_MockObject @@ -23,7 +23,7 @@ class SignatureTest extends \PHPUnit_Framework_TestCase */ protected function setUp() { - $this->signer = $this->getMock(Signer::class); + $this->signer = $this->createMock(Signer::class); } /** diff --git a/vendor/lcobucci/jwt/test/unit/Signer/BaseSignerTest.php b/vendor/lcobucci/jwt/test/unit/Signer/BaseSignerTest.php index cede77a1..799c9d03 100644 --- a/vendor/lcobucci/jwt/test/unit/Signer/BaseSignerTest.php +++ b/vendor/lcobucci/jwt/test/unit/Signer/BaseSignerTest.php @@ -13,7 +13,7 @@ use Lcobucci\JWT\Signature; * @author Luís Otávio Cobucci Oblonczyk * @since 0.1.0 */ -class BaseSignerTest extends \PHPUnit_Framework_TestCase +class BaseSignerTest extends \PHPUnit\Framework\TestCase { /** * @var BaseSigner|\PHPUnit_Framework_MockObject_MockObject diff --git a/vendor/lcobucci/jwt/test/unit/Signer/Ecdsa/KeyParserTest.php b/vendor/lcobucci/jwt/test/unit/Signer/Ecdsa/KeyParserTest.php deleted file mode 100644 index 2b01c191..00000000 --- a/vendor/lcobucci/jwt/test/unit/Signer/Ecdsa/KeyParserTest.php +++ /dev/null @@ -1,178 +0,0 @@ - - * @since 3.0.4 - */ -class KeyParserTest extends \PHPUnit_Framework_TestCase -{ - /** - * @var MathAdapterInterface|\PHPUnit_Framework_MockObject_MockObject - */ - private $adapter; - - /** - * @var PrivateKeySerializerInterface|\PHPUnit_Framework_MockObject_MockObject - */ - private $privateKeySerializer; - - /** - * @var PublicKeySerializerInterface|\PHPUnit_Framework_MockObject_MockObject - */ - private $publicKeySerializer; - - /** - * @before - */ - public function createDependencies() - { - $this->adapter = $this->getMock(MathAdapterInterface::class); - $this->privateKeySerializer = $this->getMock(PrivateKeySerializerInterface::class); - $this->publicKeySerializer = $this->getMock(PublicKeySerializerInterface::class); - } - - /** - * @test - * - * @covers Lcobucci\JWT\Signer\Ecdsa\KeyParser::__construct - */ - public function constructShouldConfigureDependencies() - { - $parser = new KeyParser($this->adapter, $this->privateKeySerializer, $this->publicKeySerializer); - - $this->assertAttributeSame($this->privateKeySerializer, 'privateKeySerializer', $parser); - $this->assertAttributeSame($this->publicKeySerializer, 'publicKeySerializer', $parser); - } - - /** - * @test - * - * @uses Lcobucci\JWT\Signer\Ecdsa\KeyParser::__construct - * @uses Lcobucci\JWT\Signer\Key - * - * @covers Lcobucci\JWT\Signer\Ecdsa\KeyParser::getPrivateKey - * @covers Lcobucci\JWT\Signer\Ecdsa\KeyParser::getKeyContent - */ - public function getPrivateKeyShouldAskSerializerToParseTheKey() - { - $privateKey = $this->getMock(PrivateKeyInterface::class); - - $keyContent = 'MHcCAQEEIBGpMoZJ64MMSzuo5JbmXpf9V4qSWdLIl/8RmJLcfn/qoAoGC' - . 'CqGSM49AwEHoUQDQgAE7it/EKmcv9bfpcV1fBreLMRXxWpnd0wxa2iF' - . 'ruiI2tsEdGFTLTsyU+GeRqC7zN0aTnTQajarUylKJ3UWr/r1kg=='; - - $this->privateKeySerializer->expects($this->once()) - ->method('parse') - ->with($keyContent) - ->willReturn($privateKey); - - $parser = new KeyParser($this->adapter, $this->privateKeySerializer, $this->publicKeySerializer); - $this->assertSame($privateKey, $parser->getPrivateKey($this->getPrivateKey())); - } - - /** - * @test - * - * @expectedException \InvalidArgumentException - * - * @uses Lcobucci\JWT\Signer\Ecdsa\KeyParser::__construct - * @uses Lcobucci\JWT\Signer\Key - * - * @covers Lcobucci\JWT\Signer\Ecdsa\KeyParser::getPrivateKey - * @covers Lcobucci\JWT\Signer\Ecdsa\KeyParser::getKeyContent - */ - public function getPrivateKeyShouldRaiseExceptionWhenAWrongKeyWasGiven() - { - $this->privateKeySerializer->expects($this->never()) - ->method('parse'); - - $parser = new KeyParser($this->adapter, $this->privateKeySerializer, $this->publicKeySerializer); - $parser->getPrivateKey($this->getPublicKey()); - } - - /** - * @test - * - * @uses Lcobucci\JWT\Signer\Ecdsa\KeyParser::__construct - * @uses Lcobucci\JWT\Signer\Key - * - * @covers Lcobucci\JWT\Signer\Ecdsa\KeyParser::getPublicKey - * @covers Lcobucci\JWT\Signer\Ecdsa\KeyParser::getKeyContent - */ - public function getPublicKeyShouldAskSerializerToParseTheKey() - { - $publicKey = $this->getMock(PublicKeyInterface::class); - - $keyContent = 'MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE7it/EKmcv9bfpcV1fBreLMRXxWpn' - . 'd0wxa2iFruiI2tsEdGFTLTsyU+GeRqC7zN0aTnTQajarUylKJ3UWr/r1kg=='; - - $this->publicKeySerializer->expects($this->once()) - ->method('parse') - ->with($keyContent) - ->willReturn($publicKey); - - $parser = new KeyParser($this->adapter, $this->privateKeySerializer, $this->publicKeySerializer); - $this->assertSame($publicKey, $parser->getPublicKey($this->getPublicKey())); - } - - /** - * @test - * - * @expectedException \InvalidArgumentException - * - * @uses Lcobucci\JWT\Signer\Ecdsa\KeyParser::__construct - * @uses Lcobucci\JWT\Signer\Key - * - * @covers Lcobucci\JWT\Signer\Ecdsa\KeyParser::getPublicKey - * @covers Lcobucci\JWT\Signer\Ecdsa\KeyParser::getKeyContent - */ - public function getPublicKeyShouldRaiseExceptionWhenAWrongKeyWasGiven() - { - $this->publicKeySerializer->expects($this->never()) - ->method('parse'); - - $parser = new KeyParser($this->adapter, $this->privateKeySerializer, $this->publicKeySerializer); - $parser->getPublicKey($this->getPrivateKey()); - } - - /** - * @return Key - */ - private function getPrivateKey() - { - return new Key( - "-----BEGIN EC PRIVATE KEY-----\n" - . "MHcCAQEEIBGpMoZJ64MMSzuo5JbmXpf9V4qSWdLIl/8RmJLcfn/qoAoGCCqGSM49\n" - . "AwEHoUQDQgAE7it/EKmcv9bfpcV1fBreLMRXxWpnd0wxa2iFruiI2tsEdGFTLTsy\n" - . "U+GeRqC7zN0aTnTQajarUylKJ3UWr/r1kg==\n" - . "-----END EC PRIVATE KEY-----" - ); - } - - /** - * @return Key - */ - private function getPublicKey() - { - return new Key( - "-----BEGIN PUBLIC KEY-----\n" - . "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE7it/EKmcv9bfpcV1fBreLMRXxWpn\n" - . "d0wxa2iFruiI2tsEdGFTLTsyU+GeRqC7zN0aTnTQajarUylKJ3UWr/r1kg==\n" - . "-----END PUBLIC KEY-----" - ); - } -} diff --git a/vendor/lcobucci/jwt/test/unit/Signer/Ecdsa/MultibyteStringConverterTest.php b/vendor/lcobucci/jwt/test/unit/Signer/Ecdsa/MultibyteStringConverterTest.php new file mode 100644 index 00000000..f18e8bc2 --- /dev/null +++ b/vendor/lcobucci/jwt/test/unit/Signer/Ecdsa/MultibyteStringConverterTest.php @@ -0,0 +1,127 @@ +toAsn1($message, strlen($r)))); + } + + /** + * @test + * + * @covers ::toAsn1 + * @covers ::octetLength + */ + public function toAsn1ShouldRaiseExceptionWhenPointsDoNotHaveCorrectLength() + { + $converter = new MultibyteStringConverter(); + + self::expectException(InvalidArgumentException::class); + $converter->toAsn1('a very wrong string', 64); + } + + /** + * @test + * @dataProvider pointsConversionData + * + * @covers ::fromAsn1 + * @covers ::readAsn1Content + * @covers ::readAsn1Integer + * @covers ::retrievePositiveInteger + */ + public function fromAsn1ShouldReturnTheConcatenatedPoints($r, $s, $asn1) + { + $converter = new MultibyteStringConverter(); + $message = hex2bin($asn1); + + self::assertSame($r . $s, bin2hex($converter->fromAsn1($message, strlen($r)))); + } + + /** + * @return string[][] + */ + public function pointsConversionData() + { + return [ + [ + 'efd48b2aacb6a8fd1140dd9cd45e81d69d2c877b56aaf991c34d0ea84eaf3716', + 'f7cb1c942d657c41d436c7a1b6e29f65f3e900dbb9aff4064dc4ab2f843acda8', + '3046022100efd48b2aacb6a8fd1140dd9cd45e81d69d2c877b56aaf991c34d0ea84eaf3716022100f7cb1c942d657c41d436c7' + . 'a1b6e29f65f3e900dbb9aff4064dc4ab2f843acda8', + ], + [ + '94edbb92a5ecb8aad4736e56c691916b3f88140666ce9fa73d64c4ea95ad133c81a648152e44acf96e36dd1e80fabe46', + '99ef4aeb15f178cea1fe40db2603138f130e740a19624526203b6351d0a3a94fa329c145786e679e7b82c71a38628ac8', + '306602310094edbb92a5ecb8aad4736e56c691916b3f88140666ce9fa73d64c4ea95ad133c81a648152e44acf96e36dd1e80fa' + . 'be4602310099ef4aeb15f178cea1fe40db2603138f130e740a19624526203b6351d0a3a94fa329c145786e679e7b82c71a38' + . '628ac8', + ], + [ + '00c328fafcbd79dd77850370c46325d987cb525569fb63c5d3bc53950e6d4c5f174e25a1ee9017b5d450606add152b534931d7' + . 'd4e8455cc91f9b15bf05ec36e377fa', + '00617cce7cf5064806c467f678d3b4080d6f1cc50af26ca209417308281b68af282623eaa63e5b5c0723d8b8c37ff0777b1a20' + . 'f8ccb1dccc43997f1ee0e44da4a67a', + '308187024200c328fafcbd79dd77850370c46325d987cb525569fb63c5d3bc53950e6d4c5f174e25a1ee9017b5d450606add15' + . '2b534931d7d4e8455cc91f9b15bf05ec36e377fa0241617cce7cf5064806c467f678d3b4080d6f1cc50af26ca20941730828' + . '1b68af282623eaa63e5b5c0723d8b8c37ff0777b1a20f8ccb1dccc43997f1ee0e44da4a67a', + ], + ]; + } + + /** + * @test + * @dataProvider invalidAsn1Structures + * + * @covers ::fromAsn1 + * @covers ::readAsn1Content + * @covers ::readAsn1Integer + * @covers ::retrievePositiveInteger + */ + public function fromAsn1ShouldRaiseExceptionOnInvalidMessage($message) + { + $converter = new MultibyteStringConverter(); + $message = hex2bin($message); + + $this->expectException(InvalidArgumentException::class); + $converter->fromAsn1($message, 64); + } + + /** + * @return string[][] + */ + public function invalidAsn1Structures() + { + return [ + 'Not a sequence' => [''], + 'Sequence without length' => ['30'], + 'Only one string element' => ['3006030204f0'], + 'Only one integer element' => ['3004020101'], + 'Integer+string elements' => ['300a020101030204f0'], + ]; + } +} diff --git a/vendor/lcobucci/jwt/test/unit/Signer/Ecdsa/Sha256Test.php b/vendor/lcobucci/jwt/test/unit/Signer/Ecdsa/Sha256Test.php index a1849208..3c6f663e 100644 --- a/vendor/lcobucci/jwt/test/unit/Signer/Ecdsa/Sha256Test.php +++ b/vendor/lcobucci/jwt/test/unit/Signer/Ecdsa/Sha256Test.php @@ -11,13 +11,13 @@ namespace Lcobucci\JWT\Signer\Ecdsa; * @author Luís Otávio Cobucci Oblonczyk * @since 2.1.0 */ -class Sha256Test extends \PHPUnit_Framework_TestCase +class Sha256Test extends \PHPUnit\Framework\TestCase { /** * @test * * @uses Lcobucci\JWT\Signer\Ecdsa - * @uses Lcobucci\JWT\Signer\Ecdsa\KeyParser + * @uses Lcobucci\JWT\Signer\OpenSSL * * @covers Lcobucci\JWT\Signer\Ecdsa\Sha256::getAlgorithmId */ @@ -32,7 +32,7 @@ class Sha256Test extends \PHPUnit_Framework_TestCase * @test * * @uses Lcobucci\JWT\Signer\Ecdsa - * @uses Lcobucci\JWT\Signer\Ecdsa\KeyParser + * @uses Lcobucci\JWT\Signer\OpenSSL * * @covers Lcobucci\JWT\Signer\Ecdsa\Sha256::getAlgorithm */ @@ -47,14 +47,14 @@ class Sha256Test extends \PHPUnit_Framework_TestCase * @test * * @uses Lcobucci\JWT\Signer\Ecdsa - * @uses Lcobucci\JWT\Signer\Ecdsa\KeyParser + * @uses Lcobucci\JWT\Signer\OpenSSL * - * @covers Lcobucci\JWT\Signer\Ecdsa\Sha256::getSignatureLength + * @covers Lcobucci\JWT\Signer\Ecdsa\Sha256::getKeyLength */ - public function getSignatureLengthMustBeCorrect() + public function getKeyLengthMustBeCorrect() { $signer = new Sha256(); - $this->assertEquals(64, $signer->getSignatureLength()); + $this->assertEquals(64, $signer->getKeyLength()); } } diff --git a/vendor/lcobucci/jwt/test/unit/Signer/Ecdsa/Sha384Test.php b/vendor/lcobucci/jwt/test/unit/Signer/Ecdsa/Sha384Test.php index b14b0570..335d0511 100644 --- a/vendor/lcobucci/jwt/test/unit/Signer/Ecdsa/Sha384Test.php +++ b/vendor/lcobucci/jwt/test/unit/Signer/Ecdsa/Sha384Test.php @@ -11,13 +11,13 @@ namespace Lcobucci\JWT\Signer\Ecdsa; * @author Luís Otávio Cobucci Oblonczyk * @since 2.1.0 */ -class Sha384Test extends \PHPUnit_Framework_TestCase +class Sha384Test extends \PHPUnit\Framework\TestCase { /** * @test * * @uses Lcobucci\JWT\Signer\Ecdsa - * @uses Lcobucci\JWT\Signer\Ecdsa\KeyParser + * @uses Lcobucci\JWT\Signer\OpenSSL * * @covers Lcobucci\JWT\Signer\Ecdsa\Sha384::getAlgorithmId */ @@ -32,7 +32,7 @@ class Sha384Test extends \PHPUnit_Framework_TestCase * @test * * @uses Lcobucci\JWT\Signer\Ecdsa - * @uses Lcobucci\JWT\Signer\Ecdsa\KeyParser + * @uses Lcobucci\JWT\Signer\OpenSSL * * @covers Lcobucci\JWT\Signer\Ecdsa\Sha384::getAlgorithm */ @@ -47,14 +47,14 @@ class Sha384Test extends \PHPUnit_Framework_TestCase * @test * * @uses Lcobucci\JWT\Signer\Ecdsa - * @uses Lcobucci\JWT\Signer\Ecdsa\KeyParser + * @uses Lcobucci\JWT\Signer\OpenSSL * - * @covers Lcobucci\JWT\Signer\Ecdsa\Sha384::getSignatureLength + * @covers Lcobucci\JWT\Signer\Ecdsa\Sha384::getKeyLength */ - public function getSignatureLengthMustBeCorrect() + public function getKeyLengthMustBeCorrect() { $signer = new Sha384(); - $this->assertEquals(96, $signer->getSignatureLength()); + $this->assertEquals(96, $signer->getKeyLength()); } } diff --git a/vendor/lcobucci/jwt/test/unit/Signer/Ecdsa/Sha512Test.php b/vendor/lcobucci/jwt/test/unit/Signer/Ecdsa/Sha512Test.php index 88a66ee9..0e1ab792 100644 --- a/vendor/lcobucci/jwt/test/unit/Signer/Ecdsa/Sha512Test.php +++ b/vendor/lcobucci/jwt/test/unit/Signer/Ecdsa/Sha512Test.php @@ -11,13 +11,13 @@ namespace Lcobucci\JWT\Signer\Ecdsa; * @author Luís Otávio Cobucci Oblonczyk * @since 2.1.0 */ -class Sha512Test extends \PHPUnit_Framework_TestCase +class Sha512Test extends \PHPUnit\Framework\TestCase { /** * @test * * @uses Lcobucci\JWT\Signer\Ecdsa - * @uses Lcobucci\JWT\Signer\Ecdsa\KeyParser + * @uses Lcobucci\JWT\Signer\OpenSSL * * @covers Lcobucci\JWT\Signer\Ecdsa\Sha512::getAlgorithmId */ @@ -32,7 +32,7 @@ class Sha512Test extends \PHPUnit_Framework_TestCase * @test * * @uses Lcobucci\JWT\Signer\Ecdsa - * @uses Lcobucci\JWT\Signer\Ecdsa\KeyParser + * @uses Lcobucci\JWT\Signer\OpenSSL * * @covers Lcobucci\JWT\Signer\Ecdsa\Sha512::getAlgorithm */ @@ -47,14 +47,14 @@ class Sha512Test extends \PHPUnit_Framework_TestCase * @test * * @uses Lcobucci\JWT\Signer\Ecdsa - * @uses Lcobucci\JWT\Signer\Ecdsa\KeyParser + * @uses Lcobucci\JWT\Signer\OpenSSL * - * @covers Lcobucci\JWT\Signer\Ecdsa\Sha512::getSignatureLength + * @covers Lcobucci\JWT\Signer\Ecdsa\Sha512::getKeyLength */ - public function getSignatureLengthMustBeCorrect() + public function getKeyLengthMustBeCorrect() { $signer = new Sha512(); - $this->assertEquals(132, $signer->getSignatureLength()); + $this->assertEquals(132, $signer->getKeyLength()); } } diff --git a/vendor/lcobucci/jwt/test/unit/Signer/EcdsaTest.php b/vendor/lcobucci/jwt/test/unit/Signer/EcdsaTest.php index 79d8ca63..95f84081 100644 --- a/vendor/lcobucci/jwt/test/unit/Signer/EcdsaTest.php +++ b/vendor/lcobucci/jwt/test/unit/Signer/EcdsaTest.php @@ -7,70 +7,43 @@ namespace Lcobucci\JWT\Signer; -use Lcobucci\JWT\Signer\Ecdsa\KeyParser; -use Mdanter\Ecc\Crypto\Signature\Signature; -use Mdanter\Ecc\Crypto\Signature\Signer; -use Mdanter\Ecc\Crypto\Key\PrivateKeyInterface; -use Mdanter\Ecc\Crypto\Key\PublicKeyInterface; -use Mdanter\Ecc\Math\MathAdapterInterface as Adapter; -use Mdanter\Ecc\Primitives\PointInterface; -use Mdanter\Ecc\Random\RandomNumberGeneratorInterface; +use Lcobucci\JWT\Keys; +use Lcobucci\JWT\Signer\Ecdsa\MultibyteStringConverter; +use const OPENSSL_ALGO_SHA256; +use function openssl_pkey_get_private; +use function openssl_pkey_get_public; +use function openssl_sign; +use function openssl_verify; -/** - * @author Luís Otávio Cobucci Oblonczyk - * @since 2.1.0 - */ -class EcdsaTest extends \PHPUnit_Framework_TestCase +class EcdsaTest extends \PHPUnit\Framework\TestCase { - /** - * @var Adapter|\PHPUnit_Framework_MockObject_MockObject - */ - private $adapter; + use Keys; /** - * @var Signer|\PHPUnit_Framework_MockObject_MockObject + * @var MultibyteStringConverter */ - private $signer; - - /** - * @var RandomNumberGeneratorInterface|\PHPUnit_Framework_MockObject_MockObject - */ - private $randomGenerator; - - /** - * @var KeyParser|\PHPUnit_Framework_MockObject_MockObject - */ - private $parser; + private $pointsManipulator; /** * @before */ public function createDependencies() { - $this->adapter = $this->getMock(Adapter::class); - $this->signer = $this->getMock(Signer::class, [], [$this->adapter]); - $this->randomGenerator = $this->getMock(RandomNumberGeneratorInterface::class); - $this->parser = $this->getMock(KeyParser::class, [], [], '', false); + $this->pointsManipulator = new MultibyteStringConverter(); } - /** - * @return Ecdsa - */ private function getSigner() { - $signer = $this->getMockForAbstractClass( - Ecdsa::class, - [$this->adapter, $this->signer, $this->parser] - ); - - $signer->method('getSignatureLength') - ->willReturn(64); + $signer = $this->getMockForAbstractClass(Ecdsa::class, [$this->pointsManipulator]); $signer->method('getAlgorithm') - ->willReturn('sha256'); + ->willReturn(OPENSSL_ALGO_SHA256); $signer->method('getAlgorithmId') - ->willReturn('ES256'); + ->willReturn('ES256'); + + $signer->method('getKeyLength') + ->willReturn(64); return $signer; } @@ -78,96 +51,67 @@ class EcdsaTest extends \PHPUnit_Framework_TestCase /** * @test * - * @covers Lcobucci\JWT\Signer\Ecdsa::__construct + * @covers \Lcobucci\JWT\Signer\Ecdsa::createHash + * @covers \Lcobucci\JWT\Signer\Ecdsa::getKeyType + * @covers \Lcobucci\JWT\Signer\Ecdsa\MultibyteStringConverter + * @covers \Lcobucci\JWT\Signer\OpenSSL + * @covers \Lcobucci\JWT\Signer\BaseSigner + * + * @uses \Lcobucci\JWT\Signer\Ecdsa::__construct + * @uses \Lcobucci\JWT\Signer\Key + * @uses \Lcobucci\JWT\Signature */ - public function constructShouldConfigureDependencies() + public function createHashShouldReturnTheAHashBasedOnTheOpenSslSignature() { - $signer = $this->getSigner(); + $payload = 'testing'; - $this->assertAttributeSame($this->adapter, 'adapter', $signer); - $this->assertAttributeSame($this->signer, 'signer', $signer); - $this->assertAttributeSame($this->parser, 'parser', $signer); + $signer = $this->getSigner(); + $signature = $signer->sign($payload, self::$ecdsaKeys['private']); + + $publicKey = openssl_pkey_get_public(self::$ecdsaKeys['public1']->getContent()); + + self::assertInternalType('resource', $publicKey); + self::assertSame( + 1, + openssl_verify( + $payload, + $this->pointsManipulator->toAsn1($signature, $signer->getKeyLength()), + $publicKey, + OPENSSL_ALGO_SHA256 + ) + ); } /** * @test * - * @uses Lcobucci\JWT\Signer\Ecdsa::__construct - * @uses Lcobucci\JWT\Signer\Key + * @covers \Lcobucci\JWT\Signer\Ecdsa::doVerify + * @covers \Lcobucci\JWT\Signer\Ecdsa::getKeyType + * @covers \Lcobucci\JWT\Signer\Ecdsa\MultibyteStringConverter + * @covers \Lcobucci\JWT\Signer\OpenSSL + * @covers \Lcobucci\JWT\Signer\BaseSigner * - * @covers Lcobucci\JWT\Signer\Ecdsa::createHash - * @covers Lcobucci\JWT\Signer\Ecdsa::createSigningHash - * @covers Lcobucci\JWT\Signer\Ecdsa::createSignatureHash - */ - public function createHashShouldReturnAHashUsingPrivateKey() - { - $signer = $this->getSigner(); - $key = new Key('testing'); - $privateKey = $this->getMock(PrivateKeyInterface::class); - $point = $this->getMock(PointInterface::class); - - $privateKey->method('getPoint') - ->willReturn($point); - - $point->method('getOrder') - ->willReturn('1'); - - $this->parser->expects($this->once()) - ->method('getPrivateKey') - ->with($key) - ->willReturn($privateKey); - - $this->randomGenerator->expects($this->once()) - ->method('generate') - ->with('1') - ->willReturn('123'); - - $this->adapter->expects($this->once()) - ->method('hexDec') - ->willReturn('123'); - - $this->adapter->expects($this->exactly(2)) - ->method('decHex') - ->willReturn('123'); - - $this->signer->expects($this->once()) - ->method('sign') - ->with($privateKey, $this->isType('string'), $this->isType('string')) - ->willReturn(new Signature('1234', '456')); - - $this->assertInternalType('string', $signer->createHash('testing', $key, $this->randomGenerator)); - } - - /** - * @test - * - * @uses Lcobucci\JWT\Signer\Ecdsa::__construct - * @uses Lcobucci\JWT\Signer\Key - * - * @covers Lcobucci\JWT\Signer\Ecdsa::doVerify - * @covers Lcobucci\JWT\Signer\Ecdsa::createSigningHash - * @covers Lcobucci\JWT\Signer\Ecdsa::extractSignature + * @uses \Lcobucci\JWT\Signer\Ecdsa::__construct + * @uses \Lcobucci\JWT\Signer\Key */ public function doVerifyShouldDelegateToEcdsaSignerUsingPublicKey() { + $payload = 'testing'; + $privateKey = openssl_pkey_get_private(self::$ecdsaKeys['private']->getContent()); + + self::assertInternalType('resource', $privateKey); + + $signature = ''; + openssl_sign($payload, $signature, $privateKey, OPENSSL_ALGO_SHA256); + $signer = $this->getSigner(); - $key = new Key('testing'); - $publicKey = $this->getMock(PublicKeyInterface::class); - $this->parser->expects($this->once()) - ->method('getPublicKey') - ->with($key) - ->willReturn($publicKey); - - $this->adapter->expects($this->exactly(3)) - ->method('hexDec') - ->willReturn('123'); - - $this->signer->expects($this->once()) - ->method('verify') - ->with($publicKey, $this->isInstanceOf(Signature::class), $this->isType('string')) - ->willReturn(true); - - $this->assertTrue($signer->doVerify('testing', 'testing2', $key)); + self::assertTrue( + $signer->verify( + $this->pointsManipulator->fromAsn1($signature, $signer->getKeyLength()), + $payload, + self::$ecdsaKeys['public1'] + ) + ); } } diff --git a/vendor/lcobucci/jwt/test/unit/Signer/Hmac/Sha256Test.php b/vendor/lcobucci/jwt/test/unit/Signer/Hmac/Sha256Test.php index f6db0bda..80abad02 100644 --- a/vendor/lcobucci/jwt/test/unit/Signer/Hmac/Sha256Test.php +++ b/vendor/lcobucci/jwt/test/unit/Signer/Hmac/Sha256Test.php @@ -11,7 +11,7 @@ namespace Lcobucci\JWT\Signer\Hmac; * @author Luís Otávio Cobucci Oblonczyk * @since 0.1.0 */ -class Sha256Test extends \PHPUnit_Framework_TestCase +class Sha256Test extends \PHPUnit\Framework\TestCase { /** * @test diff --git a/vendor/lcobucci/jwt/test/unit/Signer/Hmac/Sha384Test.php b/vendor/lcobucci/jwt/test/unit/Signer/Hmac/Sha384Test.php index b4de61bf..804d0a08 100644 --- a/vendor/lcobucci/jwt/test/unit/Signer/Hmac/Sha384Test.php +++ b/vendor/lcobucci/jwt/test/unit/Signer/Hmac/Sha384Test.php @@ -11,7 +11,7 @@ namespace Lcobucci\JWT\Signer\Hmac; * @author Luís Otávio Cobucci Oblonczyk * @since 0.1.0 */ -class Sha384Test extends \PHPUnit_Framework_TestCase +class Sha384Test extends \PHPUnit\Framework\TestCase { /** * @test diff --git a/vendor/lcobucci/jwt/test/unit/Signer/Hmac/Sha512Test.php b/vendor/lcobucci/jwt/test/unit/Signer/Hmac/Sha512Test.php index e6fd3153..603c118e 100644 --- a/vendor/lcobucci/jwt/test/unit/Signer/Hmac/Sha512Test.php +++ b/vendor/lcobucci/jwt/test/unit/Signer/Hmac/Sha512Test.php @@ -11,7 +11,7 @@ namespace Lcobucci\JWT\Signer\Hmac; * @author Luís Otávio Cobucci Oblonczyk * @since 0.1.0 */ -class Sha512Test extends \PHPUnit_Framework_TestCase +class Sha512Test extends \PHPUnit\Framework\TestCase { /** * @test diff --git a/vendor/lcobucci/jwt/test/unit/Signer/HmacTest.php b/vendor/lcobucci/jwt/test/unit/Signer/HmacTest.php index 913e796d..cb44fc92 100644 --- a/vendor/lcobucci/jwt/test/unit/Signer/HmacTest.php +++ b/vendor/lcobucci/jwt/test/unit/Signer/HmacTest.php @@ -11,7 +11,7 @@ namespace Lcobucci\JWT\Signer; * @author Luís Otávio Cobucci Oblonczyk * @since 0.1.0 */ -class HmacTest extends \PHPUnit_Framework_TestCase +class HmacTest extends \PHPUnit\Framework\TestCase { /** * @var Hmac|\PHPUnit_Framework_MockObject_MockObject diff --git a/vendor/lcobucci/jwt/test/unit/Signer/KeyTest.php b/vendor/lcobucci/jwt/test/unit/Signer/KeyTest.php index 58dd8e82..7fda4a34 100644 --- a/vendor/lcobucci/jwt/test/unit/Signer/KeyTest.php +++ b/vendor/lcobucci/jwt/test/unit/Signer/KeyTest.php @@ -13,7 +13,7 @@ use org\bovigo\vfs\vfsStream; * @author Luís Otávio Cobucci Oblonczyk * @since 3.0.4 */ -class KeyTest extends \PHPUnit_Framework_TestCase +class KeyTest extends \PHPUnit\Framework\TestCase { /** * @before diff --git a/vendor/lcobucci/jwt/test/unit/Signer/KeychainTest.php b/vendor/lcobucci/jwt/test/unit/Signer/KeychainTest.php index 472e8e82..40ccfc5f 100644 --- a/vendor/lcobucci/jwt/test/unit/Signer/KeychainTest.php +++ b/vendor/lcobucci/jwt/test/unit/Signer/KeychainTest.php @@ -11,7 +11,7 @@ namespace Lcobucci\JWT\Signer; * @author Luís Otávio Cobucci Oblonczyk * @since 2.1.0 */ -class KeychainTest extends \PHPUnit_Framework_TestCase +class KeychainTest extends \PHPUnit\Framework\TestCase { /** * @test diff --git a/vendor/lcobucci/jwt/test/unit/Signer/Rsa/Sha256Test.php b/vendor/lcobucci/jwt/test/unit/Signer/Rsa/Sha256Test.php index 2e4248a4..3c389889 100644 --- a/vendor/lcobucci/jwt/test/unit/Signer/Rsa/Sha256Test.php +++ b/vendor/lcobucci/jwt/test/unit/Signer/Rsa/Sha256Test.php @@ -11,7 +11,7 @@ namespace Lcobucci\JWT\Signer\Rsa; * @author Luís Otávio Cobucci Oblonczyk * @since 2.1.0 */ -class Sha256Test extends \PHPUnit_Framework_TestCase +class Sha256Test extends \PHPUnit\Framework\TestCase { /** * @test diff --git a/vendor/lcobucci/jwt/test/unit/Signer/Rsa/Sha384Test.php b/vendor/lcobucci/jwt/test/unit/Signer/Rsa/Sha384Test.php index 18632127..292f7b56 100644 --- a/vendor/lcobucci/jwt/test/unit/Signer/Rsa/Sha384Test.php +++ b/vendor/lcobucci/jwt/test/unit/Signer/Rsa/Sha384Test.php @@ -11,7 +11,7 @@ namespace Lcobucci\JWT\Signer\Rsa; * @author Luís Otávio Cobucci Oblonczyk * @since 2.1.0 */ -class Sha384Test extends \PHPUnit_Framework_TestCase +class Sha384Test extends \PHPUnit\Framework\TestCase { /** * @test diff --git a/vendor/lcobucci/jwt/test/unit/Signer/Rsa/Sha512Test.php b/vendor/lcobucci/jwt/test/unit/Signer/Rsa/Sha512Test.php index 03e31fda..3036e3ee 100644 --- a/vendor/lcobucci/jwt/test/unit/Signer/Rsa/Sha512Test.php +++ b/vendor/lcobucci/jwt/test/unit/Signer/Rsa/Sha512Test.php @@ -11,7 +11,7 @@ namespace Lcobucci\JWT\Signer\Rsa; * @author Luís Otávio Cobucci Oblonczyk * @since 2.1.0 */ -class Sha512Test extends \PHPUnit_Framework_TestCase +class Sha512Test extends \PHPUnit\Framework\TestCase { /** * @test diff --git a/vendor/lcobucci/jwt/test/unit/Signer/RsaTest.php b/vendor/lcobucci/jwt/test/unit/Signer/RsaTest.php new file mode 100644 index 00000000..46c5f89e --- /dev/null +++ b/vendor/lcobucci/jwt/test/unit/Signer/RsaTest.php @@ -0,0 +1,188 @@ +getSigner(); + $signature = $signer->sign($payload, self::$rsaKeys['private']); + + $publicKey = openssl_pkey_get_public(self::$rsaKeys['public']->getContent()); + self::assertInternalType('resource', $publicKey); + self::assertSame(1, openssl_verify($payload, $signature, $publicKey, OPENSSL_ALGO_SHA256)); + } + + /** + * @test + * + * @covers \Lcobucci\JWT\Signer\Rsa::createHash + * @covers \Lcobucci\JWT\Signer\Rsa::validateKey + * @covers \Lcobucci\JWT\Signer\Rsa::getKeyType + * @covers \Lcobucci\JWT\Signer\OpenSSL + * @covers \Lcobucci\JWT\Signer\BaseSigner + * + * @uses \Lcobucci\JWT\Signer\Key + */ + public function createHashShouldRaiseAnExceptionWhenKeyIsInvalid() + { + $key = <<getSigner(); + + $this->expectException(InvalidArgumentException::class); + $this->expectExceptionMessage('There was an error while creating the signature'); + + $signer->sign('testing', new Key($key)); + } + + /** + * @test + * + * @covers \Lcobucci\JWT\Signer\Rsa::createHash + * @covers \Lcobucci\JWT\Signer\Rsa::validateKey + * @covers \Lcobucci\JWT\Signer\OpenSSL + * @covers \Lcobucci\JWT\Signer\BaseSigner + * + * @uses \Lcobucci\JWT\Signer\Key + */ + public function createHashShouldRaiseAnExceptionWhenKeyIsNotParseable() + { + $signer = $this->getSigner(); + + $this->expectException(InvalidArgumentException::class); + $this->expectExceptionMessage('It was not possible to parse your key'); + + $signer->sign('testing', new Key('blablabla')); + } + + /** + * @test + * + * @covers \Lcobucci\JWT\Signer\Rsa::createHash + * @covers \Lcobucci\JWT\Signer\Rsa::validateKey + * @covers \Lcobucci\JWT\Signer\Rsa::getKeyType + * @covers \Lcobucci\JWT\Signer\OpenSSL + * @covers \Lcobucci\JWT\Signer\BaseSigner + * + * @uses \Lcobucci\JWT\Signer\Key + */ + public function createHashShouldRaiseAnExceptionWhenKeyTypeIsNotRsa() + { + $signer = $this->getSigner(); + + $this->expectException(InvalidArgumentException::class); + $this->expectExceptionMessage('This key is not compatible with this signer'); + + $signer->sign('testing', self::$ecdsaKeys['private']); + } + + /** + * @test + * + * @covers \Lcobucci\JWT\Signer\Rsa::doVerify + * @covers \Lcobucci\JWT\Signer\Rsa::validateKey + * @covers \Lcobucci\JWT\Signer\Rsa::getKeyType + * @covers \Lcobucci\JWT\Signer\OpenSSL + * @covers \Lcobucci\JWT\Signer\BaseSigner + * + * @uses \Lcobucci\JWT\Signer\Key + */ + public function doVerifyShouldReturnTrueWhenSignatureIsValid() + { + $payload = 'testing'; + $privateKey = openssl_pkey_get_private(self::$rsaKeys['private']->getContent()); + self::assertInternalType('resource', $privateKey); + + $signature = ''; + openssl_sign($payload, $signature, $privateKey, OPENSSL_ALGO_SHA256); + + $signer = $this->getSigner(); + + self::assertTrue($signer->verify($signature, $payload, self::$rsaKeys['public'])); + } + + /** + * @test + * + * @covers \Lcobucci\JWT\Signer\Rsa::doVerify + * @covers \Lcobucci\JWT\Signer\Rsa::validateKey + * @covers \Lcobucci\JWT\Signer\OpenSSL + * @covers \Lcobucci\JWT\Signer\BaseSigner + * + * @uses \Lcobucci\JWT\Signer\Key + */ + public function doVerifyShouldRaiseAnExceptionWhenKeyIsNotParseable() + { + $signer = $this->getSigner(); + + $this->expectException(InvalidArgumentException::class); + $this->expectExceptionMessage('It was not possible to parse your key'); + + $signer->verify('testing', 'testing', new Key('blablabla')); + } + + /** + * @test + * + * @covers \Lcobucci\JWT\Signer\Rsa::doVerify + * @covers \Lcobucci\JWT\Signer\Rsa::validateKey + * @covers \Lcobucci\JWT\Signer\OpenSSL + * @covers \Lcobucci\JWT\Signer\BaseSigner + * + * @uses \Lcobucci\JWT\Signer\Key + */ + public function doVerifyShouldRaiseAnExceptionWhenKeyTypeIsNotRsa() + { + $signer = $this->getSigner(); + + $this->expectException(InvalidArgumentException::class); + $this->expectExceptionMessage('It was not possible to parse your key'); + + $signer->verify('testing', 'testing', self::$ecdsaKeys['private']); + } + + private function getSigner() + { + $signer = $this->getMockForAbstractClass(Rsa::class); + + $signer->method('getAlgorithm') + ->willReturn(OPENSSL_ALGO_SHA256); + + $signer->method('getAlgorithmId') + ->willReturn('RS256'); + + return $signer; + } +} diff --git a/vendor/lcobucci/jwt/test/unit/TokenTest.php b/vendor/lcobucci/jwt/test/unit/TokenTest.php index d3fa01cd..092d1b62 100644 --- a/vendor/lcobucci/jwt/test/unit/TokenTest.php +++ b/vendor/lcobucci/jwt/test/unit/TokenTest.php @@ -18,7 +18,7 @@ use Lcobucci\JWT\Claim\LesserOrEqualsTo; * @author Luís Otávio Cobucci Oblonczyk * @since 0.1.0 */ -class TokenTest extends \PHPUnit_Framework_TestCase +class TokenTest extends \PHPUnit\Framework\TestCase { /** * @test @@ -246,7 +246,7 @@ class TokenTest extends \PHPUnit_Framework_TestCase */ public function verifyMustRaiseExceptionWhenTokenIsUnsigned() { - $signer = $this->getMock(Signer::class); + $signer = $this->createMock(Signer::class); $token = new Token(); $token->verify($signer, 'test'); @@ -262,8 +262,8 @@ class TokenTest extends \PHPUnit_Framework_TestCase */ public function verifyShouldReturnFalseWhenTokenAlgorithmIsDifferent() { - $signer = $this->getMock(Signer::class); - $signature = $this->getMock(Signature::class, [], [], '', false); + $signer = $this->createMock(Signer::class); + $signature = $this->createMock(Signature::class, [], [], '', false); $signer->expects($this->any()) ->method('getAlgorithmId') @@ -287,8 +287,8 @@ class TokenTest extends \PHPUnit_Framework_TestCase */ public function verifyMustDelegateTheValidationToSignature() { - $signer = $this->getMock(Signer::class); - $signature = $this->getMock(Signature::class, [], [], '', false); + $signer = $this->createMock(Signer::class); + $signature = $this->createMock(Signature::class, [], [], '', false); $signer->expects($this->any()) ->method('getAlgorithmId') @@ -309,6 +309,7 @@ class TokenTest extends \PHPUnit_Framework_TestCase * * @uses Lcobucci\JWT\Token::__construct * @uses Lcobucci\JWT\ValidationData::__construct + * @uses Lcobucci\JWT\ValidationData::setCurrentTime * * @covers Lcobucci\JWT\Token::validate * @covers Lcobucci\JWT\Token::getValidatableClaims @@ -325,6 +326,7 @@ class TokenTest extends \PHPUnit_Framework_TestCase * * @uses Lcobucci\JWT\Token::__construct * @uses Lcobucci\JWT\ValidationData::__construct + * @uses Lcobucci\JWT\ValidationData::setCurrentTime * @uses Lcobucci\JWT\Claim\Basic::__construct * * @covers Lcobucci\JWT\Token::validate @@ -364,6 +366,40 @@ class TokenTest extends \PHPUnit_Framework_TestCase $this->assertFalse($token->validate($data)); } + /** + * @test + * + * @uses Lcobucci\JWT\Token::__construct + * @uses Lcobucci\JWT\ValidationData + * @uses Lcobucci\JWT\Claim\Basic + * @uses Lcobucci\JWT\Claim\EqualsTo + * @uses Lcobucci\JWT\Claim\LesserOrEqualsTo + * @uses Lcobucci\JWT\Claim\GreaterOrEqualsTo + * + * @covers Lcobucci\JWT\Token::validate + * @covers Lcobucci\JWT\Token::getValidatableClaims + */ + public function validateShouldReturnFalseWhenATimeBasedClaimFails() + { + $now = time(); + + $token = new Token( + [], + [ + 'iss' => new EqualsTo('iss', 'test'), + 'iat' => new LesserOrEqualsTo('iat', $now), + 'nbf' => new LesserOrEqualsTo('nbf', $now + 20), + 'exp' => new GreaterOrEqualsTo('exp', $now + 500), + 'testing' => new Basic('testing', 'test') + ] + ); + + $data = new ValidationData($now + 10); + $data->setIssuer('test'); + + $this->assertFalse($token->validate($data)); + } + /** * @test * @@ -380,6 +416,7 @@ class TokenTest extends \PHPUnit_Framework_TestCase public function validateShouldReturnTrueWhenThereAreNoFailedValidatableClaims() { $now = time(); + $token = new Token( [], [ @@ -396,6 +433,40 @@ class TokenTest extends \PHPUnit_Framework_TestCase $this->assertTrue($token->validate($data)); } + /** + * @test + * + * @uses Lcobucci\JWT\Token::__construct + * @uses Lcobucci\JWT\ValidationData + * @uses Lcobucci\JWT\Claim\Basic + * @uses Lcobucci\JWT\Claim\EqualsTo + * @uses Lcobucci\JWT\Claim\LesserOrEqualsTo + * @uses Lcobucci\JWT\Claim\GreaterOrEqualsTo + * + * @covers Lcobucci\JWT\Token::validate + * @covers Lcobucci\JWT\Token::getValidatableClaims + */ + public function validateShouldReturnTrueWhenLeewayMakesAllTimeBasedClaimsTrueAndOtherClaimsAreTrue() + { + $now = time(); + + $token = new Token( + [], + [ + 'iss' => new EqualsTo('iss', 'test'), + 'iat' => new LesserOrEqualsTo('iat', $now), + 'nbf' => new LesserOrEqualsTo('nbf', $now + 20), + 'exp' => new GreaterOrEqualsTo('exp', $now + 500), + 'testing' => new Basic('testing', 'test') + ] + ); + + $data = new ValidationData($now + 10, 20); + $data->setIssuer('test'); + + $this->assertTrue($token->validate($data)); + } + /** * @test * @@ -493,7 +564,7 @@ class TokenTest extends \PHPUnit_Framework_TestCase */ public function toStringMustReturnEncodedData() { - $signature = $this->getMock(Signature::class, [], [], '', false); + $signature = $this->createMock(Signature::class, [], [], '', false); $token = new Token(['alg' => 'none'], [], $signature, ['test', 'test', 'test']); diff --git a/vendor/lcobucci/jwt/test/unit/ValidationDataTest.php b/vendor/lcobucci/jwt/test/unit/ValidationDataTest.php index ac612658..32df8d43 100644 --- a/vendor/lcobucci/jwt/test/unit/ValidationDataTest.php +++ b/vendor/lcobucci/jwt/test/unit/ValidationDataTest.php @@ -11,12 +11,13 @@ namespace Lcobucci\JWT; * @author Luís Otávio Cobucci Oblonczyk * @since 2.0.0 */ -class ValidationDataTest extends \PHPUnit_Framework_TestCase +class ValidationDataTest extends \PHPUnit\Framework\TestCase { /** * @test * * @covers Lcobucci\JWT\ValidationData::__construct + * @covers Lcobucci\JWT\ValidationData::setCurrentTime */ public function constructorShouldConfigureTheItems() { @@ -26,12 +27,27 @@ class ValidationDataTest extends \PHPUnit_Framework_TestCase $this->assertAttributeSame($expected, 'items', $data); } + /** + * @test + * + * @covers Lcobucci\JWT\ValidationData::__construct + * @covers Lcobucci\JWT\ValidationData::setCurrentTime + */ + public function constructorWithLeewayShouldConfigureTheItems() + { + $expected = $this->createExpectedData(null, null, null, null, 111, 111, 89); + $data = new ValidationData(100, 11); + + $this->assertAttributeSame($expected, 'items', $data); + } + /** * @test * * @dataProvider claimValues * * @uses Lcobucci\JWT\ValidationData::__construct + * @uses Lcobucci\JWT\ValidationData::setCurrentTime * * @covers Lcobucci\JWT\ValidationData::setId */ @@ -50,6 +66,7 @@ class ValidationDataTest extends \PHPUnit_Framework_TestCase * @dataProvider claimValues * * @uses Lcobucci\JWT\ValidationData::__construct + * @uses Lcobucci\JWT\ValidationData::setCurrentTime * * @covers Lcobucci\JWT\ValidationData::setIssuer */ @@ -68,6 +85,7 @@ class ValidationDataTest extends \PHPUnit_Framework_TestCase * @dataProvider claimValues * * @uses Lcobucci\JWT\ValidationData::__construct + * @uses Lcobucci\JWT\ValidationData::setCurrentTime * * @covers Lcobucci\JWT\ValidationData::setAudience */ @@ -86,6 +104,7 @@ class ValidationDataTest extends \PHPUnit_Framework_TestCase * @dataProvider claimValues * * @uses Lcobucci\JWT\ValidationData::__construct + * @uses Lcobucci\JWT\ValidationData::setCurrentTime * * @covers Lcobucci\JWT\ValidationData::setSubject */ @@ -102,6 +121,7 @@ class ValidationDataTest extends \PHPUnit_Framework_TestCase * @test * * @uses Lcobucci\JWT\ValidationData::__construct + * @uses Lcobucci\JWT\ValidationData::setCurrentTime * * @covers Lcobucci\JWT\ValidationData::setCurrentTime */ @@ -114,10 +134,28 @@ class ValidationDataTest extends \PHPUnit_Framework_TestCase $this->assertAttributeSame($expected, 'items', $data); } + /** + * @test + * + * @uses Lcobucci\JWT\ValidationData::__construct + * @uses Lcobucci\JWT\ValidationData::setCurrentTime + * + * @covers Lcobucci\JWT\ValidationData::setCurrentTime + */ + public function setCurrentTimeShouldChangeTheTimeBasedValuesUsingLeeway() + { + $expected = $this->createExpectedData(null, null, null, null, 30, 30, 10); + $data = new ValidationData(15, 10); + $data->setCurrentTime(20); + + $this->assertAttributeSame($expected, 'items', $data); + } + /** * @test * * @uses Lcobucci\JWT\ValidationData::__construct + * @uses Lcobucci\JWT\ValidationData::setCurrentTime * * @covers Lcobucci\JWT\ValidationData::has */ @@ -132,6 +170,7 @@ class ValidationDataTest extends \PHPUnit_Framework_TestCase * @test * * @uses Lcobucci\JWT\ValidationData::__construct + * @uses Lcobucci\JWT\ValidationData::setCurrentTime * * @covers Lcobucci\JWT\ValidationData::has */ @@ -146,6 +185,7 @@ class ValidationDataTest extends \PHPUnit_Framework_TestCase * @test * * @uses Lcobucci\JWT\ValidationData::__construct + * @uses Lcobucci\JWT\ValidationData::setCurrentTime * * @covers Lcobucci\JWT\ValidationData::has */ @@ -160,6 +200,7 @@ class ValidationDataTest extends \PHPUnit_Framework_TestCase * @test * * @uses Lcobucci\JWT\ValidationData::__construct + * @uses Lcobucci\JWT\ValidationData::setCurrentTime * * @covers Lcobucci\JWT\ValidationData::get */ @@ -174,6 +215,7 @@ class ValidationDataTest extends \PHPUnit_Framework_TestCase * @test * * @uses Lcobucci\JWT\ValidationData::__construct + * @uses Lcobucci\JWT\ValidationData::setCurrentTime * * @covers Lcobucci\JWT\ValidationData::get */ @@ -196,11 +238,13 @@ class ValidationDataTest extends \PHPUnit_Framework_TestCase } /** - * @param string $id - * @param string $sub - * @param string $iss - * @param string $aud - * @param int $time + * @param string|null $id + * @param string|null $sub + * @param string|null $iss + * @param string|null $aud + * @param int $iat + * @param int|null $nbf + * @param int|null $exp * * @return array */ @@ -209,16 +253,18 @@ class ValidationDataTest extends \PHPUnit_Framework_TestCase $sub = null, $iss = null, $aud = null, - $time = 1 + $iat = 1, + $nbf = null, + $exp = null ) { return [ 'jti' => $id !== null ? (string) $id : null, 'iss' => $iss !== null ? (string) $iss : null, 'aud' => $aud !== null ? (string) $aud : null, 'sub' => $sub !== null ? (string) $sub : null, - 'iat' => $time, - 'nbf' => $time, - 'exp' => $time + 'iat' => $iat, + 'nbf' => $nbf !== null ? $nbf: $iat, + 'exp' => $exp !== null ? $exp: $iat ]; } } diff --git a/vendor/league/flysystem/LICENSE b/vendor/league/flysystem/LICENSE index 0d16ccc9..f2684c84 100644 --- a/vendor/league/flysystem/LICENSE +++ b/vendor/league/flysystem/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2013-2018 Frank de Jonge +Copyright (c) 2013-2019 Frank de Jonge 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/league/flysystem/src/Adapter/AbstractFtpAdapter.php b/vendor/league/flysystem/src/Adapter/AbstractFtpAdapter.php index 932ffbbf..f15fe6d0 100644 --- a/vendor/league/flysystem/src/Adapter/AbstractFtpAdapter.php +++ b/vendor/league/flysystem/src/Adapter/AbstractFtpAdapter.php @@ -76,6 +76,13 @@ abstract class AbstractFtpAdapter extends AbstractAdapter */ protected $safeStorage; + /** + * True to enable timestamps for FTP servers that return unix-style listings + * + * @var bool + */ + protected $enableTimestampsOnUnixListings = false; + /** * Constructor. * @@ -309,6 +316,18 @@ abstract class AbstractFtpAdapter extends AbstractAdapter return $this; } + /** + * True to enable timestamps for FTP servers that return unix-style listings + * + * @param bool $bool + * @return $this + */ + public function setEnableTimestampsOnUnixListings($bool = false) { + $this->enableTimestampsOnUnixListings = $bool; + + return $this; + } + /** * @inheritdoc */ @@ -389,6 +408,18 @@ abstract class AbstractFtpAdapter extends AbstractAdapter /** * Normalize a Unix file entry. * + * Given $item contains: + * '-rw-r--r-- 1 ftp ftp 409 Aug 19 09:01 file1.txt' + * + * This function will return: + * [ + * 'type' => 'file', + * 'path' => 'file1.txt', + * 'visibility' => 'public', + * 'size' => 409, + * 'timestamp' => 1566205260 + * ] + * * @param string $item * @param string $base * @@ -402,7 +433,7 @@ abstract class AbstractFtpAdapter extends AbstractAdapter throw new RuntimeException("Metadata can't be parsed from item '$item' , not enough parts."); } - list($permissions, /* $number */, /* $owner */, /* $group */, $size, /* $month */, /* $day */, /* $time*/, $name) = explode(' ', $item, 9); + list($permissions, /* $number */, /* $owner */, /* $group */, $size, $month, $day, $timeOrYear, $name) = explode(' ', $item, 9); $type = $this->detectType($permissions); $path = $base === '' ? $name : $base . $this->separator . $name; @@ -414,7 +445,41 @@ abstract class AbstractFtpAdapter extends AbstractAdapter $visibility = $permissions & 0044 ? AdapterInterface::VISIBILITY_PUBLIC : AdapterInterface::VISIBILITY_PRIVATE; $size = (int) $size; - return compact('type', 'path', 'visibility', 'size'); + $result = compact('type', 'path', 'visibility', 'size'); + if ($this->enableTimestampsOnUnixListings) { + $timestamp = $this->normalizeUnixTimestamp($month, $day, $timeOrYear); + $result += compact('timestamp'); + } + return $result; + } + + /** + * Only accurate to the minute (current year), or to the day + * + * Inadequacies in timestamp accuracy are due to limitations of the FTP 'LIST' command + * + * Note: The 'MLSD' command is a machine-readable replacement for 'LIST' + * but many FTP servers do not support it :( + * + * @param string $month e.g. 'Aug' + * @param string $day e.g. '19' + * @param string $timeOrYear e.g. '09:01' OR '2015' + * @return int + */ + protected function normalizeUnixTimestamp($month, $day, $timeOrYear) { + if (is_numeric($timeOrYear)) { + $year = $timeOrYear; + $hour = '00'; + $minute = '00'; + $seconds = '00'; + } + else { + $year = date('Y'); + list($hour, $minute) = explode(':', $timeOrYear); + $seconds = '00'; + } + $dateTime = DateTime::createFromFormat('Y-M-j-G:i:s', "{$year}-{$month}-{$day}-{$hour}:{$minute}:{$seconds}"); + return $dateTime->getTimestamp(); } /** diff --git a/vendor/league/flysystem/src/Adapter/Ftp.php b/vendor/league/flysystem/src/Adapter/Ftp.php index fd0660d2..f622b9db 100644 --- a/vendor/league/flysystem/src/Adapter/Ftp.php +++ b/vendor/league/flysystem/src/Adapter/Ftp.php @@ -53,6 +53,7 @@ class Ftp extends AbstractFtpAdapter 'ignorePassiveAddress', 'recurseManually', 'utf8', + 'enableTimestampsOnUnixListings', ]; /** @@ -380,13 +381,11 @@ class Ftp extends AbstractFtpAdapter */ public function getMetadata($path) { - $connection = $this->getConnection(); - if ($path === '') { return ['type' => 'dir', 'path' => '']; } - if (@ftp_chdir($connection, $path) === true) { + if (@ftp_chdir($this->getConnection(), $path) === true) { $this->setConnectionRoot(); return ['type' => 'dir', 'path' => $path]; diff --git a/vendor/league/flysystem/src/Adapter/Local.php b/vendor/league/flysystem/src/Adapter/Local.php index 1bdf51d8..8e61e658 100644 --- a/vendor/league/flysystem/src/Adapter/Local.php +++ b/vendor/league/flysystem/src/Adapter/Local.php @@ -106,6 +106,7 @@ class Local extends AbstractAdapter } umask($umask); + clearstatcache(false, $root); if ( ! is_dir($root)) { $errorMessage = isset($mkdirError['message']) ? $mkdirError['message'] : ''; @@ -219,7 +220,7 @@ class Local extends AbstractAdapter public function read($path) { $location = $this->applyPathPrefix($path); - $contents = file_get_contents($location); + $contents = @file_get_contents($location); if ($contents === false) { return false; diff --git a/vendor/league/flysystem/src/Filesystem.php b/vendor/league/flysystem/src/Filesystem.php index 7e9881fb..8b0f9bda 100644 --- a/vendor/league/flysystem/src/Filesystem.php +++ b/vendor/league/flysystem/src/Filesystem.php @@ -270,7 +270,8 @@ class Filesystem implements FilesystemInterface $directory = Util::normalizePath($directory); $contents = $this->getAdapter()->listContents($directory, $recursive); - return (new ContentListingFormatter($directory, $recursive))->formatListing($contents); + return (new ContentListingFormatter($directory, $recursive, $this->config->get('case_sensitive', true))) + ->formatListing($contents); } /** diff --git a/vendor/league/flysystem/src/Util/ContentListingFormatter.php b/vendor/league/flysystem/src/Util/ContentListingFormatter.php index 5a8c95a8..ae0d3b91 100644 --- a/vendor/league/flysystem/src/Util/ContentListingFormatter.php +++ b/vendor/league/flysystem/src/Util/ContentListingFormatter.php @@ -13,19 +13,26 @@ class ContentListingFormatter * @var string */ private $directory; + /** * @var bool */ private $recursive; + /** + * @var bool + */ + private $caseSensitive; + /** * @param string $directory * @param bool $recursive */ - public function __construct($directory, $recursive) + public function __construct($directory, $recursive, $caseSensitive = true) { - $this->directory = $directory; + $this->directory = rtrim($directory, '/'); $this->recursive = $recursive; + $this->caseSensitive = $caseSensitive; } /** @@ -37,14 +44,9 @@ class ContentListingFormatter */ public function formatListing(array $listing) { - $listing = array_values( - array_map( - [$this, 'addPathInfo'], - array_filter($listing, [$this, 'isEntryOutOfScope']) - ) - ); + $listing = array_filter(array_map([$this, 'addPathInfo'], $listing), [$this, 'isEntryOutOfScope']); - return $this->sortListing($listing); + return $this->sortListing(array_values($listing)); } private function addPathInfo(array $entry) @@ -85,7 +87,9 @@ class ContentListingFormatter return true; } - return strpos($entry['path'], $this->directory . '/') === 0; + return $this->caseSensitive + ? strpos($entry['path'], $this->directory . '/') === 0 + : stripos($entry['path'], $this->directory . '/') === 0; } /** @@ -97,7 +101,9 @@ class ContentListingFormatter */ private function isDirectChild(array $entry) { - return Util::dirname($entry['path']) === $this->directory; + return $this->caseSensitive + ? $entry['dirname'] === $this->directory + : strcasecmp($this->directory, $entry['dirname']) === 0; } /** diff --git a/vendor/league/flysystem/src/Util/MimeType.php b/vendor/league/flysystem/src/Util/MimeType.php index 254bc2a1..adc0aa88 100644 --- a/vendor/league/flysystem/src/Util/MimeType.php +++ b/vendor/league/flysystem/src/Util/MimeType.php @@ -13,7 +13,7 @@ class MimeType protected static $extensionToMimeTypeMap = [ 'hqx' => 'application/mac-binhex40', 'cpt' => 'application/mac-compactpro', - 'csv' => 'text/x-comma-separated-values', + 'csv' => 'text/csv', 'bin' => 'application/octet-stream', 'dms' => 'application/octet-stream', 'lha' => 'application/octet-stream', diff --git a/vendor/mockery/mockery/.gitignore b/vendor/mockery/mockery/.gitignore index 062faccc..c6e9e517 100644 --- a/vendor/mockery/mockery/.gitignore +++ b/vendor/mockery/mockery/.gitignore @@ -13,3 +13,4 @@ phpunit.xml .php_cs.cache docs/api phpDocumentor.phar* +.phpunit.result.cache \ No newline at end of file diff --git a/vendor/mockery/mockery/CHANGELOG.md b/vendor/mockery/mockery/CHANGELOG.md index ba8a3e67..860bb245 100644 --- a/vendor/mockery/mockery/CHANGELOG.md +++ b/vendor/mockery/mockery/CHANGELOG.md @@ -1,6 +1,13 @@ # Change Log -## x.y.z (unreleased) +## 1.2.2 (2019-02-13) + +* Fix a BC breaking change for PHP 5.6/PHPUnit 5.7.27 (#947) + +## 1.2.1 (2019-02-07) + +* Support for PHPUnit 8 (#942) +* Allow mocking static methods called on instance (#938) ## 1.2.0 (2018-10-02) diff --git a/vendor/mockery/mockery/README.md b/vendor/mockery/mockery/README.md index b346f4b0..ff517baa 100644 --- a/vendor/mockery/mockery/README.md +++ b/vendor/mockery/mockery/README.md @@ -267,7 +267,7 @@ $implementationMock = Mockery::mock('overload:\Some\Implementation'); $implementationMock->shouldReceive('__construct') ->once() - ->with(['host' => 'localhost]); + ->with(['host' => 'localhost']); // add other expectations as usual $implementation = new \Some\Implementation(['host' => 'localhost']); diff --git a/vendor/mockery/mockery/composer.json b/vendor/mockery/mockery/composer.json index 4d7c96c2..45342593 100644 --- a/vendor/mockery/mockery/composer.json +++ b/vendor/mockery/mockery/composer.json @@ -36,7 +36,7 @@ "hamcrest/hamcrest-php": "~2.0" }, "require-dev": { - "phpunit/phpunit": "~5.7.10|~6.5|~7.0" + "phpunit/phpunit": "~5.7.10|~6.5|~7.0|~8.0" }, "autoload": { "psr-0": { diff --git a/vendor/mockery/mockery/docs/getting_started/simple_example.rst b/vendor/mockery/mockery/docs/getting_started/simple_example.rst index 1fb252e4..32ee2691 100644 --- a/vendor/mockery/mockery/docs/getting_started/simple_example.rst +++ b/vendor/mockery/mockery/docs/getting_started/simple_example.rst @@ -40,7 +40,7 @@ mock object for the real service which allows us to test the behaviour of the use \Mockery; - class TemperatureTest extends PHPUnit_Framework_TestCase + class TemperatureTest extends \PHPUnit\Framework\TestCase { public function tearDown() { diff --git a/vendor/mockery/mockery/docs/reference/creating_test_doubles.rst b/vendor/mockery/mockery/docs/reference/creating_test_doubles.rst index 377812d8..bb2d6b0d 100644 --- a/vendor/mockery/mockery/docs/reference/creating_test_doubles.rst +++ b/vendor/mockery/mockery/docs/reference/creating_test_doubles.rst @@ -16,7 +16,7 @@ allow us to inspect these calls after the fact. When creating a test double object, we can pass in an identifier as a name for our test double. If we pass it no identifier, the test double name will be -unknown. Furthermore, the identifier must not be a class name. It is a +unknown. Furthermore, the identifier does not have to be a class name. It is a good practice, and our recommendation, to always name the test doubles with the same name as the underlying class we are creating test doubles for. diff --git a/vendor/mockery/mockery/docs/reference/expectations.rst b/vendor/mockery/mockery/docs/reference/expectations.rst index fb1d736d..00f29379 100644 --- a/vendor/mockery/mockery/docs/reference/expectations.rst +++ b/vendor/mockery/mockery/docs/reference/expectations.rst @@ -270,7 +270,7 @@ use when throwing an ``Exception`` from the mocked method: $mock = \Mockery::mock('MyClass'); $mock->shouldReceive('name_of_method') - ->andThrow(exception_name, message); + ->andThrow('exception_name', 'message'); .. _expectations-setting-public-properties: diff --git a/vendor/mockery/mockery/library/Mockery.php b/vendor/mockery/mockery/library/Mockery.php index 8725f919..28b9bc26 100644 --- a/vendor/mockery/mockery/library/Mockery.php +++ b/vendor/mockery/mockery/library/Mockery.php @@ -108,7 +108,7 @@ class Mockery /** * Static shortcut to \Mockery\Container::mock(). * - * @param array ...$args + * @param mixed ...$args * * @return \Mockery\MockInterface */ @@ -121,7 +121,7 @@ class Mockery * Static and semantic shortcut for getting a mock from the container * and applying the spy's expected behavior into it. * - * @param array ...$args + * @param mixed ...$args * * @return \Mockery\MockInterface */ @@ -137,7 +137,7 @@ class Mockery /** * Static and Semantic shortcut to \Mockery\Container::mock(). * - * @param array ...$args + * @param mixed ...$args * * @return \Mockery\MockInterface */ @@ -149,7 +149,7 @@ class Mockery /** * Static shortcut to \Mockery\Container::mock(), first argument names the mock. * - * @param array ...$args + * @param mixed ...$args * * @return \Mockery\MockInterface */ diff --git a/vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/Legacy/TestListenerTrait.php b/vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/Legacy/TestListenerTrait.php index 08848b88..02b5d045 100644 --- a/vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/Legacy/TestListenerTrait.php +++ b/vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/Legacy/TestListenerTrait.php @@ -20,7 +20,7 @@ namespace Mockery\Adapter\Phpunit\Legacy; -if (class_exists('PHPUnit_Framework_TestCase') && ! class_exists('PHPUnit\Framework\TestCase')) { +if (class_exists('PHPUnit_Framework_TestCase') && ! class_exists('PHPUnit\Util\Blacklist')) { class_alias('PHPUnit_Framework_ExpectationFailedException', 'PHPUnit\Framework\ExpectationFailedException'); class_alias('PHPUnit_Framework_Test', 'PHPUnit\Framework\Test'); class_alias('PHPUnit_Framework_TestCase', 'PHPUnit\Framework\TestCase'); diff --git a/vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryPHPUnitIntegration.php b/vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryPHPUnitIntegration.php index 9d342935..ec3955f3 100644 --- a/vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryPHPUnitIntegration.php +++ b/vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryPHPUnitIntegration.php @@ -22,19 +22,27 @@ namespace Mockery\Adapter\Phpunit; use Mockery; +if (class_exists('PHPUnit_Framework_TestCase') || version_compare(\PHPUnit\Runner\Version::id(), '8.0.0', '<')) { + class_alias(MockeryPHPUnitIntegrationAssertPostConditionsForV7AndPrevious::class, MockeryPHPUnitIntegrationAssertPostConditions::class); +} else { + class_alias(MockeryPHPUnitIntegrationAssertPostConditionsForV8::class, MockeryPHPUnitIntegrationAssertPostConditions::class); +} + /** * Integrates Mockery into PHPUnit. Ensures Mockery expectations are verified * for each test and are included by the assertion counter. */ trait MockeryPHPUnitIntegration { + use MockeryPHPUnitIntegrationAssertPostConditions; + protected $mockeryOpen; /** * Performs assertions shared by all tests of a test case. This method is * called before execution of a test ends and before the tearDown method. */ - protected function assertPostConditions() + protected function mockeryAssertPostConditions() { $this->addMockeryExpectationsToAssertionCount(); $this->checkMockeryExceptions(); diff --git a/vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryPHPUnitIntegrationAssertPostConditionsForV7AndPrevious.php b/vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryPHPUnitIntegrationAssertPostConditionsForV7AndPrevious.php new file mode 100644 index 00000000..52b7165b --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryPHPUnitIntegrationAssertPostConditionsForV7AndPrevious.php @@ -0,0 +1,29 @@ +mockeryAssertPostConditions(); + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryPHPUnitIntegrationAssertPostConditionsForV8.php b/vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryPHPUnitIntegrationAssertPostConditionsForV8.php new file mode 100644 index 00000000..68d5551d --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryPHPUnitIntegrationAssertPostConditionsForV8.php @@ -0,0 +1,31 @@ +mockeryAssertPostConditions(); + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryTestCase.php b/vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryTestCase.php index f4e9a86a..e79753b2 100644 --- a/vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryTestCase.php +++ b/vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryTestCase.php @@ -20,7 +20,20 @@ namespace Mockery\Adapter\Phpunit; +if (class_exists('PHPUnit_Framework_TestCase') || version_compare(\PHPUnit\Runner\Version::id(), '8.0.0', '<')) { + class_alias(MockeryTestCaseSetUpForV7AndPrevious::class, MockeryTestCaseSetUp::class); +} else { + class_alias(MockeryTestCaseSetUpForV8::class, MockeryTestCaseSetUp::class); +} abstract class MockeryTestCase extends \PHPUnit\Framework\TestCase { - use MockeryPHPUnitIntegration; + use MockeryPHPUnitIntegration, MockeryTestCaseSetUp; + + protected function mockeryTestSetUp() + { + } + + protected function mockeryTestTearDown() + { + } } diff --git a/vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryTestCaseSetUpForV7AndPrevious.php b/vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryTestCaseSetUpForV7AndPrevious.php new file mode 100644 index 00000000..75b7d347 --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryTestCaseSetUpForV7AndPrevious.php @@ -0,0 +1,36 @@ +mockeryTestSetUp(); + } + + protected function tearDown() + { + $this->mockeryTestTearDown(); + parent::tearDown(); + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryTestCaseSetUpForV8.php b/vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryTestCaseSetUpForV8.php new file mode 100644 index 00000000..f531e02a --- /dev/null +++ b/vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/MockeryTestCaseSetUpForV8.php @@ -0,0 +1,38 @@ +mockeryTestSetUp(); + } + + protected function tearDown() : void + { + $this->mockeryTestTearDown(); + parent::tearDown(); + } +} diff --git a/vendor/mockery/mockery/library/Mockery/Generator/Method.php b/vendor/mockery/mockery/library/Mockery/Generator/Method.php index 713a340c..89e4a8fa 100644 --- a/vendor/mockery/mockery/library/Mockery/Generator/Method.php +++ b/vendor/mockery/mockery/library/Mockery/Generator/Method.php @@ -44,16 +44,13 @@ class Method public function getReturnType() { if (defined('HHVM_VERSION') && method_exists($this->method, 'getReturnTypeText') && $this->method->hasReturnType()) { - // Available in HHVM - $returnType = $this->method->getReturnTypeText(); - - // Remove tuple, ImmVector<>, ImmSet<>, ImmMap<>, array<>, anything with <>, void, mixed which cause eval() errors - if (preg_match('/(\w+<.*>)|(\(.+\))|(HH\\\\(void|mixed|this))/', $returnType)) { - return ''; - } - - // return directly without going through php logic. - return $returnType; + // Strip all return type for hhvm. + // eval() errors on hhvm return type include but not limited to + // tuple, ImmVector<>, ImmSet<>, ImmMap<>, array<>, + // anything with <>, void, mixed, this, and type-constant. + // For type-constant Can see https://docs.hhvm.com/hack/type-constants/introduction + // for more details. + return ''; } if (version_compare(PHP_VERSION, '7.0.0-dev') >= 0 && $this->method->hasReturnType()) { diff --git a/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/ClassPass.php b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/ClassPass.php index 91ccfabf..e949a515 100644 --- a/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/ClassPass.php +++ b/vendor/mockery/mockery/library/Mockery/Generator/StringManipulation/Pass/ClassPass.php @@ -37,6 +37,12 @@ class ClassPass implements Pass } $className = ltrim($target->getName(), "\\"); + if (defined('HHVM_VERSION') && preg_match('/^HH\\\\/', $className)) { + // HH\ namespace is reserved for HHVM class and doesnt require + // class declaration and extension. + return $code; + } + if (!class_exists($className)) { \Mockery::declareClass($className); } diff --git a/vendor/mockery/mockery/library/Mockery/Mock.php b/vendor/mockery/mockery/library/Mockery/Mock.php index cf0aa13d..0072cb34 100644 --- a/vendor/mockery/mockery/library/Mockery/Mock.php +++ b/vendor/mockery/mockery/library/Mockery/Mock.php @@ -175,7 +175,7 @@ class Mock implements MockInterface if (!\Mockery::getConfiguration()->mockingNonExistentMethodsAllowed()) { foreach ($this->mockery_getMethods() as $method) { - if ($method->isPublic() && !$method->isStatic()) { + if ($method->isPublic()) { $this->_mockery_mockableMethods[] = $method->getName(); } } @@ -185,7 +185,7 @@ class Mock implements MockInterface /** * Set expected method calls * - * @param array ...$methodNames one or many methods that are expected to be called in this mock + * @param mixed ...$methodNames one or many methods that are expected to be called in this mock * * @return \Mockery\ExpectationInterface|\Mockery\Expectation|\Mockery\HigherOrderMessage */ @@ -315,6 +315,14 @@ class Mock implements MockInterface */ public function shouldAllowMockingProtectedMethods() { + if (!\Mockery::getConfiguration()->mockingNonExistentMethodsAllowed()) { + foreach ($this->mockery_getMethods() as $method) { + if ($method->isProtected()) { + $this->_mockery_mockableMethods[] = $method->getName(); + } + } + } + $this->_mockery_allowMockingProtectedMethods = true; return $this; } diff --git a/vendor/mockery/mockery/library/Mockery/MockInterface.php b/vendor/mockery/mockery/library/Mockery/MockInterface.php index e7a2685e..dd2654b9 100644 --- a/vendor/mockery/mockery/library/Mockery/MockInterface.php +++ b/vendor/mockery/mockery/library/Mockery/MockInterface.php @@ -46,7 +46,7 @@ interface MockInterface /** * Set expected method calls * - * @param array ...$methodNames one or many methods that are expected to be called in this mock + * @param mixed ...$methodNames one or many methods that are expected to be called in this mock * * @return \Mockery\ExpectationInterface|\Mockery\Expectation|\Mockery\HigherOrderMessage */ @@ -55,7 +55,7 @@ interface MockInterface /** * Shortcut method for setting an expectation that a method should not be called. * - * @param array ...$methodNames one or many methods that are expected not to be called in this mock + * @param mixed ...$methodNames one or many methods that are expected not to be called in this mock * @return \Mockery\ExpectationInterface|\Mockery\Expectation|\Mockery\HigherOrderMessage */ public function shouldNotReceive(...$methodNames); @@ -99,7 +99,7 @@ interface MockInterface * @param null $args * @return mixed */ - public function shouldHaveReceived($method, $args = null); + public function shouldHaveReceived($method = null, $args = null); /** * @return mixed diff --git a/vendor/mockery/mockery/library/helpers.php b/vendor/mockery/mockery/library/helpers.php index 72b7240e..0756a328 100644 --- a/vendor/mockery/mockery/library/helpers.php +++ b/vendor/mockery/mockery/library/helpers.php @@ -2,7 +2,6 @@ use Mockery\Matcher\AndAnyOtherArgs; use Mockery\Matcher\AnyArgs; -use Mockery\Matcher\NoArgs; /** * Mockery diff --git a/vendor/mockery/mockery/phpunit.xml.dist b/vendor/mockery/mockery/phpunit.xml.dist index 0608e3ad..4c8ed7ac 100644 --- a/vendor/mockery/mockery/phpunit.xml.dist +++ b/vendor/mockery/mockery/phpunit.xml.dist @@ -29,6 +29,8 @@ ./library/Mockery/Adapter/Phpunit/Legacy ./library/Mockery/Adapter/Phpunit/TestListener.php + ./library/Mockery/Adapter/Phpunit/MockeryPHPUnitIntegrationAssertPostConditionsForV8.php + ./library/Mockery/Adapter/Phpunit/MockeryTestCaseSetUpForV8.php diff --git a/vendor/mockery/mockery/tests/Mockery/Adapter/Phpunit/TestListenerTest.php b/vendor/mockery/mockery/tests/Mockery/Adapter/Phpunit/TestListenerTest.php index 9a73c81d..7e01cf1d 100644 --- a/vendor/mockery/mockery/tests/Mockery/Adapter/Phpunit/TestListenerTest.php +++ b/vendor/mockery/mockery/tests/Mockery/Adapter/Phpunit/TestListenerTest.php @@ -21,7 +21,7 @@ namespace tests\Mockery\Adapter\Phpunit; -use PHPUnit\Framework\TestCase; +use Mockery\Adapter\Phpunit\MockeryTestCase; use PHPUnit\Framework\TestResult; use Mockery\Adapter\Phpunit\TestListener; @@ -33,9 +33,9 @@ if (class_exists('PHPUnit_Runner_Version') && version_compare(\PHPUnit_Runner_Ve class_alias('test\Mockery\Fixtures\EmptyTestCaseV7', 'tests\Mockery\Adapter\Phpunit\EmptyTestCase'); } -class TestListenerTest extends TestCase +class TestListenerTest extends MockeryTestCase { - protected function setUp() + protected function mockeryTestSetUp() { /** * Skip all tests here if PHPUnit is less than 6.0.0 diff --git a/vendor/mockery/mockery/tests/Mockery/AdhocTest.php b/vendor/mockery/mockery/tests/Mockery/AdhocTest.php index b930c0a4..d6894992 100644 --- a/vendor/mockery/mockery/tests/Mockery/AdhocTest.php +++ b/vendor/mockery/mockery/tests/Mockery/AdhocTest.php @@ -26,12 +26,12 @@ use Mockery\Adapter\Phpunit\MockeryTestCase; */ class Mockery_AdhocTest extends MockeryTestCase { - public function setup() + public function mockeryTestSetUp() { $this->container = new \Mockery\Container(\Mockery::getDefaultGenerator(), \Mockery::getDefaultLoader()); } - public function teardown() + public function mockeryTestTearDown() { $this->container->mockery_close(); } diff --git a/vendor/mockery/mockery/tests/Mockery/ContainerTest.php b/vendor/mockery/mockery/tests/Mockery/ContainerTest.php index 446d9e3f..bcb2fa16 100644 --- a/vendor/mockery/mockery/tests/Mockery/ContainerTest.php +++ b/vendor/mockery/mockery/tests/Mockery/ContainerTest.php @@ -172,13 +172,11 @@ class ContainerTest extends MockeryTestCase $this->assertEquals(123, $m->bar()); } - /** - * @expectedException BadMethodCallException - */ public function testNamedMockWithMakePartialThrowsIfNotAvailable() { $m = mock("MockeryTest_ClassConstructor2", array($param1 = new stdClass())); $m->makePartial(); + $this->expectException(\BadMethodCallException::class); $m->foorbar123(); $m->mockery_verify(); } @@ -243,11 +241,9 @@ class ContainerTest extends MockeryTestCase $this->assertEquals('bar', $m->foo()); } - /** - * @expectedException \Mockery\Exception - */ public function testMockingAKnownConcreteFinalClassThrowsErrors_OnlyPartialMocksCanMockFinalElements() { + $this->expectException(\Mockery\Exception::class); $m = mock('MockeryFoo3'); } @@ -323,7 +319,7 @@ class ContainerTest extends MockeryTestCase $this->assertEquals('foo', $file->getFilename()); $this->assertEquals('path/to/foo', $file->getPathname()); $this->assertEquals('css', $file->getExtension()); - $this->assertInternalType('int', $file->getMTime()); + $this->assertTrue(is_int($file->getMTime())); } public function testCanMockInterface() @@ -423,7 +419,6 @@ class ContainerTest extends MockeryTestCase } /** - * @expectedException \Mockery\Exception * @group partial */ public function testThrowsExceptionIfSettingExpectationForNonMockedMethodOfPartialMock() @@ -431,15 +426,16 @@ class ContainerTest extends MockeryTestCase $this->markTestSkipped('For now...'); $m = mock('MockeryTest_PartialNormalClass[foo]'); $this->assertInstanceOf(MockeryTest_PartialNormalClass::class, $m); + $this->expectException(\Mockery\Exception::class); $m->shouldReceive('bar')->andReturn('cba'); } /** - * @expectedException \Mockery\Exception * @group partial */ public function testThrowsExceptionIfClassOrInterfaceForPartialMockDoesNotExist() { + $this->expectException(\Mockery\Exception::class); $m = mock('MockeryTest_PartialNormalClassXYZ[foo]'); } @@ -564,12 +560,12 @@ class ContainerTest extends MockeryTestCase /** * @group issue/7 - * @expectedException \Mockery\CountValidator\Exception */ public function testMockedStaticMethodsObeyMethodCounting() { $m = mock('alias:MyNamespace\MyClass3'); $m->shouldReceive('staticFoo')->once()->andReturn('bar'); + $this->expectException(\Mockery\CountValidator\Exception::class); Mockery::close(); } @@ -680,14 +676,12 @@ class ContainerTest extends MockeryTestCase $m->shouldReceive('foo')->once()->andReturn('bar'); } - /** - * @expectedException \Mockery\CountValidator\Exception - */ public function testInstantiationOfInstanceMocksAddsThemToContainerForVerification() { $m = mock('overload:MyNamespace\MyClass8'); $m->shouldReceive('foo')->once(); $instance = new MyNamespace\MyClass8; + $this->expectException(\Mockery\CountValidator\Exception::class); Mockery::close(); } @@ -701,9 +695,6 @@ class ContainerTest extends MockeryTestCase $instance2->foo(); } - /** - * @expectedException \Mockery\CountValidator\Exception - */ public function testInstantiationOfInstanceMocksDoesNotHaveCountValidatorCrossover2() { $m = mock('overload:MyNamespace\MyClass10'); @@ -711,6 +702,7 @@ class ContainerTest extends MockeryTestCase $instance1 = new MyNamespace\MyClass10; $instance2 = new MyNamespace\MyClass10; $instance1->foo(); + $this->expectException(\Mockery\CountValidator\Exception::class); Mockery::close(); } @@ -753,9 +745,6 @@ class ContainerTest extends MockeryTestCase new MyNamespace\MyClass14($params); } - /** - * @expectedException \Mockery\Exception\NoMatchingExpectationException - */ public function testInstantiationOfInstanceMockWithConstructorParameterValidationNegative() { $m = mock('overload:MyNamespace\MyClass15'); @@ -764,19 +753,18 @@ class ContainerTest extends MockeryTestCase ]; $m->shouldReceive('__construct')->with($params); + $this->expectException(\Mockery\Exception\NoMatchingExpectationException::class); new MyNamespace\MyClass15([]); } - /** - * @expectedException \Exception - * @expectedExceptionMessageRegExp /^instanceMock \d{3}$/ - */ public function testInstantiationOfInstanceMockWithConstructorParameterValidationException() { $m = mock('overload:MyNamespace\MyClass16'); $m->shouldReceive('__construct') ->andThrow(new \Exception('instanceMock '.rand(100, 999))); + $this->expectException(\Exception::class); + $this->expectExceptionMessageRegExp('/^instanceMock \d{3}$/'); new MyNamespace\MyClass16(); } @@ -1159,23 +1147,24 @@ class ContainerTest extends MockeryTestCase /** * @group issue/154 - * @expectedException InvalidArgumentException - * @expectedExceptionMessage protectedMethod() cannot be mocked as it is a protected method and mocking protected methods is not enabled for the currently used mock object. */ public function testShouldThrowIfAttemptingToStubProtectedMethod() { $mock = mock('MockeryTest_WithProtectedAndPrivate'); + + $this->expectException(\InvalidArgumentException::class); + $this->expectExceptionMessage('protectedMethod() cannot be mocked as it is a protected method and mocking protected methods is not enabled for the currently used mock object.'); $mock->shouldReceive("protectedMethod"); } /** * @group issue/154 - * @expectedException InvalidArgumentException - * @expectedExceptionMessage privateMethod() cannot be mocked as it is a private method */ public function testShouldThrowIfAttemptingToStubPrivateMethod() { $mock = mock('MockeryTest_WithProtectedAndPrivate'); + $this->expectException(\InvalidArgumentException::class); + $this->expectExceptionMessage('privateMethod() cannot be mocked as it is a private method'); $mock->shouldReceive("privateMethod"); } @@ -1197,32 +1186,26 @@ class ContainerTest extends MockeryTestCase /** * @test * @group issue/294 - * @expectedException Mockery\Exception\RuntimeException - * @expectedExceptionMessage Could not load mock DateTime, class already exists */ public function testThrowsWhenNamedMockClassExistsAndIsNotMockery() { $builder = new MockConfigurationBuilder(); $builder->setName("DateTime"); + $this->expectException(\Mockery\Exception\RuntimeException::class); + $this->expectExceptionMessage('Could not load mock DateTime, class already exists'); $mock = mock($builder); } - /** - * @expectedException Mockery\Exception\NoMatchingExpectationException - * @expectedExceptionMessage MyTestClass::foo(resource(...)) - */ public function testHandlesMethodWithArgumentExpectationWhenCalledWithResource() { $mock = mock('MyTestClass'); $mock->shouldReceive('foo')->with(array('yourself' => 21)); + $this->expectException(\Mockery\Exception\NoMatchingExpectationException::class); + $this->expectExceptionMessage('MyTestClass::foo(resource(...))'); $mock->foo(fopen('php://memory', 'r')); } - /** - * @expectedException Mockery\Exception\NoMatchingExpectationException - * @expectedExceptionMessage MyTestClass::foo(['myself' => [...]]) - */ public function testHandlesMethodWithArgumentExpectationWhenCalledWithCircularArray() { $testArray = array(); @@ -1231,13 +1214,11 @@ class ContainerTest extends MockeryTestCase $mock = mock('MyTestClass'); $mock->shouldReceive('foo')->with(array('yourself' => 21)); + $this->expectException(\Mockery\Exception\NoMatchingExpectationException::class); + $this->expectExceptionMessage("MyTestClass::foo(['myself' => [...]])"); $mock->foo($testArray); } - /** - * @expectedException Mockery\Exception\NoMatchingExpectationException - * @expectedExceptionMessage MyTestClass::foo(['a_scalar' => 2, 'an_array' => [...]]) - */ public function testHandlesMethodWithArgumentExpectationWhenCalledWithNestedArray() { $testArray = array(); @@ -1247,13 +1228,11 @@ class ContainerTest extends MockeryTestCase $mock = mock('MyTestClass'); $mock->shouldReceive('foo')->with(array('yourself' => 21)); + $this->expectException(\Mockery\Exception\NoMatchingExpectationException::class); + $this->expectExceptionMessage("MyTestClass::foo(['a_scalar' => 2, 'an_array' => [...]])"); $mock->foo($testArray); } - /** - * @expectedException Mockery\Exception\NoMatchingExpectationException - * @expectedExceptionMessage MyTestClass::foo(['a_scalar' => 2, 'an_object' => object(stdClass)]) - */ public function testHandlesMethodWithArgumentExpectationWhenCalledWithNestedObject() { $testArray = array(); @@ -1263,13 +1242,11 @@ class ContainerTest extends MockeryTestCase $mock = mock('MyTestClass'); $mock->shouldReceive('foo')->with(array('yourself' => 21)); + $this->expectException(\Mockery\Exception\NoMatchingExpectationException::class); + $this->expectExceptionMessage("MyTestClass::foo(['a_scalar' => 2, 'an_object' => object(stdClass)])"); $mock->foo($testArray); } - /** - * @expectedException Mockery\Exception\NoMatchingExpectationException - * @expectedExceptionMessage MyTestClass::foo(['a_scalar' => 2, 'a_closure' => object(Closure - */ public function testHandlesMethodWithArgumentExpectationWhenCalledWithNestedClosure() { $testArray = array(); @@ -1280,13 +1257,11 @@ class ContainerTest extends MockeryTestCase $mock = mock('MyTestClass'); $mock->shouldReceive('foo')->with(array('yourself' => 21)); + $this->expectException(\Mockery\Exception\NoMatchingExpectationException::class); + $this->expectExceptionMessage("MyTestClass::foo(['a_scalar' => 2, 'a_closure' => object(Closure"); $mock->foo($testArray); } - /** - * @expectedException Mockery\Exception\NoMatchingExpectationException - * @expectedExceptionMessage MyTestClass::foo(['a_scalar' => 2, 'a_resource' => resource(...)]) - */ public function testHandlesMethodWithArgumentExpectationWhenCalledWithNestedResource() { $testArray = array(); @@ -1296,6 +1271,8 @@ class ContainerTest extends MockeryTestCase $mock = mock('MyTestClass'); $mock->shouldReceive('foo')->with(array('yourself' => 21)); + $this->expectException(\Mockery\Exception\NoMatchingExpectationException::class); + $this->expectExceptionMessage("MyTestClass::foo(['a_scalar' => 2, 'a_resource' => resource(...)])"); $mock->foo($testArray); } diff --git a/vendor/mockery/mockery/tests/Mockery/DemeterChainTest.php b/vendor/mockery/mockery/tests/Mockery/DemeterChainTest.php index 9528d161..f50d5b57 100644 --- a/vendor/mockery/mockery/tests/Mockery/DemeterChainTest.php +++ b/vendor/mockery/mockery/tests/Mockery/DemeterChainTest.php @@ -30,12 +30,12 @@ class DemeterChainTest extends MockeryTestCase /** @var Mockery\Mock $this->mock */ private $mock; - public function setUp() + public function mockeryTestSetUp() { $this->mock = $this->mock = Mockery::mock()->shouldIgnoreMissing(); } - public function tearDown() + public function mockeryTestTearDown() { $this->mock->mockery_getContainer()->mockery_close(); } diff --git a/vendor/mockery/mockery/tests/Mockery/ExpectationTest.php b/vendor/mockery/mockery/tests/Mockery/ExpectationTest.php index faaaf58d..66797daf 100644 --- a/vendor/mockery/mockery/tests/Mockery/ExpectationTest.php +++ b/vendor/mockery/mockery/tests/Mockery/ExpectationTest.php @@ -25,15 +25,15 @@ use Mockery\MockInterface; class ExpectationTest extends MockeryTestCase { - public function setup() + public function mockeryTestSetUp() { - parent::setUp(); + parent::mockeryTestSetUp(); $this->mock = mock(); } - public function teardown() + public function mockeryTestTearDown() { - parent::tearDown(); + parent::mockeryTestTearDown(); \Mockery::getConfiguration()->allowMockingNonExistentMethods(true); } @@ -116,7 +116,7 @@ class ExpectationTest extends MockeryTestCase { $this->mock->bar = null; $this->mock->shouldReceive('foo')->set('bar', 'baz', 'bazz', 'bazzz'); - $this->assertAttributeEmpty('bar', $this->mock); + $this->assertTrue(empty($this->mock->bar)); $this->mock->foo(); $this->assertEquals('baz', $this->mock->bar); $this->mock->foo(); @@ -232,12 +232,10 @@ class ExpectationTest extends MockeryTestCase $this->assertEquals(3, $this->mock->foo()); } - /** - * @expectedException OutOfBoundsException - */ public function testThrowsException() { $this->mock->shouldReceive('foo')->andThrow(new OutOfBoundsException); + $this->expectException(OutOfBoundsException::class); $this->mock->foo(); Mockery::close(); } @@ -262,12 +260,10 @@ class ExpectationTest extends MockeryTestCase $this->mock->foo(); } - /** - * @expectedException OutOfBoundsException - */ public function testThrowsExceptionBasedOnArgs() { $this->mock->shouldReceive('foo')->andThrow('OutOfBoundsException'); + $this->expectException(OutOfBoundsException::class); $this->mock->foo(); Mockery::close(); } @@ -282,9 +278,6 @@ class ExpectationTest extends MockeryTestCase } } - /** - * @expectedException OutOfBoundsException - */ public function testThrowsExceptionSequentially() { $this->mock->shouldReceive('foo')->andThrow(new Exception)->andThrow(new OutOfBoundsException); @@ -292,6 +285,7 @@ class ExpectationTest extends MockeryTestCase $this->mock->foo(); } catch (Exception $e) { } + $this->expectException(OutOfBoundsException::class); $this->mock->foo(); Mockery::close(); } @@ -318,12 +312,10 @@ class ExpectationTest extends MockeryTestCase } } - /** - * @expectedException Mockery\Exception - * @expectedExceptionMessage You must pass an array of exception objects to andThrowExceptions - */ public function testAndThrowExceptionsCatchNonExceptionArgument() { + $this->expectException(\Mockery\Exception::class); + $this->expectExceptionMessage('You must pass an array of exception objects to andThrowExceptions'); $this->mock ->shouldReceive('foo') ->andThrowExceptions(array('NotAnException')); @@ -344,12 +336,10 @@ class ExpectationTest extends MockeryTestCase $this->mock->foo(); } - /** - * @expectedException \Mockery\Exception - */ public function testExpectsNoArgumentsThrowsExceptionIfAnyPassed() { $this->mock->shouldReceive('foo')->withNoArgs(); + $this->expectException(\Mockery\Exception::class); $this->mock->foo(1); Mockery::close(); } @@ -360,53 +350,43 @@ class ExpectationTest extends MockeryTestCase $this->mock->foo(1, 2); } - /** - * @expectedException \Mockery\Exception - */ public function testExpectsArgumentsArrayThrowsExceptionIfPassedEmptyArray() { $this->mock->shouldReceive('foo')->withArgs(array()); + $this->expectException(\Mockery\Exception::class); $this->mock->foo(1, 2); Mockery::close(); } - /** - * @expectedException \Mockery\Exception - */ public function testExpectsArgumentsArrayThrowsExceptionIfNoArgumentsPassed() { $this->mock->shouldReceive('foo')->with(); + $this->expectException(\Mockery\Exception::class); $this->mock->foo(1); Mockery::close(); } - /** - * @expectedException \Mockery\Exception - */ public function testExpectsArgumentsArrayThrowsExceptionIfPassedWrongArguments() { $this->mock->shouldReceive('foo')->withArgs(array(1, 2)); + $this->expectException(\Mockery\Exception::class); $this->mock->foo(3, 4); Mockery::close(); } - /** - * @expectedException \Mockery\Exception - * @expectedExceptionMessageRegExp /foo\(NULL\)/ - */ public function testExpectsStringArgumentExceptionMessageDifferentiatesBetweenNullAndEmptyString() { $this->mock->shouldReceive('foo')->withArgs(array('a string')); + $this->expectException(\Mockery\Exception::class); + $this->expectExceptionMessageRegExp('/foo\(NULL\)/'); $this->mock->foo(null); Mockery::close(); } - /** - * @expectedException \InvalidArgumentException - * @expectedExceptionMessageRegExp /invalid argument (.+), only array and closure are allowed/ - */ public function testExpectsArgumentsArrayThrowsExceptionIfPassedWrongArgumentType() { + $this->expectException(\InvalidArgumentException::class); + $this->expectExceptionMessageRegExp('/invalid argument (.+), only array and closure are allowed/'); $this->mock->shouldReceive('foo')->withArgs(5); Mockery::close(); } @@ -420,15 +400,13 @@ class ExpectationTest extends MockeryTestCase $this->mock->foo(1, 2); } - /** - * @expectedException \Mockery\Exception - */ public function testExpectsArgumentsArrayThrowsExceptionWhenClosureEvaluatesToFalse() { $closure = function ($odd, $even) { return ($odd % 2 != 0) && ($even % 2 == 0); }; $this->mock->shouldReceive('foo')->withArgs($closure); + $this->expectException(\Mockery\Exception::class); $this->mock->foo(4, 2); Mockery::close(); } @@ -459,9 +437,6 @@ class ExpectationTest extends MockeryTestCase $this->mock->foo(1, 4, 5); } - /** - * @expectedException \Mockery\Exception - */ public function testExpectsArgumentsArrayClosureThrowsExceptionIfOptionalArgumentsDontMatchTheExpectation() { $closure = function ($odd, $even, $sum = null) { @@ -472,6 +447,7 @@ class ExpectationTest extends MockeryTestCase return $result; }; $this->mock->shouldReceive('foo')->withArgs($closure); + $this->expectException(\Mockery\Exception::class); $this->mock->foo(1, 4, 2); Mockery::close(); } @@ -490,12 +466,10 @@ class ExpectationTest extends MockeryTestCase $this->mock->foo(new stdClass); } - /** - * @expectedException \Mockery\Exception - */ public function testThrowsExceptionOnNoArgumentMatch() { $this->mock->shouldReceive('foo')->with(1); + $this->expectException(\Mockery\Exception::class); $this->mock->foo(2); Mockery::close(); } @@ -510,32 +484,26 @@ class ExpectationTest extends MockeryTestCase $this->mock->shouldNotReceive('foo'); } - /** - * @expectedException \Mockery\Exception\InvalidCountException - */ public function testShouldNotReceiveThrowsExceptionIfMethodCalled() { $this->mock->shouldNotReceive('foo'); + $this->expectException(\Mockery\Exception\InvalidCountException::class); $this->mock->foo(); Mockery::close(); } - /** - * @expectedException \Mockery\Exception\InvalidCountException - */ public function testShouldNotReceiveWithArgumentThrowsExceptionIfMethodCalled() { $this->mock->shouldNotReceive('foo')->with(2); + $this->expectException(\Mockery\Exception\InvalidCountException::class); $this->mock->foo(2); Mockery::close(); } - /** - * @expectedException \Mockery\CountValidator\Exception - */ public function testNeverCalledThrowsExceptionOnCall() { $this->mock->shouldReceive('foo')->never(); + $this->expectException(\Mockery\CountValidator\Exception::class); $this->mock->foo(); Mockery::close(); } @@ -546,22 +514,18 @@ class ExpectationTest extends MockeryTestCase $this->mock->foo(); } - /** - * @expectedException \Mockery\CountValidator\Exception - */ public function testCalledOnceThrowsExceptionIfNotCalled() { + $this->expectException(\Mockery\CountValidator\Exception::class); $this->mock->shouldReceive('foo')->once(); Mockery::close(); } - /** - * @expectedException \Mockery\CountValidator\Exception - */ public function testCalledOnceThrowsExceptionIfCalledTwice() { $this->mock->shouldReceive('foo')->once(); $this->mock->foo(); + $this->expectException(\Mockery\CountValidator\Exception::class); $this->mock->foo(); Mockery::close(); } @@ -573,23 +537,19 @@ class ExpectationTest extends MockeryTestCase $this->mock->foo(); } - /** - * @expectedException \Mockery\CountValidator\Exception - */ public function testCalledTwiceThrowsExceptionIfNotCalled() { $this->mock->shouldReceive('foo')->twice(); + $this->expectException(\Mockery\CountValidator\Exception::class); Mockery::close(); } - /** - * @expectedException \Mockery\CountValidator\Exception - */ public function testCalledOnceThrowsExceptionIfCalledThreeTimes() { $this->mock->shouldReceive('foo')->twice(); $this->mock->foo(); $this->mock->foo(); + $this->expectException(\Mockery\CountValidator\Exception::class); $this->mock->foo(); Mockery::close(); } @@ -616,24 +576,20 @@ class ExpectationTest extends MockeryTestCase $this->mock->foo(); } - /** - * @expectedException \Mockery\CountValidator\Exception - */ public function testTimesCountCallThrowsExceptionOnTooFewCalls() { $this->mock->shouldReceive('foo')->times(2); $this->mock->foo(); + $this->expectException(\Mockery\CountValidator\Exception::class); Mockery::close(); } - /** - * @expectedException \Mockery\CountValidator\Exception - */ public function testTimesCountCallThrowsExceptionOnTooManyCalls() { $this->mock->shouldReceive('foo')->times(2); $this->mock->foo(); $this->mock->foo(); + $this->expectException(\Mockery\CountValidator\Exception::class); $this->mock->foo(); Mockery::close(); } @@ -652,13 +608,11 @@ class ExpectationTest extends MockeryTestCase $this->mock->foo(); } - /** - * @expectedException \Mockery\CountValidator\Exception - */ public function testCalledAtLeastThrowsExceptionOnTooFewCalls() { $this->mock->shouldReceive('foo')->atLeast()->twice(); $this->mock->foo(); + $this->expectException(\Mockery\CountValidator\Exception::class); Mockery::close(); } @@ -676,25 +630,21 @@ class ExpectationTest extends MockeryTestCase $this->mock->foo(); } - /** - * @expectedException \Mockery\CountValidator\Exception - */ public function testCalledAtLeastThrowsExceptionOnTooManyCalls() { $this->mock->shouldReceive('foo')->atMost()->twice(); $this->mock->foo(); $this->mock->foo(); + $this->expectException(\Mockery\CountValidator\Exception::class); $this->mock->foo(); Mockery::close(); } - /** - * @expectedException \Mockery\CountValidator\Exception - */ public function testExactCountersOverrideAnyPriorSetNonExactCounters() { $this->mock->shouldReceive('foo')->atLeast()->once()->once(); $this->mock->foo(); + $this->expectException(\Mockery\CountValidator\Exception::class); $this->mock->foo(); Mockery::close(); } @@ -712,22 +662,18 @@ class ExpectationTest extends MockeryTestCase $this->mock->foo(); } - /** - * @expectedException \Mockery\CountValidator\Exception - */ public function testComboOfLeastAndMostCallsThrowsExceptionAtTooFewCalls() { $this->mock->shouldReceive('foo')->atleast()->once()->atMost()->twice(); + $this->expectException(\Mockery\CountValidator\Exception::class); Mockery::close(); } - /** - * @expectedException \Mockery\CountValidator\Exception - */ public function testComboOfLeastAndMostCallsThrowsExceptionAtTooManyCalls() { $this->mock->shouldReceive('foo')->atleast()->once()->atMost()->twice(); $this->mock->foo(); + $this->expectException(\Mockery\CountValidator\Exception::class); $this->mock->foo(); $this->mock->foo(); Mockery::close(); @@ -744,9 +690,6 @@ class ExpectationTest extends MockeryTestCase $this->mock->foo(3); } - /** - * @expectedException \Mockery\CountValidator\Exception - */ public function testCallCountingThrowsExceptionOnAnyMismatch() { $this->mock->shouldReceive('foo')->with(1)->once(); @@ -757,12 +700,10 @@ class ExpectationTest extends MockeryTestCase $this->mock->foo(2); $this->mock->foo(3); $this->mock->bar(); + $this->expectException(\Mockery\CountValidator\Exception::class); Mockery::close(); } - /** - * @expectedException \Mockery\Exception\InvalidCountException - */ public function testCallCountingThrowsExceptionFirst() { $number_of_calls = 0; @@ -775,6 +716,7 @@ class ExpectationTest extends MockeryTestCase $this->mock->foo(1); $this->mock->foo(1); + $this->expectException(\Mockery\CountValidator\Exception::class); $this->mock->foo(1); Mockery::close(); } @@ -787,13 +729,11 @@ class ExpectationTest extends MockeryTestCase $this->mock->bar(); } - /** - * @expectedException \Mockery\Exception - */ public function testOrderedCallsWithOutOfOrderError() { $this->mock->shouldReceive('foo')->ordered(); $this->mock->shouldReceive('bar')->ordered(); + $this->expectException(\Mockery\Exception::class); $this->mock->bar(); $this->mock->foo(); Mockery::close(); @@ -807,13 +747,11 @@ class ExpectationTest extends MockeryTestCase $this->mock->foo(2); } - /** - * @expectedException \Mockery\Exception - */ public function testDifferentArgumentsAndOrderingsThrowExceptionWhenInWrongOrder() { $this->mock->shouldReceive('foo')->with(1)->ordered(); $this->mock->shouldReceive('foo')->with(2)->ordered(); + $this->expectException(\Mockery\Exception::class); $this->mock->foo(2); $this->mock->foo(1); Mockery::close(); @@ -839,13 +777,11 @@ class ExpectationTest extends MockeryTestCase $this->mock->bar(); } - /** - * @expectedException \Mockery\Exception - */ public function testOrderingOfDefaultGroupingThrowsExceptionOnWrongOrder() { $this->mock->shouldReceive('foo')->ordered(); $this->mock->shouldReceive('bar')->ordered(); + $this->expectException(\Mockery\Exception::class); $this->mock->bar(); $this->mock->foo(); Mockery::close(); @@ -889,13 +825,11 @@ class ExpectationTest extends MockeryTestCase $this->assertLessThan($e->getOrderNumber(), $m->getOrderNumber()); } - /** - * @expectedException \Mockery\Exception - */ public function testGroupedOrderingThrowsExceptionWhenCallsDisordered() { $this->mock->shouldReceive('foo')->ordered('first'); $this->mock->shouldReceive('bar')->ordered('second'); + $this->expectException(\Mockery\Exception::class); $this->mock->bar(); $this->mock->foo(); Mockery::close(); @@ -930,14 +864,12 @@ class ExpectationTest extends MockeryTestCase $this->mock->foo(); } - /** - * @expectedException \Mockery\Exception - */ public function testEnsuresOrderingIsCrossMockWhenGloballyFlagSet() { $this->mock->shouldReceive('foo')->globally()->ordered(); $mock2 = mock('bar'); $mock2->shouldReceive('bar')->globally()->ordered(); + $this->expectException(\Mockery\Exception::class); $mock2->bar(); $this->mock->foo(); Mockery::close(); @@ -1004,13 +936,11 @@ class ExpectationTest extends MockeryTestCase $this->assertEquals('bar', $this->mock->foo(1)); } - /** - * @expectedException \Mockery\Exception - */ public function testDefaultExpectationsCanBeOrdered() { $this->mock->shouldReceive('foo')->ordered()->byDefault(); $this->mock->shouldReceive('bar')->ordered()->byDefault(); + $this->expectException(\Mockery\Exception::class); $this->mock->bar(); $this->mock->foo(); Mockery::close(); @@ -1049,13 +979,11 @@ class ExpectationTest extends MockeryTestCase $this->assertEquals('newbar', $this->mock->foo('test')); } - /** - * @expectedException \Mockery\Exception - */ public function testByDefaultPreventedFromSettingDefaultWhenDefaultingExpectationWasReplaced() { $exp = $this->mock->shouldReceive('foo')->andReturn(1); $this->mock->shouldReceive('foo')->andReturn(2); + $this->expectException(\Mockery\Exception::class); $exp->byDefault(); Mockery::close(); } @@ -1087,12 +1015,10 @@ class ExpectationTest extends MockeryTestCase $this->mock->foo(1, 'str', 3, 4); } - /** - * @expectedException \Mockery\Exception - */ public function testAndAnyOtherConstraintDoesNotPreventMatchingOfRegularArguments() { $this->mock->shouldReceive('foo')->with(1, 2, Mockery::andAnyOthers()); + $this->expectException(\Mockery\Exception::class); $this->mock->foo(10, 2, 3, 4, 5); Mockery::close(); } @@ -1112,12 +1038,10 @@ class ExpectationTest extends MockeryTestCase $this->mock->foo(1, 2, 3); } - /** - * @expectedException \Mockery\Exception - */ public function testArrayConstraintThrowsExceptionWhenConstraintUnmatched() { $this->mock->shouldReceive('foo')->with(Mockery::type('array')); + $this->expectException(\Mockery\Exception::class); $this->mock->foo(1); Mockery::close(); } @@ -1137,12 +1061,10 @@ class ExpectationTest extends MockeryTestCase $this->mock->foo(1, 2, 3); } - /** - * @expectedException \Mockery\Exception - */ public function testBoolConstraintThrowsExceptionWhenConstraintUnmatched() { $this->mock->shouldReceive('foo')->with(Mockery::type('bool')); + $this->expectException(\Mockery\Exception::class); $this->mock->foo(1); Mockery::close(); } @@ -1164,12 +1086,10 @@ class ExpectationTest extends MockeryTestCase $this->mock->foo(1, 2, 3); } - /** - * @expectedException \Mockery\Exception - */ public function testCallableConstraintThrowsExceptionWhenConstraintUnmatched() { $this->mock->shouldReceive('foo')->with(Mockery::type('callable')); + $this->expectException(\Mockery\Exception::class); $this->mock->foo(1); Mockery::close(); } @@ -1189,12 +1109,10 @@ class ExpectationTest extends MockeryTestCase $this->mock->foo(1, 2, 3); } - /** - * @expectedException \Mockery\Exception - */ public function testDoubleConstraintThrowsExceptionWhenConstraintUnmatched() { $this->mock->shouldReceive('foo')->with(Mockery::type('double')); + $this->expectException(\Mockery\Exception::class); $this->mock->foo(1); Mockery::close(); } @@ -1214,12 +1132,10 @@ class ExpectationTest extends MockeryTestCase $this->mock->foo(1, 2, 3); } - /** - * @expectedException \Mockery\Exception - */ public function testFloatConstraintThrowsExceptionWhenConstraintUnmatched() { $this->mock->shouldReceive('foo')->with(Mockery::type('float')); + $this->expectException(\Mockery\Exception::class); $this->mock->foo(1); Mockery::close(); } @@ -1239,12 +1155,10 @@ class ExpectationTest extends MockeryTestCase $this->mock->foo(1, 2, 3); } - /** - * @expectedException \Mockery\Exception - */ public function testIntConstraintThrowsExceptionWhenConstraintUnmatched() { $this->mock->shouldReceive('foo')->with(Mockery::type('int')); + $this->expectException(\Mockery\Exception::class); $this->mock->foo('f'); Mockery::close(); } @@ -1264,12 +1178,10 @@ class ExpectationTest extends MockeryTestCase $this->mock->foo(1, 2, 3); } - /** - * @expectedException \Mockery\Exception - */ public function testLongConstraintThrowsExceptionWhenConstraintUnmatched() { $this->mock->shouldReceive('foo')->with(Mockery::type('long')); + $this->expectException(\Mockery\Exception::class); $this->mock->foo('f'); Mockery::close(); } @@ -1289,12 +1201,10 @@ class ExpectationTest extends MockeryTestCase $this->mock->foo(1, 2, 3); } - /** - * @expectedException \Mockery\Exception - */ public function testNullConstraintThrowsExceptionWhenConstraintUnmatched() { $this->mock->shouldReceive('foo')->with(Mockery::type('null')); + $this->expectException(\Mockery\Exception::class); $this->mock->foo('f'); Mockery::close(); } @@ -1314,12 +1224,10 @@ class ExpectationTest extends MockeryTestCase $this->mock->foo(1, 2, 3); } - /** - * @expectedException \Mockery\Exception - */ public function testNumericConstraintThrowsExceptionWhenConstraintUnmatched() { $this->mock->shouldReceive('foo')->with(Mockery::type('numeric')); + $this->expectException(\Mockery\Exception::class); $this->mock->foo('f'); Mockery::close(); } @@ -1339,12 +1247,10 @@ class ExpectationTest extends MockeryTestCase $this->mock->foo(1, 2, 3); } - /** - * @expectedException \Mockery\Exception - */ public function testObjectConstraintThrowsExceptionWhenConstraintUnmatched() { $this->mock->shouldReceive('foo')->with(Mockery::type('object')); + $this->expectException(\Mockery\Exception::class); $this->mock->foo('f'); Mockery::close(); } @@ -1364,12 +1270,10 @@ class ExpectationTest extends MockeryTestCase $this->mock->foo(1, 2, 3); } - /** - * @expectedException \Mockery\Exception - */ public function testRealConstraintThrowsExceptionWhenConstraintUnmatched() { $this->mock->shouldReceive('foo')->with(Mockery::type('real')); + $this->expectException(\Mockery\Exception::class); $this->mock->foo('f'); Mockery::close(); } @@ -1390,12 +1294,10 @@ class ExpectationTest extends MockeryTestCase $this->mock->foo(1, 2, 3); } - /** - * @expectedException \Mockery\Exception - */ public function testResourceConstraintThrowsExceptionWhenConstraintUnmatched() { $this->mock->shouldReceive('foo')->with(Mockery::type('resource')); + $this->expectException(\Mockery\Exception::class); $this->mock->foo('f'); Mockery::close(); } @@ -1415,12 +1317,10 @@ class ExpectationTest extends MockeryTestCase $this->mock->foo(1, 2, 3); } - /** - * @expectedException \Mockery\Exception - */ public function testScalarConstraintThrowsExceptionWhenConstraintUnmatched() { $this->mock->shouldReceive('foo')->with(Mockery::type('scalar')); + $this->expectException(\Mockery\Exception::class); $this->mock->foo(array()); Mockery::close(); } @@ -1440,12 +1340,10 @@ class ExpectationTest extends MockeryTestCase $this->mock->foo(1, 2, 3); } - /** - * @expectedException \Mockery\Exception - */ public function testStringConstraintThrowsExceptionWhenConstraintUnmatched() { $this->mock->shouldReceive('foo')->with(Mockery::type('string')); + $this->expectException(\Mockery\Exception::class); $this->mock->foo(1); Mockery::close(); } @@ -1465,12 +1363,10 @@ class ExpectationTest extends MockeryTestCase $this->mock->foo(1, 2, 3); } - /** - * @expectedException \Mockery\Exception - */ public function testClassConstraintThrowsExceptionWhenConstraintUnmatched() { $this->mock->shouldReceive('foo')->with(Mockery::type('stdClass')); + $this->expectException(\Mockery\Exception::class); $this->mock->foo(new Exception); Mockery::close(); } @@ -1490,12 +1386,10 @@ class ExpectationTest extends MockeryTestCase $this->mock->foo(1, 2, 3); } - /** - * @expectedException \Mockery\Exception - */ public function testDucktypeConstraintThrowsExceptionWhenConstraintUnmatched() { $this->mock->shouldReceive('foo')->with(Mockery::ducktype('quack', 'swim')); + $this->expectException(\Mockery\Exception::class); $this->mock->foo(new Mockery_Duck_Nonswimmer); Mockery::close(); } @@ -1515,12 +1409,10 @@ class ExpectationTest extends MockeryTestCase $this->mock->foo(1, 2, 3); } - /** - * @expectedException \Mockery\Exception - */ public function testArrayContentConstraintThrowsExceptionWhenConstraintUnmatched() { $this->mock->shouldReceive('foo')->with(Mockery::subset(array('a'=>1, 'b'=>2))); + $this->expectException(\Mockery\Exception::class); $this->mock->foo(array('a'=>1, 'c'=>3)); Mockery::close(); } @@ -1540,12 +1432,10 @@ class ExpectationTest extends MockeryTestCase $this->mock->foo(1, 2, 3); } - /** - * @expectedException \Mockery\Exception - */ public function testContainsConstraintThrowsExceptionWhenConstraintUnmatched() { $this->mock->shouldReceive('foo')->with(Mockery::contains(1, 2)); + $this->expectException(\Mockery\Exception::class); $this->mock->foo(array('a'=>1, 'c'=>3)); Mockery::close(); } @@ -1565,12 +1455,10 @@ class ExpectationTest extends MockeryTestCase $this->mock->foo(1, array('a'=>1), 3); } - /** - * @expectedException \Mockery\Exception - */ public function testHasKeyConstraintThrowsExceptionWhenConstraintUnmatched() { $this->mock->shouldReceive('foo')->with(Mockery::hasKey('c')); + $this->expectException(\Mockery\Exception::class); $this->mock->foo(array('a'=>1, 'b'=>3)); Mockery::close(); } @@ -1590,12 +1478,10 @@ class ExpectationTest extends MockeryTestCase $this->mock->foo(1, array('a'=>1), 3); } - /** - * @expectedException \Mockery\Exception - */ public function testHasValueConstraintThrowsExceptionWhenConstraintUnmatched() { $this->mock->shouldReceive('foo')->with(Mockery::hasValue(2)); + $this->expectException(\Mockery\Exception::class); $this->mock->foo(array('a'=>1, 'b'=>3)); Mockery::close(); } @@ -1618,15 +1504,13 @@ class ExpectationTest extends MockeryTestCase $this->mock->foo([4, 5]); } - /** - * @expectedException \Mockery\Exception - */ public function testOnConstraintThrowsExceptionWhenConstraintUnmatched_ClosureEvaluatesToFalse() { $function = function ($arg) { return $arg % 2 == 0; }; $this->mock->shouldReceive('foo')->with(Mockery::on($function)); + $this->expectException(\Mockery\Exception::class); $this->mock->foo(5); Mockery::close(); } @@ -1646,12 +1530,10 @@ class ExpectationTest extends MockeryTestCase $this->mock->foo(1, 2, 3); } - /** - * @expectedException \Mockery\Exception - */ public function testMustBeConstraintThrowsExceptionWhenConstraintUnmatched() { $this->mock->shouldReceive('foo')->with(Mockery::mustBe(2)); + $this->expectException(\Mockery\Exception::class); $this->mock->foo('2'); Mockery::close(); } @@ -1677,9 +1559,6 @@ class ExpectationTest extends MockeryTestCase $this->mock->foo(1, $a, 3); } - /** - * @expectedException \Mockery\Exception - */ public function testMustBeConstraintThrowsExceptionWhenConstraintUnmatchedWithObject() { $a = new stdClass; @@ -1687,6 +1566,7 @@ class ExpectationTest extends MockeryTestCase $b = new stdClass; $b->foo = 2; $this->mock->shouldReceive('foo')->with(Mockery::mustBe($a)); + $this->expectException(\Mockery\Exception::class); $this->mock->foo($b); Mockery::close(); } @@ -1736,8 +1616,8 @@ class ExpectationTest extends MockeryTestCase public function testShouldIgnoreMissingAsDefinedProxiesToUndefinedAllowingToString() { $this->mock->shouldIgnoreMissing()->asUndefined(); - $this->assertInternalType('string', "{$this->mock->g()}"); - $this->assertInternalType('string', "{$this->mock}"); + $this->assertTrue(is_string("{$this->mock->g()}")); + $this->assertTrue(is_string("{$this->mock}")); } public function testShouldIgnoreMissingDefaultReturnValue() @@ -1780,12 +1660,10 @@ class ExpectationTest extends MockeryTestCase $this->mock->foo(1, 2, 3); } - /** - * @expectedException \Mockery\Exception - */ public function testNotConstraintThrowsExceptionWhenConstraintUnmatched() { $this->mock->shouldReceive('foo')->with(Mockery::not(2)); + $this->expectException(\Mockery\Exception::class); $this->mock->foo(2); Mockery::close(); } @@ -1806,31 +1684,25 @@ class ExpectationTest extends MockeryTestCase $this->mock->foo(1, 2, 3); } - /** - * @expectedException \Mockery\Exception - */ public function testAnyOfConstraintThrowsExceptionWhenConstraintUnmatched() { $this->mock->shouldReceive('foo')->with(Mockery::anyOf(1, 2)); + $this->expectException(\Mockery\Exception::class); $this->mock->foo(3); Mockery::close(); } - /** - * @expectedException \Mockery\Exception - */ public function testAnyOfConstraintThrowsExceptionWhenTrueIsNotAnExpectedArgument() { $this->mock->shouldReceive('foo')->with(Mockery::anyOf(1, 2)); + $this->expectException(\Mockery\Exception::class); $this->mock->foo(true); } - /** - * @expectedException \Mockery\Exception - */ public function testAnyOfConstraintThrowsExceptionWhenFalseIsNotAnExpectedArgument() { $this->mock->shouldReceive('foo')->with(Mockery::anyOf(0, 1, 2)); + $this->expectException(\Mockery\Exception::class); $this->mock->foo(false); } @@ -1849,12 +1721,10 @@ class ExpectationTest extends MockeryTestCase $this->mock->foo(1, 4, 3); } - /** - * @expectedException \Mockery\Exception - */ public function testNotAnyOfConstraintThrowsExceptionWhenConstraintUnmatched() { $this->mock->shouldReceive('foo')->with(Mockery::notAnyOf(1, 2)); + $this->expectException(\Mockery\Exception::class); $this->mock->foo(2); Mockery::close(); } @@ -1872,46 +1742,38 @@ class ExpectationTest extends MockeryTestCase $this->mock->foo('bar'); } - /** - * @expectedException \Mockery\Exception - */ public function testPatternConstraintThrowsExceptionWhenConstraintUnmatched() { $this->mock->shouldReceive('foo')->with(Mockery::pattern('/foo.*/')); + $this->expectException(\Mockery\Exception::class); $this->mock->foo('bar'); Mockery::close(); } - /** - * @expectedException \Mockery\Exception - */ public function testGlobalConfigMayForbidMockingNonExistentMethodsOnClasses() { \Mockery::getConfiguration()->allowMockingNonExistentMethods(false); $mock = mock('stdClass'); + $this->expectException(\Mockery\Exception::class); $mock->shouldReceive('foo'); Mockery::close(); } - /** - * @expectedException \Mockery\Exception - * @expectedExceptionMessage Mockery can't find 'SomeMadeUpClass' so can't mock it - */ public function testGlobalConfigMayForbidMockingNonExistentMethodsOnAutoDeclaredClasses() { \Mockery::getConfiguration()->allowMockingNonExistentMethods(false); + $this->expectException(\Mockery\Exception::class); + $this->expectExceptionMessage("Mockery can't find 'SomeMadeUpClass' so can't mock it"); $mock = mock('SomeMadeUpClass'); $mock->shouldReceive('foo'); Mockery::close(); } - /** - * @expectedException \Mockery\Exception - */ public function testGlobalConfigMayForbidMockingNonExistentMethodsOnObjects() { \Mockery::getConfiguration()->allowMockingNonExistentMethods(false); $mock = mock(new stdClass); + $this->expectException(\Mockery\Exception::class); $mock->shouldReceive('foo'); Mockery::close(); } @@ -2065,11 +1927,9 @@ class ExpectationTest extends MockeryTestCase $this->assertEquals($this->mock->foo(), 'blue'); } - /** - * @expectedException \InvalidArgumentException - */ public function testTimesExpectationForbidsFloatNumbers() { + $this->expectException(\InvalidArgumentException::class); $this->mock->shouldReceive('foo')->times(1.3); Mockery::close(); } @@ -2108,13 +1968,11 @@ class ExpectationTest extends MockeryTestCase $this->assertFalse($waterMock->mockery_isAnonymous()); } - /** - * @expectedException \Mockery\Exception - */ public function testWetherMockWithInterfaceOnlyCanNotImplementNonExistingMethods() { \Mockery::getConfiguration()->allowMockingNonExistentMethods(false); $waterMock = \Mockery::mock('IWater'); + $this->expectException(\Mockery\Exception::class); $waterMock ->shouldReceive('nonExistentMethod') ->once() diff --git a/vendor/mockery/mockery/tests/Mockery/Fixtures/MethodWithHHVMReturnType.php b/vendor/mockery/mockery/tests/Mockery/Fixtures/MethodWithHHVMReturnType.php index ff089b78..78039a54 100644 --- a/vendor/mockery/mockery/tests/Mockery/Fixtures/MethodWithHHVMReturnType.php +++ b/vendor/mockery/mockery/tests/Mockery/Fixtures/MethodWithHHVMReturnType.php @@ -30,9 +30,9 @@ class MethodWithHHVMReturnType extends MockeryTestCase return array('key' => true); } - public function HHVMVoid() : ?void + public function HHVMVoid() : void { - return null; + return; } public function HHVMMixed() : mixed diff --git a/vendor/mockery/mockery/tests/Mockery/Generator/MockConfigurationTest.php b/vendor/mockery/mockery/tests/Mockery/Generator/MockConfigurationTest.php index d32ac581..75f1f013 100644 --- a/vendor/mockery/mockery/tests/Mockery/Generator/MockConfigurationTest.php +++ b/vendor/mockery/mockery/tests/Mockery/Generator/MockConfigurationTest.php @@ -110,10 +110,10 @@ class MockConfigurationTest extends TestCase /** * @test - * @expectedException Mockery\Exception */ public function shouldThrowIfTargetClassIsFinal() { + $this->expectException(\Mockery\Exception::class); $config = new MockConfiguration(array("Mockery\\Generator\\TestFinal")); $config->getTargetClass(); } diff --git a/vendor/mockery/mockery/tests/Mockery/Generator/StringManipulation/Pass/CallTypeHintPassTest.php b/vendor/mockery/mockery/tests/Mockery/Generator/StringManipulation/Pass/CallTypeHintPassTest.php index 6ce54e96..e5f33d27 100644 --- a/vendor/mockery/mockery/tests/Mockery/Generator/StringManipulation/Pass/CallTypeHintPassTest.php +++ b/vendor/mockery/mockery/tests/Mockery/Generator/StringManipulation/Pass/CallTypeHintPassTest.php @@ -41,7 +41,7 @@ class CallTypeHintPassTest extends TestCase "requiresCallTypeHintRemoval" => true, ))->makePartial(); $code = $pass->apply(static::CODE, $config); - $this->assertContains('__call($method, $args)', $code); + $this->assertTrue(\mb_strpos($code, '__call($method, $args)') !== false); } /** @@ -54,6 +54,6 @@ class CallTypeHintPassTest extends TestCase "requiresCallStaticTypeHintRemoval" => true, ))->makePartial(); $code = $pass->apply(static::CODE, $config); - $this->assertContains('__callStatic($method, $args)', $code); + $this->assertTrue(\mb_strpos($code, '__callStatic($method, $args)') !== false); } } diff --git a/vendor/mockery/mockery/tests/Mockery/Generator/StringManipulation/Pass/ClassNamePassTest.php b/vendor/mockery/mockery/tests/Mockery/Generator/StringManipulation/Pass/ClassNamePassTest.php index d9209b86..55a9b33a 100644 --- a/vendor/mockery/mockery/tests/Mockery/Generator/StringManipulation/Pass/ClassNamePassTest.php +++ b/vendor/mockery/mockery/tests/Mockery/Generator/StringManipulation/Pass/ClassNamePassTest.php @@ -21,16 +21,14 @@ namespace Mockery\Generator\StringManipulation\Pass; -use Mockery as m; +use Mockery\Adapter\Phpunit\MockeryTestCase; use Mockery\Generator\MockConfiguration; -use Mockery\Generator\StringManipulation\Pass\ClassNamePass; -use PHPUnit\Framework\TestCase; -class ClassNamePassTest extends TestCase +class ClassNamePassTest extends MockeryTestCase { const CODE = "namespace Mockery; class Mock {}"; - public function setup() + public function mockeryTestSetUp() { $this->pass = new ClassNamePass(); } @@ -42,7 +40,7 @@ class ClassNamePassTest extends TestCase { $config = new MockConfiguration(array(), array(), array(), "Dave\Dave"); $code = $this->pass->apply(static::CODE, $config); - $this->assertNotContains('namespace Mockery;', $code); + $this->assertTrue(\mb_strpos($code, 'namespace Mockery;') === false); } /** @@ -52,8 +50,8 @@ class ClassNamePassTest extends TestCase { $config = new MockConfiguration(array(), array(), array(), "Dave\Dave"); $code = $this->pass->apply(static::CODE, $config); - $this->assertNotContains('namespace Mockery;', $code); - $this->assertContains('namespace Dave;', $code); + $this->assertTrue(\mb_strpos($code, 'namespace Mockery;') === false); + $this->assertTrue(\mb_strpos($code, 'namespace Dave;') !== false); } /** @@ -63,7 +61,7 @@ class ClassNamePassTest extends TestCase { $config = new MockConfiguration(array(), array(), array(), "Dave"); $code = $this->pass->apply(static::CODE, $config); - $this->assertContains('class Dave', $code); + $this->assertTrue(\mb_strpos($code, 'class Dave') !== false); } /** @@ -73,6 +71,6 @@ class ClassNamePassTest extends TestCase { $config = new MockConfiguration(array(), array(), array(), "\Dave\Dave"); $code = $this->pass->apply(static::CODE, $config); - $this->assertContains('namespace Dave;', $code); + $this->assertTrue(\mb_strpos($code, 'namespace Dave;') !== false); } } diff --git a/vendor/mockery/mockery/tests/Mockery/Generator/StringManipulation/Pass/ClassPassTest.php b/vendor/mockery/mockery/tests/Mockery/Generator/StringManipulation/Pass/ClassPassTest.php new file mode 100644 index 00000000..eef68be7 --- /dev/null +++ b/vendor/mockery/mockery/tests/Mockery/Generator/StringManipulation/Pass/ClassPassTest.php @@ -0,0 +1,59 @@ +pass = new ClassPass(); + } + + /** + * @test + */ + public function shouldDeclareUnknownClass() + { + $config = new MockConfiguration(array("Testing\TestClass"), array(), array(), "Dave\Dave"); + $code = $this->pass->apply(static::CODE, $config); + $this->assertTrue(\mb_strpos($code, 'class Mock extends \Testing\TestClass implements MockInterface') !== false); + } + + /** + * @test + */ + public function shouldNotExtendHHVMClass() + { + $config = new MockConfiguration(array("\HH\\this"), array(), array(), "Dave\Dave"); + $code = $this->pass->apply(static::CODE, $config); + if (\defined('HHVM_VERSION')) { + $this->assertNotContains('extends \HH\this', $code); + } else { + $this->assertSame('class Mock extends \HH\this implements MockInterface {}', $code); + } + } +} diff --git a/vendor/mockery/mockery/tests/Mockery/Generator/StringManipulation/Pass/ConstantsPassTest.php b/vendor/mockery/mockery/tests/Mockery/Generator/StringManipulation/Pass/ConstantsPassTest.php index ae907bca..4a2b7c5c 100644 --- a/vendor/mockery/mockery/tests/Mockery/Generator/StringManipulation/Pass/ConstantsPassTest.php +++ b/vendor/mockery/mockery/tests/Mockery/Generator/StringManipulation/Pass/ConstantsPassTest.php @@ -47,6 +47,6 @@ class ConstantsPassTest extends TestCase ['ClassWithConstants' => ['FOO' => 'test']] ); $code = $pass->apply(static::CODE, $config); - $this->assertContains("const FOO = 'test'", $code); + $this->assertTrue(\mb_strpos($code, "const FOO = 'test'") !== false); } } diff --git a/vendor/mockery/mockery/tests/Mockery/Generator/StringManipulation/Pass/InstanceMockPassTest.php b/vendor/mockery/mockery/tests/Mockery/Generator/StringManipulation/Pass/InstanceMockPassTest.php index 94be5266..bd02f1f3 100644 --- a/vendor/mockery/mockery/tests/Mockery/Generator/StringManipulation/Pass/InstanceMockPassTest.php +++ b/vendor/mockery/mockery/tests/Mockery/Generator/StringManipulation/Pass/InstanceMockPassTest.php @@ -38,8 +38,8 @@ class InstanceMockPassTest extends TestCase $config = $builder->getMockConfiguration(); $pass = new InstanceMockPass; $code = $pass->apply('class Dave { }', $config); - $this->assertContains('public function __construct', $code); - $this->assertContains('protected $_mockery_ignoreVerification', $code); - $this->assertContains('this->_mockery_constructorCalled(func_get_args());', $code); + $this->assertTrue(\mb_strpos($code, 'public function __construct') !== false); + $this->assertTrue(\mb_strpos($code, 'protected $_mockery_ignoreVerification') !== false); + $this->assertTrue(\mb_strpos($code, 'this->_mockery_constructorCalled(func_get_args());') !== false); } } diff --git a/vendor/mockery/mockery/tests/Mockery/Generator/StringManipulation/Pass/InterfacePassTest.php b/vendor/mockery/mockery/tests/Mockery/Generator/StringManipulation/Pass/InterfacePassTest.php index 99301652..01c5beee 100644 --- a/vendor/mockery/mockery/tests/Mockery/Generator/StringManipulation/Pass/InterfacePassTest.php +++ b/vendor/mockery/mockery/tests/Mockery/Generator/StringManipulation/Pass/InterfacePassTest.php @@ -61,6 +61,6 @@ class InterfacePassTest extends TestCase $code = $pass->apply(static::CODE, $config); - $this->assertContains("implements MockInterface, \Dave\Dave, \Paddy\Paddy", $code); + $this->assertTrue(\mb_strpos($code, "implements MockInterface, \Dave\Dave, \Paddy\Paddy") !== false); } } diff --git a/vendor/mockery/mockery/tests/Mockery/GlobalHelpersTest.php b/vendor/mockery/mockery/tests/Mockery/GlobalHelpersTest.php index 0f2b7c4a..3bf52d43 100644 --- a/vendor/mockery/mockery/tests/Mockery/GlobalHelpersTest.php +++ b/vendor/mockery/mockery/tests/Mockery/GlobalHelpersTest.php @@ -18,16 +18,16 @@ * @license http://github.com/padraic/mockery/blob/master/LICENSE New BSD License */ -use PHPUnit\Framework\TestCase; +use Mockery\Adapter\Phpunit\MockeryTestCase; -class GlobalHelpersTest extends TestCase +class GlobalHelpersTest extends MockeryTestCase { - public function setup() + public function mockeryTestSetUp() { \Mockery::globalHelpers(); } - public function tearDown() + public function mockeryTestTearDown() { \Mockery::close(); } diff --git a/vendor/mockery/mockery/tests/Mockery/HamcrestExpectationTest.php b/vendor/mockery/mockery/tests/Mockery/HamcrestExpectationTest.php index 659397c0..e7f793d7 100644 --- a/vendor/mockery/mockery/tests/Mockery/HamcrestExpectationTest.php +++ b/vendor/mockery/mockery/tests/Mockery/HamcrestExpectationTest.php @@ -23,17 +23,17 @@ use Mockery\Adapter\Phpunit\MockeryTestCase; class HamcrestExpectationTest extends MockeryTestCase { - public function setUp() + public function mockeryTestSetUp() { - parent::setUp(); + parent::mockeryTestSetUp(); $this->mock = mock('foo'); } - public function tearDown() + public function mockeryTestTearDown() { \Mockery::getConfiguration()->allowMockingNonExistentMethods(true); - parent::tearDown(); + parent::mockeryTestTearDown(); } /** Just a quickie roundup of a few Hamcrest matchers to check nothing obvious out of place **/ @@ -50,12 +50,10 @@ class HamcrestExpectationTest extends MockeryTestCase $this->mock->foo(2); } - /** - * @expectedException Mockery\Exception - */ public function testGreaterThanConstraintNotMatchesArgument() { $this->mock->shouldReceive('foo')->with(greaterThan(1)); + $this->expectException(\Mockery\Exception::class); $this->mock->foo(1); Mockery::close(); } diff --git a/vendor/mockery/mockery/tests/Mockery/Matcher/PHPUnitConstraintTest.php b/vendor/mockery/mockery/tests/Mockery/Matcher/PHPUnitConstraintTest.php index 3136c7f8..e66d01a1 100644 --- a/vendor/mockery/mockery/tests/Mockery/Matcher/PHPUnitConstraintTest.php +++ b/vendor/mockery/mockery/tests/Mockery/Matcher/PHPUnitConstraintTest.php @@ -19,11 +19,11 @@ * @license http://github.com/padraic/mockery/blob/master/LICENSE New BSD License */ +use Mockery\Adapter\Phpunit\MockeryTestCase; use Mockery\MockInterface; use Mockery\Matcher\PHPUnitConstraint; -use PHPUnit\Framework\TestCase; -class PHPUnitConstraintTest extends TestCase +class PHPUnitConstraintTest extends MockeryTestCase { /** @var PHPUnitConstraint */ protected $matcher; @@ -32,7 +32,7 @@ class PHPUnitConstraintTest extends TestCase /** @var MockInterface */ protected $constraint; - public function setUp() + public function mockeryTestSetUp() { /* * Revise by PHPUnit version diff --git a/vendor/mockery/mockery/tests/Mockery/MockClassWithFinalWakeupTest.php b/vendor/mockery/mockery/tests/Mockery/MockClassWithFinalWakeupTest.php index f84b30d3..e2c98f45 100644 --- a/vendor/mockery/mockery/tests/Mockery/MockClassWithFinalWakeupTest.php +++ b/vendor/mockery/mockery/tests/Mockery/MockClassWithFinalWakeupTest.php @@ -25,12 +25,12 @@ use Mockery\Adapter\Phpunit\MockeryTestCase; class MockClassWithFinalWakeupTest extends MockeryTestCase { - protected function setUp() + protected function mockeryTestSetUp() { $this->container = new \Mockery\Container; } - protected function tearDown() + protected function mockeryTestTearDown() { $this->container->mockery_close(); } diff --git a/vendor/mockery/mockery/tests/Mockery/MockClassWithMethodOverloadingTest.php b/vendor/mockery/mockery/tests/Mockery/MockClassWithMethodOverloadingTest.php index b0284dc0..98e0203e 100644 --- a/vendor/mockery/mockery/tests/Mockery/MockClassWithMethodOverloadingTest.php +++ b/vendor/mockery/mockery/tests/Mockery/MockClassWithMethodOverloadingTest.php @@ -6,15 +6,14 @@ use Mockery\Adapter\Phpunit\MockeryTestCase; class MockClassWithMethodOverloadingTest extends MockeryTestCase { - /** - * @expectedException BadMethodCallException - */ public function testCreateMockForClassWithMethodOverloading() { $mock = mock('test\Mockery\TestWithMethodOverloading') ->makePartial(); $this->assertInstanceOf('test\Mockery\TestWithMethodOverloading', $mock); + $this->expectException(\BadMethodCallException::class); + // TestWithMethodOverloading::__call wouldn't be used. See Gotchas!. $mock->randomMethod(); } diff --git a/vendor/mockery/mockery/tests/Mockery/MockTest.php b/vendor/mockery/mockery/tests/Mockery/MockTest.php index 15b4b7be..3bc575a3 100644 --- a/vendor/mockery/mockery/tests/Mockery/MockTest.php +++ b/vendor/mockery/mockery/tests/Mockery/MockTest.php @@ -43,6 +43,16 @@ class Mockery_MockTest extends MockeryTestCase \Mockery::getConfiguration()->allowMockingNonExistentMethods(true); } + public function testProtectedMethodMockWithNotAllowingMockingOfNonExistentMethodsWhenShouldAllowMockingProtectedMethodsIsCalled() + { + \Mockery::getConfiguration()->allowMockingNonExistentMethods(false); + $m = mock('ClassWithProtectedMethod'); + $m->shouldAllowMockingProtectedMethods(); + $m->shouldReceive('foo')->andReturn(true); + assertThat($m->foo(), equalTo(true)); + \Mockery::getConfiguration()->allowMockingNonExistentMethods(true); + } + public function testShouldAllowMockingMethodReturnsMockInstance() { $m = Mockery::mock('someClass'); @@ -82,23 +92,19 @@ class Mockery_MockTest extends MockeryTestCase $this->assertNull($mock->nonExistingMethod()); } - /** - * @expectedException Mockery\Exception - */ public function testShouldIgnoreMissingDisallowMockingNonExistentMethodsUsingGlobalConfiguration() { Mockery::getConfiguration()->allowMockingNonExistentMethods(false); $mock = mock('ClassWithMethods')->shouldIgnoreMissing(); + $this->expectException(\Mockery\Exception::class); $mock->shouldReceive('nonExistentMethod'); } - /** - * @expectedException BadMethodCallException - */ public function testShouldIgnoreMissingCallingNonExistentMethodsUsingGlobalConfiguration() { Mockery::getConfiguration()->allowMockingNonExistentMethods(false); $mock = mock('ClassWithMethods')->shouldIgnoreMissing(); + $this->expectException(\BadMethodCallException::class); $mock->nonExistentMethod(); } @@ -147,11 +153,9 @@ class Mockery_MockTest extends MockeryTestCase $mock->shouldReceive(""); } - /** - * @expectedException Mockery\Exception - */ public function testShouldThrowExceptionWithInvalidClassName() { + $this->expectException(\Mockery\Exception::class); mock('ClassName.CannotContainDot'); } @@ -217,3 +221,11 @@ class ClassWithMethods return 'bar'; } } + +class ClassWithProtectedMethod +{ + protected function foo() + { + return 'foo'; + } +} diff --git a/vendor/mockery/mockery/tests/Mockery/MockingHHVMMethodsTest.php b/vendor/mockery/mockery/tests/Mockery/MockingHHVMMethodsTest.php index 7377f160..d1a47c6d 100644 --- a/vendor/mockery/mockery/tests/Mockery/MockingHHVMMethodsTest.php +++ b/vendor/mockery/mockery/tests/Mockery/MockingHHVMMethodsTest.php @@ -32,13 +32,13 @@ class MockingHHVMMethodsTest extends MockeryTestCase */ private $container; - protected function setUp() + protected function mockeryTestSetUp() { if (!$this->isHHVM()) { $this->markTestSkipped('For HHVM test only'); } - parent::setUp(); + parent::mockeryTestSetUp(); require_once __DIR__."/Fixtures/MethodWithHHVMReturnType.php"; } diff --git a/vendor/mockery/mockery/tests/Mockery/MockingNullableMethodsTest.php b/vendor/mockery/mockery/tests/Mockery/MockingNullableMethodsTest.php index 9b7bdc24..0e536d65 100644 --- a/vendor/mockery/mockery/tests/Mockery/MockingNullableMethodsTest.php +++ b/vendor/mockery/mockery/tests/Mockery/MockingNullableMethodsTest.php @@ -35,9 +35,9 @@ class MockingNullableMethodsTest extends MockeryTestCase */ private $container; - protected function setUp() + protected function mockeryTestSetUp() { - parent::setUp(); + parent::mockeryTestSetUp(); require_once __DIR__."/Fixtures/MethodWithNullableReturnType.php"; } @@ -55,13 +55,13 @@ class MockingNullableMethodsTest extends MockeryTestCase /** * @test - * @expectedException \TypeError */ public function itShouldNotAllowNonNullToBeNull() { $mock = mock("test\Mockery\Fixtures\MethodWithNullableReturnType"); $mock->shouldReceive('nonNullablePrimitive')->andReturn(null); + $this->expectException(\TypeError::class); $mock->nonNullablePrimitive(); } @@ -79,7 +79,7 @@ class MockingNullableMethodsTest extends MockeryTestCase /** * @test */ - public function itShouldAllowPrimitiveNullabeToBeSet() + public function itShouldAllowPrimitiveNullableToBeSet() { $mock = mock("test\Mockery\Fixtures\MethodWithNullableReturnType"); @@ -100,13 +100,13 @@ class MockingNullableMethodsTest extends MockeryTestCase /** * @test - * @expectedException \TypeError */ public function itShouldNotAllowSelfToBeNull() { $mock = mock("test\Mockery\Fixtures\MethodWithNullableReturnType"); $mock->shouldReceive('nonNullableSelf')->andReturn(null); + $this->expectException(\TypeError::class); $mock->nonNullableSelf(); } @@ -145,13 +145,13 @@ class MockingNullableMethodsTest extends MockeryTestCase /** * @test - * @expectedException \TypeError */ public function itShouldNotAllowClassToBeNull() { $mock = mock("test\Mockery\Fixtures\MethodWithNullableReturnType"); $mock->shouldReceive('nonNullableClass')->andReturn(null); + $this->expectException(\TypeError::class); $mock->nonNullableClass(); } diff --git a/vendor/mockery/mockery/tests/Mockery/MockingStaticMethodsCalledObjectStyleTest.php b/vendor/mockery/mockery/tests/Mockery/MockingStaticMethodsCalledObjectStyleTest.php new file mode 100644 index 00000000..6e099a09 --- /dev/null +++ b/vendor/mockery/mockery/tests/Mockery/MockingStaticMethodsCalledObjectStyleTest.php @@ -0,0 +1,66 @@ +shouldReceive('foo')->andReturn(true); + $this->assertEquals(true, $mock->foo()); + } + + public function testStaticMethodCalledObjectStyleMockWithNotAllowingMockingOfNonExistentMethods() + { + \Mockery::getConfiguration()->allowMockingNonExistentMethods(false); + $mock = mock('test\Mockery\ClassWithStaticMethods'); + $mock->shouldReceive('foo')->andReturn(true); + $this->assertEquals(true, $mock->foo()); + \Mockery::getConfiguration()->allowMockingNonExistentMethods(true); + } + + public function testProtectedStaticMethodCalledObjectStyleMockWithNotAllowingMockingOfNonExistentMethods() + { + \Mockery::getConfiguration()->allowMockingNonExistentMethods(false); + $mock = mock('test\Mockery\ClassWithStaticMethods'); + $mock->shouldAllowMockingProtectedMethods(); + $mock->shouldReceive('protectedBar')->andReturn(true); + $this->assertEquals(true, $mock->protectedBar()); + \Mockery::getConfiguration()->allowMockingNonExistentMethods(true); + } +} + +class ClassWithStaticMethods +{ + public static function foo() + { + return 'foo'; + } + + protected static function protectedBar() + { + return 'bar'; + } +} diff --git a/vendor/mockery/mockery/tests/Mockery/MockingVoidMethodsTest.php b/vendor/mockery/mockery/tests/Mockery/MockingVoidMethodsTest.php index f1f167a1..e6ebd760 100644 --- a/vendor/mockery/mockery/tests/Mockery/MockingVoidMethodsTest.php +++ b/vendor/mockery/mockery/tests/Mockery/MockingVoidMethodsTest.php @@ -28,7 +28,7 @@ use Mockery\Adapter\Phpunit\MockeryTestCase; */ class MockingVoidMethodsTest extends MockeryTestCase { - protected function setUp() + protected function mockeryTestSetUp() { require_once __DIR__."/Fixtures/MethodWithVoidReturnType.php"; } diff --git a/vendor/mockery/mockery/tests/Mockery/NamedMockTest.php b/vendor/mockery/mockery/tests/Mockery/NamedMockTest.php index b39355f2..96e4548e 100644 --- a/vendor/mockery/mockery/tests/Mockery/NamedMockTest.php +++ b/vendor/mockery/mockery/tests/Mockery/NamedMockTest.php @@ -47,12 +47,12 @@ class NamedMockTest extends MockeryTestCase /** * @test - * @expectedException Mockery\Exception - * @expectedExceptionMessage The mock named 'Mockery\Dave7' has been already defined with a different mock configuration */ public function itShouldThrowIfAttemptingToRedefineNamedMock() { $mock = Mockery::namedMock("Mockery\Dave7"); + $this->expectException(\Mockery\Exception::class); + $this->expectExceptionMessage("The mock named 'Mockery\Dave7' has been already defined with a different mock configuration"); $mock = Mockery::namedMock("Mockery\Dave7", "DateTime"); } diff --git a/vendor/mockery/mockery/tests/Mockery/WithFormatterExpectationTest.php b/vendor/mockery/mockery/tests/Mockery/WithFormatterExpectationTest.php index 2e3c4f92..d6a56a53 100644 --- a/vendor/mockery/mockery/tests/Mockery/WithFormatterExpectationTest.php +++ b/vendor/mockery/mockery/tests/Mockery/WithFormatterExpectationTest.php @@ -35,8 +35,6 @@ class WithFormatterExpectationTest extends TestCase } /** - * @expectedException Mockery\Exception\NoMatchingExpectationException - * * Note that without the patch checked in with this test, rather than throwing * an exception, the program will go into an infinite recursive loop */ @@ -45,6 +43,7 @@ class WithFormatterExpectationTest extends TestCase $mock = Mockery::mock('stdClass'); $mock->shouldReceive('doBar')->with('foo'); $obj = new ClassWithGetter($mock); + $this->expectException(\Mockery\Exception\NoMatchingExpectationException::class); $obj->getFoo(); } @@ -68,7 +67,7 @@ class WithFormatterExpectationTest extends TestCase $obj = new ClassWithGetterWithParam(); $string = Mockery::formatObjects(array($obj)); - $this->assertNotContains('Missing argument 1 for', $string); + $this->assertTrue(\mb_strpos($string, 'Missing argument 1 for') === false); } public function testFormatObjectsExcludesStaticProperties() @@ -76,7 +75,7 @@ class WithFormatterExpectationTest extends TestCase $obj = new ClassWithPublicStaticProperty(); $string = Mockery::formatObjects(array($obj)); - $this->assertNotContains('excludedProperty', $string); + $this->assertTrue(\mb_strpos($string, 'excludedProperty') === false); } public function testFormatObjectsExcludesStaticGetters() @@ -84,7 +83,7 @@ class WithFormatterExpectationTest extends TestCase $obj = new ClassWithPublicStaticGetter(); $string = Mockery::formatObjects(array($obj)); - $this->assertNotContains('getExcluded', $string); + $this->assertTrue(\mb_strpos($string, 'getExcluded') === false); } } diff --git a/vendor/mockery/mockery/tests/PHP70/Generator/StringManipulation/Pass/MagicMethodTypeHintsPassTest.php b/vendor/mockery/mockery/tests/PHP70/Generator/StringManipulation/Pass/MagicMethodTypeHintsPassTest.php index a1957ff1..993c4789 100644 --- a/vendor/mockery/mockery/tests/PHP70/Generator/StringManipulation/Pass/MagicMethodTypeHintsPassTest.php +++ b/vendor/mockery/mockery/tests/PHP70/Generator/StringManipulation/Pass/MagicMethodTypeHintsPassTest.php @@ -24,11 +24,11 @@ declare(strict_types=1); namespace Mockery\Test\Generator\StringManipulation\Pass; use Mockery as m; +use Mockery\Adapter\Phpunit\MockeryTestCase; use Mockery\Generator\DefinedTargetClass; use Mockery\Generator\StringManipulation\Pass\MagicMethodTypeHintsPass; -use PHPUnit\Framework\TestCase; -class MagicMethodTypeHintsPassTest extends TestCase +class MagicMethodTypeHintsPassTest extends MockeryTestCase { /** * @var MagicMethodTypeHintsPass @@ -44,7 +44,7 @@ class MagicMethodTypeHintsPassTest extends TestCase * Setup method * @return void */ - public function setup() + public function mockeryTestSetUp() { $this->pass = new MagicMethodTypeHintsPass; $this->mockedConfiguration = m::mock( @@ -98,14 +98,14 @@ class MagicMethodTypeHintsPassTest extends TestCase 'public function __isset($name) {}', $this->mockedConfiguration ); - $this->assertContains('string $name', $code); + $this->assertTrue(\mb_strpos($code, 'string $name') !== false); $this->configureForInterface(); $code = $this->pass->apply( 'public function __isset($name) {}', $this->mockedConfiguration ); - $this->assertContains('string $name', $code); + $this->assertTrue(\mb_strpos($code, 'string $name') !== false); } /** @@ -121,12 +121,12 @@ class MagicMethodTypeHintsPassTest extends TestCase 'public function __isset($name) {}', $this->mockedConfiguration ); - $this->assertContains('string $name', $code); + $this->assertTrue(\mb_strpos($code, 'string $name') !== false); $code = $this->pass->apply( 'public function __unset($name) {}', $this->mockedConfiguration ); - $this->assertContains('string $name', $code); + $this->assertTrue(\mb_strpos($code, 'string $name') !== false); } /** @@ -139,14 +139,14 @@ class MagicMethodTypeHintsPassTest extends TestCase 'public function __isset($name) {}', $this->mockedConfiguration ); - $this->assertContains(' : bool', $code); + $this->assertTrue(\mb_strpos($code, ' : bool') !== false); $this->configureForInterface(); $code = $this->pass->apply( 'public function __isset($name) {}', $this->mockedConfiguration ); - $this->assertContains(' : bool', $code); + $this->assertTrue(\mb_strpos($code, ' : bool') !== false); } /** @@ -159,14 +159,14 @@ class MagicMethodTypeHintsPassTest extends TestCase 'public function __toString() {}', $this->mockedConfiguration ); - $this->assertContains(' : string', $code); + $this->assertTrue(\mb_strpos($code, ' : string') !== false); $this->configureForInterface(); $code = $this->pass->apply( 'public function __toString() {}', $this->mockedConfiguration ); - $this->assertContains(' : string', $code); + $this->assertTrue(\mb_strpos($code, ' : string') !== false); } /** @@ -179,14 +179,14 @@ class MagicMethodTypeHintsPassTest extends TestCase 'public function __call($method, array $args) {}', $this->mockedConfiguration ); - $this->assertContains('string $method', $code); + $this->assertTrue(\mb_strpos($code, 'string $method') !== false); $this->configureForInterface(); $code = $this->pass->apply( 'public function __call($method, array $args) {}', $this->mockedConfiguration ); - $this->assertContains('string $method', $code); + $this->assertTrue(\mb_strpos($code, 'string $method') !== false); } /** @@ -199,14 +199,14 @@ class MagicMethodTypeHintsPassTest extends TestCase 'public static function __callStatic($method, array $args) {}', $this->mockedConfiguration ); - $this->assertContains('string $method', $code); + $this->assertTrue(\mb_strpos($code, 'string $method') !== false); $this->configureForInterface(); $code = $this->pass->apply( 'public static function __callStatic($method, array $args) {}', $this->mockedConfiguration ); - $this->assertContains('string $method', $code); + $this->assertTrue(\mb_strpos($code, 'string $method') !== false); } /** @@ -219,14 +219,14 @@ class MagicMethodTypeHintsPassTest extends TestCase 'public static function __isset($parameter) {}', $this->mockedConfiguration ); - $this->assertContains(') {', $code); + $this->assertTrue(\mb_strpos($code, ') {') !== false); $this->configureForInterface('Mockery\Test\Generator\StringManipulation\Pass\MagicReturnInterfaceDummy'); $code = $this->pass->apply( 'public static function __isset($parameter) {}', $this->mockedConfiguration ); - $this->assertContains(') {', $code); + $this->assertTrue(\mb_strpos($code, ') {') !== false); } /** @@ -238,7 +238,7 @@ class MagicMethodTypeHintsPassTest extends TestCase '\StdClass' ); $magicMethods = $this->pass->getMagicMethods($targetClass); - $this->assertInternalType('array', $magicMethods); + $this->assertTrue(is_array($magicMethods)); $this->assertEmpty($magicMethods); } @@ -248,7 +248,7 @@ class MagicMethodTypeHintsPassTest extends TestCase public function itShouldReturnEmptyArrayIfClassTypeIsNotExpected() { $magicMethods = $this->pass->getMagicMethods(null); - $this->assertInternalType('array', $magicMethods); + $this->assertTrue(is_array($magicMethods)); $this->assertEmpty($magicMethods); } @@ -268,16 +268,16 @@ class MagicMethodTypeHintsPassTest extends TestCase 'public function __call($method, array $args) {}', $this->mockedConfiguration ); - $this->assertContains('$method', $code); - $this->assertContains('array $args', $code); + $this->assertTrue(\mb_strpos($code, '$method') !== false); + $this->assertTrue(\mb_strpos($code, 'array $args') !== false); $this->configureForInterface(); $code = $this->pass->apply( 'public function __call($method, array $args) {}', $this->mockedConfiguration ); - $this->assertContains('$method', $code); - $this->assertContains('array $args', $code); + $this->assertTrue(\mb_strpos($code, '$method') !== false); + $this->assertTrue(\mb_strpos($code, 'array $args') !== false); } protected function configureForClass(string $className = 'Mockery\Test\Generator\StringManipulation\Pass\MagicDummy') diff --git a/vendor/mockery/mockery/tests/PHP70/MockingParameterAndReturnTypesTest.php b/vendor/mockery/mockery/tests/PHP70/MockingParameterAndReturnTypesTest.php index 690625f6..5ebdb015 100644 --- a/vendor/mockery/mockery/tests/PHP70/MockingParameterAndReturnTypesTest.php +++ b/vendor/mockery/mockery/tests/PHP70/MockingParameterAndReturnTypesTest.php @@ -80,7 +80,7 @@ class MockingParameterAndReturnTypesTest extends MockeryTestCase $mock = mock("test\Mockery\TestWithParameterAndReturnType"); $mock->shouldReceive("returnCallable"); - $this->assertInternalType('callable', $mock->returnCallable()); + $this->assertTrue(is_callable($mock->returnCallable())); } public function testMockingClassReturnTypes() @@ -110,7 +110,7 @@ class MockingParameterAndReturnTypesTest extends MockeryTestCase $this->assertSame(0.0, $mock->returnFloat()); $this->assertFalse( $mock->returnBoolean()); $this->assertSame([], $mock->returnArray()); - $this->assertInternalType('callable', $mock->returnCallable()); + $this->assertTrue(is_callable($mock->returnCallable())); $this->assertInstanceOf("\Generator", $mock->returnGenerator()); $this->assertInstanceOf("test\Mockery\TestWithParameterAndReturnType", $mock->withClassReturnType()); } diff --git a/vendor/myclabs/deep-copy/src/DeepCopy/DeepCopy.php b/vendor/myclabs/deep-copy/src/DeepCopy/DeepCopy.php index d461ff6d..2e53cf3d 100644 --- a/vendor/myclabs/deep-copy/src/DeepCopy/DeepCopy.php +++ b/vendor/myclabs/deep-copy/src/DeepCopy/DeepCopy.php @@ -99,6 +99,14 @@ class DeepCopy ]; } + public function prependFilter(Filter $filter, Matcher $matcher) + { + array_unshift($this->filters, [ + 'matcher' => $matcher, + 'filter' => $filter, + ]); + } + public function addTypeFilter(TypeFilter $filter, TypeMatcher $matcher) { $this->typeFilters[] = [ diff --git a/vendor/nesbot/carbon/bin/upgrade-carbon b/vendor/nesbot/carbon/bin/upgrade-carbon new file mode 100644 index 00000000..49c4c9a8 --- /dev/null +++ b/vendor/nesbot/carbon/bin/upgrade-carbon @@ -0,0 +1,34 @@ +#!/usr/bin/env php +=5.3.9", + "kylekatarnls/update-helper": "^1.1", "symfony/translation": "~2.6 || ~3.0 || ~4.0" }, "require-dev": { + "composer/composer": "^1.2", + "friendsofphp/php-cs-fixer": "~2", "phpunit/phpunit": "^4.8.35 || ^5.7" }, - "suggest": { - "friendsofphp/php-cs-fixer": "Needed for the `composer phpcs` command. Allow to automatically fix code style.", - "phpstan/phpstan": "Needed for the `composer phpstan` command. Allow to detect potential errors." - }, "autoload": { "psr-4": { "": "src/" @@ -51,9 +51,16 @@ ], "phpunit": "phpunit --verbose --coverage-clover=coverage.xml", "phpcs": "php-cs-fixer fix -v --diff --dry-run", - "phpstan": "phpstan analyse --configuration phpstan.neon --level 3 src tests" + "phpstan": "phpstan analyse --configuration phpstan.neon --level 3 src tests", + "post-autoload-dump": [ + "UpdateHelper\\UpdateHelper::check" + ], + "upgrade-carbon": [ + "Carbon\\Upgrade::upgrade" + ] }, "extra": { + "update-helper": "Carbon\\Upgrade", "laravel": { "providers": [ "Carbon\\Laravel\\ServiceProvider" diff --git a/vendor/nesbot/carbon/src/Carbon/Carbon.php b/vendor/nesbot/carbon/src/Carbon/Carbon.php index 7d9db8cb..478e6a6b 100644 --- a/vendor/nesbot/carbon/src/Carbon/Carbon.php +++ b/vendor/nesbot/carbon/src/Carbon/Carbon.php @@ -2605,7 +2605,7 @@ class Carbon extends DateTime implements JsonSerializable */ public function isCurrentMonth($ofSameYear = null) { - return $this->isSameMonth($ofSameYear); + return $this->isSameMonth(null, $ofSameYear); } /** diff --git a/vendor/nesbot/carbon/src/Carbon/Upgrade.php b/vendor/nesbot/carbon/src/Carbon/Upgrade.php new file mode 100644 index 00000000..26449ff7 --- /dev/null +++ b/vendor/nesbot/carbon/src/Carbon/Upgrade.php @@ -0,0 +1,150 @@ + '5.8.0', + 'laravel/cashier' => '9.0.1', + 'illuminate/support' => '5.8.0', + 'laravel/dusk' => '5.0.0', + ); + + protected static $otherLibraries = array( + 'spatie/laravel-analytics' => '3.6.4', + 'jenssegers/date' => '3.5.0', + ); + + /** + * @param \UpdateHelper\UpdateHelper $helper + */ + public function check(UpdateHelper $helper) + { + $helper->write(array( + 'Carbon 1 is deprecated, see how to migrate to Carbon 2.', + 'https://carbon.nesbot.com/docs/#api-carbon-2', + )); + + if (static::SUGGEST_ON_UPDATE || static::ASK_ON_UPDATE || $helper->getIo()->isVerbose()) { + $laravelUpdate = array(); + + foreach (static::$laravelLibraries as $name => $version) { + if ($helper->hasAsDependency($name) && $helper->isDependencyLesserThan($name, $version)) { + $laravelUpdate[$name] = $version; + } + } + + if (count($laravelUpdate)) { + $output = array( + ' Please consider upgrading your Laravel dependencies to be compatible with Carbon 2:', + ); + + foreach ($laravelUpdate as $name => $version) { + $output[] = " - $name at least to version $version"; + } + + $output[] = ''; + $output[] = " If you can't update Laravel, check https://carbon.nesbot.com/ to see how to"; + $output[] = ' install Carbon 2 using alias version and our adapter kylekatarnls/laravel-carbon-2'; + $output[] = ''; + + $helper->write($output); + } + + foreach (static::$otherLibraries as $name => $version) { + if ($helper->hasAsDependency($name) && $helper->isDependencyLesserThan($name, $version)) { + $helper->write(" Please consider upgrading $name at least to $version to be compatible with Carbon 2.\n"); + } + } + + if (static::ASK_ON_UPDATE) { + static::askForUpgrade($helper); + + return; + } + } + + $path = implode(DIRECTORY_SEPARATOR, array('.', 'vendor', 'bin', 'upgrade-carbon')); + + if (!file_exists($path)) { + $path = realpath(__DIR__.'/../../bin/upgrade-carbon'); + } + + $helper->write( + ' You can run '.escapeshellarg($path). + ' to get help in updating carbon and other frameworks and libraries that depend on it.' + ); + } + + private static function getUpgradeQuestion($upgrades) + { + $message = "Do you want us to try the following upgrade:\n"; + + foreach ($upgrades as $name => $version) { + $message .= " - $name: $version\n"; + } + + return $message.'[Y/N] '; + } + + public static function askForUpgrade(UpdateHelper $helper, $upgradeIfNotInteractive = false) + { + $upgrades = array( + 'nesbot/carbon' => '^2.0.0', + ); + + foreach (array(static::$laravelLibraries, static::$otherLibraries) as $libraries) { + foreach ($libraries as $name => $version) { + if ($helper->hasAsDependency($name) && $helper->isDependencyLesserThan($name, $version)) { + $upgrades[$name] = "^$version"; + } + } + } + + $shouldUpgrade = $helper->isInteractive() + ? $helper->getIo()->askConfirmation(static::getUpgradeQuestion($upgrades)) + : $upgradeIfNotInteractive; + + if ($shouldUpgrade) { + $helper->setDependencyVersions($upgrades)->update(); + } + } + + public static function upgrade(ScriptEvent $event = null) + { + if (!$event) { + $composer = new Composer(); + $baseDir = __DIR__.'/../..'; + + if (file_exists("$baseDir/autoload.php")) { + $baseDir .= '/..'; + } + + $composer->setConfig(new Config(true, $baseDir)); + $event = new ScriptEvent( + 'upgrade-carbon', + $composer, + new ConsoleIO(new StringInput(''), new ConsoleOutput(), new HelperSet(array( + new QuestionHelper(), + ))) + ); + } + + static::askForUpgrade(new UpdateHelper($event), true); + } +} diff --git a/vendor/nexmo/client/composer.json b/vendor/nexmo/client/composer.json index 4eb1d1aa..f938fba6 100644 --- a/vendor/nexmo/client/composer.json +++ b/vendor/nexmo/client/composer.json @@ -17,7 +17,7 @@ "require": { "php": ">=5.6", "php-http/client-implementation": "^1.0", - "zendframework/zend-diactoros": "^1.3", + "zendframework/zend-diactoros": "^1.8.4 || ^2.0", "php-http/guzzle6-adapter": "^1.0", "lcobucci/jwt": "^3.2" }, diff --git a/vendor/nexmo/client/examples/fetch_recording.php b/vendor/nexmo/client/examples/fetch_recording.php deleted file mode 100644 index bddde2c4..00000000 --- a/vendor/nexmo/client/examples/fetch_recording.php +++ /dev/null @@ -1,12 +0,0 @@ -get($recording); - -file_put_contents($recordingId.'.mp3', $data->getBody()); diff --git a/vendor/nexmo/client/examples/send.php b/vendor/nexmo/client/examples/send.php deleted file mode 100644 index 90787fa5..00000000 --- a/vendor/nexmo/client/examples/send.php +++ /dev/null @@ -1,72 +0,0 @@ -message()->send([ - 'to' => NEXMO_TO, - 'from' => NEXMO_FROM, - 'text' => 'Test message from the Nexmo PHP Client' -]); - -//array access provides response data -echo "Sent message to " . $message['to'] . ". Balance is now " . $message['remaining-balance'] . PHP_EOL; - -sleep(1); - -//send message using object support -$text = new \Nexmo\Message\Text(NEXMO_TO, NEXMO_FROM, 'Test message using PHP client library'); -$text->setClientRef('test-message') - ->setClass(\Nexmo\Message\Text::CLASS_FLASH); - -$client->message()->send($text); - -//method access -echo "Sent message to " . $text->getTo() . ". Balance is now " . $text->getRemainingBalance() . PHP_EOL; - -sleep(1); - -//sending a message over 160 characters -$longwinded = <<message()->send($text); - -echo "Sent message to " . $text->getTo() . ". Balance is now " . $text->getRemainingBalance() . PHP_EOL; -echo "Message was split into " . count($text) . " messages, those message ids are: " . PHP_EOL; -for($i = 0; $i < count($text); $i++){ - echo $text[$i]['message-id'] . PHP_EOL; -} - -echo "The account balance after each message was: " . PHP_EOL; -for($i = 0; $i < count($text); $i++){ - echo $text->getRemainingBalance($i) . PHP_EOL; -} - -//easier iteration, can use methods or array access -foreach($text as $index => $data){ - echo "Balance was " . $text->getRemainingBalance($index) . " after message " . $data['message-id'] . " was sent." . PHP_EOL; -} - -//an invalid request -try{ - $text = new \Nexmo\Message\Text('not valid', NEXMO_FROM, $longwinded); - $client->message()->send($text); -} catch (Nexmo\Client\Exception\Request $e) { - //can still get the API response - $text = $e->getEntity(); - $request = $text->getRequest(); //PSR-7 Request Object - $response = $text->getResponse(); //PSR-7 Response Object - $data = $text->getResponseData(); //parsed response object - $code = $e->getCode(); //nexmo error code - error_log($e->getMessage()); //nexmo error message -} diff --git a/vendor/nexmo/client/src/Account/Client.php b/vendor/nexmo/client/src/Account/Client.php index d520c288..f3a0807d 100644 --- a/vendor/nexmo/client/src/Account/Client.php +++ b/vendor/nexmo/client/src/Account/Client.php @@ -137,6 +137,78 @@ class Client implements ClientAwareInterface } } + public function getConfig() + { + + $request = new Request( + $this->getClient()->getRestUrl() . '/account/settings', + 'POST', + 'php://temp' + ); + + $response = $this->client->send($request); + $rawBody = $response->getBody()->getContents(); + + if ($rawBody === '') { + throw new Exception\Server('Response was empty'); + } + + $body = json_decode($rawBody, true); + + $config = new Config( + $body['mo-callback-url'], + $body['dr-callback-url'], + $body['max-outbound-request'], + $body['max-inbound-request'], + $body['max-calls-per-second'] + ); + return $config; + } + + public function updateConfig($options) + { + // supported options are SMS Callback and DR Callback + $params = []; + if(isset($options['sms_callback_url'])) { + $params['moCallBackUrl'] = $options['sms_callback_url']; + } + + if(isset($options['dr_callback_url'])) { + $params['drCallBackUrl'] = $options['dr_callback_url']; + } + + $request = new Request( + $this->getClient()->getRestUrl() . '/account/settings', + 'POST', + 'php://temp', + ['content-type' => 'application/x-www-form-urlencoded'] + ); + + $request->getBody()->write(http_build_query($params)); + $response = $this->client->send($request); + + if($response->getStatusCode() != '200'){ + throw $this->getException($response); + } + + $rawBody = $response->getBody()->getContents(); + + if ($rawBody === '') { + throw new Exception\Server('Response was empty'); + } + + $body = json_decode($rawBody, true); + + $config = new Config( + $body['mo-callback-url'], + $body['dr-callback-url'], + $body['max-outbound-request'], + $body['max-inbound-request'], + $body['max-calls-per-second'] + ); + return $config; + } + public function listSecrets($apiKey) { $body = $this->get( $this->getClient()->getApiUrl() . '/accounts/'.$apiKey.'/secrets'); diff --git a/vendor/nexmo/client/src/Account/Config.php b/vendor/nexmo/client/src/Account/Config.php new file mode 100644 index 00000000..bb3971bb --- /dev/null +++ b/vendor/nexmo/client/src/Account/Config.php @@ -0,0 +1,91 @@ +data['sms_callback_url'] = $sms_callback_url; + } + if(!is_null($dr_callback_url)) { + $this->data['dr_callback_url'] = $dr_callback_url; + } + if(!is_null($max_outbound_request)) { + $this->data['max_outbound_request'] = $max_outbound_request; + } + if(!is_null($max_inbound_request)) { + $this->data['max_inbound_request'] = $max_inbound_request; + } + if(!is_null($max_calls_per_second)) { + $this->data['max_calls_per_second'] = $max_calls_per_second; + } + } + + public function getSmsCallbackUrl() + { + return $this['sms_callback_url']; + } + + public function getDrCallbackUrl() + { + return $this['dr_callback_url']; + } + + public function getMaxOutboundRequest() + { + return $this['max_outbound_request']; + } + + public function getMaxInboundRequest() + { + return $this['max_inbound_request']; + } + + public function getMaxCallsPerSecond() + { + return $this['max_calls_per_second']; + } + + public function jsonUnserialize(array $json) + { + $this->data = [ + 'sms_callback_url' => $json['sms_callback_url'], + 'dr_callback_url' => $json['dr_callback_url'], + 'max_outbound_request' => $json['max_outbound_request'], + 'max_inbound_request' => $json['max_inbound_request'], + 'max_calls_per_second' => $json['max_calls_per_second'], + ]; + } + + function jsonSerialize() + { + return $this->data; + } + + public function offsetExists($offset) + { + return isset($this->data[$offset]); + } + + public function offsetGet($offset) + { + return $this->data[$offset]; + } + + public function offsetSet($offset, $value) + { + throw new Exception('Balance is read only'); + } + + public function offsetUnset($offset) + { + throw new Exception('Balance is read only'); + } +} + diff --git a/vendor/nexmo/client/src/Application/Application.php b/vendor/nexmo/client/src/Application/Application.php index 013c488c..798b4535 100644 --- a/vendor/nexmo/client/src/Application/Application.php +++ b/vendor/nexmo/client/src/Application/Application.php @@ -22,6 +22,9 @@ class Application implements EntityInterface, \JsonSerializable, JsonUnserializa use JsonResponseTrait; protected $voiceConfig; + protected $messagesConfig; + protected $rtcConfig; + protected $vbcConfig; protected $name; @@ -45,6 +48,24 @@ class Application implements EntityInterface, \JsonSerializable, JsonUnserializa return $this; } + public function setMessagesConfig(MessagesConfig $config) + { + $this->messagesConfig = $config; + return $this; + } + + public function setRtcConfig(RtcConfig $config) + { + $this->rtcConfig = $config; + return $this; + } + + public function setVbcConfig(VbcConfig $config) + { + $this->vbcConfig = $config; + return $this; + } + /** * @return VoiceConfig */ @@ -63,6 +84,60 @@ class Application implements EntityInterface, \JsonSerializable, JsonUnserializa return $this->voiceConfig; } + /** + * @return MessagesConfig + */ + public function getMessagesConfig() + { + if(!isset($this->messagesConfig)){ + $this->setMessagesConfig(new MessagesConfig()); + $data = $this->getResponseData(); + if(isset($data['messages']) AND isset($data['messages']['webhooks'])){ + foreach($data['messages']['webhooks'] as $webhook){ + $this->getMessagesConfig()->setWebhook($webhook['endpoint_type'], $webhook['endpoint'], $webhook['http_method']); + } + } + } + + return $this->messagesConfig; + } + + /** + * @return RtcConfig + */ + public function getRtcConfig() + { + if(!isset($this->rtcConfig)){ + $this->setRtcConfig(new RtcConfig()); + $data = $this->getResponseData(); + if(isset($data['rtc']) AND isset($data['rtc']['webhooks'])){ + foreach($data['rtc']['webhooks'] as $webhook){ + $this->getRtcConfig()->setWebhook($webhook['endpoint_type'], $webhook['endpoint'], $webhook['http_method']); + } + } + } + + return $this->rtcConfig; + } + + /** + * @return RtcConfig + */ + public function getVbcConfig() + { + if(!isset($this->vbcConfig)){ + $this->setVbcConfig(new VbcConfig()); + } + + return $this->vbcConfig; + } + + public function setPublicKey($key) + { + $this->keys['public_key'] = $key; + return $this; + } + public function getPublicKey() { if(isset($this->keys['public_key'])){ @@ -94,23 +169,83 @@ class Application implements EntityInterface, \JsonSerializable, JsonUnserializa $this->id = $json['id']; $this->keys = $json['keys']; - //todo: make voice hydrate-able - $this->voiceConfig = new VoiceConfig(); - if(isset($json['voice']) AND isset($json['voice']['webhooks'])){ - foreach($json['voice']['webhooks'] as $webhook){ - $this->voiceConfig->setWebhook($webhook['endpoint_type'], new Webhook($webhook['endpoint'], $webhook['http_method'])); + if (isset($json['capabilities'])) { + $capabilities = $json['capabilities']; + + //todo: make voice hydrate-able + $this->voiceConfig = new VoiceConfig(); + if (isset($capabilities['voice']) AND isset($capabilities['voice']['webhooks'])) { + foreach ($capabilities['voice']['webhooks'] as $name => $details) { + $this->voiceConfig->setWebhook($name, new Webhook($details['address'], $details['http_method'])); + } + } + + //todo: make messages hydrate-able + $this->messagesConfig = new MessagesConfig(); + if (isset($capabilities['messages']) AND isset($capabilities['messages']['webhooks'])) { + foreach ($capabilities['messages']['webhooks'] as $name => $details) { + $this->messagesConfig->setWebhook($name, new Webhook($details['address'], $details['http_method'])); + } + } + + //todo: make rtc hydrate-able + $this->rtcConfig = new RtcConfig(); + if (isset($capabilities['rtc']) AND isset($capabilities['rtc']['webhooks'])) { + foreach ($capabilities['rtc']['webhooks'] as $name => $details) { + $this->rtcConfig->setWebhook($name, new Webhook($details['address'], $details['http_method'])); + } + } + + if (isset($capabilities['vbc'])) { + $this->getVbcConfig()->enable(); } } } public function jsonSerialize() { + + // Build up capabilities that are set + $availableCapabilities = [ + 'voice' => [VoiceConfig::ANSWER, VoiceConfig::EVENT], + 'messages' => [MessagesConfig::INBOUND, MessagesConfig::STATUS], + 'rtc' => [RtcConfig::EVENT] + ]; + + $capabilities = []; + foreach ($availableCapabilities as $type => $values) { + $configAccessorMethod = 'get'.ucfirst($type).'Config'; + foreach ($values as $constant) { + $webhook = $this->$configAccessorMethod()->getWebhook($constant); + if ($webhook) { + if (!isset($capabilities[$type])) { + $capabilities[$type]['webhooks'] = []; + } + $capabilities[$type]['webhooks'][$constant] = [ + 'address' => $webhook->getUrl(), + 'http_method' => $webhook->getMethod(), + ]; + } + } + } + + // Handle VBC specifically + if ($this->getVbcConfig()->isEnabled()) { + $capabilities['vbc'] = new \StdClass; + } + + // Workaround API bug. It expects an object and throws 500 + // if it gets an array + if (!count($capabilities)) { + $capabilities = (object) $capabilities; + } + return [ 'name' => $this->getName(), - //currently, the request data does not match the response data - 'event_url' => (string) $this->getVoiceConfig()->getWebhook(VoiceConfig::EVENT), - 'answer_url' => (string) $this->getVoiceConfig()->getWebhook(VoiceConfig::ANSWER), - 'type' => 'voice' //currently the only type + 'keys' => [ + 'public_key' => $this->getPublicKey() + ], + 'capabilities' => $capabilities ]; } diff --git a/vendor/nexmo/client/src/Application/Client.php b/vendor/nexmo/client/src/Application/Client.php index 6a07573e..6a1b7728 100644 --- a/vendor/nexmo/client/src/Application/Client.php +++ b/vendor/nexmo/client/src/Application/Client.php @@ -8,10 +8,11 @@ namespace Nexmo\Application; +use Nexmo\ApiErrorHandler; use Nexmo\Client\ClientAwareInterface; use Nexmo\Client\ClientAwareTrait; use Nexmo\Entity\CollectionInterface; -use Nexmo\Entity\CollectionTrait; +use Nexmo\Entity\ModernCollectionTrait; use Psr\Http\Message\ResponseInterface; use Zend\Diactoros\Request; use Nexmo\Client\Exception; @@ -19,7 +20,7 @@ use Nexmo\Client\Exception; class Client implements ClientAwareInterface, CollectionInterface { use ClientAwareTrait; - use CollectionTrait; + use ModernCollectionTrait; public static function getCollectionName() { @@ -28,7 +29,7 @@ class Client implements ClientAwareInterface, CollectionInterface public static function getCollectionPath() { - return '/v1/' . self::getCollectionName(); + return '/v2/' . self::getCollectionName(); } public function hydrateEntity($data, $id) @@ -46,7 +47,9 @@ class Client implements ClientAwareInterface, CollectionInterface $request = new Request( $this->getClient()->getApiUrl() . $this->getCollectionPath() . '/' . $application->getId() - ,'GET' + ,'GET', + 'php://memory', + ['Content-Type' => 'application/json'] ); $application->setRequest($request); @@ -77,7 +80,7 @@ class Client implements ClientAwareInterface, CollectionInterface $this->getClient()->getApiUrl() . $this->getCollectionPath() ,'POST', 'php://temp', - ['content-type' => 'application/json'] + ['Content-Type' => 'application/json'] ); $request->getBody()->write(json_encode($body)); @@ -113,7 +116,7 @@ class Client implements ClientAwareInterface, CollectionInterface $this->getClient()->getApiUrl() . $this->getCollectionPath() . '/' . $id, 'PUT', 'php://temp', - ['content-type' => 'application/json'] + ['Content-Type' => 'application/json'] ); $request->getBody()->write(json_encode($body)); @@ -138,7 +141,9 @@ class Client implements ClientAwareInterface, CollectionInterface $request = new Request( $this->getClient()->getApiUrl(). $this->getCollectionPath() . '/' . $id - ,'DELETE' + ,'DELETE', + 'php://temp', + ['Content-Type' => 'application/json'] ); if($application instanceof Application){ @@ -163,18 +168,15 @@ class Client implements ClientAwareInterface, CollectionInterface $body = json_decode($response->getBody()->getContents(), true); $status = $response->getStatusCode(); - if($status >= 400 AND $status < 500) { - $e = new Exception\Request($body['error_title'], $status); - } elseif($status >= 500 AND $status < 600) { - $e = new Exception\Server($body['error_title'], $status); - } else { - $e = new Exception\Exception('Unexpected HTTP Status Code'); - throw $e; - } - - //todo use interfaces here - if(($application instanceof Application) AND (($e instanceof Exception\Request) OR ($e instanceof Exception\Server))){ - $e->setEntity($application); + // Handle new style errors + $e = null; + try { + ApiErrorHandler::check($body, $status); + } catch (Exception\Exception $e) { + //todo use interfaces here + if(($application instanceof Application) AND (($e instanceof Exception\Request) OR ($e instanceof Exception\Server))){ + $e->setEntity($application); + } } return $e; @@ -182,6 +184,14 @@ class Client implements ClientAwareInterface, CollectionInterface protected function createFromArray($array) { + if (isset($array['answer_url']) || isset($array['event_url'])) { + return $this->createFromArrayV1($array); + } + + return $this->createFromArrayV2($array); + } + + protected function createFromArrayV1($array) { if(!is_array($array)){ throw new \RuntimeException('application must implement `' . ApplicationInterface::class . '` or be an array`'); } @@ -195,6 +205,12 @@ class Client implements ClientAwareInterface, CollectionInterface $application = new Application(); $application->setName($array['name']); + // Public key? + if (isset($array['public_key'])) { + $application->setPublicKey($array['public_key']); + } + + // Voice foreach(['event', 'answer'] as $type){ if(isset($array[$type . '_url'])){ $method = isset($array[$type . '_method']) ? $array[$type . '_method'] : null; @@ -202,6 +218,94 @@ class Client implements ClientAwareInterface, CollectionInterface } } + // Messages + foreach(['status', 'inbound'] as $type){ + if(isset($array[$type . '_url'])){ + $method = isset($array[$type . '_method']) ? $array[$type . '_method'] : null; + $application->getMessagesConfig()->setWebhook($type . '_url', new Webhook($array[$type . '_url'], $method)); + } + } + + // RTC + foreach(['event'] as $type){ + if(isset($array[$type . '_url'])){ + $method = isset($array[$type . '_method']) ? $array[$type . '_method'] : null; + $application->getRtcConfig()->setWebhook($type . '_url', new Webhook($array[$type . '_url'], $method)); + } + } + + // VBC + if (isset($array['vbc']) && $array['vbc']) { + $application->getVbcConfig()->enable(); + } + + return $application; + } + + protected function createFromArrayV2($array) { + if(!is_array($array)){ + throw new \RuntimeException('application must implement `' . ApplicationInterface::class . '` or be an array`'); + } + + foreach(['name',] as $param){ + if(!isset($array[$param])){ + throw new \InvalidArgumentException('missing expected key `' . $param . '`'); + } + } + + $application = new Application(); + $application->setName($array['name']); + + // Is there a public key? + if (isset($array['keys']['public_key'])) { + $application->setPublicKey($array['keys']['public_key']); + } + + // How about capabilities? + if (!isset($array['capabilities'])) { + return $application; + } + + $capabilities = $array['capabilities']; + + // Handle voice + if (isset($capabilities['voice'])) { + $voiceCapabilities = $capabilities['voice']['webhooks']; + + foreach(['answer', 'event'] as $type) + $application->getVoiceConfig()->setWebhook($type.'_url', new Webhook( + $voiceCapabilities[$type.'_url']['address'], + $voiceCapabilities[$type.'_url']['http_method'] + )); + } + + // Handle messages + if (isset($capabilities['messages'])) { + $messagesCapabilities = $capabilities['messages']['webhooks']; + + foreach(['status', 'inbound'] as $type) + $application->getMessagesConfig()->setWebhook($type.'_url', new Webhook( + $messagesCapabilities[$type.'_url']['address'], + $messagesCapabilities[$type.'_url']['http_method'] + )); + } + + // Handle RTC + if (isset($capabilities['rtc'])) { + $rtcCapabilities = $capabilities['rtc']['webhooks']; + + foreach(['event'] as $type) + $application->getRtcConfig()->setWebhook($type.'_url', new Webhook( + $rtcCapabilities[$type.'_url']['address'], + $rtcCapabilities[$type.'_url']['http_method'] + )); + } + + // Handle VBC + if (isset($capabilities['vbc'])) { + $application->getVbcConfig()->enable(); + } + return $application; } } diff --git a/vendor/nexmo/client/src/Application/MessagesConfig.php b/vendor/nexmo/client/src/Application/MessagesConfig.php new file mode 100644 index 00000000..af24043e --- /dev/null +++ b/vendor/nexmo/client/src/Application/MessagesConfig.php @@ -0,0 +1,34 @@ +webhooks[$type] = $url; + return $this; + } + + public function getWebhook($type) + { + if(isset($this->webhooks[$type])){ + return $this->webhooks[$type]; + } + } +} diff --git a/vendor/nexmo/client/src/Application/RtcConfig.php b/vendor/nexmo/client/src/Application/RtcConfig.php new file mode 100644 index 00000000..a5dec603 --- /dev/null +++ b/vendor/nexmo/client/src/Application/RtcConfig.php @@ -0,0 +1,33 @@ +webhooks[$type] = $url; + return $this; + } + + public function getWebhook($type) + { + if(isset($this->webhooks[$type])){ + return $this->webhooks[$type]; + } + } +} diff --git a/vendor/nexmo/client/src/Application/VbcConfig.php b/vendor/nexmo/client/src/Application/VbcConfig.php new file mode 100644 index 00000000..1c73643b --- /dev/null +++ b/vendor/nexmo/client/src/Application/VbcConfig.php @@ -0,0 +1,26 @@ +enabled = true; + } + + public function disable() { + $this->enabled = false; + } + + public function isEnabled() { + return $this->enabled; + } +} diff --git a/vendor/nexmo/client/src/Call/Call.php b/vendor/nexmo/client/src/Call/Call.php index 49b24bd1..abcf45ae 100644 --- a/vendor/nexmo/client/src/Call/Call.php +++ b/vendor/nexmo/client/src/Call/Call.php @@ -195,6 +195,11 @@ class Call implements EntityInterface, \JsonSerializable, JsonUnserializableInte $this->data[$type . '_timeout'] = $length; } + public function setNcco($ncco) { + $this->data['ncco'] = $ncco; + return $this; + } + public function getStatus() { if($this->lazyLoad()){ diff --git a/vendor/nexmo/client/src/Client.php b/vendor/nexmo/client/src/Client.php index 899f6c86..0e10944f 100644 --- a/vendor/nexmo/client/src/Client.php +++ b/vendor/nexmo/client/src/Client.php @@ -225,6 +225,7 @@ class Client $body->rewind(); $content = $body->getContents(); $params = json_decode($content, true); + if (!$params) { $params = []; } $params = array_merge($params, $credentials->asArray()); $body->rewind(); $body->write(json_encode($params)); @@ -485,8 +486,9 @@ class Client { $path = $request->getUri()->getPath(); $isSecretManagementEndpoint = strpos($path, '/accounts') === 0 && strpos($path, '/secrets') !== false; + $isApplicationV2 = strpos($path, '/v2/applications') === 0; - return $isSecretManagementEndpoint; + return $isSecretManagementEndpoint || $isApplicationV2; } protected static function requiresAuthInUrlNotBody(\Psr\Http\Message\RequestInterface $request) diff --git a/vendor/nexmo/client/src/Client/Signature.php b/vendor/nexmo/client/src/Client/Signature.php index fa13c553..739c14b2 100644 --- a/vendor/nexmo/client/src/Client/Signature.php +++ b/vendor/nexmo/client/src/Client/Signature.php @@ -67,7 +67,7 @@ class Signature case 'sha1': case 'sha256': case 'sha512': - return hash_hmac($signatureMethod, $data, $secret); + return strtoupper(hash_hmac($signatureMethod, $data, $secret)); break; default: throw new Exception('Unknown signature algorithm: '.$signatureMethod.'. Expected: md5hash, md5, sha1, sha256, or sha512'); @@ -107,7 +107,12 @@ class Signature /** * Check that a signature (or set of parameters) is valid. * - * @param array| string $signature + * First instantiate a Signature object: this will drop any supplied + * signature parameter and calculate the correct one. Then call this + * method and supply the signature that came in with the request. + * + * @param array| string $signature The incoming sig parameter to check + * (or all incoming params) * @return bool * @throws \InvalidArgumentException */ @@ -121,7 +126,7 @@ class Signature throw new \InvalidArgumentException('signature must be string, or present in array or parameters'); } - return $signature == $this->signed['sig']; + return strtolower($signature) == strtolower($this->signed['sig']); } /** diff --git a/vendor/nexmo/client/src/Entity/ModernCollectionTrait.php b/vendor/nexmo/client/src/Entity/ModernCollectionTrait.php new file mode 100644 index 00000000..6bb1a1c5 --- /dev/null +++ b/vendor/nexmo/client/src/Entity/ModernCollectionTrait.php @@ -0,0 +1,252 @@ +hydrateEntity($this->page['_embedded'][$this->getCollectionName()][$this->current], $this->key()); + } + + /** + * No checks here, just advance the index. + */ + public function next() + { + $this->current++; + } + + /** + * Return the ID of the resource, in some cases this is `id`, in others `uuid`. + * @return string + */ + public function key() + { + if(isset($this->page['_embedded'][$this->getCollectionName()][$this->current]['id'])){ + return $this->page['_embedded'][$this->getCollectionName()][$this->current]['id']; + } elseif(isset($this->page['_embedded'][$this->getCollectionName()][$this->current]['uuid'])) { + return $this->page['_embedded'][$this->getCollectionName()][$this->current]['uuid']; + } + + return $this->current; + } + + /** + * Handle pagination automatically (unless configured not to). + * @return bool + */ + public function valid() + { + //can't be valid if there's not a page (rewind sets this) + if(!isset($this->page)){ + return false; + } + + //all hal collections have an `_embedded` object, we expect there to be a property matching the collection name + if(!isset($this->page['_embedded']) OR !isset($this->page['_embedded'][$this->getCollectionName()])){ + return false; + } + + //if we have a page with no items, we've gone beyond the end of the collection + if(!count($this->page['_embedded'][$this->getCollectionName()])){ + return false; + } + + //index the start of a page at 0 + if(is_null($this->current)){ + $this->current = 0; + } + + //if our current index is past the current page, fetch the next page if possible and reset the index + if(!isset($this->page['_embedded'][$this->getCollectionName()][$this->current])){ + if(isset($this->page['_links']) AND isset($this->page['_links']['next'])){ + $this->fetchPage($this->page['_links']['next']['href']); + $this->current = 0; + + return true; + } + + return false; + } + + return true; + } + + /** + * Fetch the initial page + */ + public function rewind() + { + $this->fetchPage($this->getCollectionPath()); + } + + /** + * Count of total items + * @return integer + */ + public function count() + { + if(isset($this->page)){ + return (int) $this->page['total_items']; + } + } + + public function setPage($index) + { + $this->index = (int) $index; + return $this; + } + + public function getPage() + { + if(isset($this->page)){ + return $this->page['page']; + } + + if(isset($this->index)){ + return $this->index; + } + + throw new \RuntimeException('page not set'); + } + + public function getSize() + { + if(isset($this->page)){ + return $this->page['page_size']; + } + + if(isset($this->size)){ + return $this->size; + } + + throw new \RuntimeException('size not set'); + } + + public function setSize($size) + { + $this->size = (int) $size; + return $this; + } + + /** + * Filters reduce to query params and include paging settings. + * + * @param FilterInterface $filter + * @return $this + */ + public function setFilter(FilterInterface $filter) + { + $this->filter = $filter; + return $this; + } + + public function getFilter() + { + if(!isset($this->filter)){ + $this->setFilter(new EmptyFilter()); + } + + return $this->filter; + } + + /** + * Fetch a page using the current filter if no query is provided. + * + * @param $absoluteUri + */ + protected function fetchPage($absoluteUri) + { + //use filter if no query provided + if(false === strpos($absoluteUri, '?')){ + $query = []; + + if(isset($this->size)){ + $query['page_size'] = $this->size; + } + + if(isset($this->index)){ + $query['page_index'] = $this->index; + } + + if(isset($this->filter)){ + $query = array_merge($this->filter->getQuery(), $query); + } + + $absoluteUri .= '?' . http_build_query($query); + } + + // + $request = new Request( + $this->getClient()->getApiUrl() . $absoluteUri, + 'GET', + 'php://memory', + ['Content-Type' => 'application/json'] + ); + + $response = $this->client->send($request); + + if($response->getStatusCode() != '200'){ + throw $this->getException($response); + } + + $this->response = $response; + $this->page = json_decode($this->response->getBody()->getContents(), true); + } +} diff --git a/vendor/nexmo/client/src/Message/Client.php b/vendor/nexmo/client/src/Message/Client.php index 7a137ce4..f0ac54df 100644 --- a/vendor/nexmo/client/src/Message/Client.php +++ b/vendor/nexmo/client/src/Message/Client.php @@ -81,6 +81,37 @@ class Client implements ClientAwareInterface return $message; } + public function sendShortcode($message) { + if(!($message instanceof Shortcode)){ + $message = Shortcode::createMessageFromArray($message); + } + + $params = $message->getRequestData(); + + $request = new Request( + $this->getClient()->getRestUrl() . '/sc/us/'.$message->getType().'/json' + ,'POST', + 'php://temp', + ['content-type' => 'application/json'] + ); + + $request->getBody()->write(json_encode($params)); + $response = $this->client->send($request); + + $body = json_decode($response->getBody(), true); + + foreach ($body['messages'] as $m) { + if ($m['status'] != '0') { + $e = new Exception\Request($m['error-text'], $m['status']); + $e->setEntity($message); + throw $e; + } + } + + return $body; + + } + /** * @param $query * @return MessageInterface[] diff --git a/vendor/nexmo/client/src/Message/Shortcode.php b/vendor/nexmo/client/src/Message/Shortcode.php new file mode 100644 index 00000000..8ce1774d --- /dev/null +++ b/vendor/nexmo/client/src/Message/Shortcode.php @@ -0,0 +1,78 @@ +to = $to; + $this->custom = $custom; + $this->options = $options; + } + + public function setCustom($custom) { + $this->custom = $custom; + } + + public function setOptions($options) { + $this->options = $options; + } + + public function getType() { + return $this->type; + } + + public function getRequestData() { + // Options, then custom, then to. This is the priority + // we want so that people can't overwrite to with a custom param + return $this->options + $this->custom + [ + 'to' => $this->to + ]; + } + + public static function createMessageFromArray($data){ + if (!isset($data['type'])) { + throw new Exception('No type provided when creating a shortcode message'); + } + + if (!isset($data['to'])) { + throw new Exception('No to provided when creating a shortcode message'); + } + + $data['type'] = strtolower($data['type']); + + if ($data['type'] === '2fa') { + $m = new TwoFactor($data['to']); + } else if ($data['type'] === 'marketing') { + $m = new Marketing($data['to']); + } else if ($data['type'] === 'alert') { + $m = new Alert($data['to']); + } + + if (isset($data['custom'])) { + $m->setCustom($data['custom']); + } + + if (isset($data['options'])) { + $m->setOptions($data['options']); + } + + return $m; + } +} \ No newline at end of file diff --git a/vendor/nexmo/client/src/Message/Shortcode/Alert.php b/vendor/nexmo/client/src/Message/Shortcode/Alert.php new file mode 100644 index 00000000..ee43bcc9 --- /dev/null +++ b/vendor/nexmo/client/src/Message/Shortcode/Alert.php @@ -0,0 +1,15 @@ +addVisitor(new PhpParser\NodeVisitor\NameResolver); foreach ($files as $file) { if (strpos($file, ' Code $code\n"; + fwrite(STDERR, "====> Code $code\n"); } else { if (!file_exists($file)) { - die("File $file does not exist.\n"); + fwrite(STDERR, "File $file does not exist.\n"); + exit(1); } $code = file_get_contents($file); - echo "====> File $file:\n"; + fwrite(STDERR, "====> File $file:\n"); } if ($attributes['with-recovery']) { @@ -60,7 +61,7 @@ foreach ($files as $file) { $stmts = $parser->parse($code, $errorHandler); foreach ($errorHandler->getErrors() as $error) { $message = formatErrorMessage($error, $code, $attributes['with-column-info']); - echo $message . "\n"; + fwrite(STDERR, $message . "\n"); } if (null === $stmts) { continue; @@ -70,25 +71,26 @@ foreach ($files as $file) { $stmts = $parser->parse($code); } catch (PhpParser\Error $error) { $message = formatErrorMessage($error, $code, $attributes['with-column-info']); - die($message . "\n"); + fwrite(STDERR, $message . "\n"); + exit(1); } } foreach ($operations as $operation) { if ('dump' === $operation) { - echo "==> Node dump:\n"; + fwrite(STDERR, "==> Node dump:\n"); echo $dumper->dump($stmts, $code), "\n"; } elseif ('pretty-print' === $operation) { - echo "==> Pretty print:\n"; + fwrite(STDERR, "==> Pretty print:\n"); echo $prettyPrinter->prettyPrintFile($stmts), "\n"; } elseif ('json-dump' === $operation) { - echo "==> JSON dump:\n"; + fwrite(STDERR, "==> JSON dump:\n"); echo json_encode($stmts, JSON_PRETTY_PRINT), "\n"; } elseif ('var-dump' === $operation) { - echo "==> var_dump():\n"; + fwrite(STDERR, "==> var_dump():\n"); var_dump($stmts); } elseif ('resolve-names' === $operation) { - echo "==> Resolved names.\n"; + fwrite(STDERR, "==> Resolved names.\n"); $stmts = $traverser->traverse($stmts); } } @@ -104,9 +106,9 @@ function formatErrorMessage(PhpParser\Error $e, $code, $withColumnInfo) { function showHelp($error = '') { if ($error) { - echo $error . "\n\n"; + fwrite(STDERR, $error . "\n\n"); } - die(<<lookaheadStartAttributes, $this->endAttributes); + { makeZeroLengthNop($nop, $this->lookaheadStartAttributes); if ($nop !== null) { $1[] = $nop; } $$ = $1; } ; @@ -27,7 +27,7 @@ reserved_non_modifiers: | T_FINALLY | T_THROW | T_USE | T_INSTEADOF | T_GLOBAL | T_VAR | T_UNSET | T_ISSET | T_EMPTY | T_CONTINUE | T_GOTO | T_FUNCTION | T_CONST | T_RETURN | T_PRINT | T_YIELD | T_LIST | T_SWITCH | T_ENDSWITCH | T_CASE | T_DEFAULT | T_BREAK | T_ARRAY | T_CALLABLE | T_EXTENDS | T_IMPLEMENTS | T_NAMESPACE | T_TRAIT | T_INTERFACE | T_CLASS - | T_CLASS_C | T_TRAIT_C | T_FUNC_C | T_METHOD_C | T_LINE | T_FILE | T_DIR | T_NS_C | T_HALT_COMPILER + | T_CLASS_C | T_TRAIT_C | T_FUNC_C | T_METHOD_C | T_LINE | T_FILE | T_DIR | T_NS_C | T_HALT_COMPILER | T_FN ; semi_reserved: @@ -160,7 +160,7 @@ inner_statement_list_ex: inner_statement_list: inner_statement_list_ex - { makeNop($nop, $this->lookaheadStartAttributes, $this->endAttributes); + { makeZeroLengthNop($nop, $this->lookaheadStartAttributes); if ($nop !== null) { $1[] = $nop; } $$ = $1; } ; @@ -461,7 +461,7 @@ class_statement_list_ex: class_statement_list: class_statement_list_ex - { makeNop($nop, $this->lookaheadStartAttributes, $this->endAttributes); + { makeZeroLengthNop($nop, $this->lookaheadStartAttributes); if ($nop !== null) { $1[] = $nop; } $$ = $1; } ; @@ -579,6 +579,7 @@ expr: | variable T_SL_EQUAL expr { $$ = Expr\AssignOp\ShiftLeft [$1, $3]; } | variable T_SR_EQUAL expr { $$ = Expr\AssignOp\ShiftRight[$1, $3]; } | variable T_POW_EQUAL expr { $$ = Expr\AssignOp\Pow [$1, $3]; } + | variable T_COALESCE_EQUAL expr { $$ = Expr\AssignOp\Coalesce [$1, $3]; } | variable T_INC { $$ = Expr\PostInc[$1]; } | T_INC variable { $$ = Expr\PreInc [$2]; } | variable T_DEC { $$ = Expr\PostDec[$1]; } @@ -987,6 +988,7 @@ array_pair: | expr { $$ = Expr\ArrayItem[$1, null, false]; } | expr T_DOUBLE_ARROW '&' variable { $$ = Expr\ArrayItem[$4, $1, true]; } | '&' variable { $$ = Expr\ArrayItem[$2, null, true]; } + | T_ELLIPSIS expr { $$ = Expr\ArrayItem[$2, null, false, attributes(), true]; } ; encaps_list: diff --git a/vendor/nikic/php-parser/grammar/php7.y b/vendor/nikic/php-parser/grammar/php7.y index 45a3a036..23b193bb 100644 --- a/vendor/nikic/php-parser/grammar/php7.y +++ b/vendor/nikic/php-parser/grammar/php7.y @@ -16,7 +16,7 @@ top_statement_list_ex: top_statement_list: top_statement_list_ex - { makeNop($nop, $this->lookaheadStartAttributes, $this->endAttributes); + { makeZeroLengthNop($nop, $this->lookaheadStartAttributes); if ($nop !== null) { $1[] = $nop; } $$ = $1; } ; @@ -27,7 +27,7 @@ reserved_non_modifiers: | T_FINALLY | T_THROW | T_USE | T_INSTEADOF | T_GLOBAL | T_VAR | T_UNSET | T_ISSET | T_EMPTY | T_CONTINUE | T_GOTO | T_FUNCTION | T_CONST | T_RETURN | T_PRINT | T_YIELD | T_LIST | T_SWITCH | T_ENDSWITCH | T_CASE | T_DEFAULT | T_BREAK | T_ARRAY | T_CALLABLE | T_EXTENDS | T_IMPLEMENTS | T_NAMESPACE | T_TRAIT | T_INTERFACE | T_CLASS - | T_CLASS_C | T_TRAIT_C | T_FUNC_C | T_METHOD_C | T_LINE | T_FILE | T_DIR | T_NS_C | T_HALT_COMPILER + | T_CLASS_C | T_TRAIT_C | T_FUNC_C | T_METHOD_C | T_LINE | T_FILE | T_DIR | T_NS_C | T_HALT_COMPILER | T_FN ; semi_reserved: @@ -196,7 +196,7 @@ inner_statement_list_ex: inner_statement_list: inner_statement_list_ex - { makeNop($nop, $this->lookaheadStartAttributes, $this->endAttributes); + { makeZeroLengthNop($nop, $this->lookaheadStartAttributes); if ($nop !== null) { $1[] = $nop; } $$ = $1; } ; @@ -530,7 +530,7 @@ class_statement_list_ex: class_statement_list: class_statement_list_ex - { makeNop($nop, $this->lookaheadStartAttributes, $this->endAttributes); + { makeZeroLengthNop($nop, $this->lookaheadStartAttributes); if ($nop !== null) { $1[] = $nop; } $$ = $1; } ; @@ -660,6 +660,7 @@ expr: | variable T_SL_EQUAL expr { $$ = Expr\AssignOp\ShiftLeft [$1, $3]; } | variable T_SR_EQUAL expr { $$ = Expr\AssignOp\ShiftRight[$1, $3]; } | variable T_POW_EQUAL expr { $$ = Expr\AssignOp\Pow [$1, $3]; } + | variable T_COALESCE_EQUAL expr { $$ = Expr\AssignOp\Coalesce [$1, $3]; } | variable T_INC { $$ = Expr\PostInc[$1]; } | T_INC variable { $$ = Expr\PreInc [$2]; } | variable T_DEC { $$ = Expr\PostDec[$1]; } @@ -728,6 +729,12 @@ expr: | T_YIELD expr { $$ = Expr\Yield_[$2, null]; } | T_YIELD expr T_DOUBLE_ARROW expr { $$ = Expr\Yield_[$4, $2]; } | T_YIELD_FROM expr { $$ = Expr\YieldFrom[$2]; } + + | T_FN optional_ref '(' parameter_list ')' optional_return_type T_DOUBLE_ARROW expr + { $$ = Expr\ArrowFunction[['static' => false, 'byRef' => $2, 'params' => $4, 'returnType' => $6, 'expr' => $8]]; } + | T_STATIC T_FN optional_ref '(' parameter_list ')' optional_return_type T_DOUBLE_ARROW expr + { $$ = Expr\ArrowFunction[['static' => true, 'byRef' => $3, 'params' => $5, 'returnType' => $7, 'expr' => $9]]; } + | T_FUNCTION optional_ref '(' parameter_list ')' lexical_vars optional_return_type block_or_error { $$ = Expr\Closure[['static' => false, 'byRef' => $2, 'params' => $4, 'uses' => $6, 'returnType' => $7, 'stmts' => $8]]; } @@ -976,6 +983,7 @@ array_pair: | expr { $$ = Expr\ArrayItem[$1, null, false]; } | expr T_DOUBLE_ARROW '&' variable { $$ = Expr\ArrayItem[$4, $1, true]; } | '&' variable { $$ = Expr\ArrayItem[$2, null, true]; } + | T_ELLIPSIS expr { $$ = Expr\ArrayItem[$2, null, false, attributes(), true]; } | /* empty */ { $$ = null; } ; diff --git a/vendor/nikic/php-parser/grammar/rebuildParsers.php b/vendor/nikic/php-parser/grammar/rebuildParsers.php index 1882d5fe..b913cdac 100644 --- a/vendor/nikic/php-parser/grammar/rebuildParsers.php +++ b/vendor/nikic/php-parser/grammar/rebuildParsers.php @@ -13,9 +13,12 @@ $tmpResultFile = __DIR__ . '/tmp_parser.php'; $resultDir = __DIR__ . '/../lib/PhpParser/Parser'; $tokensResultsFile = $resultDir . '/Tokens.php'; -// check for kmyacc.exe binary in this directory, otherwise fall back to global name -$kmyacc = __DIR__ . '/kmyacc.exe'; -if (!file_exists($kmyacc)) { +// check for kmyacc binary in this directory, otherwise fall back to global name +if (file_exists(__DIR__ . '/kmyacc.exe')) { + $kmyacc = __DIR__ . '/kmyacc.exe'; +} else if (file_exists(__DIR__ . '/kmyacc')) { + $kmyacc = __DIR__ . '/kmyacc'; +} else { $kmyacc = 'kmyacc'; } @@ -175,6 +178,15 @@ function resolveMacros($code) { . ' else { ' . $args[0] . ' = null; }'; } + if ('makeZeroLengthNop' == $name) { + assertArgs(2, $args, $name); + + return '$startAttributes = ' . $args[1] . ';' + . ' if (isset($startAttributes[\'comments\']))' + . ' { ' . $args[0] . ' = new Stmt\Nop($this->createZeroLengthAttributes($startAttributes)); }' + . ' else { ' . $args[0] . ' = null; }'; + } + if ('strKind' == $name) { assertArgs(1, $args, $name); diff --git a/vendor/nikic/php-parser/grammar/tokens.y b/vendor/nikic/php-parser/grammar/tokens.y index 2b54f80b..dd83a6f8 100644 --- a/vendor/nikic/php-parser/grammar/tokens.y +++ b/vendor/nikic/php-parser/grammar/tokens.y @@ -10,7 +10,7 @@ %right T_YIELD %right T_DOUBLE_ARROW %right T_YIELD_FROM -%left '=' T_PLUS_EQUAL T_MINUS_EQUAL T_MUL_EQUAL T_DIV_EQUAL T_CONCAT_EQUAL T_MOD_EQUAL T_AND_EQUAL T_OR_EQUAL T_XOR_EQUAL T_SL_EQUAL T_SR_EQUAL T_POW_EQUAL +%left '=' T_PLUS_EQUAL T_MINUS_EQUAL T_MUL_EQUAL T_DIV_EQUAL T_CONCAT_EQUAL T_MOD_EQUAL T_AND_EQUAL T_OR_EQUAL T_XOR_EQUAL T_SL_EQUAL T_SR_EQUAL T_POW_EQUAL T_COALESCE_EQUAL %left '?' ':' %right T_COALESCE %left T_BOOLEAN_OR @@ -64,6 +64,7 @@ %token T_CONTINUE %token T_GOTO %token T_FUNCTION +%token T_FN %token T_CONST %token T_RETURN %token T_TRY diff --git a/vendor/nikic/php-parser/lib/PhpParser/BuilderFactory.php b/vendor/nikic/php-parser/lib/PhpParser/BuilderFactory.php index 77d282e0..18bd1cd5 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/BuilderFactory.php +++ b/vendor/nikic/php-parser/lib/PhpParser/BuilderFactory.php @@ -8,7 +8,6 @@ use PhpParser\Node\Expr\BinaryOp\Concat; use PhpParser\Node\Identifier; use PhpParser\Node\Name; use PhpParser\Node\Scalar\String_; -use PhpParser\Node\Stmt; use PhpParser\Node\Stmt\Use_; class BuilderFactory @@ -77,7 +76,7 @@ class BuilderFactory * @return Builder\TraitUseAdaptation The create trait use adaptation builder */ public function traitUseAdaptation($trait, $method = null) : Builder\TraitUseAdaptation { - if (is_null($method)) { + if ($method === null) { $method = $trait; $trait = null; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Lexer.php b/vendor/nikic/php-parser/lib/PhpParser/Lexer.php index 125c3b80..dc5e5332 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Lexer.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Lexer.php @@ -16,7 +16,13 @@ class Lexer protected $tokenMap; protected $dropTokens; - protected $usedAttributes; + private $attributeStartLineUsed; + private $attributeEndLineUsed; + private $attributeStartTokenPosUsed; + private $attributeEndTokenPosUsed; + private $attributeStartFilePosUsed; + private $attributeEndFilePosUsed; + private $attributeCommentsUsed; /** * Creates a Lexer. @@ -37,12 +43,17 @@ class Lexer [\T_WHITESPACE, \T_OPEN_TAG, \T_COMMENT, \T_DOC_COMMENT], 1 ); - // the usedAttributes member is a map of the used attribute names to a dummy - // value (here "true") - $options += [ - 'usedAttributes' => ['comments', 'startLine', 'endLine'], - ]; - $this->usedAttributes = array_fill_keys($options['usedAttributes'], true); + $defaultAttributes = ['comments', 'startLine', 'endLine']; + $usedAttributes = array_fill_keys($options['usedAttributes'] ?? $defaultAttributes, true); + + // Create individual boolean properties to make these checks faster. + $this->attributeStartLineUsed = isset($usedAttributes['startLine']); + $this->attributeEndLineUsed = isset($usedAttributes['endLine']); + $this->attributeStartTokenPosUsed = isset($usedAttributes['startTokenPos']); + $this->attributeEndTokenPosUsed = isset($usedAttributes['endTokenPos']); + $this->attributeStartFilePosUsed = isset($usedAttributes['startFilePos']); + $this->attributeEndFilePosUsed = isset($usedAttributes['endFilePos']); + $this->attributeCommentsUsed = isset($usedAttributes['comments']); } /** @@ -230,13 +241,13 @@ class Lexer $token = "\0"; } - if (isset($this->usedAttributes['startLine'])) { + if ($this->attributeStartLineUsed) { $startAttributes['startLine'] = $this->line; } - if (isset($this->usedAttributes['startTokenPos'])) { + if ($this->attributeStartTokenPosUsed) { $startAttributes['startTokenPos'] = $this->pos; } - if (isset($this->usedAttributes['startFilePos'])) { + if ($this->attributeStartFilePosUsed) { $startAttributes['startFilePos'] = $this->filePos; } @@ -263,7 +274,7 @@ class Lexer $this->filePos += \strlen($value); } else { if (\T_COMMENT === $token[0] || \T_DOC_COMMENT === $token[0]) { - if (isset($this->usedAttributes['comments'])) { + if ($this->attributeCommentsUsed) { $comment = \T_DOC_COMMENT === $token[0] ? new Comment\Doc($token[1], $this->line, $this->filePos, $this->pos) : new Comment($token[1], $this->line, $this->filePos, $this->pos); @@ -276,13 +287,13 @@ class Lexer continue; } - if (isset($this->usedAttributes['endLine'])) { + if ($this->attributeEndLineUsed) { $endAttributes['endLine'] = $this->line; } - if (isset($this->usedAttributes['endTokenPos'])) { + if ($this->attributeEndTokenPosUsed) { $endAttributes['endTokenPos'] = $this->pos; } - if (isset($this->usedAttributes['endFilePos'])) { + if ($this->attributeEndFilePosUsed) { $endAttributes['endFilePos'] = $this->filePos - 1; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Lexer/Emulative.php b/vendor/nikic/php-parser/lib/PhpParser/Lexer/Emulative.php index b62d79cc..5d10b9af 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Lexer/Emulative.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Lexer/Emulative.php @@ -4,27 +4,67 @@ namespace PhpParser\Lexer; use PhpParser\Error; use PhpParser\ErrorHandler; +use PhpParser\Lexer; +use PhpParser\Lexer\TokenEmulator\CoaleseEqualTokenEmulator; +use PhpParser\Lexer\TokenEmulator\FnTokenEmulator; +use PhpParser\Lexer\TokenEmulator\TokenEmulatorInterface; -class Emulative extends \PhpParser\Lexer +class Emulative extends Lexer { const PHP_7_3 = '7.3.0dev'; + const PHP_7_4 = '7.4.0dev'; + + const FLEXIBLE_DOC_STRING_REGEX = <<<'REGEX' +/<<<[ \t]*(['"]?)([a-zA-Z_\x80-\xff][a-zA-Z0-9_\x80-\xff]*)\1\r?\n +(?:.*\r?\n)*? +(?\h*)\2(?![a-zA-Z_\x80-\xff])(?(?:;?[\r\n])?)/x +REGEX; + + /** @var mixed[] Patches used to reverse changes introduced in the code */ + private $patches = []; + + /** @var TokenEmulatorInterface[] */ + private $tokenEmulators = []; /** - * @var array Patches used to reverse changes introduced in the code + * @param mixed[] $options */ - private $patches; + public function __construct(array $options = []) + { + parent::__construct($options); + + // prepare token emulators + $this->tokenEmulators[] = new FnTokenEmulator(); + $this->tokenEmulators[] = new CoaleseEqualTokenEmulator(); + + // add emulated tokens here + foreach ($this->tokenEmulators as $emulativeToken) { + $this->tokenMap[$emulativeToken->getTokenId()] = $emulativeToken->getParserTokenId(); + } + } public function startLexing(string $code, ErrorHandler $errorHandler = null) { $this->patches = []; - $preparedCode = $this->prepareCode($code); - if (null === $preparedCode) { + + if ($this->isEmulationNeeded($code) === false) { // Nothing to emulate, yay parent::startLexing($code, $errorHandler); return; } $collector = new ErrorHandler\Collecting(); + + // 1. emulation of heredoc and nowdoc new syntax + $preparedCode = $this->processHeredocNowdoc($code); parent::startLexing($preparedCode, $collector); + + // add token emulation + foreach ($this->tokenEmulators as $emulativeToken) { + if ($emulativeToken->isEmulationNeeded($code)) { + $this->tokens = $emulativeToken->emulate($code, $this->tokens); + } + } + $this->fixupTokens(); $errors = $collector->getErrors(); @@ -36,30 +76,25 @@ class Emulative extends \PhpParser\Lexer } } - /** - * Prepares code for emulation. If nothing has to be emulated null is returned. - * - * @param string $code - * @return null|string - */ - private function prepareCode(string $code) { + private function isHeredocNowdocEmulationNeeded(string $code): bool + { + // skip version where this works without emulation if (version_compare(\PHP_VERSION, self::PHP_7_3, '>=')) { - return null; + return false; } - if (strpos($code, '<<<') === false) { - // Definitely doesn't contain heredoc/nowdoc - return null; + return strpos($code, '<<<') !== false; + } + + private function processHeredocNowdoc(string $code): string + { + if ($this->isHeredocNowdocEmulationNeeded($code) === false) { + return $code; } - $flexibleDocStringRegex = <<<'REGEX' -/<<<[ \t]*(['"]?)([a-zA-Z_\x80-\xff][a-zA-Z0-9_\x80-\xff]*)\1\r?\n -(?:.*\r?\n)*? -(?\h*)\2(?![a-zA-Z_\x80-\xff])(?(?:;?[\r\n])?)/x -REGEX; - if (!preg_match_all($flexibleDocStringRegex, $code, $matches, PREG_SET_ORDER|PREG_OFFSET_CAPTURE)) { + if (!preg_match_all(self::FLEXIBLE_DOC_STRING_REGEX, $code, $matches, PREG_SET_ORDER|PREG_OFFSET_CAPTURE)) { // No heredoc/nowdoc found - return null; + return $code; } // Keep track of how much we need to adjust string offsets due to the modifications we @@ -93,19 +128,29 @@ REGEX; } } - if (empty($this->patches)) { - // We did not end up emulating anything - return null; - } - return $code; } - private function fixupTokens() { - assert(count($this->patches) > 0); + private function isEmulationNeeded(string $code): bool + { + foreach ($this->tokenEmulators as $emulativeToken) { + if ($emulativeToken->isEmulationNeeded($code)) { + return true; + } + } + + return $this->isHeredocNowdocEmulationNeeded($code); + } + + private function fixupTokens() + { + if (\count($this->patches) === 0) { + return; + } // Load first patch $patchIdx = 0; + list($patchPos, $patchType, $patchText) = $this->patches[$patchIdx]; // We use a manual loop over the tokens, because we modify the array on the fly @@ -200,4 +245,4 @@ REGEX; $error->setAttributes($attrs); } } -} \ No newline at end of file +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/CoaleseEqualTokenEmulator.php b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/CoaleseEqualTokenEmulator.php new file mode 100644 index 00000000..ca6cf134 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/CoaleseEqualTokenEmulator.php @@ -0,0 +1,54 @@ +=')) { + return false; + } + + return strpos($code, '??=') !== false; + } + + public function emulate(string $code, array $tokens): array + { + // We need to manually iterate and manage a count because we'll change + // the tokens array on the way + $line = 1; + for ($i = 0, $c = count($tokens); $i < $c; ++$i) { + if (isset($tokens[$i + 1])) { + if ($tokens[$i][0] === T_COALESCE && $tokens[$i + 1] === '=') { + array_splice($tokens, $i, 2, [ + [self::T_COALESCE_EQUAL, '??=', $line] + ]); + $c--; + continue; + } + } + if (\is_array($tokens[$i])) { + $line += substr_count($tokens[$i][1], "\n"); + } + } + + return $tokens; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/FnTokenEmulator.php b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/FnTokenEmulator.php new file mode 100644 index 00000000..2059693a --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/FnTokenEmulator.php @@ -0,0 +1,66 @@ +=')) { + return false; + } + + return strpos($code, 'fn') !== false; + } + + public function emulate(string $code, array $tokens): array + { + // We need to manually iterate and manage a count because we'll change + // the tokens array on the way + foreach ($tokens as $i => $token) { + if ($token[0] === T_STRING && $token[1] === 'fn') { + $previousNonSpaceToken = $this->getPreviousNonSpaceToken($tokens, $i); + if ($previousNonSpaceToken !== null && $previousNonSpaceToken[0] === T_OBJECT_OPERATOR) { + continue; + } + + $tokens[$i][0] = self::T_FN; + } + } + + return $tokens; + } + + /** + * @param mixed[] $tokens + * @return mixed[]|null + */ + private function getPreviousNonSpaceToken(array $tokens, int $start) + { + for ($i = $start - 1; $i >= 0; --$i) { + if ($tokens[$i][0] === T_WHITESPACE) { + continue; + } + + return $tokens[$i]; + } + + return null; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/TokenEmulatorInterface.php b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/TokenEmulatorInterface.php new file mode 100644 index 00000000..6ef5b9d0 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/TokenEmulatorInterface.php @@ -0,0 +1,17 @@ +attributes = $attributes; $this->value = $value; $this->byRef = $byRef; $this->unpack = $unpack; diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Const_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Const_.php index 76a220f4..4094a653 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Const_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Const_.php @@ -22,7 +22,7 @@ class Const_ extends NodeAbstract * @param array $attributes Additional attributes */ public function __construct($name, Expr $value, array $attributes = []) { - parent::__construct($attributes); + $this->attributes = $attributes; $this->name = \is_string($name) ? new Identifier($name) : $name; $this->value = $value; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayDimFetch.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayDimFetch.php index 7c7dcecf..71694478 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayDimFetch.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayDimFetch.php @@ -19,7 +19,7 @@ class ArrayDimFetch extends Expr * @param array $attributes Additional attributes */ public function __construct(Expr $var, Expr $dim = null, array $attributes = []) { - parent::__construct($attributes); + $this->attributes = $attributes; $this->var = $var; $this->dim = $dim; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayItem.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayItem.php index bf9c7fde..1b078f82 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayItem.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayItem.php @@ -12,6 +12,8 @@ class ArrayItem extends Expr public $value; /** @var bool Whether to assign by reference */ public $byRef; + /** @var bool Whether to unpack the argument */ + public $unpack; /** * Constructs an array item node. @@ -21,17 +23,18 @@ class ArrayItem extends Expr * @param bool $byRef Whether to assign by reference * @param array $attributes Additional attributes */ - public function __construct(Expr $value, Expr $key = null, bool $byRef = false, array $attributes = []) { - parent::__construct($attributes); + public function __construct(Expr $value, Expr $key = null, bool $byRef = false, array $attributes = [], bool $unpack = false) { + $this->attributes = $attributes; $this->key = $key; $this->value = $value; $this->byRef = $byRef; + $this->unpack = $unpack; } public function getSubNodeNames() : array { - return ['key', 'value', 'byRef']; + return ['key', 'value', 'byRef', 'unpack']; } - + public function getType() : string { return 'Expr_ArrayItem'; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Array_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Array_.php index 061c52e3..fbe207ee 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Array_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Array_.php @@ -20,7 +20,7 @@ class Array_ extends Expr * @param array $attributes Additional attributes */ public function __construct(array $items = [], array $attributes = []) { - parent::__construct($attributes); + $this->attributes = $attributes; $this->items = $items; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrowFunction.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrowFunction.php new file mode 100644 index 00000000..b4b816f6 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrowFunction.php @@ -0,0 +1,71 @@ + false : Whether the closure is static + * 'byRef' => false : Whether to return by reference + * 'params' => array() : Parameters + * 'returnType' => null : Return type + * 'expr' => Expr : Expression body + * @param array $attributes Additional attributes + */ + public function __construct(array $subNodes = [], array $attributes = []) { + $this->attributes = $attributes; + $this->static = $subNodes['static'] ?? false; + $this->byRef = $subNodes['byRef'] ?? false; + $this->params = $subNodes['params'] ?? []; + $returnType = $subNodes['returnType'] ?? null; + $this->returnType = \is_string($returnType) ? new Node\Identifier($returnType) : $returnType; + $this->expr = $subNodes['expr'] ?? null; + } + + public function getSubNodeNames() : array { + return ['static', 'byRef', 'params', 'returnType', 'expr']; + } + + public function returnsByRef() : bool { + return $this->byRef; + } + + public function getParams() : array { + return $this->params; + } + + public function getReturnType() { + return $this->returnType; + } + + /** + * @return Node\Stmt\Return_[] + */ + public function getStmts() : array { + return [new Node\Stmt\Return_($this->expr)]; + } + + public function getType() : string { + return 'Expr_ArrowFunction'; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Assign.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Assign.php index 1306c88f..cf9e6e82 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Assign.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Assign.php @@ -19,7 +19,7 @@ class Assign extends Expr * @param array $attributes Additional attributes */ public function __construct(Expr $var, Expr $expr, array $attributes = []) { - parent::__construct($attributes); + $this->attributes = $attributes; $this->var = $var; $this->expr = $expr; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp.php index e5bdbf58..bce8604f 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp.php @@ -19,7 +19,7 @@ abstract class AssignOp extends Expr * @param array $attributes Additional attributes */ public function __construct(Expr $var, Expr $expr, array $attributes = []) { - parent::__construct($attributes); + $this->attributes = $attributes; $this->var = $var; $this->expr = $expr; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Coalesce.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Coalesce.php new file mode 100644 index 00000000..c0e9b316 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Coalesce.php @@ -0,0 +1,12 @@ +attributes = $attributes; $this->var = $var; $this->expr = $expr; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp.php index 466b01a2..d9c582b0 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp.php @@ -19,7 +19,7 @@ abstract class BinaryOp extends Expr * @param array $attributes Additional attributes */ public function __construct(Expr $left, Expr $right, array $attributes = []) { - parent::__construct($attributes); + $this->attributes = $attributes; $this->left = $left; $this->right = $right; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BitwiseNot.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BitwiseNot.php index f96fdddc..ed44984b 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BitwiseNot.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BitwiseNot.php @@ -16,7 +16,7 @@ class BitwiseNot extends Expr * @param array $attributes Additional attributes */ public function __construct(Expr $expr, array $attributes = []) { - parent::__construct($attributes); + $this->attributes = $attributes; $this->expr = $expr; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BooleanNot.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BooleanNot.php index 1ae74b16..bf27e9f6 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BooleanNot.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BooleanNot.php @@ -16,7 +16,7 @@ class BooleanNot extends Expr * @param array $attributes Additional attributes */ public function __construct(Expr $expr, array $attributes = []) { - parent::__construct($attributes); + $this->attributes = $attributes; $this->expr = $expr; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast.php index 8fd0285e..36769d4f 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast.php @@ -16,7 +16,7 @@ abstract class Cast extends Expr * @param array $attributes Additional attributes */ public function __construct(Expr $expr, array $attributes = []) { - parent::__construct($attributes); + $this->attributes = $attributes; $this->expr = $expr; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ClassConstFetch.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ClassConstFetch.php index 9aaea3c9..faf832f9 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ClassConstFetch.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ClassConstFetch.php @@ -21,7 +21,7 @@ class ClassConstFetch extends Expr * @param array $attributes Additional attributes */ public function __construct($class, $name, array $attributes = []) { - parent::__construct($attributes); + $this->attributes = $attributes; $this->class = $class; $this->name = \is_string($name) ? new Identifier($name) : $name; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Clone_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Clone_.php index 9f6931a6..db216b8f 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Clone_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Clone_.php @@ -16,7 +16,7 @@ class Clone_ extends Expr * @param array $attributes Additional attributes */ public function __construct(Expr $expr, array $attributes = []) { - parent::__construct($attributes); + $this->attributes = $attributes; $this->expr = $expr; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Closure.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Closure.php index 261b4440..dfda88a7 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Closure.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Closure.php @@ -34,7 +34,7 @@ class Closure extends Expr implements FunctionLike * @param array $attributes Additional attributes */ public function __construct(array $subNodes = [], array $attributes = []) { - parent::__construct($attributes); + $this->attributes = $attributes; $this->static = $subNodes['static'] ?? false; $this->byRef = $subNodes['byRef'] ?? false; $this->params = $subNodes['params'] ?? []; diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ClosureUse.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ClosureUse.php index 4c551684..2b8a0966 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ClosureUse.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ClosureUse.php @@ -19,7 +19,7 @@ class ClosureUse extends Expr * @param array $attributes Additional attributes */ public function __construct(Expr\Variable $var, bool $byRef = false, array $attributes = []) { - parent::__construct($attributes); + $this->attributes = $attributes; $this->var = $var; $this->byRef = $byRef; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ConstFetch.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ConstFetch.php index 875ddf3c..14ebd16b 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ConstFetch.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ConstFetch.php @@ -17,7 +17,7 @@ class ConstFetch extends Expr * @param array $attributes Additional attributes */ public function __construct(Name $name, array $attributes = []) { - parent::__construct($attributes); + $this->attributes = $attributes; $this->name = $name; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Empty_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Empty_.php index 2e0c43b0..4042ec93 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Empty_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Empty_.php @@ -16,7 +16,7 @@ class Empty_ extends Expr * @param array $attributes Additional attributes */ public function __construct(Expr $expr, array $attributes = []) { - parent::__construct($attributes); + $this->attributes = $attributes; $this->expr = $expr; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Error.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Error.php index 90f6cbbc..1637f3ae 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Error.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Error.php @@ -18,7 +18,7 @@ class Error extends Expr * @param array $attributes Additional attributes */ public function __construct(array $attributes = []) { - parent::__construct($attributes); + $this->attributes = $attributes; } public function getSubNodeNames() : array { diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ErrorSuppress.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ErrorSuppress.php index 345c8d46..c44ff6f9 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ErrorSuppress.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ErrorSuppress.php @@ -16,7 +16,7 @@ class ErrorSuppress extends Expr * @param array $attributes Additional attributes */ public function __construct(Expr $expr, array $attributes = []) { - parent::__construct($attributes); + $this->attributes = $attributes; $this->expr = $expr; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Eval_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Eval_.php index d421595a..85685474 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Eval_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Eval_.php @@ -16,7 +16,7 @@ class Eval_ extends Expr * @param array $attributes Additional attributes */ public function __construct(Expr $expr, array $attributes = []) { - parent::__construct($attributes); + $this->attributes = $attributes; $this->expr = $expr; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Exit_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Exit_.php index 58134811..b88a8f7e 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Exit_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Exit_.php @@ -20,7 +20,7 @@ class Exit_ extends Expr * @param array $attributes Additional attributes */ public function __construct(Expr $expr = null, array $attributes = []) { - parent::__construct($attributes); + $this->attributes = $attributes; $this->expr = $expr; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/FuncCall.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/FuncCall.php index 79457670..1e8afa55 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/FuncCall.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/FuncCall.php @@ -20,7 +20,7 @@ class FuncCall extends Expr * @param array $attributes Additional attributes */ public function __construct($name, array $args = [], array $attributes = []) { - parent::__construct($attributes); + $this->attributes = $attributes; $this->name = $name; $this->args = $args; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Include_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Include_.php index aa6e55d1..07ce5968 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Include_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Include_.php @@ -24,7 +24,7 @@ class Include_ extends Expr * @param array $attributes Additional attributes */ public function __construct(Expr $expr, int $type, array $attributes = []) { - parent::__construct($attributes); + $this->attributes = $attributes; $this->expr = $expr; $this->type = $type; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Instanceof_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Instanceof_.php index 5b73d027..9000d47b 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Instanceof_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Instanceof_.php @@ -20,7 +20,7 @@ class Instanceof_ extends Expr * @param array $attributes Additional attributes */ public function __construct(Expr $expr, $class, array $attributes = []) { - parent::__construct($attributes); + $this->attributes = $attributes; $this->expr = $expr; $this->class = $class; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Isset_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Isset_.php index 5e192cfe..76b73875 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Isset_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Isset_.php @@ -16,7 +16,7 @@ class Isset_ extends Expr * @param array $attributes Additional attributes */ public function __construct(array $vars, array $attributes = []) { - parent::__construct($attributes); + $this->attributes = $attributes; $this->vars = $vars; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/List_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/List_.php index cc156e3a..c27a27b9 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/List_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/List_.php @@ -16,7 +16,7 @@ class List_ extends Expr * @param array $attributes Additional attributes */ public function __construct(array $items, array $attributes = []) { - parent::__construct($attributes); + $this->attributes = $attributes; $this->items = $items; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/MethodCall.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/MethodCall.php index e0fe3271..bd81bb43 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/MethodCall.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/MethodCall.php @@ -24,7 +24,7 @@ class MethodCall extends Expr * @param array $attributes Additional attributes */ public function __construct(Expr $var, $name, array $args = [], array $attributes = []) { - parent::__construct($attributes); + $this->attributes = $attributes; $this->var = $var; $this->name = \is_string($name) ? new Identifier($name) : $name; $this->args = $args; diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/New_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/New_.php index f4380082..c86f0c60 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/New_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/New_.php @@ -20,7 +20,7 @@ class New_ extends Expr * @param array $attributes Additional attributes */ public function __construct($class, array $args = [], array $attributes = []) { - parent::__construct($attributes); + $this->attributes = $attributes; $this->class = $class; $this->args = $args; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PostDec.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PostDec.php index c3f21a2c..94d6c296 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PostDec.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PostDec.php @@ -16,7 +16,7 @@ class PostDec extends Expr * @param array $attributes Additional attributes */ public function __construct(Expr $var, array $attributes = []) { - parent::__construct($attributes); + $this->attributes = $attributes; $this->var = $var; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PostInc.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PostInc.php index e8b07d80..005c443a 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PostInc.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PostInc.php @@ -16,7 +16,7 @@ class PostInc extends Expr * @param array $attributes Additional attributes */ public function __construct(Expr $var, array $attributes = []) { - parent::__construct($attributes); + $this->attributes = $attributes; $this->var = $var; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PreDec.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PreDec.php index d31b2580..a5ca685a 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PreDec.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PreDec.php @@ -16,7 +16,7 @@ class PreDec extends Expr * @param array $attributes Additional attributes */ public function __construct(Expr $var, array $attributes = []) { - parent::__construct($attributes); + $this->attributes = $attributes; $this->var = $var; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PreInc.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PreInc.php index 68be695b..0986c447 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PreInc.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PreInc.php @@ -16,7 +16,7 @@ class PreInc extends Expr * @param array $attributes Additional attributes */ public function __construct(Expr $var, array $attributes = []) { - parent::__construct($attributes); + $this->attributes = $attributes; $this->var = $var; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Print_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Print_.php index 9d514e65..2d43c2ac 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Print_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Print_.php @@ -16,7 +16,7 @@ class Print_ extends Expr * @param array $attributes Additional attributes */ public function __construct(Expr $expr, array $attributes = []) { - parent::__construct($attributes); + $this->attributes = $attributes; $this->expr = $expr; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PropertyFetch.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PropertyFetch.php index 90efef3d..4281f31c 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PropertyFetch.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PropertyFetch.php @@ -20,7 +20,7 @@ class PropertyFetch extends Expr * @param array $attributes Additional attributes */ public function __construct(Expr $var, $name, array $attributes = []) { - parent::__construct($attributes); + $this->attributes = $attributes; $this->var = $var; $this->name = \is_string($name) ? new Identifier($name) : $name; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ShellExec.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ShellExec.php index 59708d66..537a7cc8 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ShellExec.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ShellExec.php @@ -16,7 +16,7 @@ class ShellExec extends Expr * @param array $attributes Additional attributes */ public function __construct(array $parts, array $attributes = []) { - parent::__construct($attributes); + $this->attributes = $attributes; $this->parts = $parts; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticCall.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticCall.php index e467c221..9883f5af 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticCall.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticCall.php @@ -24,7 +24,7 @@ class StaticCall extends Expr * @param array $attributes Additional attributes */ public function __construct($class, $name, array $args = [], array $attributes = []) { - parent::__construct($attributes); + $this->attributes = $attributes; $this->class = $class; $this->name = \is_string($name) ? new Identifier($name) : $name; $this->args = $args; diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticPropertyFetch.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticPropertyFetch.php index 809b6662..1ee1a25e 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticPropertyFetch.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticPropertyFetch.php @@ -21,7 +21,7 @@ class StaticPropertyFetch extends Expr * @param array $attributes Additional attributes */ public function __construct($class, $name, array $attributes = []) { - parent::__construct($attributes); + $this->attributes = $attributes; $this->class = $class; $this->name = \is_string($name) ? new VarLikeIdentifier($name) : $name; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Ternary.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Ternary.php index cb36145e..9316f47d 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Ternary.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Ternary.php @@ -22,7 +22,7 @@ class Ternary extends Expr * @param array $attributes Additional attributes */ public function __construct(Expr $cond, $if, Expr $else, array $attributes = []) { - parent::__construct($attributes); + $this->attributes = $attributes; $this->cond = $cond; $this->if = $if; $this->else = $else; diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryMinus.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryMinus.php index 90be0e05..ce8808bc 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryMinus.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryMinus.php @@ -16,7 +16,7 @@ class UnaryMinus extends Expr * @param array $attributes Additional attributes */ public function __construct(Expr $expr, array $attributes = []) { - parent::__construct($attributes); + $this->attributes = $attributes; $this->expr = $expr; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryPlus.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryPlus.php index 1a5bc632..d23047e5 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryPlus.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryPlus.php @@ -16,7 +16,7 @@ class UnaryPlus extends Expr * @param array $attributes Additional attributes */ public function __construct(Expr $expr, array $attributes = []) { - parent::__construct($attributes); + $this->attributes = $attributes; $this->expr = $expr; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Variable.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Variable.php index b100f214..1f2b2314 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Variable.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Variable.php @@ -16,7 +16,7 @@ class Variable extends Expr * @param array $attributes Additional attributes */ public function __construct($name, array $attributes = []) { - parent::__construct($attributes); + $this->attributes = $attributes; $this->name = $name; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/YieldFrom.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/YieldFrom.php index ab3a2754..a3efce61 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/YieldFrom.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/YieldFrom.php @@ -16,7 +16,7 @@ class YieldFrom extends Expr * @param array $attributes Additional attributes */ public function __construct(Expr $expr, array $attributes = []) { - parent::__construct($attributes); + $this->attributes = $attributes; $this->expr = $expr; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Yield_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Yield_.php index a28a701a..aef8fc33 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Yield_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Yield_.php @@ -19,7 +19,7 @@ class Yield_ extends Expr * @param array $attributes Additional attributes */ public function __construct(Expr $value = null, Expr $key = null, array $attributes = []) { - parent::__construct($attributes); + $this->attributes = $attributes; $this->key = $key; $this->value = $value; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Identifier.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Identifier.php index 485b5b9d..2f262db0 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Identifier.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Identifier.php @@ -25,7 +25,7 @@ class Identifier extends NodeAbstract * @param array $attributes Additional attributes */ public function __construct(string $name, array $attributes = []) { - parent::__construct($attributes); + $this->attributes = $attributes; $this->name = $name; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Name.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Name.php index 5d923d02..7ebdd579 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Name.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Name.php @@ -6,9 +6,7 @@ use PhpParser\NodeAbstract; class Name extends NodeAbstract { - /** - * @var string[] Parts of the name - */ + /** @var string[] Parts of the name */ public $parts; private static $specialClassNames = [ @@ -24,7 +22,7 @@ class Name extends NodeAbstract * @param array $attributes Additional attributes */ public function __construct($name, array $attributes = []) { - parent::__construct($attributes); + $this->attributes = $attributes; $this->parts = self::prepareName($name); } @@ -237,7 +235,7 @@ class Name extends NodeAbstract 'Expected string, array of parts or Name instance' ); } - + public function getType() : string { return 'Name'; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/NullableType.php b/vendor/nikic/php-parser/lib/PhpParser/Node/NullableType.php index 3679269e..36463657 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/NullableType.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/NullableType.php @@ -16,7 +16,7 @@ class NullableType extends NodeAbstract * @param array $attributes Additional attributes */ public function __construct($type, array $attributes = []) { - parent::__construct($attributes); + $this->attributes = $attributes; $this->type = \is_string($type) ? new Identifier($type) : $type; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Param.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Param.php index 37d99392..5bc8a1cb 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Param.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Param.php @@ -31,7 +31,7 @@ class Param extends NodeAbstract $var, Expr $default = null, $type = null, bool $byRef = false, bool $variadic = false, array $attributes = [] ) { - parent::__construct($attributes); + $this->attributes = $attributes; $this->type = \is_string($type) ? new Identifier($type) : $type; $this->byRef = $byRef; $this->variadic = $variadic; diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/DNumber.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/DNumber.php index d6934d33..7b7ae378 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/DNumber.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/DNumber.php @@ -16,7 +16,7 @@ class DNumber extends Scalar * @param array $attributes Additional attributes */ public function __construct(float $value, array $attributes = []) { - parent::__construct($attributes); + $this->attributes = $attributes; $this->value = $value; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/Encapsed.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/Encapsed.php index 0541a31e..fa5d2e26 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/Encapsed.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/Encapsed.php @@ -17,7 +17,7 @@ class Encapsed extends Scalar * @param array $attributes Additional attributes */ public function __construct(array $parts, array $attributes = []) { - parent::__construct($attributes); + $this->attributes = $attributes; $this->parts = $parts; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/EncapsedStringPart.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/EncapsedStringPart.php index 89048e21..bb3194c1 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/EncapsedStringPart.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/EncapsedStringPart.php @@ -16,7 +16,7 @@ class EncapsedStringPart extends Scalar * @param array $attributes Additional attributes */ public function __construct(string $value, array $attributes = []) { - parent::__construct($attributes); + $this->attributes = $attributes; $this->value = $value; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/LNumber.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/LNumber.php index 7b9ec5e9..5c5aca3f 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/LNumber.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/LNumber.php @@ -23,7 +23,7 @@ class LNumber extends Scalar * @param array $attributes Additional attributes */ public function __construct(int $value, array $attributes = []) { - parent::__construct($attributes); + $this->attributes = $attributes; $this->value = $value; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst.php index 841f4f8b..941f0c76 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst.php @@ -12,7 +12,7 @@ abstract class MagicConst extends Scalar * @param array $attributes Additional attributes */ public function __construct(array $attributes = []) { - parent::__construct($attributes); + $this->attributes = $attributes; } public function getSubNodeNames() : array { diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/String_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/String_.php index cf12e8c6..de6318d0 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/String_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/String_.php @@ -34,7 +34,7 @@ class String_ extends Scalar * @param array $attributes Additional attributes */ public function __construct(string $value, array $attributes = []) { - parent::__construct($attributes); + $this->attributes = $attributes; $this->value = $value; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Break_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Break_.php index 57df3eae..6adc5a6c 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Break_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Break_.php @@ -16,7 +16,7 @@ class Break_ extends Node\Stmt * @param array $attributes Additional attributes */ public function __construct(Node\Expr $num = null, array $attributes = []) { - parent::__construct($attributes); + $this->attributes = $attributes; $this->num = $num; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Case_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Case_.php index 81952be0..2bf044c9 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Case_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Case_.php @@ -19,7 +19,7 @@ class Case_ extends Node\Stmt * @param array $attributes Additional attributes */ public function __construct($cond, array $stmts = [], array $attributes = []) { - parent::__construct($attributes); + $this->attributes = $attributes; $this->cond = $cond; $this->stmts = $stmts; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Catch_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Catch_.php index 49cecf39..7d4a7034 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Catch_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Catch_.php @@ -25,7 +25,7 @@ class Catch_ extends Node\Stmt public function __construct( array $types, Expr\Variable $var, array $stmts = [], array $attributes = [] ) { - parent::__construct($attributes); + $this->attributes = $attributes; $this->types = $types; $this->var = $var; $this->stmts = $stmts; diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassConst.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassConst.php index ff2f40d2..73a50103 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassConst.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassConst.php @@ -19,7 +19,7 @@ class ClassConst extends Node\Stmt * @param array $attributes Additional attributes */ public function __construct(array $consts, int $flags = 0, array $attributes = []) { - parent::__construct($attributes); + $this->attributes = $attributes; $this->flags = $flags; $this->consts = $consts; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassMethod.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassMethod.php index 550b54ba..881dcd7f 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassMethod.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassMethod.php @@ -51,7 +51,7 @@ class ClassMethod extends Node\Stmt implements FunctionLike * @param array $attributes Additional attributes */ public function __construct($name, array $subNodes = [], array $attributes = []) { - parent::__construct($attributes); + $this->attributes = $attributes; $this->flags = $subNodes['flags'] ?? $subNodes['type'] ?? 0; $this->byRef = $subNodes['byRef'] ?? false; $this->name = \is_string($name) ? new Node\Identifier($name) : $name; diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Class_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Class_.php index 78bd1957..a97c3f4a 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Class_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Class_.php @@ -35,7 +35,7 @@ class Class_ extends ClassLike * @param array $attributes Additional attributes */ public function __construct($name, array $subNodes = [], array $attributes = []) { - parent::__construct($attributes); + $this->attributes = $attributes; $this->flags = $subNodes['flags'] ?? $subNodes['type'] ?? 0; $this->name = \is_string($name) ? new Node\Identifier($name) : $name; $this->extends = $subNodes['extends'] ?? null; diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Const_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Const_.php index c1786bed..e6316345 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Const_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Const_.php @@ -16,7 +16,7 @@ class Const_ extends Node\Stmt * @param array $attributes Additional attributes */ public function __construct(array $consts, array $attributes = []) { - parent::__construct($attributes); + $this->attributes = $attributes; $this->consts = $consts; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Continue_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Continue_.php index 7e143ac9..24882683 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Continue_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Continue_.php @@ -16,7 +16,7 @@ class Continue_ extends Node\Stmt * @param array $attributes Additional attributes */ public function __construct(Node\Expr $num = null, array $attributes = []) { - parent::__construct($attributes); + $this->attributes = $attributes; $this->num = $num; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/DeclareDeclare.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/DeclareDeclare.php index 40bec303..ac07f30c 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/DeclareDeclare.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/DeclareDeclare.php @@ -19,7 +19,7 @@ class DeclareDeclare extends Node\Stmt * @param array $attributes Additional attributes */ public function __construct($key, Node\Expr $value, array $attributes = []) { - parent::__construct($attributes); + $this->attributes = $attributes; $this->key = \is_string($key) ? new Node\Identifier($key) : $key; $this->value = $value; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Declare_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Declare_.php index 305e07d5..f46ff0ba 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Declare_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Declare_.php @@ -19,7 +19,7 @@ class Declare_ extends Node\Stmt * @param array $attributes Additional attributes */ public function __construct(array $declares, array $stmts = null, array $attributes = []) { - parent::__construct($attributes); + $this->attributes = $attributes; $this->declares = $declares; $this->stmts = $stmts; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Do_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Do_.php index 778c7398..78e90da0 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Do_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Do_.php @@ -19,7 +19,7 @@ class Do_ extends Node\Stmt * @param array $attributes Additional attributes */ public function __construct(Node\Expr $cond, array $stmts = [], array $attributes = []) { - parent::__construct($attributes); + $this->attributes = $attributes; $this->cond = $cond; $this->stmts = $stmts; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Echo_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Echo_.php index 9c35c616..7cc50d5d 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Echo_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Echo_.php @@ -16,7 +16,7 @@ class Echo_ extends Node\Stmt * @param array $attributes Additional attributes */ public function __construct(array $exprs, array $attributes = []) { - parent::__construct($attributes); + $this->attributes = $attributes; $this->exprs = $exprs; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ElseIf_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ElseIf_.php index f518d512..eef1ece3 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ElseIf_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ElseIf_.php @@ -19,7 +19,7 @@ class ElseIf_ extends Node\Stmt * @param array $attributes Additional attributes */ public function __construct(Node\Expr $cond, array $stmts = [], array $attributes = []) { - parent::__construct($attributes); + $this->attributes = $attributes; $this->cond = $cond; $this->stmts = $stmts; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Else_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Else_.php index c7015c69..0e61778e 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Else_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Else_.php @@ -16,7 +16,7 @@ class Else_ extends Node\Stmt * @param array $attributes Additional attributes */ public function __construct(array $stmts = [], array $attributes = []) { - parent::__construct($attributes); + $this->attributes = $attributes; $this->stmts = $stmts; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Expression.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Expression.php index 1e2aa394..99d1687d 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Expression.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Expression.php @@ -19,7 +19,7 @@ class Expression extends Node\Stmt * @param array $attributes Additional attributes */ public function __construct(Node\Expr $expr, array $attributes = []) { - parent::__construct($attributes); + $this->attributes = $attributes; $this->expr = $expr; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Finally_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Finally_.php index 0498f5bf..d55b8b68 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Finally_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Finally_.php @@ -16,7 +16,7 @@ class Finally_ extends Node\Stmt * @param array $attributes Additional attributes */ public function __construct(array $stmts = [], array $attributes = []) { - parent::__construct($attributes); + $this->attributes = $attributes; $this->stmts = $stmts; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/For_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/For_.php index 3e208914..1323d37c 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/For_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/For_.php @@ -26,7 +26,7 @@ class For_ extends Node\Stmt * @param array $attributes Additional attributes */ public function __construct(array $subNodes = [], array $attributes = []) { - parent::__construct($attributes); + $this->attributes = $attributes; $this->init = $subNodes['init'] ?? []; $this->cond = $subNodes['cond'] ?? []; $this->loop = $subNodes['loop'] ?? []; diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Foreach_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Foreach_.php index 9c8e88f8..0556a7ce 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Foreach_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Foreach_.php @@ -29,7 +29,7 @@ class Foreach_ extends Node\Stmt * @param array $attributes Additional attributes */ public function __construct(Node\Expr $expr, Node\Expr $valueVar, array $subNodes = [], array $attributes = []) { - parent::__construct($attributes); + $this->attributes = $attributes; $this->expr = $expr; $this->keyVar = $subNodes['keyVar'] ?? null; $this->byRef = $subNodes['byRef'] ?? false; diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Function_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Function_.php index a0bd2570..d11a4df9 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Function_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Function_.php @@ -33,7 +33,7 @@ class Function_ extends Node\Stmt implements FunctionLike * @param array $attributes Additional attributes */ public function __construct($name, array $subNodes = [], array $attributes = []) { - parent::__construct($attributes); + $this->attributes = $attributes; $this->byRef = $subNodes['byRef'] ?? false; $this->name = \is_string($name) ? new Node\Identifier($name) : $name; $this->params = $subNodes['params'] ?? []; diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Global_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Global_.php index 8e616487..a0022ad9 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Global_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Global_.php @@ -16,7 +16,7 @@ class Global_ extends Node\Stmt * @param array $attributes Additional attributes */ public function __construct(array $vars, array $attributes = []) { - parent::__construct($attributes); + $this->attributes = $attributes; $this->vars = $vars; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Goto_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Goto_.php index 35052b8a..24a57f78 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Goto_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Goto_.php @@ -17,7 +17,7 @@ class Goto_ extends Stmt * @param array $attributes Additional attributes */ public function __construct($name, array $attributes = []) { - parent::__construct($attributes); + $this->attributes = $attributes; $this->name = \is_string($name) ? new Identifier($name) : $name; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/GroupUse.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/GroupUse.php index e0d7e604..24520d22 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/GroupUse.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/GroupUse.php @@ -23,7 +23,7 @@ class GroupUse extends Stmt * @param array $attributes Additional attributes */ public function __construct(Name $prefix, array $uses, int $type = Use_::TYPE_NORMAL, array $attributes = []) { - parent::__construct($attributes); + $this->attributes = $attributes; $this->type = $type; $this->prefix = $prefix; $this->uses = $uses; diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/HaltCompiler.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/HaltCompiler.php index c86d71e1..8e624e0f 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/HaltCompiler.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/HaltCompiler.php @@ -16,7 +16,7 @@ class HaltCompiler extends Stmt * @param array $attributes Additional attributes */ public function __construct(string $remaining, array $attributes = []) { - parent::__construct($attributes); + $this->attributes = $attributes; $this->remaining = $remaining; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/If_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/If_.php index 87cd313b..a1bae4bf 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/If_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/If_.php @@ -26,7 +26,7 @@ class If_ extends Node\Stmt * @param array $attributes Additional attributes */ public function __construct(Node\Expr $cond, array $subNodes = [], array $attributes = []) { - parent::__construct($attributes); + $this->attributes = $attributes; $this->cond = $cond; $this->stmts = $subNodes['stmts'] ?? []; $this->elseifs = $subNodes['elseifs'] ?? []; diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/InlineHTML.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/InlineHTML.php index 1dec989f..0711d284 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/InlineHTML.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/InlineHTML.php @@ -16,7 +16,7 @@ class InlineHTML extends Stmt * @param array $attributes Additional attributes */ public function __construct(string $value, array $attributes = []) { - parent::__construct($attributes); + $this->attributes = $attributes; $this->value = $value; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Interface_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Interface_.php index 39049aae..05255811 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Interface_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Interface_.php @@ -19,7 +19,7 @@ class Interface_ extends ClassLike * @param array $attributes Additional attributes */ public function __construct($name, array $subNodes = [], array $attributes = []) { - parent::__construct($attributes); + $this->attributes = $attributes; $this->name = \is_string($name) ? new Node\Identifier($name) : $name; $this->extends = $subNodes['extends'] ?? []; $this->stmts = $subNodes['stmts'] ?? []; diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Label.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Label.php index 332043ba..3edcb3be 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Label.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Label.php @@ -17,7 +17,7 @@ class Label extends Stmt * @param array $attributes Additional attributes */ public function __construct($name, array $attributes = []) { - parent::__construct($attributes); + $this->attributes = $attributes; $this->name = \is_string($name) ? new Identifier($name) : $name; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Namespace_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Namespace_.php index f113998d..c6320457 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Namespace_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Namespace_.php @@ -23,7 +23,7 @@ class Namespace_ extends Node\Stmt * @param array $attributes Additional attributes */ public function __construct(Node\Name $name = null, $stmts = [], array $attributes = []) { - parent::__construct($attributes); + $this->attributes = $attributes; $this->name = $name; $this->stmts = $stmts; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Property.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Property.php index 1888bbb6..849b8b44 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Property.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Property.php @@ -25,7 +25,7 @@ class Property extends Node\Stmt * @param null|string|Identifier|Name|NullableType $type Type declaration */ public function __construct(int $flags, array $props, array $attributes = [], $type = null) { - parent::__construct($attributes); + $this->attributes = $attributes; $this->flags = $flags; $this->props = $props; $this->type = \is_string($type) ? new Identifier($type) : $type; diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/PropertyProperty.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/PropertyProperty.php index 45e26faa..205731e2 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/PropertyProperty.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/PropertyProperty.php @@ -19,7 +19,7 @@ class PropertyProperty extends Node\Stmt * @param array $attributes Additional attributes */ public function __construct($name, Node\Expr $default = null, array $attributes = []) { - parent::__construct($attributes); + $this->attributes = $attributes; $this->name = \is_string($name) ? new Node\VarLikeIdentifier($name) : $name; $this->default = $default; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Return_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Return_.php index 346f9bd8..efc578c5 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Return_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Return_.php @@ -16,7 +16,7 @@ class Return_ extends Node\Stmt * @param array $attributes Additional attributes */ public function __construct(Node\Expr $expr = null, array $attributes = []) { - parent::__construct($attributes); + $this->attributes = $attributes; $this->expr = $expr; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/StaticVar.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/StaticVar.php index 7fbb7de1..29584560 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/StaticVar.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/StaticVar.php @@ -22,7 +22,7 @@ class StaticVar extends Node\Stmt public function __construct( Expr\Variable $var, Node\Expr $default = null, array $attributes = [] ) { - parent::__construct($attributes); + $this->attributes = $attributes; $this->var = $var; $this->default = $default; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Static_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Static_.php index e408f51f..464898ff 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Static_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Static_.php @@ -16,7 +16,7 @@ class Static_ extends Stmt * @param array $attributes Additional attributes */ public function __construct(array $vars, array $attributes = []) { - parent::__construct($attributes); + $this->attributes = $attributes; $this->vars = $vars; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Switch_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Switch_.php index ff2ba0d9..2c8dae02 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Switch_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Switch_.php @@ -19,7 +19,7 @@ class Switch_ extends Node\Stmt * @param array $attributes Additional attributes */ public function __construct(Node\Expr $cond, array $cases, array $attributes = []) { - parent::__construct($attributes); + $this->attributes = $attributes; $this->cond = $cond; $this->cases = $cases; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Throw_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Throw_.php index 21709bf7..f97f5671 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Throw_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Throw_.php @@ -16,7 +16,7 @@ class Throw_ extends Node\Stmt * @param array $attributes Additional attributes */ public function __construct(Node\Expr $expr, array $attributes = []) { - parent::__construct($attributes); + $this->attributes = $attributes; $this->expr = $expr; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUse.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUse.php index 43c66b8d..9e97053b 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUse.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUse.php @@ -19,7 +19,7 @@ class TraitUse extends Node\Stmt * @param array $attributes Additional attributes */ public function __construct(array $traits, array $adaptations = [], array $attributes = []) { - parent::__construct($attributes); + $this->attributes = $attributes; $this->traits = $traits; $this->adaptations = $adaptations; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Alias.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Alias.php index 189cc858..a3bccbd1 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Alias.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Alias.php @@ -21,7 +21,7 @@ class Alias extends Node\Stmt\TraitUseAdaptation * @param array $attributes Additional attributes */ public function __construct($trait, $method, $newModifier, $newName, array $attributes = []) { - parent::__construct($attributes); + $this->attributes = $attributes; $this->trait = $trait; $this->method = \is_string($method) ? new Node\Identifier($method) : $method; $this->newModifier = $newModifier; diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Precedence.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Precedence.php index 2ec6bff2..80385f64 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Precedence.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Precedence.php @@ -18,7 +18,7 @@ class Precedence extends Node\Stmt\TraitUseAdaptation * @param array $attributes Additional attributes */ public function __construct(Node\Name $trait, $method, array $insteadof, array $attributes = []) { - parent::__construct($attributes); + $this->attributes = $attributes; $this->trait = $trait; $this->method = \is_string($method) ? new Node\Identifier($method) : $method; $this->insteadof = $insteadof; diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Trait_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Trait_.php index 83980a76..1ffa664e 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Trait_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Trait_.php @@ -15,7 +15,7 @@ class Trait_ extends ClassLike * @param array $attributes Additional attributes */ public function __construct($name, array $subNodes = [], array $attributes = []) { - parent::__construct($attributes); + $this->attributes = $attributes; $this->name = \is_string($name) ? new Node\Identifier($name) : $name; $this->stmts = $subNodes['stmts'] ?? []; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TryCatch.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TryCatch.php index 7661ecb7..47b9aae7 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TryCatch.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TryCatch.php @@ -22,7 +22,7 @@ class TryCatch extends Node\Stmt * @param array $attributes Additional attributes */ public function __construct(array $stmts, array $catches, Finally_ $finally = null, array $attributes = []) { - parent::__construct($attributes); + $this->attributes = $attributes; $this->stmts = $stmts; $this->catches = $catches; $this->finally = $finally; diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Unset_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Unset_.php index 8bd2d7d6..310e427a 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Unset_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Unset_.php @@ -16,7 +16,7 @@ class Unset_ extends Node\Stmt * @param array $attributes Additional attributes */ public function __construct(array $vars, array $attributes = []) { - parent::__construct($attributes); + $this->attributes = $attributes; $this->vars = $vars; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/UseUse.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/UseUse.php index fe588d2c..32bd7847 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/UseUse.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/UseUse.php @@ -23,7 +23,7 @@ class UseUse extends Node\Stmt * @param array $attributes Additional attributes */ public function __construct(Node\Name $name, $alias = null, int $type = Use_::TYPE_UNKNOWN, array $attributes = []) { - parent::__construct($attributes); + $this->attributes = $attributes; $this->type = $type; $this->name = $name; $this->alias = \is_string($alias) ? new Identifier($alias) : $alias; diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Use_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Use_.php index dafc1090..8753da31 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Use_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Use_.php @@ -32,7 +32,7 @@ class Use_ extends Stmt * @param array $attributes Additional attributes */ public function __construct(array $uses, int $type = self::TYPE_NORMAL, array $attributes = []) { - parent::__construct($attributes); + $this->attributes = $attributes; $this->type = $type; $this->uses = $uses; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/While_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/While_.php index 671207b8..f41034f8 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/While_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/While_.php @@ -19,7 +19,7 @@ class While_ extends Node\Stmt * @param array $attributes Additional attributes */ public function __construct(Node\Expr $cond, array $stmts = [], array $attributes = []) { - parent::__construct($attributes); + $this->attributes = $attributes; $this->cond = $cond; $this->stmts = $stmts; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeAbstract.php b/vendor/nikic/php-parser/lib/PhpParser/NodeAbstract.php index 29d42b4f..fda59599 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/NodeAbstract.php +++ b/vendor/nikic/php-parser/lib/PhpParser/NodeAbstract.php @@ -2,8 +2,6 @@ namespace PhpParser; -use PhpParser\Node; - abstract class NodeAbstract implements Node, \JsonSerializable { protected $attributes; @@ -159,11 +157,11 @@ abstract class NodeAbstract implements Node, \JsonSerializable } public function getAttribute(string $key, $default = null) { - if (!array_key_exists($key, $this->attributes)) { - return $default; - } else { + if (array_key_exists($key, $this->attributes)) { return $this->attributes[$key]; } + + return $default; } public function getAttributes() : array { diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/NameResolver.php b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/NameResolver.php index abbe8ae5..cfe8ce76 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/NameResolver.php +++ b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/NameResolver.php @@ -2,7 +2,6 @@ namespace PhpParser\NodeVisitor; -use PhpParser\Error; use PhpParser\ErrorHandler; use PhpParser\NameContext; use PhpParser\Node; diff --git a/vendor/nikic/php-parser/lib/PhpParser/Parser/Php5.php b/vendor/nikic/php-parser/lib/PhpParser/Parser/Php5.php index 8c94dfc9..a558d28b 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Parser/Php5.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Parser/Php5.php @@ -17,17 +17,17 @@ use PhpParser\Node\Stmt; */ class Php5 extends \PhpParser\ParserAbstract { - protected $tokenToSymbolMapSize = 392; - protected $actionTableSize = 1072; - protected $gotoTableSize = 644; + protected $tokenToSymbolMapSize = 394; + protected $actionTableSize = 1079; + protected $gotoTableSize = 650; - protected $invalidSymbol = 157; + protected $invalidSymbol = 159; protected $errorSymbol = 1; protected $defaultAction = -32766; protected $unexpectedTokenRule = 32767; - protected $YY2TBLSTATE = 403; - protected $numNonLeafStates = 672; + protected $YY2TBLSTATE = 407; + protected $numNonLeafStates = 676; protected $symbolToName = array( "EOF", @@ -58,6 +58,7 @@ class Php5 extends \PhpParser\ParserAbstract "T_SL_EQUAL", "T_SR_EQUAL", "T_POW_EQUAL", + "T_COALESCE_EQUAL", "'?'", "':'", "T_COALESCE", @@ -133,6 +134,7 @@ class Php5 extends \PhpParser\ParserAbstract "T_CONTINUE", "T_GOTO", "T_FUNCTION", + "T_FN", "T_CONST", "T_RETURN", "T_TRY", @@ -190,388 +192,389 @@ class Php5 extends \PhpParser\ParserAbstract ); protected $tokenToSymbol = array( - 0, 157, 157, 157, 157, 157, 157, 157, 157, 157, - 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, - 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, - 157, 157, 157, 53, 156, 157, 153, 52, 35, 157, - 151, 152, 50, 47, 7, 48, 49, 51, 157, 157, - 157, 157, 157, 157, 157, 157, 157, 157, 29, 148, - 41, 15, 43, 28, 65, 157, 157, 157, 157, 157, - 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, - 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, - 157, 67, 157, 155, 34, 157, 154, 157, 157, 157, - 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, - 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, - 157, 157, 157, 149, 33, 150, 55, 157, 157, 157, - 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, - 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, - 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, - 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, - 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, - 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, - 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, - 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, - 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, - 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, - 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, - 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, - 157, 157, 157, 157, 157, 157, 1, 2, 3, 4, + 0, 159, 159, 159, 159, 159, 159, 159, 159, 159, + 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, + 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, + 159, 159, 159, 54, 158, 159, 155, 53, 36, 159, + 153, 154, 51, 48, 7, 49, 50, 52, 159, 159, + 159, 159, 159, 159, 159, 159, 159, 159, 30, 150, + 42, 15, 44, 29, 66, 159, 159, 159, 159, 159, + 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, + 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, + 159, 68, 159, 157, 35, 159, 156, 159, 159, 159, + 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, + 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, + 159, 159, 159, 151, 34, 152, 56, 159, 159, 159, + 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, + 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, + 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, + 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, + 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, + 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, + 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, + 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, + 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, + 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, + 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, + 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, + 159, 159, 159, 159, 159, 159, 1, 2, 3, 4, 5, 6, 8, 9, 10, 11, 12, 13, 14, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, - 27, 30, 31, 32, 36, 37, 38, 39, 40, 42, - 44, 45, 46, 54, 56, 57, 58, 59, 60, 61, - 62, 63, 64, 66, 68, 69, 70, 71, 72, 73, - 74, 75, 76, 77, 78, 79, 80, 81, 157, 157, - 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, + 27, 28, 31, 32, 33, 37, 38, 39, 40, 41, + 43, 45, 46, 47, 55, 57, 58, 59, 60, 61, + 62, 63, 64, 65, 67, 69, 70, 71, 72, 73, + 74, 75, 76, 77, 78, 79, 80, 81, 82, 159, + 159, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, - 132, 133, 134, 135, 136, 137, 157, 157, 157, 157, - 157, 157, 138, 139, 140, 141, 142, 143, 144, 145, - 146, 147 + 132, 133, 134, 135, 136, 137, 138, 139, 159, 159, + 159, 159, 159, 159, 140, 141, 142, 143, 144, 145, + 146, 147, 148, 149 ); protected $action = array( - 677, 678, 679, 680, 681, 279, 682, 683, 684, 720, - 721, 218, 219, 220, 221, 222, 223, 224, 225, 226, - 0, 227, 228, 229, 230, 231, 232, 233, 234, 235, - 236, 237, 238,-32766,-32766,-32766,-32766,-32766,-32766,-32766, - -32766,-32767,-32767,-32767,-32767, 206, 239, 240,-32766,-32766, - -32766,-32766, 685,-32766, 123,-32766,-32766,-32766,-32766,-32766, - -32766,-32767,-32767,-32767,-32767,-32767, 686, 687, 688, 689, - 690, 691, 692, 350, 30, 752, 954, 955, 956, 953, - 952, 951, 693, 694, 695, 696, 697, 698, 699, 700, - 701, 702, 703, 723, 724, 725, 726, 727, 715, 716, - 717, 718, 719, 704, 705, 706, 707, 708, 709, 710, - 746, 747, 748, 749, 750, 751, 711, 712, 713, 714, - 744, 735, 733, 734, 730, 731, 1046, 722, 728, 729, - 736, 737, 739, 738, 740, 741, 54, 55, 422, 56, - 57, 732, 743, 742, -219, 58, 59, 413, 60,-32766, - -32766,-32766,-32766,-32766,-32766,-32766,-32766,-32766, 1046,-32767, - -32767,-32767,-32767,-32767,-32767,-32767,-32767, 96, 97, 98, - 99, 100,-32766,-32766,-32766,-32766,-32766, 1224, 52, 829, - 1225, 61, 62,-32766,-32766,-32766, 294, 63, 590, 64, - 290, 291, 65, 66, 67, 68, 69, 70, 71, 72, - 1046, 26, 298, 73, 414,-32766,-32766,-32766, 877, 1097, - 1098, 756, 754, 759, 815, 771, 772, 471,-32766,-32766, - -32766, 830, 421, 294, 548,-32766, 1182,-32766,-32766,-32766, - -32766,-32766,-32766, 215, 216, 217, 434, 420,-32766, 306, - -32766,-32766,-32766,-32766,-32766, 1109, 495, 954, 955, 956, - 953, 952, 951, 202, 479, 480, 215, 216, 217, 407, - 122, 241, 813, 481, 482, 1046, 1103, 1104, 1105, 1106, - 1100, 1101, 309, 901, 902, 328, 202, 496, 1107, 1102, - 430,-32766, 215, 216, 217, 41, 496, 332, 320, 430, - 321, 423, -125, -125, -125, -4, 830, 470, 126, 417, - 336, 818, 202, 907, 40, 21, 424, -125, 472, -125, - 473, -125, 474, -125,-32766, 425, 215, 216, 217, 31, - 32, 426, 427, 10, 33, 475, 820, 878, 74, 216, - 217, 348, 349, 476, 477, 126, 202, 243, 418, 478, - 1046, 444, 801, 848, 428, 429, 281, 756, 202, 759, - 35, 105, 106, 107, 108, 109, 110, 111, 112, 113, - 114, 115, 116,-32766,-32766,-32766, 423, 1064, 832, 643, - -125, 830, 470, 215, 216, 217, 818, 1148, 927, 40, - 21, 424, 1074, 472, 628, 473,-32766, 474,-32766, 419, - 425, 985, 987, 202, 31, 32, 426, 427, 405, 33, - 475, 811, 1046, 74, 319, 1046, 348, 349, 476, 477, - -32766,-32766,-32766, 496, 478, 25, 430, 763, 848, 428, - 429, 435, 48, 332, 415, 295, 901, 902, 282, 1147, - -32766, 297,-32766,-32766,-32766,-32766, 1182, 347, 333, 496, - 770, 423, 430, 832, 643, -4, 830, 470, -223, 331, - 629, 818,-32766, 430, 40, 21, 424, 932, 472, 308, - 473, 445, 474, -502, 928, 425, -203, -203, -203, 31, - 32, 426, 427, 296, 33, 475, 809, 759, 74, 816, - 1215, 348, 349, 476, 477,-32766,-32766,-32766, 1046, 478, - 335, 1197, 801, 848, 428, 429, 236, 237, 238, 217, - 49,-32766,-32766,-32766, 118,-32766, 127,-32766,-32766,-32766, - 336, 292, 239, 240, 1046, 1196, 423, 202, 832, 643, - -203,-32766, 470,-32766,-32766, 481, 818, 208, 131, 40, - 21, 424, 581, 472, 20, 473, 36, 474, 29, 293, - 425, -204, -204, -204, 31, 32, 426, 427, 51, 33, - 475, 447, 121, 74, 202, 830, 348, 349, 476, 477, - 908,-32766,-32766,-32766, 478, 244, 522, 801, 848, 428, - 429, 101, 102, 103, 9, 300, 78, 79, 80, 246, - 324,-32766, 119, 646, 233, 234, 235, 104, 77, 946, - 130, 754, 332, 832, 643, -204, 34, 245, 81, 82, - 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, - 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, - 103, -254, 300, 1109, 830, 423, 98, 99, 100, 496, - 120, 470, 430, 1046, 104, 818,-32766,-32766, 40, 21, - 424, 117, 472, 828, 473, 440, 474, 207, 645, 425, - 125, 209, 647, 31, 32, 426, 830, 841, 33, 475, - -32766,-32766, 74, 128, 657, 348, 349, 332, 239, 240, - 459, 597, 654, 478, 312, 454, 22, 132, 358, 771, - 772, 604, 605, -82, 660, 300, 943, 663, 931, 671, - 764, 649,-32766, 104, 423, 756, 757, 53, 612, 959, - 470, 43, 832, 643, 818, 44, 45, 40, 21, 424, - 298, 472, -273, 473, 46, 474, 50, 47, 425, 129, - 759, 754, 31, 32, 426, 830, 423, 33, 475, 637, - 528, 74, 470,-32766, 348, 349, 818, 624, 850, 40, - 21, 424, 478, 472, 443, 473, 584, 474, 849, 616, - 425, -80, 1108, 655, 31, 32, 426, 830, 11, 33, - 475, 446, 278, 74, 438, 601, 348, 349, 587, 602, - 283, 832, 643, 464, 478, 325, 1154, 0, 0, 327, - 0, 0, 0, 0, 0, 651, 0, 0, 0, 322, - 0, 0, 0, 323, 0, 423, 0, 0, 307, 0, - 0, 470, 305, 832, 643, 818, -503, -502, 40, 21, - 424, 481, 472, 0, 473, -403, 474, 14, 5, 425, - 0, 0, 6, 31, 32, 426, 830, 423, 33, 475, - 357, -411, 74, 470, 12, 348, 349, 818, -412, 440, - 40, 21, 424, 478, 472, 382, 473, 409, 474, 408, - 383, 425, 391, 371, 530, 31, 32, 426, 843, 329, - 33, 475, 666, 810, 74, 39, 38, 348, 349, 880, - 821, 769, 832, 643, 819, 478, 937, 806, 667, 768, - 827, 936, 939, 812, 767, 814, 826, 872, 804, 938, - 865, 862, 817, 860, 935, 871, 423, 77, 644, 648, - 650, 652, 470, 653, 864, 643, 818, 656, 658, 40, - 21, 424, 659, 472, 661, 473, 242, 474, 662, 330, - 425, 403, 404, 124, 31, 32, 426, 845, 773, 33, - 475, 776, 775, 74, 210, 211, 348, 349, 870, 668, - 212, 802, 213, 1221, 478, 458, 1220, 1190, 1188, 1173, - 1186, 1088, 919, 1194, 204, 1184, 869, 944, 835, 210, - 211, 1049, 1097, 1098, 844, 212,-32766, 213, 1048, 837, - 1099, 1060, 774, 832, 643, 42, 1222, 846, 765, 204, - 847, 766, 1223, 1044, 37, 28, 412, 1097, 1098, 406, - 337,-32766, 75, 76, 304, 1099, 303, 302, 301, 27, - 24, 289, 288, 280,-32766, 205, 0, 1025, 573, 1026, - 1050, -220, 1090, -219, 16, 1113, 909, 569, 1054, 1103, - 1104, 1105, 1106, 1100, 1101, 381, 1051, 634, 563, 468, - 463, 1107, 1102, 462, 455, 376, 18, 17, 214, 0, - -32766, 608, 569, -421, 1103, 1104, 1105, 1106, 1100, 1101, - 381, 1168, 1167, 1114, 1218, 1087, 1107, 1102, 1185, 1057, - 1172, 1187, 1073, 214, 1058,-32766, 1059, 0, 1056, 1055, - 0, 1153 + 681, 682, 683, 684, 685, 283, 686, 687, 688, 724, + 725, 222, 223, 224, 225, 226, 227, 228, 229, 230, + 0, 231, 232, 233, 234, 235, 236, 237, 238, 239, + 240, 241, 242,-32766,-32766,-32766,-32766,-32766,-32766,-32766, + -32766,-32767,-32767,-32767,-32767, 1052, 243, 244,-32766,-32766, + -32766,-32766,-32766, 689,-32766,-32766,-32766,-32766,-32766,-32766, + -32766,-32766,-32767,-32767,-32767,-32767,-32767, 690, 691, 692, + 693, 694, 695, 696, 834, 27, 757, 959, 960, 961, + 958, 957, 956, 697, 698, 699, 700, 701, 702, 703, + 704, 705, 706, 707, 727, 728, 729, 730, 731, 719, + 720, 721, 749, 722, 723, 708, 709, 710, 711, 712, + 713, 714, 751, 752, 753, 754, 755, 756, 715, 716, + 717, 718, 748, 739, 737, 738, 734, 735, 1188, 726, + 732, 733, 740, 741, 743, 742, 744, 745, 54, 55, + 426, 56, 57, 736, 747, 746, -220, 58, 59, 419, + 60,-32766,-32766,-32766,-32766,-32766,-32766,-32766,-32766,-32766, + 28,-32767,-32767,-32767,-32767,-32767,-32767,-32767,-32767, 97, + 98, 99, 100, 101, 9, 906, 907,-32766, 1202, 761, + 328, 764, 1188, 814, 61, 62, 52, 285, 500, 951, + 63, 434, 64, 294, 295, 65, 66, 67, 68, 69, + 70, 71, 72, 340, 25, 302, 73, 418,-32766,-32766, + -32766, 882, 1103, 1104, 761, 1080, 764,-32766,-32766,-32766, + 475, -255, 298, 825, 835, 759, 219, 220, 221,-32766, + 36,-32766,-32766,-32766,-32766,-32766,-32766, 125,-32766, 438, + -32766,-32766,-32766,-32766,-32766, 1052, 500, 206, 310, 434, + 499, 423, 1052, 129, 439, 759, 336, 340, 483, 484, + 10, 959, 960, 961, 958, 957, 956, 485, 486, 124, + 1109, 1110, 1111, 1112, 1106, 1107, 313,-32766,-32766,-32766, + -32766, 500, 1113, 1108, 434, 219, 220, 221, 425, 41, + 764, 336, 324, 1222, 325, 427, -126, -126, -126, -4, + 835, 474,-32766,-32766,-32766, 823, 206, 913, 40, 21, + 428, -126, 476, -126, 477, -126, 478, -126, 123, 429, + 219, 220, 221, 31, 32, 430, 431, 354, 130, 33, + 479, 883, 336, 74, 1203, 128, 352, 353, 480, 481, + 912, 206, 247, 301, 482, 210, 1052, 806, 853, 432, + 433, 312, 30, 297, 35, 106, 107, 108, 109, 110, + 111, 112, 113, 114, 115, 116, 117, 118, 421, 1052, + 296, 427, 1154, 837, 647, -126, 835, 474, 102, 103, + 104, 823, 304, 816, 40, 21, 428, 332, 476, 632, + 477, 422, 478, 298, 105, 429, 991, 993, 20, 31, + 32, 430, 431, 933, 409, 33, 479, 220, 221, 74, + 323,-32766, 352, 353, 480, 481,-32766,-32766,-32766, 424, + 482, 1052, 448, 768, 853, 432, 433, 206,-32766,-32766, + -32766, 48, 906, 907, 1153, 1070, 339,-32766, 485,-32766, + -32766,-32766,-32766, 1231, 337, 500, 1232, 427, 434, 837, + 647, -4, 835, 474, -224, 1052, 633, 823, 49, 434, + 40, 21, 428, 937, 476, 776, 477, 777, 478, -504, + 820, 429, -205, -205, -205, 31, 32, 430, 431,-32766, + -32766, 33, 479, 75,-32766, 74,-32766, 594, 352, 353, + 480, 481,-32766,-32766,-32766, 119, 482, 526, 451, 806, + 853, 432, 433, 240, 241, 242, 128,-32766,-32766,-32766, + 411, 775, 51,-32766, 120,-32766,-32766,-32766, 500, 243, + 244, 434, 552, 427, 417, 837, 647, -205,-32766, 474, + -32766,-32766, 1052, 823, 821, 351, 40, 21, 428, 1052, + 476, 121, 477, 449, 478, 1115, 211, 429, -204, -204, + -204, 31, 32, 430, 431, 1115, 286, 33, 479, 818, + 835, 74, 932, 299, 352, 353, 480, 481, 212, 219, + 220, 221, 482, 335, 245, 806, 853, 432, 433,-32766, + -32766,-32766, 213, 79, 80, 81, 99, 100, 101, 650, + 206, 237, 238, 239, 444, 122, 776, 649, 777, 300, + -32766, 837, 647, -204, 34, 248, 82, 83, 84, 85, + 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, + 96, 97, 98, 99, 100, 101, 102, 103, 104, 1052, + 304, 427, 221, 249, 835, 250, 78, 474, 206, 133, + 336, 823, 105, 585, 40, 21, 428, 127, 476, -83, + 477, 206, 478,-32766,-32766, 429, 219, 220, 221, 31, + 32, 430, 316, 651, 658, 33, 479, 835, 661, 74, + 243, 244, 352, 353, 458, 22, 833, 206, 463, 601, + 482, 134, 362, 132, 608, 609, 769, 653,-32766, 948, + 667, 936, 675, 846, 304, 105, 655, 43, 44, 45, + 616, 761, 759, 46, 47, 427, 302, -274, 50, 837, + 647, 474, 53, 131, 588, 823, 442, 468, 40, 21, + 428, 762, 476, 606, 477,-32766, 478, 764, 447, 429, + 964, 854, 532, 31, 32, 430, 855, 327, 427, 33, + 479, 835, 641, 74, 474, 620, 352, 353, 823, -81, + 628, 40, 21, 428, 482, 476, 11, 477, 450, 478, + 282, 591, 429, 375, 605, 848, 31, 32, 430, 0, + 659, 329, 33, 479, 835, 0, 74, 0, 0, 352, + 353, 0, 0, 837, 647, -504, 0, 482, 326, 0, + 331, 0, 0, 0, 0, 0, 0, 0, 309, 311, + -505, 0, 485, 664, 0, 0, 0, 0, 0, 0, + 0, 0, 427, 1114, 1160, 0, 869, 647, 474, -413, + -405, 835, 823, 5, 6, 40, 21, 428, 12, 476, + 14, 477, 361, 478, -414, 386, 429, 387, 24, 395, + 31, 32, 430, 444, 534, 427, 33, 479, 412, 413, + 74, 474, 38, 352, 353, 823, 39, 670, 40, 21, + 428, 482, 476, 671, 477, 774, 478, 824, 832, 429, + 811, 826, 885, 31, 32, 430, 876, 877, 809, 33, + 479, 870, 867, 74, 865, 943, 352, 353, 944, 941, + 837, 647, 427, 815, 482, 817, 819, 831, 474, 822, + 940, 772, 823, 773, 942, 40, 21, 428, 78, 476, + 648, 477, 652, 478, 654, 656, 429, 657, 246, 660, + 31, 32, 430, 837, 647, 662, 33, 479, 663, 665, + 74, 666, 126, 352, 353, 333, 214, 215, 334, 407, + 408, 482, 216, 672, 217, 807, 1228, 1230, 771, 852, + 770, 851, 1229, 850, 1066, 842, 208, 1054, 849, 1055, + 840, 214, 215, 949, 1103, 1104, 874, 216,-32766, 217, + 837, 647, 1105, 875, 462, 1227, 1196, 1194, 1179, 1192, + 1094, 208, 924, 1200, 1190, 780, 781, 778, 779, 1103, + 1104, 26, 29,-32766, 37, 42, 76, 1105, 77, 209, + 284, 292, 293, 305, 306, 307, 308, 341, 410, 416, + -32766, 0, -221, -220, 16, 17, 18, 380, 459, 466, + 573, 467, 1109, 1110, 1111, 1112, 1106, 1107, 385, 472, + 567, 638, 1057, 1060, 1113, 1108, 914, 1119, 1056, 1032, + 577, 218, 287,-32766, 1031, 573, 1096, 1109, 1110, 1111, + 1112, 1106, 1107, 385, -423, 1050, 0, 1061, 1063, 1113, + 1108, 1062, 1065, 1064, 1079, 1193, 218, 1178,-32766, 1174, + 0, 1191, 1093, 1225, 1120, 1173, 612, 0, 1159 ); protected $actionCheck = array( 2, 3, 4, 5, 6, 13, 8, 9, 10, 11, - 12, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 0, 41, 42, 43, 44, 45, 46, 47, 48, 49, - 50, 51, 52, 8, 9, 10, 31, 32, 33, 34, - 35, 36, 37, 38, 39, 7, 66, 67, 31, 32, - 33, 34, 54, 28, 7, 30, 31, 32, 33, 34, - 35, 36, 37, 38, 39, 40, 68, 69, 70, 71, - 72, 73, 74, 7, 7, 77, 112, 113, 114, 115, - 116, 117, 84, 85, 86, 87, 88, 89, 90, 91, + 12, 32, 33, 34, 35, 36, 37, 38, 39, 40, + 0, 42, 43, 44, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 8, 9, 10, 32, 33, 34, 35, + 36, 37, 38, 39, 40, 12, 67, 68, 32, 33, + 34, 35, 36, 55, 29, 8, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 69, 70, 71, + 72, 73, 74, 75, 1, 7, 78, 114, 115, 116, + 117, 118, 119, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, - 122, 123, 124, 125, 126, 127, 12, 129, 130, 131, - 132, 133, 134, 135, 136, 137, 2, 3, 4, 5, - 6, 143, 144, 145, 152, 11, 12, 7, 14, 31, - 32, 33, 34, 35, 36, 37, 38, 39, 12, 41, - 42, 43, 44, 41, 42, 43, 44, 45, 46, 47, - 48, 49, 31, 32, 33, 34, 35, 77, 67, 1, - 80, 47, 48, 8, 9, 10, 35, 53, 82, 55, - 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, - 12, 67, 68, 69, 70, 8, 9, 10, 29, 75, - 76, 77, 77, 79, 148, 102, 103, 83, 8, 9, - 10, 1, 7, 35, 78, 28, 79, 30, 31, 32, - 33, 34, 35, 8, 9, 10, 102, 7, 28, 128, - 30, 31, 32, 33, 34, 139, 112, 112, 113, 114, - 115, 116, 117, 28, 120, 121, 8, 9, 10, 146, - 149, 13, 148, 129, 130, 12, 132, 133, 134, 135, - 136, 137, 138, 130, 131, 7, 28, 143, 144, 145, - 146, 8, 8, 9, 10, 151, 143, 153, 154, 146, - 156, 71, 72, 73, 74, 0, 1, 77, 147, 7, - 153, 81, 28, 152, 84, 85, 86, 87, 88, 89, - 90, 91, 92, 93, 79, 95, 8, 9, 10, 99, - 100, 101, 102, 7, 104, 105, 148, 148, 108, 9, - 10, 111, 112, 113, 114, 147, 28, 29, 7, 119, - 12, 29, 122, 123, 124, 125, 7, 77, 28, 79, - 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 31, 32, 33, 71, 152, 148, 149, - 150, 1, 77, 8, 9, 10, 81, 152, 148, 84, - 85, 86, 112, 88, 77, 90, 151, 92, 153, 7, - 95, 56, 57, 28, 99, 100, 101, 102, 103, 104, - 105, 148, 12, 108, 109, 12, 111, 112, 113, 114, - 8, 9, 10, 143, 119, 7, 146, 122, 123, 124, - 125, 151, 67, 153, 123, 35, 130, 131, 35, 155, - 28, 35, 30, 31, 32, 33, 79, 7, 143, 143, - 148, 71, 146, 148, 149, 150, 1, 77, 152, 7, - 143, 81, 151, 146, 84, 85, 86, 150, 88, 7, - 90, 149, 92, 128, 148, 95, 96, 97, 98, 99, - 100, 101, 102, 7, 104, 105, 148, 79, 108, 148, - 82, 111, 112, 113, 114, 8, 9, 10, 12, 119, - 67, 152, 122, 123, 124, 125, 50, 51, 52, 10, - 67, 8, 9, 10, 149, 28, 149, 30, 31, 32, - 153, 35, 66, 67, 12, 1, 71, 28, 148, 149, - 150, 28, 77, 30, 31, 129, 81, 15, 149, 84, - 85, 86, 153, 88, 152, 90, 13, 92, 140, 141, - 95, 96, 97, 98, 99, 100, 101, 102, 67, 104, - 105, 128, 13, 108, 28, 1, 111, 112, 113, 114, - 152, 8, 9, 10, 119, 15, 82, 122, 123, 124, - 125, 50, 51, 52, 103, 54, 8, 9, 10, 15, - 109, 28, 149, 29, 47, 48, 49, 66, 149, 118, - 29, 77, 153, 148, 149, 150, 28, 15, 30, 31, - 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, - 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, - 52, 150, 54, 139, 1, 71, 47, 48, 49, 143, - 149, 77, 146, 12, 66, 81, 8, 9, 84, 85, - 86, 15, 88, 29, 90, 146, 92, 15, 149, 95, - 29, 15, 29, 99, 100, 101, 1, 35, 104, 105, - 31, 32, 108, 149, 29, 111, 112, 153, 66, 67, - 72, 73, 29, 119, 29, 72, 73, 97, 98, 102, - 103, 106, 107, 29, 29, 54, 148, 149, 148, 149, - 148, 149, 31, 66, 71, 77, 77, 67, 74, 79, - 77, 67, 148, 149, 81, 67, 67, 84, 85, 86, - 68, 88, 79, 90, 67, 92, 67, 67, 95, 67, - 79, 77, 99, 100, 101, 1, 71, 104, 105, 89, - 82, 108, 77, 82, 111, 112, 81, 91, 123, 84, - 85, 86, 119, 88, 86, 90, 87, 92, 123, 93, - 95, 94, 139, 29, 99, 100, 101, 1, 94, 104, - 105, 94, 94, 108, 102, 96, 111, 112, 96, 109, - 153, 148, 149, 102, 119, 110, 139, -1, -1, 126, - -1, -1, -1, -1, -1, 29, -1, -1, -1, 126, - -1, -1, -1, 127, -1, 71, -1, -1, 128, -1, - -1, 77, 128, 148, 149, 81, 128, 128, 84, 85, - 86, 129, 88, -1, 90, 142, 92, 142, 142, 95, - -1, -1, 142, 99, 100, 101, 1, 71, 104, 105, - 142, 142, 108, 77, 142, 111, 112, 81, 142, 146, - 84, 85, 86, 119, 88, 146, 90, 146, 92, 146, - 146, 95, 146, 146, 146, 99, 100, 101, 147, 149, - 104, 105, 148, 148, 108, 148, 148, 111, 112, 148, - 148, 148, 148, 149, 148, 119, 148, 148, 148, 148, - 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, - 148, 148, 148, 148, 148, 148, 71, 149, 149, 149, - 149, 149, 77, 149, 148, 149, 81, 149, 149, 84, - 85, 86, 149, 88, 149, 90, 29, 92, 149, 149, - 95, 149, 149, 149, 99, 100, 101, 150, 150, 104, - 105, 150, 150, 108, 47, 48, 111, 112, 150, 150, - 53, 150, 55, 150, 119, 150, 150, 150, 150, 150, - 150, 150, 150, 150, 67, 150, 150, 150, 150, 47, - 48, 150, 75, 76, 150, 53, 79, 55, 150, 150, - 83, 150, 150, 148, 149, 151, 150, 150, 150, 67, - 150, 150, 150, 154, 151, 151, 151, 75, 76, 151, - 151, 79, 151, 151, 151, 83, 151, 151, 151, 151, - 151, 151, 151, 151, 151, 151, -1, 152, 152, 152, - 152, 152, 152, 152, 152, 152, 152, 130, 152, 132, - 133, 134, 135, 136, 137, 138, 152, 152, 152, 152, - 152, 144, 145, 152, 152, 152, 152, 152, 151, -1, - 153, 155, 130, 154, 132, 133, 134, 135, 136, 137, - 138, 155, 155, 155, 155, 155, 144, 145, 155, 155, - 155, 155, 155, 151, 155, 153, 155, -1, 155, 155, - -1, 156 + 122, 123, 124, 125, 126, 127, 128, 129, 80, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 2, 3, + 4, 5, 6, 145, 146, 147, 154, 11, 12, 125, + 14, 32, 33, 34, 35, 36, 37, 38, 39, 40, + 7, 42, 43, 44, 45, 42, 43, 44, 45, 46, + 47, 48, 49, 50, 105, 132, 133, 153, 1, 78, + 111, 80, 80, 150, 48, 49, 68, 7, 145, 120, + 54, 148, 56, 57, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 155, 68, 69, 70, 71, 8, 9, + 10, 30, 76, 77, 78, 114, 80, 8, 9, 10, + 84, 152, 36, 150, 1, 78, 8, 9, 10, 29, + 13, 31, 32, 33, 34, 35, 36, 7, 29, 103, + 31, 32, 33, 34, 35, 12, 145, 29, 130, 148, + 114, 7, 12, 151, 153, 78, 155, 155, 122, 123, + 7, 114, 115, 116, 117, 118, 119, 131, 132, 151, + 134, 135, 136, 137, 138, 139, 140, 32, 33, 34, + 35, 145, 146, 147, 148, 8, 9, 10, 7, 153, + 80, 155, 156, 83, 158, 72, 73, 74, 75, 0, + 1, 78, 8, 9, 10, 82, 29, 154, 85, 86, + 87, 88, 89, 90, 91, 92, 93, 94, 13, 96, + 8, 9, 10, 100, 101, 102, 103, 7, 151, 106, + 107, 150, 155, 110, 154, 149, 113, 114, 115, 116, + 154, 29, 30, 36, 121, 7, 12, 124, 125, 126, + 127, 7, 142, 143, 15, 16, 17, 18, 19, 20, + 21, 22, 23, 24, 25, 26, 27, 28, 7, 12, + 36, 72, 154, 150, 151, 152, 1, 78, 51, 52, + 53, 82, 55, 150, 85, 86, 87, 7, 89, 78, + 91, 7, 93, 36, 67, 96, 57, 58, 154, 100, + 101, 102, 103, 150, 105, 106, 107, 9, 10, 110, + 111, 80, 113, 114, 115, 116, 8, 9, 10, 7, + 121, 12, 30, 124, 125, 126, 127, 29, 32, 33, + 34, 68, 132, 133, 157, 154, 68, 29, 131, 31, + 32, 33, 34, 78, 145, 145, 81, 72, 148, 150, + 151, 152, 1, 78, 154, 12, 145, 82, 68, 148, + 85, 86, 87, 152, 89, 103, 91, 105, 93, 130, + 150, 96, 97, 98, 99, 100, 101, 102, 103, 8, + 9, 106, 107, 149, 153, 110, 155, 83, 113, 114, + 115, 116, 8, 9, 10, 15, 121, 83, 130, 124, + 125, 126, 127, 51, 52, 53, 149, 8, 9, 10, + 148, 150, 68, 29, 151, 31, 32, 33, 145, 67, + 68, 148, 79, 72, 7, 150, 151, 152, 29, 78, + 31, 32, 12, 82, 150, 7, 85, 86, 87, 12, + 89, 151, 91, 151, 93, 141, 15, 96, 97, 98, + 99, 100, 101, 102, 103, 141, 36, 106, 107, 150, + 1, 110, 150, 36, 113, 114, 115, 116, 15, 8, + 9, 10, 121, 7, 13, 124, 125, 126, 127, 8, + 9, 10, 15, 8, 9, 10, 48, 49, 50, 30, + 29, 48, 49, 50, 148, 151, 103, 151, 105, 7, + 29, 150, 151, 152, 29, 15, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 12, + 55, 72, 10, 15, 1, 15, 151, 78, 29, 151, + 155, 82, 67, 155, 85, 86, 87, 30, 89, 30, + 91, 29, 93, 32, 33, 96, 8, 9, 10, 100, + 101, 102, 30, 30, 30, 106, 107, 1, 30, 110, + 67, 68, 113, 114, 73, 74, 30, 29, 73, 74, + 121, 98, 99, 30, 108, 109, 150, 151, 32, 150, + 151, 150, 151, 36, 55, 67, 30, 68, 68, 68, + 75, 78, 78, 68, 68, 72, 69, 80, 68, 150, + 151, 78, 68, 68, 88, 82, 103, 103, 85, 86, + 87, 78, 89, 111, 91, 83, 93, 80, 87, 96, + 80, 125, 83, 100, 101, 102, 125, 129, 72, 106, + 107, 1, 90, 110, 78, 94, 113, 114, 82, 95, + 92, 85, 86, 87, 121, 89, 95, 91, 95, 93, + 95, 97, 96, 148, 97, 149, 100, 101, 102, -1, + 30, 112, 106, 107, 1, -1, 110, -1, -1, 113, + 114, -1, -1, 150, 151, 130, -1, 121, 128, -1, + 128, -1, -1, -1, -1, -1, -1, -1, 130, 130, + 130, -1, 131, 30, -1, -1, -1, -1, -1, -1, + -1, -1, 72, 141, 141, -1, 150, 151, 78, 144, + 144, 1, 82, 144, 144, 85, 86, 87, 144, 89, + 144, 91, 144, 93, 144, 148, 96, 148, 153, 148, + 100, 101, 102, 148, 148, 72, 106, 107, 148, 148, + 110, 78, 150, 113, 114, 82, 150, 150, 85, 86, + 87, 121, 89, 150, 91, 150, 93, 150, 150, 96, + 150, 150, 150, 100, 101, 102, 150, 150, 150, 106, + 107, 150, 150, 110, 150, 150, 113, 114, 150, 150, + 150, 151, 72, 150, 121, 150, 150, 150, 78, 150, + 150, 150, 82, 150, 150, 85, 86, 87, 151, 89, + 151, 91, 151, 93, 151, 151, 96, 151, 30, 151, + 100, 101, 102, 150, 151, 151, 106, 107, 151, 151, + 110, 151, 151, 113, 114, 151, 48, 49, 151, 151, + 151, 121, 54, 152, 56, 152, 152, 152, 152, 152, + 152, 152, 152, 152, 152, 152, 68, 152, 152, 152, + 152, 48, 49, 152, 76, 77, 152, 54, 80, 56, + 150, 151, 84, 152, 152, 152, 152, 152, 152, 152, + 152, 68, 152, 152, 152, 152, 152, 152, 152, 76, + 77, 153, 153, 80, 153, 153, 153, 84, 153, 153, + 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, + 153, -1, 154, 154, 154, 154, 154, 154, 154, 154, + 132, 154, 134, 135, 136, 137, 138, 139, 140, 154, + 154, 154, 154, 154, 146, 147, 154, 154, 154, 154, + 154, 153, 155, 155, 154, 132, 154, 134, 135, 136, + 137, 138, 139, 140, 156, 156, -1, 157, 157, 146, + 147, 157, 157, 157, 157, 157, 153, 157, 155, 157, + -1, 157, 157, 157, 157, 157, 157, -1, 158 ); protected $actionBase = array( - 0, 220, 295, 445, 370, 357, 357, 307, 728, -2, - -2, 135, -2, -2, -2, 623, 724, 655, 724, 554, - 756, 825, 825, 825, 151, 188, 476, 476, 860, 146, - 476, 328, 253, 114, 621, 393, 390, 502, 502, 502, - 502, 134, 134, 502, 502, 502, 502, 502, 502, 502, - 502, 502, 502, 502, 502, 502, 502, 502, 502, 502, - 502, 502, 502, 502, 502, 502, 502, 502, 502, 502, - 502, 502, 502, 502, 502, 502, 502, 502, 502, 502, - 502, 502, 502, 502, 502, 502, 502, 502, 502, 502, - 502, 502, 502, 502, 502, 502, 502, 502, 502, 502, - 502, 502, 502, 502, 502, 502, 502, 502, 502, 502, - 502, 502, 502, 502, 502, 502, 502, 502, 502, 502, - 502, 502, 502, 502, 502, 502, 502, 502, 502, 502, - 502, 502, 502, 179, 178, 539, 523, 715, 735, 737, - 738, 858, 668, 857, 796, 797, 561, 798, 799, 800, - 801, 802, 795, 803, 886, 805, 568, 568, 568, 568, - 568, 568, 568, 568, 568, 568, 568, 273, 248, 225, - 308, 274, 628, 365, 365, 365, 365, 365, 365, 365, - 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, - 175, 175, 175, 175, 175, 175, 175, 320, 553, 553, - 553, 489, 887, 526, 912, 912, 912, 912, 912, 912, - 912, 912, 912, 912, 912, 912, 912, 912, 912, 912, - 912, 912, 912, 912, 912, 912, 912, 912, 912, 912, - 912, 912, 912, 912, 912, 912, 912, 912, 912, 912, - 912, 912, 912, 912, 912, 912, 912, 493, -20, -20, - 477, 661, 402, 629, 210, 332, 197, 25, 25, 25, - 25, 25, 17, 141, 5, 5, 5, 5, 335, 122, - 122, 122, 122, 118, 118, 118, 118, 471, 396, 396, - 682, 682, 642, 774, 579, 579, 537, 537, 270, 270, - 270, 270, 270, 270, 270, 270, 270, 270, 301, 633, - 853, 296, 296, 296, 296, 514, 514, 514, 143, 484, - 637, 915, 143, 521, 521, 521, 446, 446, 446, 113, - 648, 398, 235, 235, 235, 235, 398, 235, 235, 577, - 577, 577, 439, 499, 651, 100, 379, 486, 433, 672, - 806, 669, 788, 540, 696, 111, 703, 701, 617, 662, - 617, 603, 598, 575, 673, 312, 847, 147, 179, 538, - 481, 631, 744, 292, 736, 66, 331, 423, 542, 355, - 382, 710, 731, 856, 855, 339, 678, 631, 631, 631, - 408, 106, 770, 772, 355, -8, 602, 602, 602, 602, - 782, 773, 602, 602, 602, 602, 781, 778, 316, 230, - 822, 215, 746, 618, 618, 644, 644, 618, 618, 618, - 618, 620, 622, 618, 834, 849, 849, 644, 641, 644, - 620, 622, 824, 824, 824, 824, 644, 622, 644, 644, - 618, 644, 849, 849, 622, 642, 849, 67, 622, 663, - 618, 653, 653, 824, 714, 730, 644, 644, 666, 849, - 849, 849, 666, 622, 824, 660, 711, 38, 849, 824, - 645, 641, 645, 660, 622, 645, 641, 641, 645, 20, - 654, 634, 833, 841, 838, 749, 625, 615, 851, 850, - 842, 852, 848, 614, 708, 723, 726, 626, 638, 639, - 647, 650, 676, 649, 674, 662, 693, 627, 627, 627, - 679, 680, 679, 627, 627, 627, 627, 627, 627, 627, - 627, 914, 689, 688, 670, 658, 732, 632, 707, 667, - 512, 750, 613, 708, 708, 791, 874, 883, 889, 829, - 619, 847, 876, 679, 904, 718, 47, 636, 846, 789, - 699, 704, 679, 845, 679, 751, 679, 866, 793, 652, - 832, 708, 831, 627, 864, 913, 911, 909, 907, 906, - 905, 896, 903, 630, 900, 729, 659, 882, 452, 854, - 673, 692, 706, 722, 830, 268, 899, 828, 679, 679, - 752, 748, 679, 754, 721, 717, 862, 747, 881, 898, - 613, 878, 679, 671, 827, 897, 268, 643, 624, 859, - 656, 739, 835, 863, 839, 758, 550, 582, 826, 777, - 821, 635, 740, 885, 884, 861, 742, 759, 564, 763, - 646, 819, 765, 843, 743, 818, 814, 875, 657, 693, - 675, 665, 664, 640, 769, 811, 877, 745, 741, 734, - 808, 733, 807, 0, 0, 0, 0, 0, 0, 0, + 0, 223, 299, 375, 451, 102, 102, 311, 754, -2, + -2, 147, -2, -2, -2, 633, 740, 773, 740, 559, + 666, 820, 820, 820, 186, 334, 334, 334, 357, 892, + 443, 33, 233, 409, 617, 520, 527, 240, 240, 240, + 240, 136, 136, 240, 240, 240, 240, 240, 240, 240, + 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, + 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, + 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, + 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, + 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, + 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, + 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, + 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, + 240, 240, 240, 240, 240, 181, 73, 305, 217, 743, + 745, 746, 747, 884, 665, 885, 823, 824, 653, 825, + 826, 827, 828, 830, 822, 831, 919, 832, 575, 575, + 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, + 47, 561, 218, 312, 277, 471, 648, 648, 648, 648, + 648, 648, 648, 294, 294, 294, 294, 294, 294, 294, + 294, 294, 294, 294, 294, 294, 294, 294, 294, 294, + 294, 398, 571, 571, 571, 622, 888, 609, 913, 913, + 913, 913, 913, 913, 913, 913, 913, 913, 913, 913, + 913, 913, 913, 913, 913, 913, 913, 913, 913, 913, + 913, 913, 913, 913, 913, 913, 913, 913, 913, 913, + 913, 913, 913, 913, 913, 913, 913, 913, 913, 913, + 913, 499, -21, -21, 484, 656, 408, 621, 209, 396, + 200, 25, 25, 25, 25, 25, 245, 16, 4, 4, + 4, 4, 339, 123, 123, 123, 123, 119, 119, 119, + 119, 69, 307, 307, 671, 671, 637, 781, 538, 538, + 543, 543, 101, 101, 101, 101, 101, 101, 101, 101, + 101, 101, 24, 627, 857, 300, 300, 300, 300, 177, + 177, 177, 43, 414, 673, 920, 43, 327, 327, 327, + 452, 452, 452, 362, 649, 210, 331, 331, 331, 331, + 210, 331, 331, 493, 493, 493, 485, 446, 642, 365, + 488, 373, 390, 664, 814, 667, 821, 541, 690, 118, + 700, 701, 887, 613, 887, 601, 605, 576, 676, 392, + 850, 48, 181, 539, 444, 639, 749, 361, 751, 320, + 384, 368, 536, 363, 244, 784, 753, 886, 890, 180, + 670, 639, 639, 639, 153, 404, 787, 788, 363, -8, + 603, 603, 603, 603, 833, 789, 603, 603, 603, 603, + 834, 835, 253, 412, 836, 281, 750, 623, 623, 624, + 624, 623, 623, 623, 623, 650, 657, 623, 839, 685, + 685, 624, 647, 624, 650, 657, 842, 842, 842, 842, + 624, 657, 624, 624, 623, 624, 685, 685, 657, 637, + 685, 68, 657, 660, 623, 662, 662, 842, 707, 713, + 624, 624, 608, 685, 685, 685, 608, 657, 842, 612, + 616, 338, 685, 842, 632, 647, 632, 612, 657, 632, + 647, 647, 632, 20, 619, 629, 841, 843, 855, 759, + 606, 611, 848, 849, 845, 847, 838, 646, 696, 715, + 717, 480, 630, 631, 635, 636, 679, 640, 668, 613, + 695, 628, 628, 628, 655, 680, 655, 628, 628, 628, + 628, 628, 628, 628, 628, 900, 675, 688, 669, 641, + 718, 531, 615, 663, 553, 761, 672, 696, 696, 793, + 878, 863, 898, 899, 643, 850, 876, 655, 901, 702, + 230, 567, 851, 791, 687, 689, 655, 852, 655, 763, + 655, 879, 794, 645, 795, 696, 796, 628, 882, 904, + 905, 906, 907, 908, 910, 912, 914, 644, 915, 720, + 626, 864, 344, 846, 676, 684, 691, 721, 797, 380, + 916, 798, 655, 655, 764, 757, 655, 766, 722, 706, + 860, 726, 865, 917, 672, 867, 655, 614, 799, 918, + 380, 634, 625, 858, 651, 727, 856, 883, 854, 768, + 590, 618, 800, 801, 802, 638, 728, 861, 862, 859, + 731, 774, 620, 777, 658, 803, 778, 853, 732, 805, + 806, 877, 654, 695, 686, 659, 661, 652, 780, 807, + 875, 734, 735, 738, 808, 739, 811, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 134, 134, 134, 134, -2, -2, -2, - -2, 0, 0, -2, 0, 0, 0, 134, 134, 134, - 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, - 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, - 134, 134, 134, 0, 0, 134, 134, 134, 134, 134, - 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, - 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, - 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, - 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, - 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, - 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, - 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, - 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, - 134, 134, 134, 134, 134, 568, 568, 568, 568, 568, - 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, - 568, 568, 568, 568, 568, 568, 568, 568, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 568, - -20, -20, -20, -20, 568, -20, -20, -20, -20, -20, - -20, -20, 568, 568, 568, 568, 568, 568, 568, 568, - 568, 568, 568, 568, 568, 568, 568, 568, 568, -20, - 568, 568, 568, -20, 270, -20, 270, 270, 270, 270, - 270, 270, 270, 270, 270, 270, 270, 270, 270, 270, - 270, 270, 270, 270, 270, 270, 270, 270, 270, 270, - 270, 270, 270, 270, 270, 270, 270, 270, 270, 270, - 270, 270, 270, 270, 270, 270, 270, 270, 270, 568, - 0, 0, 568, -20, 568, -20, 568, -20, 568, 568, - 568, 568, 568, 568, -20, -20, -20, -20, -20, -20, - 0, 521, 521, 521, 521, -20, -20, -20, -20, -36, - 270, 270, 270, 270, 270, 270, 521, 521, 446, 446, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 270, -36, 270, 618, 618, 618, 618, 641, 641, 641, - 618, 398, 398, 398, 618, 0, 0, 0, 0, 0, - 0, 618, 398, 0, 270, 270, 270, 270, 0, 270, - 270, 618, 618, 618, 641, 618, 398, 641, 641, 618, - 849, 580, 580, 580, 580, 268, 355, 0, 618, 618, - 641, 641, 641, 0, 0, 0, 849, 0, 644, 0, - 0, 0, 0, 627, 47, 0, 430, 0, 0, 0, - 0, 0, 0, 619, 430, 466, 466, 0, 630, 627, - 627, 627, 0, 0, 619, 619, 0, 0, 0, 0, - 0, 0, 442, 619, 0, 0, 0, 0, 442, 140, - 0, 0, 140, 0, 268 + 0, 0, 0, 0, 0, 0, 0, 136, 136, 136, + 136, -2, -2, -2, -2, 0, 0, -2, 0, 0, + 0, 136, 136, 136, 136, 136, 136, 136, 136, 136, + 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, + 136, 136, 136, 136, 136, 136, 136, 0, 0, 136, + 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, + 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, + 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, + 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, + 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, + 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, + 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, + 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, + 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, + 136, 575, 575, 575, 575, 575, 575, 575, 575, 575, + 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, + 575, 575, 575, 575, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 575, -21, -21, -21, + -21, 575, -21, -21, -21, -21, -21, -21, -21, 575, + 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, + 575, 575, 575, 575, 575, 575, 575, -21, 575, 575, + 575, -21, 101, -21, 101, 101, 101, 101, 101, 101, + 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, + 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, + 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, + 101, 101, 101, 101, 101, 101, 101, 575, 0, 0, + 575, -21, 575, -21, 575, -21, 575, 575, 575, 575, + 575, 575, -21, -21, -21, -21, -21, -21, 0, 327, + 327, 327, 327, -21, -21, -21, -21, -37, 101, 101, + 101, 101, 101, 101, 327, 327, 452, 452, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 101, -37, + 101, 623, 623, 623, 623, 647, 647, 647, 623, 210, + 210, 210, 623, 0, 0, 0, 0, 0, 0, 623, + 210, 0, 101, 101, 101, 101, 0, 101, 101, 623, + 623, 623, 647, 623, 210, 647, 647, 623, 685, 583, + 583, 583, 583, 380, 363, 0, 623, 623, 647, 647, + 647, 0, 0, 0, 685, 0, 624, 0, 0, 0, + 0, 628, 230, 0, 528, 0, 0, 0, 0, 0, + 0, 643, 528, 592, 592, 0, 644, 628, 628, 628, + 0, 0, 643, 643, 0, 0, 0, 0, 0, 0, + 566, 643, 0, 0, 0, 0, 566, 517, 0, 0, + 517, 0, 380 ); protected $actionDefault = array( 3,32767,32767,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 531, 531,32767,32767, - 486,32767,32767,32767,32767,32767,32767, 292, 292, 292, - 32767,32767,32767, 519, 519, 519, 519, 519, 519, 519, - 519, 519, 519, 519,32767,32767,32767,32767,32767, 374, + 32767,32767,32767,32767,32767, 533, 533, 488,32767,32767, + 32767,32767,32767,32767,32767,32767,32767, 293, 293, 293, + 32767,32767,32767, 521, 521, 521, 521, 521, 521, 521, + 521, 521, 521, 521,32767,32767,32767,32767,32767, 376, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, @@ -579,129 +582,129 @@ class Php5 extends \PhpParser\ParserAbstract 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767, 380, 536,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767, 382, 538,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 355, 356, 358, 359, - 291, 520, 240, 381, 535, 290, 242, 319, 490,32767, - 32767,32767, 321, 119, 251, 196, 489, 122, 289, 227, - 373, 375, 320, 296, 301, 302, 303, 304, 305, 306, - 307, 308, 309, 310, 311, 312, 295, 446, 352, 351, - 350, 448,32767, 447, 483, 483, 486,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767, 357, 358, + 360, 361, 292, 541, 522, 241, 383, 537, 291, 243, + 321, 492,32767,32767,32767, 323, 120, 252, 197, 491, + 123, 290, 228, 375, 377, 322, 297, 302, 303, 304, + 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, + 296, 448, 354, 353, 352, 450,32767, 449, 485, 485, + 488,32767,32767,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767, 317, 474, 473, - 318, 444, 322, 445, 324, 449, 323, 340, 341, 338, - 339, 342, 451, 450, 467, 468, 465, 466, 294, 343, - 344, 345, 346, 469, 470, 471, 472, 275,32767,32767, - 530, 530,32767,32767, 331, 332, 458, 459,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767, 276, - 32767, 231, 231, 231, 231,32767,32767,32767, 231,32767, - 32767,32767,32767, 326, 327, 325, 453, 454, 452,32767, - 420,32767,32767,32767,32767,32767, 422,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767, 491,32767, - 32767,32767,32767,32767, 504, 409,32767,32767,32767, 402, - 32767, 215, 217, 164, 477,32767,32767,32767,32767,32767, - 509, 336,32767,32767,32767,32767,32767, 545,32767, 504, - 32767,32767,32767,32767,32767,32767, 349, 328, 329, 330, - 32767,32767,32767,32767, 508, 502, 461, 462, 463, 464, - 32767,32767, 455, 456, 457, 460,32767,32767,32767,32767, + 32767, 319, 476, 475, 320, 446, 324, 447, 326, 451, + 325, 342, 343, 340, 341, 344, 453, 452, 469, 470, + 467, 468, 295, 345, 346, 347, 348, 471, 472, 473, + 474, 276,32767,32767, 532, 532,32767,32767, 333, 334, + 460, 461,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767, 277,32767, 232, 232, 232, 232,32767, + 32767,32767, 232,32767,32767,32767,32767, 328, 329, 327, + 455, 456, 454,32767, 422,32767,32767,32767,32767,32767, + 424,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767, 493,32767,32767,32767,32767,32767, 506, 411, + 32767,32767,32767, 404,32767, 216, 218, 165, 479,32767, + 32767,32767,32767,32767, 511, 338,32767,32767,32767,32767, + 32767, 548,32767, 506,32767,32767,32767,32767,32767,32767, + 351, 330, 331, 332,32767,32767,32767,32767, 510, 504, + 463, 464, 465, 466,32767,32767, 457, 458, 459, 462, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767, 168,32767, 417, 423, 423,32767,32767,32767, - 32767, 168,32767,32767,32767,32767,32767, 168,32767,32767, - 32767,32767, 507, 506, 168,32767, 403, 485, 168, 181, - 32767, 179, 179,32767, 201, 201,32767,32767, 183, 478, - 497,32767, 183, 168,32767, 391, 170, 485,32767,32767, - 233,32767, 233, 391, 168, 233,32767,32767, 233,32767, - 84, 427,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767, 404,32767,32767,32767, 370, 371, - 480, 493,32767, 494,32767, 402,32767, 334, 335, 337, - 314,32767, 316, 360, 361, 362, 363, 364, 365, 366, - 368,32767, 407,32767, 410,32767,32767,32767, 86, 111, - 250,32767, 543, 86, 405,32767,32767, 299, 543,32767, - 32767,32767,32767, 538,32767,32767, 293,32767,32767,32767, - 86, 86, 246,32767, 166,32767, 528,32767, 544,32767, - 502, 406,32767, 333,32767,32767,32767,32767,32767,32767, - 32767,32767,32767, 503,32767,32767,32767,32767, 222,32767, - 440,32767, 86,32767,32767, 182,32767,32767, 297, 241, - 32767,32767, 537,32767,32767,32767,32767,32767,32767,32767, - 32767,32767, 167,32767,32767,32767, 184,32767,32767, 502, - 32767,32767,32767,32767,32767,32767,32767, 288,32767,32767, - 32767,32767,32767,32767,32767, 502,32767,32767, 226,32767, - 32767,32767,32767,32767,32767,32767,32767,32767, 84, 60, - 32767, 269,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767, 124, 124, 3, 124, 124, 253, 3, - 253, 124, 253, 253, 124, 124, 124, 124, 124, 124, - 124, 124, 124, 124, 209, 212, 201, 201, 161, 124, - 124, 261 + 32767,32767,32767,32767,32767,32767, 169,32767, 419, 425, + 425,32767,32767,32767,32767, 169,32767,32767,32767,32767, + 32767, 169,32767,32767,32767,32767, 509, 508, 169,32767, + 405, 487, 169, 182,32767, 180, 180,32767, 202, 202, + 32767,32767, 184, 480, 499,32767, 184, 169,32767, 393, + 171, 487,32767,32767, 234,32767, 234, 393, 169, 234, + 32767,32767, 234,32767, 85, 429,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767, 406,32767, + 32767,32767, 372, 373, 482, 495,32767, 496,32767, 404, + 32767, 336, 337, 339, 316,32767, 318, 362, 363, 364, + 365, 366, 367, 368, 370,32767, 409,32767, 412,32767, + 32767,32767, 87, 112, 251,32767, 546, 87, 407,32767, + 32767, 300, 546,32767,32767,32767,32767, 540,32767,32767, + 294,32767,32767,32767, 87, 87, 247,32767, 167,32767, + 530,32767, 547,32767, 504, 408,32767, 335,32767,32767, + 32767,32767,32767,32767,32767,32767,32767, 505,32767,32767, + 32767,32767, 223,32767, 442,32767, 87,32767,32767, 183, + 32767,32767, 298, 242,32767,32767, 539,32767,32767,32767, + 32767,32767,32767,32767,32767,32767, 168,32767,32767,32767, + 185,32767,32767, 504,32767,32767,32767,32767,32767,32767, + 32767, 289,32767,32767,32767,32767,32767,32767,32767, 504, + 32767,32767, 227,32767,32767,32767,32767,32767,32767,32767, + 32767,32767, 85, 60,32767, 270,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767, 125, 125, 3, + 125, 125, 254, 3, 254, 125, 254, 254, 125, 125, + 125, 125, 125, 125, 125, 125, 125, 125, 210, 213, + 202, 202, 162, 125, 125, 262 ); protected $goto = array( - 162, 162, 136, 136, 141, 144, 136, 137, 138, 139, - 146, 183, 164, 160, 160, 160, 160, 141, 141, 161, - 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, - 156, 157, 158, 159, 180, 135, 181, 497, 498, 361, - 499, 503, 504, 505, 506, 507, 508, 509, 510, 972, - 140, 142, 143, 145, 167, 172, 182, 198, 247, 250, - 252, 254, 256, 257, 258, 259, 260, 261, 269, 270, - 271, 272, 284, 285, 313, 314, 315, 377, 378, 379, - 553, 184, 185, 186, 187, 188, 189, 190, 191, 192, - 193, 194, 195, 196, 147, 148, 149, 163, 150, 165, - 151, 199, 166, 152, 153, 154, 200, 155, 133, 630, - 571, 792, 571, 571, 571, 571, 571, 571, 571, 571, - 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, - 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, - 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, - 571, 571, 571, 571, 571, 1110, 762, 1110, 1110, 1110, - 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, - 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, - 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, - 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110, - 501, 501, 501, 501, 501, 501, 512, 638, 512, 761, - 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, - 513, 755, 513, 893, 893, 1201, 1201, 527, 585, 613, - 857, 857, 857, 857, 170, 852, 858, 1086, 1085, 173, - 174, 175, 386, 387, 388, 389, 169, 197, 201, 203, - 251, 253, 255, 262, 263, 264, 265, 266, 267, 273, - 274, 275, 276, 286, 287, 316, 317, 318, 392, 393, - 394, 395, 171, 176, 248, 249, 177, 178, 179, 385, - 615, 546, 546, 578, 542, 1212, 1212, 823, 340, 544, - 544, 500, 502, 533, 550, 579, 582, 592, 599, 619, - 863, 1212, 622, 911, 570, 359, 570, 570, 570, 570, - 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, - 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, - 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, - 570, 570, 570, 570, 570, 570, 570, 570, 570, 555, - 556, 557, 558, 559, 560, 561, 562, 564, 595, 518, - 554, 326, 311, 594, 526, 609, 610, 949, 552, 523, - 523, 523, 577, 523, 588, 591, 636, 526, 526, 547, - 436, 436, 436, 436, 436, 436, 541, 523, 1205, 950, - 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, - 1075, 362, 1075, 900, 900, 900, 900, 596, 343, 402, - 900, 514, 1159, 514, 900, 1179, 603, 1179, 3, 4, - 367, 367, 367, 614, 1075, 1075, 1075, 1075, 785, 1075, - 1075, 367, 367, 1178, 1198, 1178, 1171, 367, 374, 467, - 1195, 1195, 1195, 523, 523, 367, 1226, 540, 572, 523, - 523, 1019, 1068, 523, 897, 785, 785, 906, 346, 917, - 520, 917, 396, 368, 781, 372, 915, 1177, 970, 779, - 524, 539, 669, 665, 566, 400, 1061, 920, 600, 760, - 551, 890, 620, 621, 886, 625, 626, 633, 635, 640, - 642, 789, 879, 861, 859, 861, 664, 1091, 515, 888, - 883, 1193, 1193, 1193, 867, 1029, 19, 15, 355, 341, - 342, 958, 778, 778, 356, 1066, 786, 786, 786, 788, - 452, 531, 777, 1156, 465, 543, 565, 583, 0, 520, - 1071, 1072, 0, 0, 1068, 0, 0, 23, 1211, 1211, - 456, 0, 611, 369, 369, 369, 0, 1069, 1170, 1069, - 0, 13, 538, 0, 1211, 0, 1070, 449, 451, 942, - 641, 0, 1214, 0, 1111, 623, 940, 0, 0, 0, - 369, 0, 618, 0, 384, 0, 0, 1067, 627, 0, + 165, 138, 138, 138, 165, 143, 146, 139, 140, 141, + 148, 186, 167, 162, 162, 162, 162, 143, 143, 164, + 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, + 158, 159, 160, 161, 183, 137, 184, 501, 502, 365, + 503, 507, 508, 509, 510, 511, 512, 513, 514, 977, + 142, 163, 144, 145, 147, 170, 175, 185, 202, 251, + 254, 256, 258, 260, 261, 262, 263, 264, 265, 273, + 274, 275, 276, 288, 289, 317, 318, 319, 381, 382, + 383, 557, 187, 188, 189, 190, 191, 192, 193, 194, + 195, 196, 197, 198, 199, 200, 149, 150, 151, 166, + 152, 168, 153, 203, 169, 154, 155, 156, 204, 157, + 135, 634, 575, 760, 575, 575, 575, 575, 575, 575, + 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, + 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, + 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, + 575, 575, 575, 575, 575, 575, 575, 1116, 766, 1116, + 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, + 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, + 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, + 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, + 1116, 1116, 505, 505, 505, 505, 505, 505, 516, 642, + 516, 767, 505, 505, 505, 505, 505, 505, 505, 505, + 505, 505, 517, 797, 517, 898, 898, 1207, 1207, 531, + 589, 617, 862, 862, 862, 862, 173, 857, 863, 1092, + 1091, 176, 177, 178, 390, 391, 392, 393, 172, 201, + 205, 207, 255, 257, 259, 266, 267, 268, 269, 270, + 271, 277, 278, 279, 280, 290, 291, 320, 321, 322, + 396, 397, 398, 399, 174, 179, 252, 253, 180, 181, + 182, 389, 619, 550, 550, 582, 546, 598, 765, 613, + 614, 548, 548, 504, 506, 537, 554, 583, 586, 596, + 603, 884, 866, 864, 866, 668, 828, 519, 893, 888, + 574, 344, 574, 574, 574, 574, 574, 574, 574, 574, + 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, + 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, + 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, + 574, 574, 574, 574, 574, 559, 560, 561, 562, 563, + 564, 565, 566, 568, 599, 522, 558, 330, 315, 1219, + 1219, 530, 592, 595, 640, 527, 527, 527, 868, 527, + 600, 347, 406, 530, 530, 1219, 440, 440, 440, 440, + 440, 440, 545, 527, 551, 954, 440, 440, 440, 440, + 440, 440, 440, 440, 440, 440, 1081, 1211, 1081, 905, + 905, 905, 905, 3, 4, 623, 905, 955, 626, 556, + 905, 363, 1185, 581, 1185, 916, 371, 371, 371, 366, + 1081, 1081, 1081, 1081, 790, 1081, 1081, 371, 371, 1184, + 607, 1184, 1177, 371, 1165, 471, 1201, 1201, 1201, 527, + 527, 371, 1233, 544, 576, 527, 527, 618, 1074, 527, + 1204, 790, 790, 378, 1025, 922, 524, 922, 518, 902, + 518, 911, 350, 1183, 975, 400, 528, 543, 786, 669, + 570, 372, 376, 920, 604, 784, 555, 895, 624, 625, + 891, 629, 630, 637, 639, 644, 646, 453, 455, 947, + 645, 673, 1097, 404, 1117, 627, 945, 1199, 1199, 1199, + 1035, 19, 15, 359, 1218, 1218, 1067, 872, 783, 783, + 794, 963, 791, 791, 791, 793, 1072, 925, 782, 456, + 1218, 569, 345, 346, 360, 524, 1077, 1078, 1221, 1162, + 1074, 535, 23, 587, 469, 547, 0, 615, 373, 373, + 373, 0, 0, 1075, 1176, 1075, 0, 0, 542, 0, + 460, 0, 1076, 0, 0, 0, 0, 0, 0, 0, + 0, 13, 0, 0, 0, 373, 0, 0, 622, 388, + 0, 0, 0, 1073, 631, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 517, 537, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 517, 0, 537, 0, 0, 0, 0, - 0, 532, 516, 0, 521, 439, 0, 441, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 784, 1219 + 0, 0, 0, 0, 0, 0, 0, 521, 541, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 521, + 0, 541, 0, 0, 0, 0, 0, 536, 520, 0, + 525, 443, 0, 445, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 789, 1226 ); protected $gotoCheck = array( @@ -715,97 +718,97 @@ class Php5 extends \PhpParser\ParserAbstract 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 56, - 66, 28, 66, 66, 66, 66, 66, 66, 66, 66, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 56, 66, 5, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, - 66, 66, 66, 66, 66, 124, 15, 124, 124, 124, + 66, 66, 66, 66, 66, 66, 66, 124, 14, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, - 115, 115, 115, 115, 115, 115, 66, 8, 66, 14, - 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, - 115, 5, 115, 74, 74, 74, 74, 99, 39, 39, - 66, 66, 66, 66, 26, 66, 66, 122, 122, 26, + 124, 124, 115, 115, 115, 115, 115, 115, 66, 8, + 66, 15, 115, 115, 115, 115, 115, 115, 115, 115, + 115, 115, 115, 28, 115, 74, 74, 74, 74, 99, + 39, 39, 66, 66, 66, 66, 26, 66, 66, 122, + 122, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, - 26, 26, 26, 26, 26, 26, 26, 26, 26, 50, - 50, 50, 50, 50, 50, 140, 140, 49, 69, 50, - 50, 50, 50, 50, 50, 50, 50, 50, 50, 60, - 32, 140, 60, 81, 56, 60, 56, 56, 56, 56, + 26, 50, 50, 50, 50, 50, 50, 64, 13, 64, + 64, 50, 50, 50, 50, 50, 50, 50, 50, 50, + 50, 13, 13, 13, 13, 13, 49, 13, 13, 13, + 56, 69, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, 56, 108, - 108, 108, 108, 108, 108, 108, 108, 108, 108, 10, - 46, 123, 123, 64, 46, 64, 64, 95, 2, 10, - 10, 10, 2, 10, 59, 59, 59, 46, 46, 107, - 56, 56, 56, 56, 56, 56, 10, 10, 138, 95, - 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, - 56, 45, 56, 56, 56, 56, 56, 67, 67, 67, - 56, 120, 129, 120, 56, 116, 125, 116, 29, 29, - 12, 12, 12, 48, 56, 56, 56, 56, 22, 56, - 56, 12, 12, 117, 136, 117, 79, 12, 47, 56, - 117, 117, 117, 10, 10, 12, 12, 10, 10, 10, - 10, 100, 79, 10, 76, 22, 22, 78, 17, 12, - 12, 12, 21, 11, 24, 16, 82, 117, 99, 23, - 10, 31, 71, 31, 31, 20, 111, 83, 31, 13, - 10, 31, 31, 31, 31, 31, 31, 31, 31, 31, - 31, 25, 13, 13, 13, 13, 13, 33, 13, 13, - 13, 8, 8, 8, 68, 33, 33, 33, 33, 69, - 69, 97, 22, 22, 57, 113, 22, 22, 22, 22, - 62, 57, 22, 128, 106, 57, 33, 63, -1, 12, - 79, 79, -1, -1, 79, -1, -1, 33, 139, 139, - 57, -1, 33, 121, 121, 121, -1, 79, 79, 79, - -1, 57, 8, -1, 139, -1, 79, 7, 7, 7, - 7, -1, 139, -1, 7, 7, 7, -1, -1, -1, - 121, -1, 12, -1, 121, -1, -1, 12, 12, -1, + 56, 56, 56, 56, 56, 108, 108, 108, 108, 108, + 108, 108, 108, 108, 108, 10, 46, 123, 123, 140, + 140, 46, 59, 59, 59, 10, 10, 10, 32, 10, + 67, 67, 67, 46, 46, 140, 56, 56, 56, 56, + 56, 56, 10, 10, 107, 95, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 138, 56, 56, + 56, 56, 56, 29, 29, 60, 56, 95, 60, 2, + 56, 60, 116, 2, 116, 81, 12, 12, 12, 45, + 56, 56, 56, 56, 22, 56, 56, 12, 12, 117, + 125, 117, 79, 12, 129, 56, 117, 117, 117, 10, + 10, 12, 12, 10, 10, 10, 10, 48, 79, 10, + 136, 22, 22, 47, 100, 12, 12, 12, 120, 76, + 120, 78, 17, 117, 99, 21, 10, 31, 24, 31, + 31, 11, 16, 82, 31, 23, 10, 31, 31, 31, + 31, 31, 31, 31, 31, 31, 31, 7, 7, 7, + 7, 71, 33, 20, 7, 7, 7, 8, 8, 8, + 33, 33, 33, 33, 139, 139, 111, 68, 22, 22, + 25, 97, 22, 22, 22, 22, 113, 83, 22, 62, + 139, 33, 69, 69, 57, 12, 79, 79, 139, 128, + 79, 57, 33, 63, 106, 57, -1, 33, 121, 121, + 121, -1, -1, 79, 79, 79, -1, -1, 8, -1, + 57, -1, 79, -1, -1, -1, -1, -1, -1, -1, + -1, 57, -1, -1, -1, 121, -1, -1, 12, 121, + -1, -1, -1, 12, 12, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 8, 8, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 8, -1, 8, -1, -1, -1, -1, - -1, 99, 8, -1, 8, 8, -1, 8, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 8, 8 + -1, -1, -1, -1, -1, -1, -1, 8, 8, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 8, + -1, 8, -1, -1, -1, -1, -1, 99, 8, -1, + 8, 8, -1, 8, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 8, 8 ); protected $gotoBase = array( - 0, 0, -277, 0, 0, 210, 0, 552, 196, 0, - 40, 130, 111, 477, 207, 154, 119, 139, 0, 0, - 71, 132, 109, 122, 133, 74, 32, 0, 101, -251, - 0, -173, 280, 83, 0, 0, 0, 0, 0, 190, - 0, 0, -24, 0, 0, 361, 336, 149, 144, 269, - 1, 0, 0, 0, 0, 0, 102, 87, 0, 72, - -163, 0, 78, 75, -287, 0, -92, 84, 85, -157, - 0, 114, 0, 0, -55, 0, 146, 0, 145, 98, - 0, 278, 116, 59, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 90, 0, 91, 0, 186, - 151, 0, 0, 0, 0, 0, 61, 352, 305, 0, - 0, 60, 0, 94, 0, -78, 117, 135, 0, 0, - 113, 238, -69, 41, -47, 211, 0, 0, 66, 206, - 0, 0, 0, 0, 0, 0, 153, 0, 358, 228, - -25, 0, 0 + 0, 0, -230, 0, 0, 102, 0, 492, 198, 0, + 42, 144, 113, 286, 156, 209, 132, 149, 0, 0, + 95, 141, 111, 134, 143, 99, 30, 0, 213, -260, + 0, -171, 358, 84, 0, 0, 0, 0, 0, 192, + 0, 0, -24, 0, 0, 389, 342, 170, 174, 288, + -1, 0, 0, 0, 0, 0, 104, 103, 0, 66, + -51, 0, 83, 87, -367, 0, -94, 53, 94, -138, + 0, 139, 0, 0, -57, 0, 157, 0, 155, 100, + 0, 397, 129, 105, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 114, 0, 97, 0, 188, + 160, 0, 0, 0, 0, 0, 77, 368, 311, 0, + 0, 96, 0, 101, 0, -80, 120, 137, 0, 0, + 166, 239, -71, 43, -49, 231, 0, 0, 78, 234, + 0, 0, 0, 0, 0, 0, 175, 0, 380, 200, + 55, 0, 0 ); protected $gotoDefault = array( - -32768, 469, 673, 2, 674, 745, 753, 606, 483, 639, - 484, 519, 1189, 798, 799, 800, 364, 410, 485, 363, - 397, 390, 787, 780, 782, 790, 168, 398, 793, 1, - 795, 525, 831, 1020, 351, 803, 352, 598, 805, 535, - 807, 808, 134, 365, 366, 536, 486, 373, 586, 822, - 268, 370, 824, 353, 825, 834, 354, 466, 461, 567, - 617, 431, 448, 580, 574, 545, 1083, 575, 866, 339, - 874, 670, 882, 885, 487, 568, 896, 453, 904, 1096, - 380, 910, 916, 921, 277, 924, 411, 399, 593, 929, - 930, 7, 934, 631, 632, 8, 299, 957, 607, 971, - 416, 1039, 1041, 488, 489, 529, 460, 511, 534, 490, - 1062, 442, 401, 1065, 491, 492, 432, 433, 1080, 345, - 1164, 344, 450, 310, 1151, 589, 1115, 457, 1204, 1160, - 338, 493, 494, 360, 1183, 375, 1199, 437, 1206, 1213, - 334, 549, 576 + -32768, 473, 677, 2, 678, 750, 758, 610, 487, 643, + 488, 523, 1195, 803, 804, 805, 368, 414, 489, 367, + 401, 394, 792, 785, 787, 795, 171, 402, 798, 1, + 800, 529, 836, 1026, 355, 808, 356, 602, 810, 539, + 812, 813, 136, 369, 370, 540, 490, 377, 590, 827, + 272, 374, 829, 357, 830, 839, 358, 470, 465, 571, + 621, 435, 452, 584, 578, 549, 1089, 579, 871, 343, + 879, 674, 887, 890, 491, 572, 901, 457, 909, 1102, + 384, 915, 921, 926, 281, 929, 415, 403, 597, 934, + 935, 7, 939, 635, 636, 8, 303, 962, 611, 976, + 420, 1045, 1047, 492, 493, 533, 464, 515, 538, 494, + 1068, 446, 405, 1071, 495, 496, 436, 437, 1086, 349, + 1170, 348, 454, 314, 1157, 593, 1121, 461, 1210, 1166, + 342, 497, 498, 364, 1189, 379, 1205, 441, 1212, 1220, + 338, 553, 580 ); protected $ruleToNonTerminal = array( @@ -816,29 +819,29 @@ class Php5 extends \PhpParser\ParserAbstract 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, - 7, 7, 8, 9, 10, 10, 11, 12, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 17, - 17, 18, 18, 18, 18, 20, 20, 16, 16, 21, - 21, 22, 22, 23, 23, 24, 24, 19, 19, 25, - 27, 27, 28, 29, 29, 31, 30, 30, 30, 30, + 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, + 6, 7, 7, 8, 9, 10, 10, 11, 12, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 17, 17, 18, 18, 18, 18, 20, 20, 16, 16, + 21, 21, 22, 22, 23, 23, 24, 24, 19, 19, + 25, 27, 27, 28, 29, 29, 31, 30, 30, 30, + 30, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, 32, 13, - 13, 53, 53, 55, 54, 54, 47, 47, 57, 57, - 58, 58, 14, 15, 15, 15, 61, 61, 61, 62, - 62, 65, 65, 63, 63, 67, 67, 40, 40, 49, - 49, 52, 52, 52, 51, 51, 68, 41, 41, 41, - 41, 69, 69, 70, 70, 71, 71, 38, 38, 34, - 34, 72, 36, 36, 73, 35, 35, 37, 37, 48, - 48, 48, 59, 59, 75, 75, 76, 76, 78, 78, - 78, 77, 77, 60, 60, 79, 79, 79, 80, 80, - 81, 81, 81, 43, 43, 82, 82, 82, 44, 44, - 83, 83, 84, 84, 64, 85, 85, 85, 85, 90, - 90, 91, 91, 92, 92, 92, 92, 92, 93, 94, - 94, 89, 89, 86, 86, 88, 88, 96, 96, 95, - 95, 95, 95, 95, 95, 87, 87, 98, 97, 97, - 45, 45, 39, 39, 42, 42, 42, 42, 42, 42, + 13, 13, 53, 53, 55, 54, 54, 47, 47, 57, + 57, 58, 58, 14, 15, 15, 15, 61, 61, 61, + 62, 62, 65, 65, 63, 63, 67, 67, 40, 40, + 49, 49, 52, 52, 52, 51, 51, 68, 41, 41, + 41, 41, 69, 69, 70, 70, 71, 71, 38, 38, + 34, 34, 72, 36, 36, 73, 35, 35, 37, 37, + 48, 48, 48, 59, 59, 75, 75, 76, 76, 78, + 78, 78, 77, 77, 60, 60, 79, 79, 79, 80, + 80, 81, 81, 81, 43, 43, 82, 82, 82, 44, + 44, 83, 83, 84, 84, 64, 85, 85, 85, 85, + 90, 90, 91, 91, 92, 92, 92, 92, 92, 93, + 94, 94, 89, 89, 86, 86, 88, 88, 96, 96, + 95, 95, 95, 95, 95, 95, 87, 87, 98, 97, + 97, 45, 45, 39, 39, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, @@ -846,25 +849,25 @@ class Php5 extends \PhpParser\ParserAbstract 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 33, 33, - 46, 46, 103, 103, 104, 104, 104, 104, 110, 99, - 99, 106, 106, 112, 112, 113, 114, 114, 114, 114, - 114, 114, 66, 66, 56, 56, 56, 100, 100, 118, - 118, 115, 115, 119, 119, 119, 119, 101, 101, 101, - 105, 105, 105, 111, 111, 124, 124, 124, 124, 124, - 124, 124, 124, 124, 124, 124, 124, 124, 26, 26, - 26, 26, 26, 26, 126, 126, 126, 126, 126, 126, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 33, 33, 46, 46, 103, 103, 104, 104, 104, 104, + 110, 99, 99, 106, 106, 112, 112, 113, 114, 114, + 114, 114, 114, 114, 66, 66, 56, 56, 56, 100, + 100, 118, 118, 115, 115, 119, 119, 119, 119, 101, + 101, 101, 105, 105, 105, 111, 111, 124, 124, 124, + 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, + 26, 26, 26, 26, 26, 26, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, - 126, 126, 126, 126, 126, 126, 126, 109, 109, 102, - 102, 102, 102, 125, 125, 128, 128, 127, 127, 129, - 129, 50, 50, 50, 50, 131, 131, 130, 130, 130, - 130, 130, 132, 132, 117, 117, 120, 120, 116, 116, - 134, 133, 133, 133, 133, 121, 121, 121, 121, 108, - 108, 122, 122, 122, 122, 74, 135, 135, 136, 136, - 136, 107, 107, 137, 137, 138, 138, 138, 138, 123, - 123, 123, 123, 140, 141, 139, 139, 139, 139, 139, - 139, 139, 142, 142, 142 + 126, 126, 126, 126, 126, 126, 126, 126, 126, 109, + 109, 102, 102, 102, 102, 125, 125, 128, 128, 127, + 127, 129, 129, 50, 50, 50, 50, 131, 131, 130, + 130, 130, 130, 130, 132, 132, 117, 117, 120, 120, + 116, 116, 134, 133, 133, 133, 133, 121, 121, 121, + 121, 108, 108, 122, 122, 122, 122, 74, 135, 135, + 136, 136, 136, 107, 107, 137, 137, 138, 138, 138, + 138, 138, 123, 123, 123, 123, 140, 141, 139, 139, + 139, 139, 139, 139, 139, 142, 142, 142 ); protected $ruleToLength = array( @@ -876,54 +879,54 @@ class Php5 extends \PhpParser\ParserAbstract 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, - 1, 1, 3, 5, 4, 3, 4, 2, 3, 1, - 1, 7, 8, 6, 7, 3, 1, 3, 1, 3, - 1, 1, 3, 1, 2, 1, 2, 3, 1, 3, - 3, 1, 3, 2, 0, 1, 1, 1, 1, 1, - 3, 5, 8, 3, 5, 9, 3, 2, 3, 2, - 3, 2, 3, 3, 3, 3, 1, 2, 2, 5, - 7, 9, 5, 6, 3, 3, 2, 2, 1, 1, - 1, 0, 2, 8, 0, 4, 1, 3, 0, 1, - 0, 1, 10, 7, 6, 5, 1, 2, 2, 0, - 2, 0, 2, 0, 2, 1, 3, 1, 4, 1, - 4, 1, 1, 4, 1, 3, 3, 3, 4, 4, - 5, 0, 2, 4, 3, 1, 1, 1, 4, 0, - 2, 3, 0, 2, 4, 0, 2, 0, 3, 1, - 2, 1, 1, 0, 1, 3, 4, 6, 1, 1, - 1, 0, 1, 0, 2, 2, 3, 3, 1, 3, - 1, 2, 2, 3, 1, 1, 2, 4, 3, 1, - 1, 3, 2, 0, 1, 3, 3, 9, 3, 1, - 3, 0, 2, 4, 5, 4, 4, 4, 3, 1, - 1, 1, 3, 1, 1, 0, 1, 1, 2, 1, - 1, 1, 1, 1, 1, 1, 3, 1, 1, 3, - 3, 1, 0, 1, 1, 3, 3, 4, 4, 1, - 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, + 1, 1, 1, 3, 5, 4, 3, 4, 2, 3, + 1, 1, 7, 8, 6, 7, 3, 1, 3, 1, + 3, 1, 1, 3, 1, 2, 1, 2, 3, 1, + 3, 3, 1, 3, 2, 0, 1, 1, 1, 1, + 1, 3, 5, 8, 3, 5, 9, 3, 2, 3, + 2, 3, 2, 3, 3, 3, 3, 1, 2, 2, + 5, 7, 9, 5, 6, 3, 3, 2, 2, 1, + 1, 1, 0, 2, 8, 0, 4, 1, 3, 0, + 1, 0, 1, 10, 7, 6, 5, 1, 2, 2, + 0, 2, 0, 2, 0, 2, 1, 3, 1, 4, + 1, 4, 1, 1, 4, 1, 3, 3, 3, 4, + 4, 5, 0, 2, 4, 3, 1, 1, 1, 4, + 0, 2, 3, 0, 2, 4, 0, 2, 0, 3, + 1, 2, 1, 1, 0, 1, 3, 4, 6, 1, + 1, 1, 0, 1, 0, 2, 2, 3, 3, 1, + 3, 1, 2, 2, 3, 1, 1, 2, 4, 3, + 1, 1, 3, 2, 0, 1, 3, 3, 9, 3, + 1, 3, 0, 2, 4, 5, 4, 4, 4, 3, + 1, 1, 1, 3, 1, 1, 0, 1, 1, 2, + 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, + 3, 3, 1, 0, 1, 1, 3, 3, 4, 4, + 1, 2, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 2, 2, 2, 2, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 1, 3, 5, 4, 3, 4, 4, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 1, 1, 1, 3, 2, 1, 2, 10, 11, + 3, 3, 2, 4, 4, 3, 4, 4, 4, 4, + 7, 3, 2, 0, 4, 1, 3, 2, 2, 4, + 6, 2, 2, 4, 1, 1, 1, 2, 3, 1, + 1, 1, 1, 1, 1, 3, 3, 4, 4, 0, + 2, 1, 0, 1, 1, 0, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 3, 2, + 1, 3, 1, 4, 3, 1, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 2, 2, 2, 2, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 1, 3, - 5, 4, 3, 4, 4, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, - 1, 1, 3, 2, 1, 2, 10, 11, 3, 3, - 2, 4, 4, 3, 4, 4, 4, 4, 7, 3, - 2, 0, 4, 1, 3, 2, 2, 4, 6, 2, - 2, 4, 1, 1, 1, 2, 3, 1, 1, 1, - 1, 1, 1, 3, 3, 4, 4, 0, 2, 1, - 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 3, 2, 1, 3, - 1, 4, 3, 1, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 2, 2, 2, 2, 3, 3, 3, 3, 3, - 3, 3, 3, 5, 4, 4, 3, 1, 3, 1, - 1, 3, 3, 0, 2, 0, 1, 3, 1, 3, - 1, 1, 1, 1, 1, 6, 4, 3, 4, 2, - 4, 4, 1, 3, 1, 2, 1, 1, 4, 1, - 1, 3, 6, 4, 4, 4, 4, 1, 4, 0, - 1, 1, 3, 1, 1, 4, 3, 1, 1, 1, - 0, 0, 2, 3, 1, 3, 1, 4, 2, 2, - 2, 1, 2, 1, 1, 1, 4, 3, 3, 3, - 6, 3, 1, 1, 1 + 3, 3, 3, 3, 3, 5, 4, 4, 3, 1, + 3, 1, 1, 3, 3, 0, 2, 0, 1, 3, + 1, 3, 1, 1, 1, 1, 1, 6, 4, 3, + 4, 2, 4, 4, 1, 3, 1, 2, 1, 1, + 4, 1, 1, 3, 6, 4, 4, 4, 4, 1, + 4, 0, 1, 1, 3, 1, 1, 4, 3, 1, + 1, 1, 0, 0, 2, 3, 1, 3, 1, 4, + 2, 2, 2, 2, 1, 2, 1, 1, 1, 4, + 3, 3, 3, 6, 3, 1, 1, 1 ); protected function initReduceCallbacks() { @@ -941,7 +944,7 @@ class Php5 extends \PhpParser\ParserAbstract $this->semValue = array(); }, 4 => function ($stackPos) { - $startAttributes = $this->lookaheadStartAttributes; if (isset($startAttributes['comments'])) { $nop = new Stmt\Nop($startAttributes + $this->endAttributes); } else { $nop = null; }; + $startAttributes = $this->lookaheadStartAttributes; if (isset($startAttributes['comments'])) { $nop = new Stmt\Nop($this->createZeroLengthAttributes($startAttributes)); } else { $nop = null; }; if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 5 => function ($stackPos) { @@ -1170,7 +1173,7 @@ class Php5 extends \PhpParser\ParserAbstract $this->semValue = $this->semStack[$stackPos]; }, 80 => function ($stackPos) { - $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos]; }, 81 => function ($stackPos) { $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); @@ -1182,19 +1185,19 @@ class Php5 extends \PhpParser\ParserAbstract $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 84 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 85 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 86 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 87 => function ($stackPos) { - $this->semValue = new Expr\Variable(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 88 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\Variable(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 89 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; @@ -1203,119 +1206,119 @@ class Php5 extends \PhpParser\ParserAbstract $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 91 => function ($stackPos) { - $this->semValue = new Stmt\HaltCompiler($this->lexer->handleHaltCompiler(), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 92 => function ($stackPos) { + $this->semValue = new Stmt\HaltCompiler($this->lexer->handleHaltCompiler(), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 93 => function ($stackPos) { $this->semValue = new Stmt\Namespace_($this->semStack[$stackPos-(3-2)], null, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->semValue->setAttribute('kind', Stmt\Namespace_::KIND_SEMICOLON); $this->checkNamespace($this->semValue); }, - 93 => function ($stackPos) { + 94 => function ($stackPos) { $this->semValue = new Stmt\Namespace_($this->semStack[$stackPos-(5-2)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); $this->semValue->setAttribute('kind', Stmt\Namespace_::KIND_BRACED); $this->checkNamespace($this->semValue); }, - 94 => function ($stackPos) { + 95 => function ($stackPos) { $this->semValue = new Stmt\Namespace_(null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); $this->semValue->setAttribute('kind', Stmt\Namespace_::KIND_BRACED); $this->checkNamespace($this->semValue); }, - 95 => function ($stackPos) { + 96 => function ($stackPos) { $this->semValue = new Stmt\Use_($this->semStack[$stackPos-(3-2)], Stmt\Use_::TYPE_NORMAL, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 96 => function ($stackPos) { + 97 => function ($stackPos) { $this->semValue = new Stmt\Use_($this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-2)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 97 => function ($stackPos) { + 98 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 98 => function ($stackPos) { + 99 => function ($stackPos) { $this->semValue = new Stmt\Const_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 99 => function ($stackPos) { + 100 => function ($stackPos) { $this->semValue = Stmt\Use_::TYPE_FUNCTION; }, - 100 => function ($stackPos) { + 101 => function ($stackPos) { $this->semValue = Stmt\Use_::TYPE_CONSTANT; }, - 101 => function ($stackPos) { + 102 => function ($stackPos) { $this->semValue = new Stmt\GroupUse(new Name($this->semStack[$stackPos-(7-3)], $this->startAttributeStack[$stackPos-(7-3)] + $this->endAttributeStack[$stackPos-(7-3)]), $this->semStack[$stackPos-(7-6)], $this->semStack[$stackPos-(7-2)], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); }, - 102 => function ($stackPos) { + 103 => function ($stackPos) { $this->semValue = new Stmt\GroupUse(new Name($this->semStack[$stackPos-(8-4)], $this->startAttributeStack[$stackPos-(8-4)] + $this->endAttributeStack[$stackPos-(8-4)]), $this->semStack[$stackPos-(8-7)], $this->semStack[$stackPos-(8-2)], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); }, - 103 => function ($stackPos) { + 104 => function ($stackPos) { $this->semValue = new Stmt\GroupUse(new Name($this->semStack[$stackPos-(6-2)], $this->startAttributeStack[$stackPos-(6-2)] + $this->endAttributeStack[$stackPos-(6-2)]), $this->semStack[$stackPos-(6-5)], Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); }, - 104 => function ($stackPos) { + 105 => function ($stackPos) { $this->semValue = new Stmt\GroupUse(new Name($this->semStack[$stackPos-(7-3)], $this->startAttributeStack[$stackPos-(7-3)] + $this->endAttributeStack[$stackPos-(7-3)]), $this->semStack[$stackPos-(7-6)], Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); }, - 105 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, 106 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 107 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 108 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 109 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 110 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 111 => function ($stackPos) { - $this->semValue = new Stmt\UseUse($this->semStack[$stackPos-(1-1)], null, Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $stackPos-(1-1)); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 112 => function ($stackPos) { - $this->semValue = new Stmt\UseUse($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $stackPos-(3-3)); + $this->semValue = new Stmt\UseUse($this->semStack[$stackPos-(1-1)], null, Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $stackPos-(1-1)); }, 113 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Stmt\UseUse($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $stackPos-(3-3)); }, 114 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 115 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; $this->semValue->type = Stmt\Use_::TYPE_NORMAL; + $this->semValue = $this->semStack[$stackPos-(2-2)]; }, 116 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; $this->semValue->type = $this->semStack[$stackPos-(2-1)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; $this->semValue->type = Stmt\Use_::TYPE_NORMAL; }, 117 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = $this->semStack[$stackPos-(2-2)]; $this->semValue->type = $this->semStack[$stackPos-(2-1)]; }, 118 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 119 => function ($stackPos) { - $this->semValue = new Node\Const_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 120 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 121 => function ($stackPos) { + 119 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 122 => function ($stackPos) { + 120 => function ($stackPos) { $this->semValue = new Node\Const_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, + 121 => function ($stackPos) { + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + }, + 122 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(1-1)]); + }, 123 => function ($stackPos) { - if (is_array($this->semStack[$stackPos-(2-2)])) { $this->semValue = array_merge($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); } else { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }; + $this->semValue = new Node\Const_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 124 => function ($stackPos) { - $this->semValue = array(); + if (is_array($this->semStack[$stackPos-(2-2)])) { $this->semValue = array_merge($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); } else { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }; }, 125 => function ($stackPos) { - $startAttributes = $this->lookaheadStartAttributes; if (isset($startAttributes['comments'])) { $nop = new Stmt\Nop($startAttributes + $this->endAttributes); } else { $nop = null; }; - if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = array(); }, 126 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $startAttributes = $this->lookaheadStartAttributes; if (isset($startAttributes['comments'])) { $nop = new Stmt\Nop($this->createZeroLengthAttributes($startAttributes)); } else { $nop = null; }; + if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 127 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; @@ -1324,9 +1327,12 @@ class Php5 extends \PhpParser\ParserAbstract $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 129 => function ($stackPos) { - throw new Error('__HALT_COMPILER() can only be used from the outermost scope', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 130 => function ($stackPos) { + throw new Error('__HALT_COMPILER() can only be used from the outermost scope', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 131 => function ($stackPos) { if ($this->semStack[$stackPos-(3-2)]) { $this->semValue = $this->semStack[$stackPos-(3-2)]; $attrs = $this->startAttributeStack[$stackPos-(3-1)]; $stmts = $this->semValue; if (!empty($attrs['comments'])) {$stmts[0]->setAttribute('comments', array_merge($attrs['comments'], $stmts[0]->getAttribute('comments', []))); }; @@ -1336,852 +1342,849 @@ class Php5 extends \PhpParser\ParserAbstract } }, - 131 => function ($stackPos) { + 132 => function ($stackPos) { $this->semValue = new Stmt\If_($this->semStack[$stackPos-(5-2)], ['stmts' => is_array($this->semStack[$stackPos-(5-3)]) ? $this->semStack[$stackPos-(5-3)] : array($this->semStack[$stackPos-(5-3)]), 'elseifs' => $this->semStack[$stackPos-(5-4)], 'else' => $this->semStack[$stackPos-(5-5)]], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, - 132 => function ($stackPos) { + 133 => function ($stackPos) { $this->semValue = new Stmt\If_($this->semStack[$stackPos-(8-2)], ['stmts' => $this->semStack[$stackPos-(8-4)], 'elseifs' => $this->semStack[$stackPos-(8-5)], 'else' => $this->semStack[$stackPos-(8-6)]], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); }, - 133 => function ($stackPos) { + 134 => function ($stackPos) { $this->semValue = new Stmt\While_($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 134 => function ($stackPos) { + 135 => function ($stackPos) { $this->semValue = new Stmt\Do_($this->semStack[$stackPos-(5-4)], is_array($this->semStack[$stackPos-(5-2)]) ? $this->semStack[$stackPos-(5-2)] : array($this->semStack[$stackPos-(5-2)]), $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, - 135 => function ($stackPos) { + 136 => function ($stackPos) { $this->semValue = new Stmt\For_(['init' => $this->semStack[$stackPos-(9-3)], 'cond' => $this->semStack[$stackPos-(9-5)], 'loop' => $this->semStack[$stackPos-(9-7)], 'stmts' => $this->semStack[$stackPos-(9-9)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, - 136 => function ($stackPos) { + 137 => function ($stackPos) { $this->semValue = new Stmt\Switch_($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 137 => function ($stackPos) { + 138 => function ($stackPos) { $this->semValue = new Stmt\Break_(null, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 138 => function ($stackPos) { + 139 => function ($stackPos) { $this->semValue = new Stmt\Break_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 139 => function ($stackPos) { + 140 => function ($stackPos) { $this->semValue = new Stmt\Continue_(null, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 140 => function ($stackPos) { + 141 => function ($stackPos) { $this->semValue = new Stmt\Continue_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 141 => function ($stackPos) { + 142 => function ($stackPos) { $this->semValue = new Stmt\Return_(null, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 142 => function ($stackPos) { + 143 => function ($stackPos) { $this->semValue = new Stmt\Return_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 143 => function ($stackPos) { + 144 => function ($stackPos) { $this->semValue = new Stmt\Global_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 144 => function ($stackPos) { + 145 => function ($stackPos) { $this->semValue = new Stmt\Static_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 145 => function ($stackPos) { + 146 => function ($stackPos) { $this->semValue = new Stmt\Echo_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 146 => function ($stackPos) { - $this->semValue = new Stmt\InlineHTML($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, 147 => function ($stackPos) { - $this->semValue = new Stmt\Expression($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Stmt\InlineHTML($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 148 => function ($stackPos) { $this->semValue = new Stmt\Expression($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 149 => function ($stackPos) { - $this->semValue = new Stmt\Unset_($this->semStack[$stackPos-(5-3)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); - }, - 150 => function ($stackPos) { - $this->semValue = new Stmt\Foreach_($this->semStack[$stackPos-(7-3)], $this->semStack[$stackPos-(7-5)][0], ['keyVar' => null, 'byRef' => $this->semStack[$stackPos-(7-5)][1], 'stmts' => $this->semStack[$stackPos-(7-7)]], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); - }, - 151 => function ($stackPos) { - $this->semValue = new Stmt\Foreach_($this->semStack[$stackPos-(9-3)], $this->semStack[$stackPos-(9-7)][0], ['keyVar' => $this->semStack[$stackPos-(9-5)], 'byRef' => $this->semStack[$stackPos-(9-7)][1], 'stmts' => $this->semStack[$stackPos-(9-9)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); - }, - 152 => function ($stackPos) { - $this->semValue = new Stmt\Declare_($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); - }, - 153 => function ($stackPos) { - $this->semValue = new Stmt\TryCatch($this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-5)], $this->semStack[$stackPos-(6-6)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); $this->checkTryCatch($this->semValue); - }, - 154 => function ($stackPos) { - $this->semValue = new Stmt\Throw_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 155 => function ($stackPos) { - $this->semValue = new Stmt\Goto_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 156 => function ($stackPos) { - $this->semValue = new Stmt\Label($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 157 => function ($stackPos) { $this->semValue = new Stmt\Expression($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, + 150 => function ($stackPos) { + $this->semValue = new Stmt\Unset_($this->semStack[$stackPos-(5-3)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + }, + 151 => function ($stackPos) { + $this->semValue = new Stmt\Foreach_($this->semStack[$stackPos-(7-3)], $this->semStack[$stackPos-(7-5)][0], ['keyVar' => null, 'byRef' => $this->semStack[$stackPos-(7-5)][1], 'stmts' => $this->semStack[$stackPos-(7-7)]], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); + }, + 152 => function ($stackPos) { + $this->semValue = new Stmt\Foreach_($this->semStack[$stackPos-(9-3)], $this->semStack[$stackPos-(9-7)][0], ['keyVar' => $this->semStack[$stackPos-(9-5)], 'byRef' => $this->semStack[$stackPos-(9-7)][1], 'stmts' => $this->semStack[$stackPos-(9-9)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); + }, + 153 => function ($stackPos) { + $this->semValue = new Stmt\Declare_($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + }, + 154 => function ($stackPos) { + $this->semValue = new Stmt\TryCatch($this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-5)], $this->semStack[$stackPos-(6-6)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); $this->checkTryCatch($this->semValue); + }, + 155 => function ($stackPos) { + $this->semValue = new Stmt\Throw_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 156 => function ($stackPos) { + $this->semValue = new Stmt\Goto_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 157 => function ($stackPos) { + $this->semValue = new Stmt\Label($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, 158 => function ($stackPos) { - $this->semValue = array(); /* means: no statement */ + $this->semValue = new Stmt\Expression($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 159 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = array(); /* means: no statement */ }, 160 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 161 => function ($stackPos) { $startAttributes = $this->startAttributeStack[$stackPos-(1-1)]; if (isset($startAttributes['comments'])) { $this->semValue = new Stmt\Nop($startAttributes + $this->endAttributes); } else { $this->semValue = null; }; if ($this->semValue === null) $this->semValue = array(); /* means: no statement */ }, - 161 => function ($stackPos) { + 162 => function ($stackPos) { $this->semValue = array(); }, - 162 => function ($stackPos) { + 163 => function ($stackPos) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 163 => function ($stackPos) { + 164 => function ($stackPos) { $this->semValue = new Stmt\Catch_(array($this->semStack[$stackPos-(8-3)]), $this->semStack[$stackPos-(8-4)], $this->semStack[$stackPos-(8-7)], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); }, - 164 => function ($stackPos) { + 165 => function ($stackPos) { $this->semValue = null; }, - 165 => function ($stackPos) { + 166 => function ($stackPos) { $this->semValue = new Stmt\Finally_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 166 => function ($stackPos) { + 167 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 167 => function ($stackPos) { + 168 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 168 => function ($stackPos) { - $this->semValue = false; - }, 169 => function ($stackPos) { - $this->semValue = true; + $this->semValue = false; }, 170 => function ($stackPos) { - $this->semValue = false; - }, - 171 => function ($stackPos) { $this->semValue = true; }, + 171 => function ($stackPos) { + $this->semValue = false; + }, 172 => function ($stackPos) { - $this->semValue = new Stmt\Function_($this->semStack[$stackPos-(10-3)], ['byRef' => $this->semStack[$stackPos-(10-2)], 'params' => $this->semStack[$stackPos-(10-5)], 'returnType' => $this->semStack[$stackPos-(10-7)], 'stmts' => $this->semStack[$stackPos-(10-9)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); + $this->semValue = true; }, 173 => function ($stackPos) { + $this->semValue = new Stmt\Function_($this->semStack[$stackPos-(10-3)], ['byRef' => $this->semStack[$stackPos-(10-2)], 'params' => $this->semStack[$stackPos-(10-5)], 'returnType' => $this->semStack[$stackPos-(10-7)], 'stmts' => $this->semStack[$stackPos-(10-9)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); + }, + 174 => function ($stackPos) { $this->semValue = new Stmt\Class_($this->semStack[$stackPos-(7-2)], ['type' => $this->semStack[$stackPos-(7-1)], 'extends' => $this->semStack[$stackPos-(7-3)], 'implements' => $this->semStack[$stackPos-(7-4)], 'stmts' => $this->semStack[$stackPos-(7-6)]], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); $this->checkClass($this->semValue, $stackPos-(7-2)); }, - 174 => function ($stackPos) { + 175 => function ($stackPos) { $this->semValue = new Stmt\Interface_($this->semStack[$stackPos-(6-2)], ['extends' => $this->semStack[$stackPos-(6-3)], 'stmts' => $this->semStack[$stackPos-(6-5)]], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); $this->checkInterface($this->semValue, $stackPos-(6-2)); }, - 175 => function ($stackPos) { + 176 => function ($stackPos) { $this->semValue = new Stmt\Trait_($this->semStack[$stackPos-(5-2)], ['stmts' => $this->semStack[$stackPos-(5-4)]], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, - 176 => function ($stackPos) { + 177 => function ($stackPos) { $this->semValue = 0; }, - 177 => function ($stackPos) { + 178 => function ($stackPos) { $this->semValue = Stmt\Class_::MODIFIER_ABSTRACT; }, - 178 => function ($stackPos) { + 179 => function ($stackPos) { $this->semValue = Stmt\Class_::MODIFIER_FINAL; }, - 179 => function ($stackPos) { - $this->semValue = null; - }, 180 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; + $this->semValue = null; }, 181 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = $this->semStack[$stackPos-(2-2)]; }, 182 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; + $this->semValue = array(); }, 183 => function ($stackPos) { - $this->semValue = array(); - }, - 184 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-2)]; }, - 185 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 186 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 187 => function ($stackPos) { - $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); - }, - 188 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; - }, - 189 => function ($stackPos) { - $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); - }, - 190 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; - }, - 191 => function ($stackPos) { - $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); - }, - 192 => function ($stackPos) { - $this->semValue = null; - }, - 193 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; - }, - 194 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 195 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 196 => function ($stackPos) { - $this->semValue = new Stmt\DeclareDeclare($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 197 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 198 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-3)]; - }, - 199 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; - }, - 200 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(5-3)]; - }, - 201 => function ($stackPos) { + 184 => function ($stackPos) { $this->semValue = array(); }, + 185 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(2-2)]; + }, + 186 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(1-1)]); + }, + 187 => function ($stackPos) { + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + }, + 188 => function ($stackPos) { + $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); + }, + 189 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(4-2)]; + }, + 190 => function ($stackPos) { + $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); + }, + 191 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(4-2)]; + }, + 192 => function ($stackPos) { + $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); + }, + 193 => function ($stackPos) { + $this->semValue = null; + }, + 194 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(4-2)]; + }, + 195 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(1-1)]); + }, + 196 => function ($stackPos) { + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + }, + 197 => function ($stackPos) { + $this->semValue = new Stmt\DeclareDeclare($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 198 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(3-2)]; + }, + 199 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(4-3)]; + }, + 200 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(4-2)]; + }, + 201 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(5-3)]; + }, 202 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = array(); }, 203 => function ($stackPos) { - $this->semValue = new Stmt\Case_($this->semStack[$stackPos-(4-2)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 204 => function ($stackPos) { - $this->semValue = new Stmt\Case_(null, $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Stmt\Case_($this->semStack[$stackPos-(4-2)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 205 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; + $this->semValue = new Stmt\Case_(null, $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 206 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos]; }, 207 => function ($stackPos) { - $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); + $this->semValue = $this->semStack[$stackPos]; }, 208 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; + $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); }, 209 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = $this->semStack[$stackPos-(4-2)]; }, 210 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = array(); }, 211 => function ($stackPos) { - $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(3-2)], is_array($this->semStack[$stackPos-(3-3)]) ? $this->semStack[$stackPos-(3-3)] : array($this->semStack[$stackPos-(3-3)]), $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 212 => function ($stackPos) { - $this->semValue = array(); - }, - 213 => function ($stackPos) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, + 212 => function ($stackPos) { + $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(3-2)], is_array($this->semStack[$stackPos-(3-3)]) ? $this->semStack[$stackPos-(3-3)] : array($this->semStack[$stackPos-(3-3)]), $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 213 => function ($stackPos) { + $this->semValue = array(); + }, 214 => function ($stackPos) { - $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(4-2)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 215 => function ($stackPos) { - $this->semValue = null; + $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(4-2)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 216 => function ($stackPos) { - $this->semValue = new Stmt\Else_(is_array($this->semStack[$stackPos-(2-2)]) ? $this->semStack[$stackPos-(2-2)] : array($this->semStack[$stackPos-(2-2)]), $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = null; }, 217 => function ($stackPos) { - $this->semValue = null; + $this->semValue = new Stmt\Else_(is_array($this->semStack[$stackPos-(2-2)]) ? $this->semStack[$stackPos-(2-2)] : array($this->semStack[$stackPos-(2-2)]), $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 218 => function ($stackPos) { - $this->semValue = new Stmt\Else_($this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = null; }, 219 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)], false); + $this->semValue = new Stmt\Else_($this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 220 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(2-2)], true); - }, - 221 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)], false); }, + 221 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(2-2)], true); + }, 222 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = array($this->semStack[$stackPos-(1-1)], false); }, 223 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 224 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = array(); }, 225 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 226 => function ($stackPos) { - $this->semValue = new Node\Param($this->semStack[$stackPos-(4-4)], null, $this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-2)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); $this->checkParam($this->semValue); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 227 => function ($stackPos) { - $this->semValue = new Node\Param($this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-6)], $this->semStack[$stackPos-(6-1)], $this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-3)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); $this->checkParam($this->semValue); + $this->semValue = new Node\Param($this->semStack[$stackPos-(4-4)], null, $this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-2)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); $this->checkParam($this->semValue); }, 228 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Node\Param($this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-6)], $this->semStack[$stackPos-(6-1)], $this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-3)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); $this->checkParam($this->semValue); }, 229 => function ($stackPos) { - $this->semValue = new Node\Identifier('array', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 230 => function ($stackPos) { - $this->semValue = new Node\Identifier('callable', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\Identifier('array', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 231 => function ($stackPos) { - $this->semValue = null; + $this->semValue = new Node\Identifier('callable', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 232 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 233 => function ($stackPos) { $this->semValue = null; }, - 234 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; - }, - 235 => function ($stackPos) { - $this->semValue = array(); - }, - 236 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 237 => function ($stackPos) { - $this->semValue = array(new Node\Arg($this->semStack[$stackPos-(3-2)], false, false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes)); - }, - 238 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 239 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 240 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(1-1)], false, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 241 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], true, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 242 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], false, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 243 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 244 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 245 => function ($stackPos) { + 233 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 246 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + 234 => function ($stackPos) { + $this->semValue = null; }, - 247 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + 235 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(2-2)]; }, - 248 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 249 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 250 => function ($stackPos) { - $this->semValue = new Stmt\StaticVar($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 251 => function ($stackPos) { - $this->semValue = new Stmt\StaticVar($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 252 => function ($stackPos) { - if ($this->semStack[$stackPos-(2-2)] !== null) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; } - }, - 253 => function ($stackPos) { + 236 => function ($stackPos) { $this->semValue = array(); }, + 237 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(3-2)]; + }, + 238 => function ($stackPos) { + $this->semValue = array(new Node\Arg($this->semStack[$stackPos-(3-2)], false, false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes)); + }, + 239 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(1-1)]); + }, + 240 => function ($stackPos) { + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + }, + 241 => function ($stackPos) { + $this->semValue = new Node\Arg($this->semStack[$stackPos-(1-1)], false, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 242 => function ($stackPos) { + $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], true, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 243 => function ($stackPos) { + $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], false, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 244 => function ($stackPos) { + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + }, + 245 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(1-1)]); + }, + 246 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 247 => function ($stackPos) { + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 248 => function ($stackPos) { + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + }, + 249 => function ($stackPos) { + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + }, + 250 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(1-1)]); + }, + 251 => function ($stackPos) { + $this->semValue = new Stmt\StaticVar($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 252 => function ($stackPos) { + $this->semValue = new Stmt\StaticVar($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 253 => function ($stackPos) { + if ($this->semStack[$stackPos-(2-2)] !== null) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; } + }, 254 => function ($stackPos) { - $startAttributes = $this->lookaheadStartAttributes; if (isset($startAttributes['comments'])) { $nop = new Stmt\Nop($startAttributes + $this->endAttributes); } else { $nop = null; }; - if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = array(); }, 255 => function ($stackPos) { - $this->semValue = new Stmt\Property($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->checkProperty($this->semValue, $stackPos-(3-1)); + $startAttributes = $this->lookaheadStartAttributes; if (isset($startAttributes['comments'])) { $nop = new Stmt\Nop($this->createZeroLengthAttributes($startAttributes)); } else { $nop = null; }; + if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 256 => function ($stackPos) { - $this->semValue = new Stmt\ClassConst($this->semStack[$stackPos-(3-2)], 0, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Stmt\Property($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->checkProperty($this->semValue, $stackPos-(3-1)); }, 257 => function ($stackPos) { + $this->semValue = new Stmt\ClassConst($this->semStack[$stackPos-(3-2)], 0, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 258 => function ($stackPos) { $this->semValue = new Stmt\ClassMethod($this->semStack[$stackPos-(9-4)], ['type' => $this->semStack[$stackPos-(9-1)], 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-6)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); $this->checkClassMethod($this->semValue, $stackPos-(9-1)); }, - 258 => function ($stackPos) { + 259 => function ($stackPos) { $this->semValue = new Stmt\TraitUse($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 259 => function ($stackPos) { - $this->semValue = array(); - }, 260 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = array(); }, 261 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 262 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = array(); }, 263 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Precedence($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 264 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(5-1)][0], $this->semStack[$stackPos-(5-1)][1], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + $this->semValue = new Stmt\TraitUseAdaptation\Precedence($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 265 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], null, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(5-1)][0], $this->semStack[$stackPos-(5-1)][1], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, 266 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], null, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 267 => function ($stackPos) { $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 268 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); + $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 269 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); }, 270 => function ($stackPos) { - $this->semValue = array(null, $this->semStack[$stackPos-(1-1)]); - }, - 271 => function ($stackPos) { - $this->semValue = null; - }, - 272 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 273 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, + 271 => function ($stackPos) { + $this->semValue = array(null, $this->semStack[$stackPos-(1-1)]); + }, + 272 => function ($stackPos) { + $this->semValue = null; + }, + 273 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(3-2)]; + }, 274 => function ($stackPos) { - $this->semValue = 0; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 275 => function ($stackPos) { $this->semValue = 0; }, 276 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = 0; }, 277 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 278 => function ($stackPos) { - $this->checkModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 279 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PUBLIC; + $this->checkModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; }, 280 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PROTECTED; + $this->semValue = Stmt\Class_::MODIFIER_PUBLIC; }, 281 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PRIVATE; + $this->semValue = Stmt\Class_::MODIFIER_PROTECTED; }, 282 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_STATIC; + $this->semValue = Stmt\Class_::MODIFIER_PRIVATE; }, 283 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_ABSTRACT; + $this->semValue = Stmt\Class_::MODIFIER_STATIC; }, 284 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_FINAL; + $this->semValue = Stmt\Class_::MODIFIER_ABSTRACT; }, 285 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = Stmt\Class_::MODIFIER_FINAL; }, 286 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 287 => function ($stackPos) { - $this->semValue = new Node\VarLikeIdentifier(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 288 => function ($stackPos) { - $this->semValue = new Stmt\PropertyProperty($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 289 => function ($stackPos) { - $this->semValue = new Stmt\PropertyProperty($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 290 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 291 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, + 287 => function ($stackPos) { + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + }, + 288 => function ($stackPos) { + $this->semValue = new Node\VarLikeIdentifier(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 289 => function ($stackPos) { + $this->semValue = new Stmt\PropertyProperty($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 290 => function ($stackPos) { + $this->semValue = new Stmt\PropertyProperty($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 291 => function ($stackPos) { + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + }, 292 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 293 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = array(); }, 294 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 295 => function ($stackPos) { - $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 296 => function ($stackPos) { $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 297 => function ($stackPos) { - $this->semValue = new Expr\AssignRef($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 298 => function ($stackPos) { $this->semValue = new Expr\AssignRef($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 299 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\AssignRef($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 300 => function ($stackPos) { - $this->semValue = new Expr\Clone_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 301 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 302 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 303 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 304 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 305 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 306 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 307 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 308 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 309 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 310 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 311 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 312 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 313 => function ($stackPos) { - $this->semValue = new Expr\PostInc($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 314 => function ($stackPos) { - $this->semValue = new Expr\PreInc($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 315 => function ($stackPos) { - $this->semValue = new Expr\PostDec($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 316 => function ($stackPos) { - $this->semValue = new Expr\PreDec($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 317 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BooleanOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 318 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BooleanAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 319 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 320 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 321 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 322 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 323 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 324 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 325 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 326 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 327 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 328 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 329 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 330 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 331 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 332 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 333 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 334 => function ($stackPos) { - $this->semValue = new Expr\UnaryPlus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 335 => function ($stackPos) { - $this->semValue = new Expr\UnaryMinus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 336 => function ($stackPos) { - $this->semValue = new Expr\BooleanNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 337 => function ($stackPos) { - $this->semValue = new Expr\BitwiseNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 338 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Identical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 339 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\NotIdentical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 340 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Equal($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 341 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\NotEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 342 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Spaceship($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 343 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Smaller($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 344 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\SmallerOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 345 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Greater($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 346 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\GreaterOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 347 => function ($stackPos) { - $this->semValue = new Expr\Instanceof_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 348 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, + 301 => function ($stackPos) { + $this->semValue = new Expr\Clone_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 302 => function ($stackPos) { + $this->semValue = new Expr\AssignOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 303 => function ($stackPos) { + $this->semValue = new Expr\AssignOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 304 => function ($stackPos) { + $this->semValue = new Expr\AssignOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 305 => function ($stackPos) { + $this->semValue = new Expr\AssignOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 306 => function ($stackPos) { + $this->semValue = new Expr\AssignOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 307 => function ($stackPos) { + $this->semValue = new Expr\AssignOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 308 => function ($stackPos) { + $this->semValue = new Expr\AssignOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 309 => function ($stackPos) { + $this->semValue = new Expr\AssignOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 310 => function ($stackPos) { + $this->semValue = new Expr\AssignOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 311 => function ($stackPos) { + $this->semValue = new Expr\AssignOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 312 => function ($stackPos) { + $this->semValue = new Expr\AssignOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 313 => function ($stackPos) { + $this->semValue = new Expr\AssignOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 314 => function ($stackPos) { + $this->semValue = new Expr\AssignOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 315 => function ($stackPos) { + $this->semValue = new Expr\PostInc($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 316 => function ($stackPos) { + $this->semValue = new Expr\PreInc($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 317 => function ($stackPos) { + $this->semValue = new Expr\PostDec($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 318 => function ($stackPos) { + $this->semValue = new Expr\PreDec($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 319 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\BooleanOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 320 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\BooleanAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 321 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\LogicalOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 322 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\LogicalAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 323 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\LogicalXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 324 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 325 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 326 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 327 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 328 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 329 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 330 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 331 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 332 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 333 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 334 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 335 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 336 => function ($stackPos) { + $this->semValue = new Expr\UnaryPlus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 337 => function ($stackPos) { + $this->semValue = new Expr\UnaryMinus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 338 => function ($stackPos) { + $this->semValue = new Expr\BooleanNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 339 => function ($stackPos) { + $this->semValue = new Expr\BitwiseNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 340 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\Identical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 341 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\NotIdentical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 342 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\Equal($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 343 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\NotEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 344 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\Spaceship($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 345 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\Smaller($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 346 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\SmallerOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 347 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\Greater($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 348 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\GreaterOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, 349 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = new Expr\Instanceof_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 350 => function ($stackPos) { - $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(5-1)], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 351 => function ($stackPos) { - $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(4-1)], null, $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 352 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(5-1)], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, 353 => function ($stackPos) { - $this->semValue = new Expr\Isset_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(4-1)], null, $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 354 => function ($stackPos) { - $this->semValue = new Expr\Empty_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 355 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Isset_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 356 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Empty_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 357 => function ($stackPos) { - $this->semValue = new Expr\Eval_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 358 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 359 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Eval_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 360 => function ($stackPos) { - $this->semValue = new Expr\Cast\Int_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 361 => function ($stackPos) { + $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 362 => function ($stackPos) { + $this->semValue = new Expr\Cast\Int_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 363 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes; $attrs['kind'] = $this->getFloatCastKind($this->semStack[$stackPos-(2-1)]); $this->semValue = new Expr\Cast\Double($this->semStack[$stackPos-(2-2)], $attrs); }, - 362 => function ($stackPos) { + 364 => function ($stackPos) { $this->semValue = new Expr\Cast\String_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 363 => function ($stackPos) { + 365 => function ($stackPos) { $this->semValue = new Expr\Cast\Array_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 364 => function ($stackPos) { + 366 => function ($stackPos) { $this->semValue = new Expr\Cast\Object_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 365 => function ($stackPos) { + 367 => function ($stackPos) { $this->semValue = new Expr\Cast\Bool_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 366 => function ($stackPos) { + 368 => function ($stackPos) { $this->semValue = new Expr\Cast\Unset_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 367 => function ($stackPos) { + 369 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes; $attrs['kind'] = strtolower($this->semStack[$stackPos-(2-1)]) === 'exit' ? Expr\Exit_::KIND_EXIT : Expr\Exit_::KIND_DIE; $this->semValue = new Expr\Exit_($this->semStack[$stackPos-(2-2)], $attrs); }, - 368 => function ($stackPos) { - $this->semValue = new Expr\ErrorSuppress($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 369 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, 370 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\ErrorSuppress($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 371 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 372 => function ($stackPos) { - $this->semValue = new Expr\ShellExec($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 373 => function ($stackPos) { - $this->semValue = new Expr\Print_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 374 => function ($stackPos) { - $this->semValue = new Expr\Yield_(null, null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\ShellExec($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 375 => function ($stackPos) { - $this->semValue = new Expr\YieldFrom($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Print_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 376 => function ($stackPos) { - $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(10-2)], 'params' => $this->semStack[$stackPos-(10-4)], 'uses' => $this->semStack[$stackPos-(10-6)], 'returnType' => $this->semStack[$stackPos-(10-7)], 'stmts' => $this->semStack[$stackPos-(10-9)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); + $this->semValue = new Expr\Yield_(null, null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 377 => function ($stackPos) { - $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(11-3)], 'params' => $this->semStack[$stackPos-(11-5)], 'uses' => $this->semStack[$stackPos-(11-7)], 'returnType' => $this->semStack[$stackPos-(11-8)], 'stmts' => $this->semStack[$stackPos-(11-10)]], $this->startAttributeStack[$stackPos-(11-1)] + $this->endAttributes); + $this->semValue = new Expr\YieldFrom($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 378 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(10-2)], 'params' => $this->semStack[$stackPos-(10-4)], 'uses' => $this->semStack[$stackPos-(10-6)], 'returnType' => $this->semStack[$stackPos-(10-7)], 'stmts' => $this->semStack[$stackPos-(10-9)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); }, 379 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(11-3)], 'params' => $this->semStack[$stackPos-(11-5)], 'uses' => $this->semStack[$stackPos-(11-7)], 'returnType' => $this->semStack[$stackPos-(11-8)], 'stmts' => $this->semStack[$stackPos-(11-10)]], $this->startAttributeStack[$stackPos-(11-1)] + $this->endAttributes); }, 380 => function ($stackPos) { - $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(2-2)], null, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 381 => function ($stackPos) { - $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-2)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 382 => function ($stackPos) { + $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(2-2)], null, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 383 => function ($stackPos) { + $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-2)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + }, + 384 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_LONG; $this->semValue = new Expr\Array_($this->semStack[$stackPos-(4-3)], $attrs); }, - 383 => function ($stackPos) { + 385 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_SHORT; $this->semValue = new Expr\Array_($this->semStack[$stackPos-(3-2)], $attrs); }, - 384 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 385 => function ($stackPos) { - $attrs = $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes; $attrs['kind'] = ($this->semStack[$stackPos-(4-1)][0] === "'" || ($this->semStack[$stackPos-(4-1)][1] === "'" && ($this->semStack[$stackPos-(4-1)][0] === 'b' || $this->semStack[$stackPos-(4-1)][0] === 'B')) ? Scalar\String_::KIND_SINGLE_QUOTED : Scalar\String_::KIND_DOUBLE_QUOTED); - $this->semValue = new Expr\ArrayDimFetch(new Scalar\String_(Scalar\String_::parse($this->semStack[$stackPos-(4-1)]), $attrs), $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, 386 => function ($stackPos) { $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 387 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $attrs = $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes; $attrs['kind'] = ($this->semStack[$stackPos-(4-1)][0] === "'" || ($this->semStack[$stackPos-(4-1)][1] === "'" && ($this->semStack[$stackPos-(4-1)][0] === 'b' || $this->semStack[$stackPos-(4-1)][0] === 'B')) ? Scalar\String_::KIND_SINGLE_QUOTED : Scalar\String_::KIND_DOUBLE_QUOTED); + $this->semValue = new Expr\ArrayDimFetch(new Scalar\String_(Scalar\String_::parse($this->semStack[$stackPos-(4-1)]), $attrs), $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 388 => function ($stackPos) { + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + }, + 389 => function ($stackPos) { + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + }, + 390 => function ($stackPos) { $this->semValue = array(new Stmt\Class_(null, ['type' => 0, 'extends' => $this->semStack[$stackPos-(7-3)], 'implements' => $this->semStack[$stackPos-(7-4)], 'stmts' => $this->semStack[$stackPos-(7-6)]], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes), $this->semStack[$stackPos-(7-2)]); $this->checkClass($this->semValue[0], -1); }, - 389 => function ($stackPos) { + 391 => function ($stackPos) { $this->semValue = new Expr\New_($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 390 => function ($stackPos) { + 392 => function ($stackPos) { list($class, $ctorArgs) = $this->semStack[$stackPos-(2-2)]; $this->semValue = new Expr\New_($class, $ctorArgs, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 391 => function ($stackPos) { + 393 => function ($stackPos) { $this->semValue = array(); }, - 392 => function ($stackPos) { + 394 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(4-3)]; }, - 393 => function ($stackPos) { + 395 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 394 => function ($stackPos) { + 396 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 395 => function ($stackPos) { + 397 => function ($stackPos) { $this->semValue = new Expr\ClosureUse($this->semStack[$stackPos-(2-2)], $this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 396 => function ($stackPos) { - $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 397 => function ($stackPos) { - $this->semValue = new Expr\StaticCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, 398 => function ($stackPos) { - $this->semValue = new Expr\StaticCall($this->semStack[$stackPos-(6-1)], $this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-6)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); + $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 399 => function ($stackPos) { - $this->semValue = $this->fixupPhp5StaticPropCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\StaticCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 400 => function ($stackPos) { - $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\StaticCall($this->semStack[$stackPos-(6-1)], $this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-6)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); }, 401 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->fixupPhp5StaticPropCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 402 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 403 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 404 => function ($stackPos) { $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 405 => function ($stackPos) { - $this->semValue = new Name\FullyQualified($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 406 => function ($stackPos) { - $this->semValue = new Name\Relative($this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 407 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Name\FullyQualified($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 408 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Name\Relative($this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 409 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; @@ -2196,246 +2199,246 @@ class Php5 extends \PhpParser\ParserAbstract $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 413 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 414 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 415 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 416 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 417 => function ($stackPos) { - $this->semValue = null; + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 418 => function ($stackPos) { - $this->semValue = null; + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 419 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = null; }, 420 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = null; }, 421 => function ($stackPos) { - $this->semValue = array(new Scalar\EncapsedStringPart(Scalar\String_::parseEscapeSequences($this->semStack[$stackPos-(1-1)], '`', false), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes)); - }, - 422 => function ($stackPos) { - foreach ($this->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\Scalar\EncapsedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', false); } }; $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 423 => function ($stackPos) { - $this->semValue = array(); - }, - 424 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, + 422 => function ($stackPos) { + $this->semValue = array(); + }, + 423 => function ($stackPos) { + $this->semValue = array(new Scalar\EncapsedStringPart(Scalar\String_::parseEscapeSequences($this->semStack[$stackPos-(1-1)], '`', false), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes)); + }, + 424 => function ($stackPos) { + foreach ($this->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\Scalar\EncapsedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', false); } }; $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, 425 => function ($stackPos) { - $this->semValue = $this->parseLNumber($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes, true); + $this->semValue = array(); }, 426 => function ($stackPos) { - $this->semValue = new Scalar\DNumber(Scalar\DNumber::parse($this->semStack[$stackPos-(1-1)]), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 427 => function ($stackPos) { + $this->semValue = $this->parseLNumber($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes, true); + }, + 428 => function ($stackPos) { + $this->semValue = new Scalar\DNumber(Scalar\DNumber::parse($this->semStack[$stackPos-(1-1)]), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 429 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes; $attrs['kind'] = ($this->semStack[$stackPos-(1-1)][0] === "'" || ($this->semStack[$stackPos-(1-1)][1] === "'" && ($this->semStack[$stackPos-(1-1)][0] === 'b' || $this->semStack[$stackPos-(1-1)][0] === 'B')) ? Scalar\String_::KIND_SINGLE_QUOTED : Scalar\String_::KIND_DOUBLE_QUOTED); $this->semValue = new Scalar\String_(Scalar\String_::parse($this->semStack[$stackPos-(1-1)], false), $attrs); }, - 428 => function ($stackPos) { + 430 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Line($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 429 => function ($stackPos) { + 431 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\File($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 430 => function ($stackPos) { + 432 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Dir($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 431 => function ($stackPos) { + 433 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Class_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 432 => function ($stackPos) { + 434 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Trait_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 433 => function ($stackPos) { + 435 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Method($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 434 => function ($stackPos) { + 436 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Function_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 435 => function ($stackPos) { + 437 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Namespace_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 436 => function ($stackPos) { + 438 => function ($stackPos) { $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], false); }, - 437 => function ($stackPos) { + 439 => function ($stackPos) { $this->semValue = $this->parseDocString($this->semStack[$stackPos-(2-1)], '', $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(2-2)] + $this->endAttributeStack[$stackPos-(2-2)], false); }, - 438 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 439 => function ($stackPos) { - $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, 440 => function ($stackPos) { - $this->semValue = new Expr\ConstFetch($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 441 => function ($stackPos) { - $this->semValue = new Expr\Array_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 442 => function ($stackPos) { - $this->semValue = new Expr\Array_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 443 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 444 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BooleanOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 445 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BooleanAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 446 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 447 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 448 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 449 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 450 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 451 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 452 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 453 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 454 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 455 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 456 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 457 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 458 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 459 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 460 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 461 => function ($stackPos) { - $this->semValue = new Expr\UnaryPlus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 462 => function ($stackPos) { - $this->semValue = new Expr\UnaryMinus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 463 => function ($stackPos) { - $this->semValue = new Expr\BooleanNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 464 => function ($stackPos) { - $this->semValue = new Expr\BitwiseNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 465 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Identical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 466 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\NotIdentical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 467 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Equal($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 468 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\NotEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 469 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Smaller($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 470 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\SmallerOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 471 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Greater($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 472 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\GreaterOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 473 => function ($stackPos) { - $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(5-1)], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); - }, - 474 => function ($stackPos) { - $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(4-1)], null, $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 475 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 476 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 477 => function ($stackPos) { - $this->semValue = new Expr\ConstFetch($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 478 => function ($stackPos) { $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 479 => function ($stackPos) { + 442 => function ($stackPos) { + $this->semValue = new Expr\ConstFetch($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 443 => function ($stackPos) { + $this->semValue = new Expr\Array_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + }, + 444 => function ($stackPos) { + $this->semValue = new Expr\Array_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 445 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, + 446 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\BooleanOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 447 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\BooleanAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 448 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\LogicalOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 449 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\LogicalAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 450 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\LogicalXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 451 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 452 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 453 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 454 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 455 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 456 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 457 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 458 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 459 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 460 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 461 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 462 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 463 => function ($stackPos) { + $this->semValue = new Expr\UnaryPlus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 464 => function ($stackPos) { + $this->semValue = new Expr\UnaryMinus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 465 => function ($stackPos) { + $this->semValue = new Expr\BooleanNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 466 => function ($stackPos) { + $this->semValue = new Expr\BitwiseNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 467 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\Identical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 468 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\NotIdentical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 469 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\Equal($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 470 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\NotEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 471 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\Smaller($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 472 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\SmallerOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 473 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\Greater($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 474 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\GreaterOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 475 => function ($stackPos) { + $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(5-1)], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + }, + 476 => function ($stackPos) { + $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(4-1)], null, $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + }, + 477 => function ($stackPos) { + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + }, + 478 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(3-2)]; + }, + 479 => function ($stackPos) { + $this->semValue = new Expr\ConstFetch($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, 480 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 481 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 482 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 483 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; foreach ($this->semStack[$stackPos-(3-2)] as $s) { if ($s instanceof Node\Scalar\EncapsedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '"', true); } }; $this->semValue = new Scalar\Encapsed($this->semStack[$stackPos-(3-2)], $attrs); }, - 482 => function ($stackPos) { + 484 => function ($stackPos) { $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); }, - 483 => function ($stackPos) { + 485 => function ($stackPos) { $this->semValue = array(); }, - 484 => function ($stackPos) { + 486 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 485 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 486 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, 487 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = $this->semStack[$stackPos]; }, 488 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = $this->semStack[$stackPos]; }, 489 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 490 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 491 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 492 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 493 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; @@ -2444,64 +2447,64 @@ class Php5 extends \PhpParser\ParserAbstract $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 495 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-5)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); - }, - 496 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 497 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 498 => function ($stackPos) { - $this->semValue = new Expr\MethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 499 => function ($stackPos) { - $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 500 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 501 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 502 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, + 496 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 497 => function ($stackPos) { + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-5)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); + }, + 498 => function ($stackPos) { + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + }, + 499 => function ($stackPos) { + $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 500 => function ($stackPos) { + $this->semValue = new Expr\MethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + }, + 501 => function ($stackPos) { + $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 502 => function ($stackPos) { + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + }, 503 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 504 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 505 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 506 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 507 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 508 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 509 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 510 => function ($stackPos) { - $var = substr($this->semStack[$stackPos-(1-1)], 1); $this->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes) : $var; + $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 511 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 512 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(6-1)], $this->semStack[$stackPos-(6-5)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); + $var = substr($this->semStack[$stackPos-(1-1)], 1); $this->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes) : $var; }, 513 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 514 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(6-1)], $this->semStack[$stackPos-(6-5)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); }, 515 => function ($stackPos) { $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); @@ -2510,117 +2513,126 @@ class Php5 extends \PhpParser\ParserAbstract $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 517 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 518 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 519 => function ($stackPos) { - $this->semValue = null; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 520 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 521 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = null; }, 522 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 523 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 524 => function ($stackPos) { - $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; - }, - 525 => function ($stackPos) { - $this->semValue = new Expr\List_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 526 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 527 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 528 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 529 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 530 => function ($stackPos) { - $this->semValue = null; - }, - 531 => function ($stackPos) { - $this->semValue = array(); - }, - 532 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 533 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 534 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 535 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 536 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 537 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-1)], true, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 538 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(2-2)], null, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 539 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 540 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 541 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 542 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); - }, - 543 => function ($stackPos) { - $this->semValue = new Scalar\EncapsedStringPart($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 544 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 545 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 546 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 547 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 548 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 549 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 550 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-4)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); - }, - 551 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, + 525 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 526 => function ($stackPos) { + $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; + }, + 527 => function ($stackPos) { + $this->semValue = new Expr\List_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + }, + 528 => function ($stackPos) { + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + }, + 529 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(1-1)]); + }, + 530 => function ($stackPos) { + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 531 => function ($stackPos) { + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 532 => function ($stackPos) { + $this->semValue = null; + }, + 533 => function ($stackPos) { + $this->semValue = array(); + }, + 534 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(2-1)]; + }, + 535 => function ($stackPos) { + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + }, + 536 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(1-1)]); + }, + 537 => function ($stackPos) { + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 538 => function ($stackPos) { + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 539 => function ($stackPos) { + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-1)], true, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + }, + 540 => function ($stackPos) { + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(2-2)], null, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 541 => function ($stackPos) { + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(2-2)], null, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 542 => function ($stackPos) { + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + }, + 543 => function ($stackPos) { + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + }, + 544 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(1-1)]); + }, + 545 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); + }, + 546 => function ($stackPos) { + $this->semValue = new Scalar\EncapsedStringPart($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 547 => function ($stackPos) { + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 548 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 549 => function ($stackPos) { + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + }, + 550 => function ($stackPos) { + $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 551 => function ($stackPos) { + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, 552 => function ($stackPos) { - $this->semValue = new Scalar\String_($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 553 => function ($stackPos) { - $this->semValue = $this->parseNumString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-4)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); }, 554 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(3-2)]; + }, + 555 => function ($stackPos) { + $this->semValue = new Scalar\String_($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 556 => function ($stackPos) { + $this->semValue = $this->parseNumString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 557 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, ]; diff --git a/vendor/nikic/php-parser/lib/PhpParser/Parser/Php7.php b/vendor/nikic/php-parser/lib/PhpParser/Parser/Php7.php index 4c3a6bfb..75c8305f 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Parser/Php7.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Parser/Php7.php @@ -17,17 +17,17 @@ use PhpParser\Node\Stmt; */ class Php7 extends \PhpParser\ParserAbstract { - protected $tokenToSymbolMapSize = 392; - protected $actionTableSize = 942; - protected $gotoTableSize = 493; + protected $tokenToSymbolMapSize = 394; + protected $actionTableSize = 964; + protected $gotoTableSize = 508; - protected $invalidSymbol = 157; + protected $invalidSymbol = 159; protected $errorSymbol = 1; protected $defaultAction = -32766; protected $unexpectedTokenRule = 32767; - protected $YY2TBLSTATE = 337; - protected $numNonLeafStates = 582; + protected $YY2TBLSTATE = 348; + protected $numNonLeafStates = 602; protected $symbolToName = array( "EOF", @@ -58,6 +58,7 @@ class Php7 extends \PhpParser\ParserAbstract "T_SL_EQUAL", "T_SR_EQUAL", "T_POW_EQUAL", + "T_COALESCE_EQUAL", "'?'", "':'", "T_COALESCE", @@ -133,6 +134,7 @@ class Php7 extends \PhpParser\ParserAbstract "T_CONTINUE", "T_GOTO", "T_FUNCTION", + "T_FN", "T_CONST", "T_RETURN", "T_TRY", @@ -190,452 +192,462 @@ class Php7 extends \PhpParser\ParserAbstract ); protected $tokenToSymbol = array( - 0, 157, 157, 157, 157, 157, 157, 157, 157, 157, - 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, - 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, - 157, 157, 157, 53, 155, 157, 156, 52, 35, 157, - 151, 152, 50, 47, 7, 48, 49, 51, 157, 157, - 157, 157, 157, 157, 157, 157, 157, 157, 29, 148, - 41, 15, 43, 28, 65, 157, 157, 157, 157, 157, - 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, - 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, - 157, 67, 157, 154, 34, 157, 153, 157, 157, 157, - 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, - 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, - 157, 157, 157, 149, 33, 150, 55, 157, 157, 157, - 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, - 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, - 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, - 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, - 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, - 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, - 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, - 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, - 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, - 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, - 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, - 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, - 157, 157, 157, 157, 157, 157, 1, 2, 3, 4, + 0, 159, 159, 159, 159, 159, 159, 159, 159, 159, + 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, + 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, + 159, 159, 159, 54, 157, 159, 158, 53, 36, 159, + 153, 154, 51, 48, 7, 49, 50, 52, 159, 159, + 159, 159, 159, 159, 159, 159, 159, 159, 30, 150, + 42, 15, 44, 29, 66, 159, 159, 159, 159, 159, + 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, + 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, + 159, 68, 159, 156, 35, 159, 155, 159, 159, 159, + 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, + 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, + 159, 159, 159, 151, 34, 152, 56, 159, 159, 159, + 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, + 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, + 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, + 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, + 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, + 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, + 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, + 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, + 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, + 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, + 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, + 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, + 159, 159, 159, 159, 159, 159, 1, 2, 3, 4, 5, 6, 8, 9, 10, 11, 12, 13, 14, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, - 27, 30, 31, 32, 36, 37, 38, 39, 40, 42, - 44, 45, 46, 54, 56, 57, 58, 59, 60, 61, - 62, 63, 64, 66, 68, 69, 70, 71, 72, 73, - 74, 75, 76, 77, 78, 79, 80, 81, 157, 157, - 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, + 27, 28, 31, 32, 33, 37, 38, 39, 40, 41, + 43, 45, 46, 47, 55, 57, 58, 59, 60, 61, + 62, 63, 64, 65, 67, 69, 70, 71, 72, 73, + 74, 75, 76, 77, 78, 79, 80, 81, 82, 159, + 159, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, - 132, 133, 134, 135, 136, 137, 157, 157, 157, 157, - 157, 157, 138, 139, 140, 141, 142, 143, 144, 145, - 146, 147 + 132, 133, 134, 135, 136, 137, 138, 139, 159, 159, + 159, 159, 159, 159, 140, 141, 142, 143, 144, 145, + 146, 147, 148, 149 ); protected $action = array( - 587, 588, 589, 590, 591, 218, 592, 593, 594, 630, - 631, 666, 32, 102, 103, 104, 105, 106, 107, 108, - 109, 110, 111, 112, 113,-32766,-32766,-32766, 883, 884, - 885, 882, 881, 880, 0,-32766,-32766,-32766,-32766,-32766, - -32766, 664, 825, 117, 24,-32766, 429,-32766,-32766,-32766, - -32766,-32766, 595, 916, 918,-32766, 9,-32766,-32766,-32766, - -32766,-32766,-32766, 859, 251, 119, 596, 597, 598, 599, - 600, 601, 602,-32766,-32766, 662, 883, 884, 885, 882, - 881, 880, 603, 604, 605, 606, 607, 608, 609, 610, - 611, 612, 613, 633, 634, 635, 636, 637, 625, 626, - 627, 628, 629, 614, 615, 616, 617, 618, 619, 620, - 656, 657, 658, 659, 660, 661, 621, 622, 623, 624, - 654, 645, 643, 644, 640, 641, 231, 632, 638, 639, - 646, 647, 649, 648, 650, 651, 45, 46, 406, 47, - 48, 642, 653, 652, -233, 49, 50, 243, 51,-32767, - -32767,-32767,-32767, 93, 94, 95, 96, 97,-32766,-32766, - -32766, 42, -452, 25, -294, -294, 829, 830, 98, 99, - 100, 261, 242, 266, -454, 1049, 671, 389,-32766, 1015, - 875, 52, 53, 801, 101, 1049, 278, 54, 835, 55, - 223, 224, 56, 57, 58, 59, 60, 61, 62, 63, - -453, 25, 234, 64, 358,-32766,-32766,-32766, 992, 1016, - 1017, 408, -272, 1049, -489, 251, 491, 1015,-32766,-32766, - -32766, 747, 249, -452, 251,-32766, 421,-32766,-32766,-32766, - -32766, 452, -259, 1080, 293, -454, 366, -452,-32766, 1079, - -32766,-32766,-32766, 116, -452, 1101, 292, 68, 1102, -454, - 516, 21, 268, 487, 418, 419, -454, 296, -457,-32766, - 999, -453, 268, 420, 421, 1067, 1021, 1022, 1023, 1024, - 1018, 1019, 246, 1052, -452, -453, 267, 430, 1025, 1020, - 363, 666, -453, 300, -456, 66, 1011, 258, 1029, 263, - 268, 407, -136, -136, -136, -4, 747, 390, 351, 251, - 669, 736, 802, 1092, 37, 20, 409, -136, 410, -136, - 411, -136, 412, -136, -490, 413, 229, 829, 830, 38, - 39, 359, 360, 670, 40, 414, 829, 830, 65, 374, - 44, 291, 558, 415, 416, -452, 765, 380, 1049, 417, - 354, 664, 722, 770, 361, 362, 217, 430, -91, -452, - 363, 33,-32766,-32766,-32766, 355, -452, 114, 666, -489, - 356, 28, 226, 122, 1049, 230, 407, 747, 749, 556, - -136, 992,-32766, 219,-32766,-32766, 736, -259, 233, 37, - 20, 409, 352, 410, -496, 411, -496, 412, 687, 688, - 413, 250, 232, 429, 38, 39, 359, 360, 343, 40, - 414, 829, 830, 65, 257, 295, 291, 666, 415, 416, - 25, 666, 118, 125, 417, 268, 357, 679, 770, 361, - 362, 74, 1049, -238, 25, 115, 1015, 541, 123,-32766, - -32766,-32766, 347, 836, 124, 120, 1049, 407, 280, 747, - 1015, 268, 429, 749, 556, -4, 429, 736, 666, 475, - 37, 20, 409, 746, 410, 992, 411, 121, 412, -490, - 127, 413, -218, -218, -218, 38, 39, 359, 360, 992, - 40, 414, 420, 421, 65, 132, 228, 291, 229, 415, - 416, -493, -82, 429, 569, 417, 420, 421, 722, 770, - 361, 362, 133, 542, 68, 30, 363, 134, -176, 268, - 861, 129, 225, 227, 244, 999, 530, 531, 68, 407, - 95, 96, 97, 268, 749, 556, -218, -177, 666, 736, - 666, 573, 37, 20, 409, -492, 410, 570, 411, 282, - 412, 398, 8, 413, -217, -217, -217, 38, 39, 359, - 360, 761, 40, 414, 666, 666, 65, 242, 747, 291, - 101, 415, 416, 429, 43, 429, 128, 417, 130, 318, - 722, 770, 361, 362, 687, 688, -295, -295, 538, 75, - 76, 77, 509, 510, 829, 830, 567, 667, 664, 429, - 429, 860, 579, 1049, 666, 1103, 749, 556, -217, 31, - 123, 78, 79, 80, 81, 82, 83, 84, 85, 86, - 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, - 97, 98, 99, 100, 889, 242, 992, 747, 407, 669, - 456,-32766, 461, 550, 517, 522, -493, 101, 736, 523, - 371, 37, 20, 409, 533, 410, 10, 411, -80, 412, - 1068, 534, 413, -176, 378, 563, 38, 39, 359, 747, - 508, 40, 414, 771, 772, 65, 262, 12, 291, 1031, - 268, 992, -177, 1028, 294, -411, 417, 5, 763, 794, - -492, 513, 374, 348, 265, 349, 0, 564, 259, 0, - 260, 0, 0, 0, 0, 0, 0, 407, 0, 0, - 0, 0, 0, 0, 0, 749, 556, 736, 0, 804, - 37, 20, 409, 325, 410, 336, 411, 557, 412, 332, - 331, 413, 458, 872, 956, 38, 39, 359, 747, 407, - 40, 414, 727, 578, 65, 36, 35, 291, 577, 736, - 788, 865, 37, 20, 409, 417, 410, 795, 411, 868, - 412, 867, 864, 413, 783, 725, 562, 38, 39, 359, - 747, 796, 40, 414, 785, 856, 65, 855, 866, 291, - 559, 342, 341, 561, 749, 556, 277, 417, 276, 572, - 568, 566, 565, 560, 0, 793, 754, 764, 571, 756, - 690, 980, 767, 723, 1043, 1098, 1100, 682, 407, 747, - 769, 681, 691, 768, 692, 689, 787, 556, 736, 1097, - 1050, 37, 20, 409, 1099, 410, 1057, 411, 1062, 412, - 1065, 574, 413, 41, 34, 27, 38, 39, 359, 26, - 407, 40, 414, 23, -455, 65, -456, -457, 291, -479, - 736, -481, 238, 37, 20, 409, 417, 410, 346, 411, - 344, 412, 279, 241, 413, 240, 239, 222, 38, 39, - 359, 221, 135, 40, 414, 131, 126, 65, 73, 407, - 291, 72, 71, 70, 69, 749, 556, 67, 417, 736, - 959, 549, 37, 20, 409, 504, 410, 485, 411, 314, - 412, 253, 22, 413, 18, 13, -236, 38, 39, 359, - 984, 837, 40, 414, 1013, 955, 65, 749, 556, 291, - -32766,-32766,-32766, 1003, 547, 404, 397, 417, 395, 391, - 315, 19, 17, -91, 16, 15, 14, -233, -234, 0, - -32766, 972,-32766,-32766,-32766,-32766,-32766,-32766,-32767,-32767, - -32767,-32767,-32767, -423, 1030, 1012, 749, 556, 1095, 1056, - 1042, 1041 + 607, 608, 609, 610, 611, 685, 612, 613, 614, 650, + 651, 0, 32, 103, 104, 105, 106, 107, 108, 109, + 110, 111, 112, 113, 114, 115,-32767,-32767,-32767,-32767, + 94, 95, 96, 97, 98,-32766,-32766,-32766, 687, 491, + -497, 904, 905, 906, 903, 902, 901, 904, 905, 906, + 903, 902, 901, 615, 938, 940,-32766, 9,-32766,-32766, + -32766,-32766,-32766,-32766,-32766,-32766,-32766, 616, 617, 618, + 619, 620, 621, 622, 333, 1104, 683,-32766,-32766,-32766, + 846, 1103, 119, 623, 624, 625, 626, 627, 628, 629, + 630, 631, 632, 633, 653, 654, 655, 656, 657, 645, + 646, 647, 675, 648, 649, 634, 635, 636, 637, 638, + 639, 640, 677, 678, 679, 680, 681, 682, 641, 642, + 643, 644, 674, 665, 663, 664, 660, 661, 402, 652, + 658, 659, 666, 667, 669, 668, 670, 671, 45, 46, + 421, 47, 48, 662, 673, 672, 27, 49, 50, 233, + 51,-32766,-32766,-32766, 96, 97, 98, 24,-32766,-32766, + -32766, -458, 261, 121, 1023,-32766,-32766,-32766, 1091, 1073, + -32766,-32766,-32766, 1039,-32766,-32766,-32766,-32766,-32766,-32766, + -496,-32766,-32766,-32766, 52, 53,-32766, -497,-32766,-32766, + 54, 687, 55, 231, 232, 56, 57, 58, 59, 60, + 61, 62, 63, 1016, 24, 242, 64, 369,-32766,-32766, + -32766, 226, 1040, 1041, 423, 1076, 1073, -493, 880, 508, + 1039, 436, 1023, -458, 768, 1073, 239, 333, -500,-32766, + -500,-32766,-32766,-32766,-32766, 856, 253, -458, 276, 378, + 372, 786, 68, 1073, -458, 685, -461, 278, 1126, 403, + 289, 1127, 288, 99, 100, 101, 303, 252, 433, 434, + 822,-32766, 69, 261, 237, 850, 851, 435, 436, 102, + 1045, 1046, 1047, 1048, 1042, 1043, 256, 1016, -456, -456, + 306, 444, 1049, 1044, 375, 133, 561, -239, 363, 66, + 237, 268, 692, 273, 278, 422, -137, -137, -137, -4, + 768, 1073, 310, 278, 1035, 757, 687, 362, 37, 20, + 424, -137, 425, -137, 426, -137, 427, -137, 127, 428, + -295, 278, -295, 38, 39, 370, 371, -496, 271, 40, + 429, 277, 687, 65, 261, 1016, 302, 896, 430, 431, + -456, -456, 333, -494, 432, 44, 42, 743, 791, 373, + 374, -457, -234, 562, -456, -456, 375,-32766,-32766,-32766, + 882, -456, -456, 124, -493, 75, 850, 851, 333, -273, + -260, 422, 768, 770, 576, -137, 261, 125,-32766, 278, + 823, 757, 857, 1073, 37, 20, 424, 240, 425, -178, + 426, 589, 427, 393, 503, 428, 687, 235, 241, 38, + 39, 370, 371, 125, 354, 40, 429, 260, 259, 65, + 267, 687, 302, -457, 430, 431, -296, -177, -296, 24, + 432, 305, 365, 700, 791, 373, 374, -457, 120, 118, + 24, 1073, 30, 366, -457, 1039, -460, 850, 851, 687, + 367, 691, 1073, 422, 291, 768, 1039, 333, -83, 770, + 576, -4, 467, 757, 126, 368, 37, 20, 424, -92, + 425, 278, 426, 444, 427, 1016, 375, 428, -219, -219, + -219, 38, 39, 370, 371, 333, 1016, 40, 429, 850, + 851, 65, 435, 436, 302, 236, 430, 431, 225, 708, + -494, 709, 432, 435, 436, 743, 791, 373, 374, 690, + 387, 136, 1117, 578, 68, 413, 238, 8, 33, 278, + 1053, 227, 708, 687, 709, 68, 422, -260, 535, 21, + 278, 770, 576, -219, 550, 551, 757, 687, 116, 37, + 20, 424, 117, 425, 358, 426, -178, 427, 132, 328, + 428, -218, -218, -218, 38, 39, 370, 371, 687, 333, + 40, 429, 122, 768, 65, 383, 384, 302, 123, 430, + 431, 29, 234, 333, -177, 432, 528, 529, 743, 791, + 373, 374, 129, 850, 851, 135, 76, 77, 78, 1092, + 881, 599, 582, 254, 333, 137, 138, 782, 590, 593, + 293, 767, 131, 252, 770, 576, -218, 31, 102, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, + 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, + 100, 101, 43, 252, 422, 558, 768, 687, 690,-32766, + 471, 130, 476, 685, 757, 102, 553, 37, 20, 424, + 526, 425, 688, 426, 272, 427, 910, 1016, 428, 792, + 1128, 793, 38, 39, 370, 583, 269, 570, 40, 429, + 536, 1052, 65, 275, 1055, 302, -415, 541, 270, -81, + 10, 391, 768, 432, 542, 554, 784, 594, 5, 0, + 12, 577, 0, 0, 304, 0, 0, 0, 0, 336, + 342, 0, 0, 0, 0, 0, 0, 422, 0, 0, + 0, 584, 770, 576, 0, 0, 0, 757, 0, 0, + 37, 20, 424, 343, 425, 0, 426, 0, 427, 768, + 0, 428, 0, 0, 0, 38, 39, 370, 347, 387, + 473, 40, 429, 359, 360, 65, 744, 35, 302, 36, + 597, 598, 748, 422, 825, 809, 432, 816, 587, 876, + 877, 806, 817, 757, 746, 804, 37, 20, 424, 885, + 425, 888, 426, 889, 427, 768, 886, 428, 887, 893, + -485, 38, 39, 370, 579, 770, 576, 40, 429, 581, + 585, 65, 586, 588, 302, 592, 286, 287, 352, 353, + 422, 580, 432, 1123, 591, 1125, 703, 790, 702, 712, + 757, 789, 713, 37, 20, 424, 710, 425, 1124, 426, + 788, 427, 768, 1004, 428, 711, 777, 785, 38, 39, + 370, 808, 576, -483, 40, 429, 775, 814, 65, 815, + 1122, 302, 1074, 1067, 1081, 1086, 422, 1089, -237, 432, + -461, -460, -459, 23, 25, 28, 757, 34, 41, 37, + 20, 424, 67, 425, 70, 426, 71, 427, 72, 73, + 428, 74, 128, 134, 38, 39, 370, 139, 770, 576, + 40, 429, 229, 230, 65, 246, 247, 302, 248, 249, + 250, 251, 290, 422, 355, 432, 357, -427, -235, -234, + 14, 15, 16, 757, 17, 19, 37, 20, 424, 325, + 425, 404, 426, 406, 427, 409, 411, 428, 412, 419, + 567, 38, 39, 370, 770, 576, 1027, 40, 429, 977, + 1037, 65, 858, 1008, 302,-32766,-32766,-32766, -92, 13, + 18, 22, 432, 263, 324, 501, 522, 569, 981, 978, + 0, 994, 0, 1036, 1065, 1066,-32766, 1080,-32766,-32766, + -32766,-32766,-32766,-32766,-32767,-32767,-32767,-32767,-32767, 1120, + 532, 770, 576, 1054 ); protected $actionCheck = array( - 2, 3, 4, 5, 6, 13, 8, 9, 10, 11, - 12, 77, 15, 16, 17, 18, 19, 20, 21, 22, - 23, 24, 25, 26, 27, 8, 9, 10, 112, 113, - 114, 115, 116, 117, 0, 8, 9, 10, 8, 9, - 10, 77, 1, 13, 7, 28, 112, 30, 31, 32, - 33, 34, 54, 56, 57, 28, 7, 30, 31, 32, - 33, 34, 35, 1, 28, 7, 68, 69, 70, 71, - 72, 73, 74, 8, 9, 77, 112, 113, 114, 115, - 116, 117, 84, 85, 86, 87, 88, 89, 90, 91, + 2, 3, 4, 5, 6, 78, 8, 9, 10, 11, + 12, 0, 15, 16, 17, 18, 19, 20, 21, 22, + 23, 24, 25, 26, 27, 28, 42, 43, 44, 45, + 46, 47, 48, 49, 50, 8, 9, 10, 78, 79, + 7, 114, 115, 116, 117, 118, 119, 114, 115, 116, + 117, 118, 119, 55, 57, 58, 29, 7, 31, 32, + 33, 34, 35, 36, 8, 9, 10, 69, 70, 71, + 72, 73, 74, 75, 114, 1, 78, 8, 9, 10, + 1, 7, 13, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, - 122, 123, 124, 125, 126, 127, 7, 129, 130, 131, - 132, 133, 134, 135, 136, 137, 2, 3, 4, 5, - 6, 143, 144, 145, 152, 11, 12, 7, 14, 41, - 42, 43, 44, 45, 46, 47, 48, 49, 8, 9, - 10, 67, 67, 67, 102, 103, 130, 131, 50, 51, - 52, 109, 54, 7, 67, 79, 1, 29, 28, 83, - 118, 47, 48, 29, 66, 79, 7, 53, 1, 55, - 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, - 67, 67, 68, 69, 70, 8, 9, 10, 112, 75, - 76, 77, 150, 79, 7, 28, 48, 83, 8, 9, - 10, 1, 128, 128, 28, 28, 130, 30, 31, 32, - 33, 82, 7, 1, 7, 128, 102, 142, 28, 7, - 30, 31, 32, 149, 149, 77, 112, 151, 80, 142, - 72, 73, 156, 1, 120, 121, 149, 7, 151, 8, - 1, 128, 156, 129, 130, 1, 132, 133, 134, 135, - 136, 137, 138, 1, 67, 142, 67, 143, 144, 145, - 146, 77, 149, 7, 151, 151, 1, 153, 139, 155, - 156, 71, 72, 73, 74, 0, 1, 149, 7, 28, - 79, 81, 148, 82, 84, 85, 86, 87, 88, 89, - 90, 91, 92, 93, 7, 95, 35, 130, 131, 99, - 100, 101, 102, 148, 104, 105, 130, 131, 108, 146, - 67, 111, 149, 113, 114, 128, 1, 128, 79, 119, - 7, 77, 122, 123, 124, 125, 94, 143, 152, 142, - 146, 13, 8, 9, 10, 7, 149, 15, 77, 152, - 7, 140, 141, 29, 79, 35, 71, 1, 148, 149, - 150, 112, 28, 13, 30, 31, 81, 152, 35, 84, - 85, 86, 123, 88, 152, 90, 154, 92, 102, 103, - 95, 128, 35, 112, 99, 100, 101, 102, 103, 104, - 105, 130, 131, 108, 109, 142, 111, 77, 113, 114, - 67, 77, 149, 149, 119, 156, 7, 122, 123, 124, - 125, 149, 79, 152, 67, 15, 83, 77, 147, 8, - 9, 10, 146, 152, 149, 15, 79, 71, 143, 1, - 83, 156, 112, 148, 149, 150, 112, 81, 77, 78, - 84, 85, 86, 29, 88, 112, 90, 15, 92, 152, - 15, 95, 96, 97, 98, 99, 100, 101, 102, 112, - 104, 105, 129, 130, 108, 15, 35, 111, 35, 113, - 114, 7, 29, 112, 149, 119, 129, 130, 122, 123, - 124, 125, 15, 143, 151, 7, 146, 15, 7, 156, - 150, 29, 35, 35, 29, 1, 72, 73, 151, 71, - 47, 48, 49, 156, 148, 149, 150, 7, 77, 81, - 77, 29, 84, 85, 86, 7, 88, 29, 90, 33, - 92, 102, 103, 95, 96, 97, 98, 99, 100, 101, - 102, 35, 104, 105, 77, 77, 108, 54, 1, 111, - 66, 113, 114, 112, 67, 112, 67, 119, 97, 98, - 122, 123, 124, 125, 102, 103, 102, 103, 74, 8, - 9, 10, 106, 107, 130, 131, 29, 77, 77, 112, - 112, 148, 149, 79, 77, 80, 148, 149, 150, 28, - 147, 30, 31, 32, 33, 34, 35, 36, 37, 38, - 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, - 49, 50, 51, 52, 79, 54, 112, 1, 71, 79, - 82, 82, 86, 89, 87, 93, 152, 66, 81, 96, - 102, 84, 85, 86, 91, 88, 94, 90, 94, 92, - 152, 96, 95, 152, 94, 29, 99, 100, 101, 1, - 109, 104, 105, 123, 123, 108, 110, 142, 111, 139, - 156, 112, 152, 139, 142, 142, 119, 142, 147, 150, - 152, 154, 146, 146, 126, 146, -1, 29, 126, -1, - 127, -1, -1, -1, -1, -1, -1, 71, -1, -1, - -1, -1, -1, -1, -1, 148, 149, 81, -1, 148, - 84, 85, 86, 146, 88, 146, 90, 149, 92, 146, - 146, 95, 146, 148, 152, 99, 100, 101, 1, 71, - 104, 105, 148, 148, 108, 148, 148, 111, 148, 81, - 148, 148, 84, 85, 86, 119, 88, 148, 90, 148, - 92, 148, 148, 95, 148, 148, 29, 99, 100, 101, - 1, 148, 104, 105, 148, 148, 108, 148, 148, 111, - 149, 149, 149, 149, 148, 149, 149, 119, 149, 149, - 149, 149, 149, 149, -1, 150, 150, 150, 29, 150, - 150, 150, 150, 150, 150, 150, 150, 150, 71, 1, - 150, 150, 150, 150, 150, 150, 148, 149, 81, 150, - 150, 84, 85, 86, 150, 88, 150, 90, 150, 92, - 150, 150, 95, 151, 151, 151, 99, 100, 101, 151, - 71, 104, 105, 151, 151, 108, 151, 151, 111, 151, - 81, 151, 151, 84, 85, 86, 119, 88, 151, 90, - 151, 92, 151, 151, 95, 151, 151, 151, 99, 100, - 101, 151, 151, 104, 105, 151, 151, 108, 151, 71, - 111, 151, 151, 151, 151, 148, 149, 151, 119, 81, - 152, 152, 84, 85, 86, 152, 88, 152, 90, 152, - 92, 152, 152, 95, 152, 152, 152, 99, 100, 101, - 152, 152, 104, 105, 152, 152, 108, 148, 149, 111, - 8, 9, 10, 152, 152, 152, 152, 119, 152, 152, - 152, 152, 152, 152, 152, 152, 152, 152, 152, -1, - 28, 153, 30, 31, 32, 33, 34, 35, 36, 37, - 38, 39, 40, 153, 155, 154, 148, 149, 154, 154, - 154, 154 + 122, 123, 124, 125, 126, 127, 128, 129, 30, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 2, 3, + 4, 5, 6, 145, 146, 147, 7, 11, 12, 36, + 14, 8, 9, 10, 48, 49, 50, 68, 8, 9, + 10, 68, 29, 7, 1, 8, 9, 10, 1, 80, + 8, 9, 29, 84, 31, 32, 33, 34, 35, 29, + 7, 31, 32, 33, 48, 49, 29, 154, 31, 32, + 54, 78, 56, 57, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 114, 68, 69, 70, 71, 8, 9, + 10, 13, 76, 77, 78, 1, 80, 7, 1, 49, + 84, 132, 1, 130, 1, 80, 7, 114, 154, 29, + 156, 31, 32, 33, 34, 1, 7, 144, 7, 103, + 104, 1, 153, 80, 151, 78, 153, 158, 78, 151, + 114, 81, 7, 51, 52, 53, 7, 55, 122, 123, + 30, 8, 149, 29, 36, 132, 133, 131, 132, 67, + 134, 135, 136, 137, 138, 139, 140, 114, 68, 68, + 7, 145, 146, 147, 148, 13, 78, 154, 125, 153, + 36, 155, 1, 157, 158, 72, 73, 74, 75, 0, + 1, 80, 7, 158, 1, 82, 78, 7, 85, 86, + 87, 88, 89, 90, 91, 92, 93, 94, 151, 96, + 103, 158, 105, 100, 101, 102, 103, 154, 111, 106, + 107, 68, 78, 110, 29, 114, 113, 120, 115, 116, + 130, 130, 114, 7, 121, 68, 68, 124, 125, 126, + 127, 68, 154, 145, 144, 144, 148, 8, 9, 10, + 152, 151, 151, 30, 154, 151, 132, 133, 114, 152, + 7, 72, 1, 150, 151, 152, 29, 149, 29, 158, + 150, 82, 154, 80, 85, 86, 87, 36, 89, 7, + 91, 151, 93, 130, 1, 96, 78, 36, 36, 100, + 101, 102, 103, 149, 105, 106, 107, 130, 130, 110, + 111, 78, 113, 130, 115, 116, 103, 7, 105, 68, + 121, 144, 7, 124, 125, 126, 127, 144, 151, 151, + 68, 80, 7, 7, 151, 84, 153, 132, 133, 78, + 7, 150, 80, 72, 145, 1, 84, 114, 30, 150, + 151, 152, 83, 82, 151, 7, 85, 86, 87, 154, + 89, 158, 91, 145, 93, 114, 148, 96, 97, 98, + 99, 100, 101, 102, 103, 114, 114, 106, 107, 132, + 133, 110, 131, 132, 113, 36, 115, 116, 95, 103, + 154, 105, 121, 131, 132, 124, 125, 126, 127, 80, + 148, 13, 83, 151, 153, 103, 36, 105, 13, 158, + 141, 13, 103, 78, 105, 153, 72, 154, 73, 74, + 158, 150, 151, 152, 73, 74, 82, 78, 15, 85, + 86, 87, 15, 89, 148, 91, 154, 93, 98, 99, + 96, 97, 98, 99, 100, 101, 102, 103, 78, 114, + 106, 107, 15, 1, 110, 103, 104, 113, 15, 115, + 116, 142, 143, 114, 154, 121, 108, 109, 124, 125, + 126, 127, 15, 132, 133, 15, 8, 9, 10, 154, + 150, 151, 30, 30, 114, 15, 15, 36, 30, 30, + 34, 30, 30, 55, 150, 151, 152, 29, 67, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, + 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, + 52, 53, 68, 55, 72, 75, 1, 78, 80, 83, + 83, 68, 87, 78, 82, 67, 92, 85, 86, 87, + 111, 89, 78, 91, 112, 93, 80, 114, 96, 125, + 81, 125, 100, 101, 102, 30, 128, 90, 106, 107, + 88, 141, 110, 128, 141, 113, 144, 94, 129, 95, + 95, 95, 1, 121, 97, 97, 149, 152, 144, -1, + 144, 151, -1, -1, 144, -1, -1, -1, -1, 148, + 148, -1, -1, -1, -1, -1, -1, 72, -1, -1, + -1, 30, 150, 151, -1, -1, -1, 82, -1, -1, + 85, 86, 87, 148, 89, -1, 91, -1, 93, 1, + -1, 96, -1, -1, -1, 100, 101, 102, 148, 148, + 148, 106, 107, 148, 148, 110, 152, 150, 113, 150, + 150, 150, 150, 72, 150, 150, 121, 150, 30, 150, + 150, 150, 150, 82, 150, 150, 85, 86, 87, 150, + 89, 150, 91, 150, 93, 1, 150, 96, 150, 150, + 153, 100, 101, 102, 151, 150, 151, 106, 107, 151, + 151, 110, 151, 151, 113, 151, 151, 151, 151, 151, + 72, 151, 121, 152, 30, 152, 152, 152, 152, 152, + 82, 152, 152, 85, 86, 87, 152, 89, 152, 91, + 152, 93, 1, 152, 96, 152, 152, 152, 100, 101, + 102, 150, 151, 153, 106, 107, 152, 152, 110, 152, + 152, 113, 152, 152, 152, 152, 72, 152, 154, 121, + 153, 153, 153, 153, 153, 153, 82, 153, 153, 85, + 86, 87, 153, 89, 153, 91, 153, 93, 153, 153, + 96, 153, 153, 153, 100, 101, 102, 153, 150, 151, + 106, 107, 153, 153, 110, 153, 153, 113, 153, 153, + 153, 153, 153, 72, 153, 121, 153, 155, 154, 154, + 154, 154, 154, 82, 154, 154, 85, 86, 87, 154, + 89, 154, 91, 154, 93, 154, 154, 96, 154, 154, + 154, 100, 101, 102, 150, 151, 154, 106, 107, 154, + 154, 110, 154, 154, 113, 8, 9, 10, 154, 154, + 154, 154, 121, 154, 154, 154, 154, 154, 154, 154, + -1, 155, -1, 156, 156, 156, 29, 156, 31, 32, + 33, 34, 35, 36, 37, 38, 39, 40, 41, 156, + 156, 150, 151, 157 ); protected $actionBase = array( - 0, 220, 295, 366, 438, 285, 350, 610, -2, -2, - -36, -2, -2, 616, 547, 547, 749, 547, 717, 648, - 788, 788, 788, 281, 443, 467, 467, 468, 371, 467, - 468, 334, 441, 330, -66, -66, -66, -66, -66, -66, - -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, - -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, - -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, - -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, - -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, - -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, - -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, - -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, - -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, - -66, -66, -66, -66, -66, -66, 175, 175, 154, 252, - 338, 729, 718, 725, 732, 733, 727, 562, 360, 649, - 650, 472, 634, 656, 658, 660, 723, 517, 730, 719, - 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, - 561, 561, 561, 561, 561, 561, 251, 30, 65, 421, - 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, - 421, 421, 421, 421, 421, 421, 421, 421, 150, 150, - 150, 344, 210, 207, 197, 17, 95, 27, 892, 892, - 892, 892, 892, 108, 108, 108, 108, 357, 357, 343, - 62, 96, 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 259, 464, 463, 463, 271, 271, - 271, 271, 504, 196, 187, 36, 149, 520, 779, 264, - 264, 444, 107, 133, 118, 118, 118, 286, 538, 549, - 549, 549, 549, 221, 221, 549, 549, 168, 272, 232, - 95, 95, 263, 95, 95, 95, 462, 462, 462, 204, - 183, 539, 204, 565, 624, 533, 625, 545, 519, 94, - 527, 106, 528, 529, 106, 106, 106, 466, 178, 434, - 761, 175, 523, 175, 175, 175, 175, 681, 175, 175, - 175, 175, 175, 175, 148, 175, 41, 433, 154, 335, - 335, 496, 335, 493, 209, 619, 491, 488, 493, 493, - 493, 617, 613, 307, 225, -8, 612, 510, 429, 518, - 474, 507, 507, 501, 501, 535, 506, 507, 507, 507, - 507, 507, 672, 672, 501, 540, 501, 535, 662, 501, - 506, 501, 501, 507, 501, 672, 506, 58, 333, 227, - 250, 506, 348, 552, 507, 548, 548, 353, 501, 119, - 501, 37, 553, 672, 672, 553, 140, 506, 166, 580, - 575, 541, 521, 179, 475, 475, 291, 541, 506, 475, - 409, 49, 540, 276, 475, 34, 716, 713, 453, 712, - 663, 711, 689, 710, 558, 530, 531, 700, 696, 707, - 664, 668, 424, 566, 342, 410, 525, 487, 673, 528, - 526, 484, 484, 484, 487, 676, 484, 484, 484, 484, - 484, 484, 484, 484, 781, 522, 536, 420, 557, 550, - 442, 611, 524, 566, 566, 633, 780, 768, 500, 681, - 751, 705, 578, 445, 759, 695, 661, 564, 563, 694, - 758, 743, 614, 342, 742, 635, 489, 636, 566, 637, - 484, 678, 680, 787, 786, 675, 785, 764, 757, 559, - 640, 505, 784, 641, 739, 623, 622, 577, 763, 734, - 756, 642, 754, 643, 574, 537, 766, 532, 687, 691, - 621, 644, 645, 654, 632, 631, 704, 551, 762, 543, - 760, 765, 582, 589, 460, 630, 609, 477, 482, 607, - 701, 498, 494, 606, 603, 738, 629, 692, 597, 627, - 752, 544, 526, 515, 546, 542, 534, 620, 753, 492, - 596, 594, 593, 591, 626, 583, 0, 0, 0, 0, + 0, 223, 299, 371, 444, 303, 208, 618, -2, -2, + -73, -2, -2, 625, 718, 718, 764, 718, 552, 671, + 811, 811, 811, 228, 113, 113, 113, 254, 361, -40, + 361, 333, 449, 470, 435, 435, 435, 435, 435, 435, + 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, + 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, + 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, + 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, + 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, + 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, + 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, + 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, + 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, + 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, + 291, 291, 230, 393, 495, 779, 784, 781, 776, 775, + 780, 785, 498, 678, 680, 562, 681, 682, 683, 685, + 782, 804, 777, 783, 568, 568, 568, 568, 568, 568, + 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, + 568, 253, 69, 162, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 349, 349, 349, 157, + 210, 150, 200, 211, 143, 27, 917, 917, 917, 917, + 917, -16, -16, -16, -16, 351, 351, 362, 217, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 163, 313, 106, 106, 133, 133, 133, 133, + 133, 133, 221, 305, 234, 347, 369, 523, 806, 167, + 167, 441, 93, 283, 202, 202, 202, 386, 547, 533, + 533, 533, 533, 419, 419, 533, 533, 170, 214, 74, + 211, 211, 277, 211, 211, 211, 409, 409, 409, 452, + 318, 352, 546, 318, 619, 640, 577, 675, 578, 677, + 278, 585, 145, 586, 145, 145, 145, 458, 445, 451, + 774, 291, 522, 291, 291, 291, 291, 722, 291, 291, + 291, 291, 291, 291, 98, 291, 79, 430, 230, 240, + 240, 556, 240, 452, 538, 263, 635, 410, 425, 538, + 538, 538, 636, 637, 336, 363, 198, 638, 382, 402, + 173, 33, 549, 549, 555, 555, 566, 551, 549, 549, + 549, 549, 549, 690, 690, 555, 548, 555, 566, 695, + 555, 551, 551, 555, 555, 549, 555, 690, 551, 156, + 415, 249, 273, 551, 551, 426, 528, 549, 535, 535, + 433, 555, 219, 555, 139, 539, 690, 690, 539, 229, + 551, 231, 590, 591, 529, 527, 553, 245, 553, 553, + 300, 529, 553, 551, 553, 448, 50, 548, 295, 553, + 11, 699, 701, 418, 703, 694, 705, 731, 706, 530, + 524, 526, 719, 720, 708, 692, 691, 561, 582, 513, + 517, 534, 554, 689, 581, 531, 531, 531, 554, 687, + 531, 531, 531, 531, 531, 531, 531, 531, 787, 540, + 545, 723, 537, 541, 576, 543, 623, 520, 582, 582, + 584, 732, 786, 564, 722, 762, 709, 587, 557, 741, + 725, 525, 542, 565, 726, 727, 745, 765, 628, 513, + 766, 641, 563, 643, 582, 644, 531, 670, 617, 788, + 789, 688, 791, 736, 747, 749, 580, 645, 569, 803, + 646, 768, 629, 631, 589, 737, 684, 751, 647, 752, + 754, 649, 592, 572, 734, 573, 733, 272, 729, 632, + 650, 654, 656, 658, 661, 710, 594, 738, 544, 740, + 735, 595, 597, 560, 663, 488, 599, 570, 571, 600, + 714, 558, 550, 601, 602, 769, 664, 728, 604, 665, + 756, 574, 581, 536, 532, 575, 567, 634, 755, 559, + 605, 609, 611, 613, 674, 616, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 134, 134, 134, 134, -2, -2, -2, - 0, 0, -2, 0, 0, 134, 134, 134, 134, 134, - 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, - 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, - 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, - 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, - 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, - 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, - 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, - 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, - 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, - 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, - 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, - 134, 134, 134, 134, 134, 134, 134, 134, 561, 561, - 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, - 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, - 561, 561, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 561, 561, - 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, - 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, - 561, 561, 561, 561, 561, -3, 561, 561, -3, 561, - 561, 561, 561, 561, 561, 118, 118, 118, 118, 204, - 204, 204, -84, 204, 204, 204, 204, 204, 204, 204, - 204, 204, 204, 204, 204, 204, 204, -84, 118, 118, - 204, 204, 204, 204, 204, 204, 204, 204, 221, 221, - 221, 106, 106, 204, 0, 0, 0, 0, 0, 507, - 221, 204, 204, 204, 204, 0, 0, 204, 204, 540, - 106, 0, 0, 0, 0, 0, 0, 0, 507, 507, - 507, 0, 507, 221, 0, 335, 175, 461, 461, 461, - 461, 0, 507, 0, 540, 507, 0, 0, 0, 0, - 0, 0, 506, 0, 672, 0, 0, 0, 0, 501, - 0, 0, 0, 0, 0, 0, 0, 0, 540, 0, - 0, 0, 0, 540, 0, 484, 0, 500, 0, 0, - 484, 484, 484, 500, 500, 0, 0, 0, 500 + 0, 0, 0, 136, 136, 136, 136, -2, -2, -2, + 0, 0, -2, 0, 0, 136, 136, 136, 136, 136, + 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, + 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, + 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, + 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, + 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, + 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, + 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, + 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, + 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, + 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, + 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, + 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, + 136, 136, 568, 568, 568, 568, 568, 568, 568, 568, + 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, + 568, 568, 568, 568, 568, 568, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 568, 568, 568, 568, 568, 568, 568, + 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, + 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, + 568, 568, -3, 568, 568, -3, 568, 568, 568, 568, + 568, 568, 568, 202, 202, 202, 202, 318, 318, 318, + -67, 318, 318, 318, 318, 318, 318, 318, 318, 318, + 318, 318, 318, 318, 318, -67, 202, 202, 318, 318, + 318, 318, 318, 318, 318, 318, 318, 318, 419, 419, + 419, 145, 145, 318, 0, 0, 0, 0, 0, 549, + 419, 318, 318, 318, 318, 0, 0, 318, 318, 548, + 145, 0, 0, 0, 0, 0, 0, 0, 549, 549, + 549, 548, 0, 549, 419, 0, 240, 291, 440, 440, + 440, 440, 0, 549, 0, 549, 0, 0, 0, 0, + 0, 0, 551, 0, 690, 0, 0, 0, 0, 555, + 0, 0, 0, 0, 0, 0, 0, 0, 548, 0, + 0, 0, 0, 548, 0, 0, 531, 0, 564, 0, + 0, 531, 531, 531, 564, 564, 0, 0, 0, 564 ); protected $actionDefault = array( - 3,32767,32767,32767,32767,32767,32767,32767,32767, 91, + 3,32767,32767,32767,32767,32767,32767,32767,32767, 92, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767, 93, 505, 505, 495,32767, 505, - 495,32767,32767,32767, 313, 313, 313,32767, 450, 450, - 450, 450, 450, 450, 450,32767,32767,32767,32767,32767, - 392,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767, 510, 510, 510, 94, 499,32767, + 499,32767,32767,32767, 314, 314, 314,32767, 454, 454, + 454, 454, 454, 454, 454,32767,32767,32767,32767,32767, + 394,32767,32767,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767, 91, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767, 92,32767,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 502,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767, 506,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 375, 376, 378, 379, 312, 451, 258, 501, 311, 129, - 269, 260, 210, 242, 309, 133, 340, 393, 342, 391, - 395, 341, 318, 322, 323, 324, 325, 326, 327, 328, - 329, 330, 331, 332, 333, 316, 317, 394, 372, 371, - 370, 338, 339, 315, 343, 345, 315, 344, 361, 362, - 359, 360, 363, 364, 365, 366, 367,32767,32767,32767, + 32767,32767,32767,32767, 377, 378, 380, 381, 313, 455, + 509, 259, 505, 312, 130, 270, 261, 211, 243, 310, + 134, 342, 395, 344, 393, 397, 343, 319, 323, 324, + 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, + 335, 317, 318, 396, 398, 399, 374, 373, 372, 340, + 316, 341, 345, 316, 347, 346, 363, 364, 361, 362, + 365, 366, 367, 368, 369,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767, 94, + 32767,32767,32767, 293, 354, 355, 250, 250, 250, 250, + 250, 250,32767, 250,32767, 250,32767,32767,32767,32767, + 32767,32767, 448, 371, 349, 350, 348,32767, 426,32767, + 32767,32767,32767,32767, 428,32767, 92,32767,32767,32767, + 337, 339, 420, 508, 320, 507,32767,32767, 94, 414, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767, 93,32767,32767,32767, 292, 352, 353, 249, 249, - 249, 249,32767, 249,32767, 249,32767,32767,32767,32767, - 32767,32767, 444, 369, 347, 348, 346,32767, 422,32767, - 32767,32767,32767,32767, 424,32767, 91,32767,32767,32767, - 335, 337, 416, 504, 319, 503,32767,32767, 93,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767, 419, - 32767,32767, 410, 91,32767,32767, 91, 173, 229, 231, - 178,32767, 427,32767,32767,32767,32767,32767,32767,32767, + 423,32767,32767, 92,32767,32767, 92, 174, 230, 232, + 179,32767, 431,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767, 357, 512,32767, 452,32767, 349, 350, - 351,32767,32767, 452, 452, 452,32767, 452,32767, 452, - 452,32767,32767,32767,32767,32767, 178,32767,32767,32767, - 32767, 93, 425, 425, 91, 91, 91, 91, 420,32767, - 178,32767,32767,32767,32767,32767, 178, 90, 90, 90, - 90, 178, 90, 193,32767, 191, 191, 90,32767, 92, - 32767, 92, 195,32767, 466, 195, 90, 178, 90, 215, - 215, 401, 180, 92, 251, 251, 92, 401, 178, 251, - 90, 90,32767, 90, 251,32767,32767,32767, 84,32767, + 32767,32767,32767, 414, 359, 517,32767, 456,32767, 351, + 352, 353,32767,32767, 456, 456, 456,32767, 456,32767, + 456, 456,32767,32767,32767,32767,32767, 179,32767,32767, + 32767,32767, 94, 429, 429, 92, 92, 92, 92, 424, + 32767, 179, 179,32767,32767,32767,32767,32767, 179, 91, + 91, 91, 91, 179, 179, 91, 194,32767, 192, 192, + 91,32767, 93,32767, 93, 196,32767, 470, 196, 91, + 179, 91, 216, 216, 405, 181, 252, 93, 252, 252, + 93, 405, 252, 179, 252, 91, 91,32767, 91, 252, + 32767,32767,32767, 85,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767, 416,32767, + 436,32767, 449, 468,32767, 357, 358, 360,32767, 458, + 382, 383, 384, 385, 386, 387, 388, 390,32767, 419, + 32767,32767,32767, 87, 121, 269,32767, 515, 87, 417, + 32767, 515,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767, 87, 87,32767,32767,32767,32767,32767, 495, + 32767, 516,32767, 456, 418,32767, 356, 432, 475,32767, + 32767, 457,32767,32767,32767,32767, 87,32767,32767,32767, + 32767,32767,32767,32767,32767,32767, 436,32767,32767,32767, + 32767,32767,32767,32767, 456,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767, 412,32767, 432,32767, 445, 464, 410, - 32767, 355, 356, 358,32767, 454, 380, 381, 382, 383, - 384, 385, 386, 388,32767, 415,32767,32767, 86, 120, - 268,32767, 510, 86, 413,32767, 510,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767, 86, 86,32767, - 32767,32767,32767, 491,32767, 511,32767, 452, 414,32767, - 354, 428, 471,32767,32767, 453,32767,32767,32767, 86, - 32767,32767,32767,32767,32767,32767,32767,32767,32767, 432, - 32767,32767,32767,32767,32767,32767, 452,32767,32767,32767, + 456,32767,32767, 242,32767,32767,32767, 309,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767, 452,32767,32767, 241,32767,32767, 308,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767, 84, 60,32767, 288,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 135, 135, 3, 271, - 3, 271, 135, 135, 135, 271, 271, 135, 135, 135, - 135, 135, 135, 135, 168, 223, 226, 215, 215, 280, - 135, 135 + 32767, 85, 60,32767, 289,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767, 136, 136, 3, 272, + 3, 272, 136, 136, 136, 272, 272, 136, 136, 136, + 136, 136, 136, 136, 169, 224, 227, 216, 216, 281, + 136, 136 ); protected $goto = array( - 166, 166, 140, 140, 148, 149, 140, 148, 151, 182, - 167, 164, 164, 164, 164, 165, 165, 165, 165, 165, - 165, 165, 160, 161, 162, 163, 179, 177, 180, 431, - 432, 323, 433, 436, 437, 438, 439, 440, 441, 442, - 443, 903, 137, 141, 142, 143, 144, 145, 139, 146, - 147, 150, 176, 178, 181, 198, 201, 202, 204, 205, - 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, - 236, 237, 254, 255, 256, 328, 329, 330, 480, 183, - 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, - 194, 195, 196, 152, 197, 153, 168, 169, 170, 199, - 171, 154, 155, 156, 172, 157, 200, 138, 158, 173, - 174, 175, 159, 543, 203, 448, 552, 203, 744, 305, - 309, 460, 483, 484, 486, 264, 1089, 1089, 320, 989, - 248, 678, 322, 482, 453, 453, 453, 283, 453, 481, - 871, 555, 739, 1089, 740, 537, 869, 473, 468, 677, - 473, 453, 434, 434, 434, 286, 434, 434, 434, 434, - 434, 434, 434, 434, 434, 434, 434, 434, 434, 435, - 435, 435, 713, 435, 435, 435, 435, 435, 435, 435, - 435, 435, 435, 435, 435, 435, 1088, 1088, 665, 494, - 503, 479, 990, 493, 514, 515, 500, 502, 548, 453, - 453, 699, 786, 1088, 693, 467, 489, 453, 453, 453, - 991, 1045, 466, 978, 766, 839, 979, 576, 505, 507, - 1091, 454, 519, 536, 539, 814, 546, 554, 810, 499, - 499, 1014, 478, 1014, 1014, 1014, 1014, 1014, 1014, 1014, - 1014, 1014, 1014, 1014, 1014, 1014, 708, 696, 843, 474, - 847, 778, 317, 551, 1081, 789, 676, 497, 518, 1059, - 1060, 1069, 878, 303, 819, 680, 779, 803, 784, 784, - 782, 784, 575, 520, 446, 812, 807, 879, 886, 712, - 471, 985, 685, 950, 735, 730, 731, 745, 822, 686, - 732, 683, 733, 734, 684, 834, 738, 3, 4, 445, - 704, 345, 1058, 290, 335, 521, 339, 445, 326, 326, - 270, 271, 273, 477, 333, 274, 334, 275, 337, 506, - 340, 827, 700, 313, 780, 780, 780, 780, 284, 697, - 774, 781, 580, 704, 511, 844, 704, 817, 817, 1076, - 525, 993, 287, 288, 709, 828, 828, 828, 828, 993, - 828, 828, 828, 986, 981, 1064, 1064, 1104, 828, 848, - 888, 791, 1055, 385, 496, 399, 993, 993, 993, 993, - 1055, 0, 993, 993, 0, 0, 0, 1066, 1066, 0, - 0, 0, 450, 0, 695, 695, 752, 0, 0, 753, - 705, 705, 705, 707, 694, 0, 1051, 0, 307, 0, - 0, 0, 0, 0, 459, 0, 524, 0, 0, 469, - 0, 540, 0, 465, 0, 0, 0, 0, 0, 846, - 0, 0, 1053, 1053, 846, 392, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, - 0, 0, 0, 0, 0, 450, 0, 0, 0, 447, - 463, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 447, 0, 463, 0, 0, 306, 0, 451, 373, 0, - 375, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 703, 0, 1096, 0, 0, 0, - 0, 0, 988 + 171, 144, 144, 144, 171, 152, 153, 152, 155, 187, + 172, 168, 168, 168, 168, 169, 169, 169, 169, 169, + 169, 169, 164, 165, 166, 167, 184, 182, 185, 445, + 446, 334, 447, 450, 451, 452, 453, 454, 455, 456, + 457, 924, 141, 145, 146, 147, 170, 148, 149, 143, + 150, 151, 154, 181, 183, 186, 206, 209, 211, 212, + 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, + 224, 244, 245, 264, 265, 266, 339, 340, 341, 496, + 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, + 198, 199, 200, 201, 202, 156, 203, 157, 173, 174, + 175, 207, 176, 158, 159, 160, 177, 161, 208, 142, + 204, 162, 178, 205, 179, 180, 163, 563, 210, 463, + 210, 516, 516, 1038, 572, 1038, 1038, 1038, 1038, 1038, + 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 468, 468, + 468, 514, 537, 468, 297, 489, 521, 489, 498, 274, + 533, 534, 698, 483, 258, 468, 448, 448, 448, 725, + 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, + 448, 448, 448, 449, 449, 449, 699, 449, 449, 449, + 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, + 1114, 1114, 734, 725, 899, 725, 315, 319, 475, 499, + 500, 502, 1083, 1084, 468, 468, 760, 1114, 761, 900, + 482, 506, 468, 468, 468, 329, 330, 686, 481, 545, + 495, 332, 510, 596, 523, 525, 294, 469, 538, 556, + 559, 835, 566, 574, 831, 765, 729, 717, 864, 494, + 807, 868, 490, 860, 716, 716, 810, 697, 1013, 1105, + 726, 726, 726, 728, 715, 840, 1093, 800, 824, 805, + 805, 803, 805, 595, 313, 460, 833, 828, 459, 3, + 4, 907, 733, 539, 1009, 487, 317, 461, 459, 497, + 892, 575, 972, 474, 843, 557, 890, 1129, 484, 485, + 505, 517, 519, 520, 568, 801, 801, 801, 801, 465, + 855, 795, 802, 1002, 787, 405, 1003, 799, 327, 571, + 356, 1082, 530, 1014, 848, 346, 540, 350, 11, 337, + 337, 280, 281, 283, 493, 344, 284, 345, 285, 348, + 524, 351, 1015, 1069, 1113, 1113, 543, 301, 298, 299, + 721, 560, 838, 838, 1100, 295, 865, 718, 600, 323, + 544, 1113, 1010, 1017, 511, 1005, 869, 849, 849, 849, + 849, 849, 849, 1017, 849, 849, 849, 720, 730, 1116, + 714, 812, 849, 1088, 1088, 909, 465, 398, 513, 414, + 1017, 1017, 1017, 1017, 0, 1079, 1017, 1017, 0, 701, + 0, 0, 0, 0, 0, 1079, 0, 0, 0, 0, + 0, 773, 1090, 1090, 774, 706, 0, 756, 751, 752, + 766, 0, 707, 753, 704, 754, 755, 705, 0, 759, + 0, 1075, 0, 0, 0, 0, 0, 1012, 0, 0, + 0, 480, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 867, 0, 1077, 1077, 867, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 462, 478, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 462, + 0, 478, 0, 0, 316, 0, 0, 466, 386, 0, + 388, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 724, 0, 1121 ); protected $gotoCheck = array( @@ -650,83 +662,84 @@ class Php7 extends \PhpParser\ParserAbstract 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, - 33, 33, 33, 63, 56, 10, 8, 56, 13, 49, - 49, 49, 49, 49, 49, 134, 148, 148, 69, 92, - 134, 18, 69, 97, 10, 10, 10, 69, 10, 7, - 7, 7, 55, 148, 55, 7, 7, 85, 10, 17, - 85, 10, 135, 135, 135, 80, 135, 135, 135, 135, - 135, 135, 135, 135, 135, 135, 135, 135, 135, 137, - 137, 137, 36, 137, 137, 137, 137, 137, 137, 137, - 137, 137, 137, 137, 137, 137, 147, 147, 5, 15, - 73, 2, 92, 2, 73, 73, 68, 68, 68, 10, - 10, 15, 40, 147, 15, 10, 10, 10, 10, 10, - 92, 92, 39, 67, 67, 94, 67, 39, 39, 39, - 147, 10, 39, 39, 39, 39, 39, 39, 39, 86, - 86, 86, 10, 86, 86, 86, 86, 86, 86, 86, - 86, 86, 86, 86, 86, 86, 14, 14, 14, 136, - 14, 76, 76, 76, 146, 14, 16, 46, 46, 141, - 141, 143, 111, 52, 14, 13, 14, 16, 16, 16, - 16, 16, 16, 54, 16, 16, 16, 111, 14, 14, - 53, 14, 13, 118, 13, 13, 13, 13, 88, 13, - 13, 13, 13, 13, 13, 90, 13, 37, 37, 75, - 26, 89, 139, 20, 56, 56, 56, 75, 56, 56, + 33, 33, 33, 33, 33, 33, 33, 63, 56, 10, + 56, 86, 86, 86, 8, 86, 86, 86, 86, 86, + 86, 86, 86, 86, 86, 86, 86, 86, 10, 10, + 10, 46, 46, 10, 80, 85, 73, 85, 97, 134, + 73, 73, 17, 10, 134, 10, 135, 135, 135, 26, + 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, + 135, 135, 135, 137, 137, 137, 18, 137, 137, 137, + 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, + 148, 148, 36, 26, 111, 26, 49, 49, 49, 49, + 49, 49, 141, 141, 10, 10, 55, 148, 55, 111, + 10, 10, 10, 10, 10, 69, 69, 5, 39, 69, + 2, 69, 2, 39, 39, 39, 69, 10, 39, 39, + 39, 39, 39, 39, 39, 13, 14, 14, 14, 10, + 40, 14, 136, 94, 26, 26, 14, 16, 92, 146, + 26, 26, 26, 26, 26, 14, 143, 14, 16, 16, + 16, 16, 16, 16, 52, 16, 16, 16, 75, 37, + 37, 14, 14, 54, 14, 53, 65, 65, 75, 7, + 7, 7, 118, 65, 88, 7, 7, 12, 65, 65, + 68, 68, 68, 68, 68, 75, 75, 75, 75, 12, + 90, 75, 75, 67, 67, 65, 67, 76, 76, 76, + 89, 139, 24, 92, 91, 56, 56, 56, 65, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, - 56, 91, 30, 19, 75, 75, 75, 75, 11, 28, - 75, 75, 82, 26, 24, 96, 26, 85, 85, 85, - 23, 63, 80, 80, 32, 63, 63, 63, 63, 63, - 63, 63, 63, 127, 124, 8, 8, 12, 63, 99, - 114, 79, 97, 71, 72, 122, 63, 63, 63, 63, - 97, -1, 63, 63, -1, -1, -1, 97, 97, -1, - -1, -1, 12, -1, 26, 26, 63, -1, -1, 63, - 26, 26, 26, 26, 26, -1, 97, -1, 65, -1, - -1, -1, -1, -1, 65, -1, 12, -1, -1, 65, - -1, 12, -1, 8, -1, -1, -1, -1, -1, 97, - -1, -1, 97, 97, 97, 65, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 65, -1, -1, -1, - -1, -1, -1, -1, -1, 12, -1, -1, -1, 8, + 56, 56, 92, 92, 147, 147, 12, 20, 80, 80, + 30, 12, 85, 85, 85, 11, 96, 28, 82, 19, + 23, 147, 127, 63, 15, 124, 99, 63, 63, 63, + 63, 63, 63, 63, 63, 63, 63, 15, 32, 147, + 15, 79, 63, 8, 8, 114, 12, 71, 72, 122, + 63, 63, 63, 63, -1, 97, 63, 63, -1, 13, + -1, -1, -1, -1, -1, 97, -1, -1, -1, -1, + -1, 63, 97, 97, 63, 13, -1, 13, 13, 13, + 13, -1, 13, 13, 13, 13, 13, 13, -1, 13, + -1, 97, -1, -1, -1, -1, -1, 12, -1, -1, + -1, 8, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 97, -1, 97, 97, 97, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 8, 8, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 8, + -1, 8, -1, -1, 8, -1, -1, 8, 8, -1, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 8, -1, 8, -1, -1, 8, -1, 8, 8, -1, - 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 8, -1, 8, -1, -1, -1, - -1, -1, 12 + -1, -1, -1, -1, -1, 8, -1, 8 ); protected $gotoBase = array( - 0, 0, -367, 0, 0, 178, 0, 134, 106, 0, - -142, 48, 90, -19, -122, -192, 254, 147, 129, 33, - 46, 0, 0, -2, 57, 0, 43, 0, 36, 0, - 44, 0, -10, -23, 0, 0, 163, -283, 0, -345, - 183, 0, 0, 0, 0, 0, 222, 0, 0, 80, - 0, 0, 226, 58, 55, 127, 87, 0, 0, 0, - 0, 0, 0, 107, 0, 38, 0, -106, -43, -267, - 0, -13, -21, -371, 0, 65, -9, 0, 0, 5, - -235, 0, 14, 0, 0, 120, 12, 0, 45, 56, - 51, 70, -173, 0, 191, 0, 39, 128, 0, 4, + 0, 0, -358, 0, 0, 207, 0, 274, 114, 0, + -148, 54, 10, 94, -144, -40, 245, 150, 174, 48, + 70, 0, 0, -3, 25, 0, -108, 0, 44, 0, + 52, 0, 3, -23, 0, 0, 183, -331, 0, -359, + 221, 0, 0, 0, 0, 0, 106, 0, 0, 157, + 0, 0, 227, 45, 47, 191, 90, 0, 0, 0, + 0, 0, 0, 111, 0, -95, 0, -26, 43, -193, + 0, -12, -20, -435, 0, 26, 37, 0, 0, 4, + -259, 0, 20, 0, 0, 117, -104, 0, 31, 55, + 46, 53, -64, 0, 216, 0, 40, 143, 0, -10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 42, 0, 0, 3, 0, 0, 0, 41, 0, - 0, 0, -32, 0, 1, 0, 0, 7, 0, 0, - 0, 0, 0, 0, -133, -65, 223, -48, 0, 52, - 0, -35, 0, 231, 0, 0, 225, -61, -121, 0, + 0, -34, 0, 0, 7, 0, 0, 0, 30, 0, + 0, 0, -32, 0, -9, 0, 0, -5, 0, 0, + 0, 0, 0, 0, -119, -69, 217, -52, 0, 51, + 0, -102, 0, 226, 0, 0, 223, 77, -67, 0, 0 ); protected $gotoDefault = array( - -32768, 405, 583, 2, 584, 655, 663, 528, 422, 553, - 423, 449, 324, 737, 892, 757, 719, 720, 721, 310, - 350, 301, 308, 512, 501, 396, 706, 369, 698, 393, - 701, 368, 710, 136, 529, 401, 714, 1, 716, 455, - 748, 298, 724, 299, 532, 726, 462, 728, 729, 304, - 311, 312, 896, 470, 498, 741, 206, 464, 742, 297, - 743, 751, 321, 302, 379, 402, 316, 873, 488, 319, - 364, 382, 495, 490, 472, 1000, 776, 388, 377, 790, - 285, 798, 581, 806, 809, 424, 425, 386, 821, 387, - 832, 826, 1008, 381, 838, 370, 845, 1040, 372, 849, - 220, 852, 245, 526, 338, 857, 858, 6, 863, 544, - 545, 7, 235, 400, 887, 527, 367, 902, 353, 969, - 971, 457, 394, 982, 376, 535, 403, 987, 1044, 365, - 426, 383, 272, 289, 247, 427, 444, 252, 428, 384, - 1047, 1054, 327, 1070, 269, 29, 1082, 1090, 281, 476, - 492 + -32768, 420, 603, 2, 604, 676, 684, 548, 437, 573, + 438, 464, 335, 758, 913, 778, 740, 741, 742, 320, + 361, 311, 318, 531, 518, 410, 727, 381, 719, 407, + 722, 380, 731, 140, 549, 416, 735, 1, 737, 470, + 769, 308, 745, 309, 552, 747, 477, 749, 750, 314, + 321, 322, 917, 486, 515, 762, 213, 479, 763, 307, + 764, 772, 331, 312, 392, 417, 326, 894, 504, 527, + 376, 395, 512, 507, 488, 1024, 797, 401, 390, 811, + 296, 819, 601, 827, 830, 439, 440, 399, 842, 400, + 853, 847, 1032, 394, 859, 382, 866, 1064, 385, 870, + 228, 873, 255, 546, 349, 878, 879, 6, 884, 564, + 565, 7, 243, 415, 908, 547, 379, 923, 364, 991, + 993, 472, 408, 1006, 389, 555, 418, 1011, 1068, 377, + 441, 396, 282, 300, 257, 442, 458, 262, 443, 397, + 1071, 1078, 338, 1094, 279, 26, 1106, 1115, 292, 492, + 509 ); protected $ruleToNonTerminal = array( @@ -737,31 +750,31 @@ class Php7 extends \PhpParser\ParserAbstract 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, - 7, 7, 8, 9, 10, 10, 11, 12, 13, 13, - 14, 14, 15, 15, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 20, 20, 21, 21, 21, - 21, 23, 25, 25, 19, 27, 27, 24, 29, 29, - 26, 26, 28, 28, 30, 30, 22, 31, 31, 32, - 34, 35, 35, 36, 37, 37, 39, 38, 38, 38, - 38, 40, 40, 40, 40, 40, 40, 40, 40, 40, + 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, + 6, 7, 7, 8, 9, 10, 10, 11, 12, 13, + 13, 14, 14, 15, 15, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 20, 20, 21, 21, + 21, 21, 23, 25, 25, 19, 27, 27, 24, 29, + 29, 26, 26, 28, 28, 30, 30, 22, 31, 31, + 32, 34, 35, 35, 36, 37, 37, 39, 38, 38, + 38, 38, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, - 40, 40, 40, 40, 40, 40, 16, 16, 59, 59, - 62, 62, 61, 60, 60, 53, 64, 64, 65, 65, - 66, 66, 67, 67, 17, 18, 18, 18, 70, 70, - 70, 71, 71, 74, 74, 72, 72, 76, 77, 77, - 47, 47, 55, 55, 58, 58, 58, 57, 78, 78, - 79, 48, 48, 48, 48, 80, 80, 81, 81, 82, - 82, 45, 45, 41, 41, 83, 43, 43, 84, 42, - 42, 44, 44, 54, 54, 54, 54, 68, 68, 87, - 87, 88, 88, 88, 90, 90, 91, 91, 91, 89, - 89, 69, 69, 69, 92, 92, 93, 93, 94, 94, - 94, 50, 95, 95, 96, 51, 98, 98, 99, 99, - 100, 100, 73, 101, 101, 101, 101, 101, 106, 106, - 107, 107, 108, 108, 108, 108, 108, 109, 110, 110, - 105, 105, 102, 102, 104, 104, 112, 112, 111, 111, - 111, 111, 111, 111, 103, 113, 113, 115, 114, 114, - 52, 116, 116, 46, 46, 33, 33, 33, 33, 33, + 40, 40, 40, 40, 40, 40, 40, 16, 16, 59, + 59, 62, 62, 61, 60, 60, 53, 64, 64, 65, + 65, 66, 66, 67, 67, 17, 18, 18, 18, 70, + 70, 70, 71, 71, 74, 74, 72, 72, 76, 77, + 77, 47, 47, 55, 55, 58, 58, 58, 57, 78, + 78, 79, 48, 48, 48, 48, 80, 80, 81, 81, + 82, 82, 45, 45, 41, 41, 83, 43, 43, 84, + 42, 42, 44, 44, 54, 54, 54, 54, 68, 68, + 87, 87, 88, 88, 88, 90, 90, 91, 91, 91, + 89, 89, 69, 69, 69, 92, 92, 93, 93, 94, + 94, 94, 50, 95, 95, 96, 51, 98, 98, 99, + 99, 100, 100, 73, 101, 101, 101, 101, 101, 106, + 106, 107, 107, 108, 108, 108, 108, 108, 109, 110, + 110, 105, 105, 102, 102, 104, 104, 112, 112, 111, + 111, 111, 111, 111, 111, 103, 113, 113, 115, 114, + 114, 52, 116, 116, 46, 46, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, @@ -769,20 +782,20 @@ class Php7 extends \PhpParser\ParserAbstract 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, - 33, 33, 33, 33, 33, 33, 33, 33, 123, 117, - 117, 122, 122, 125, 126, 126, 127, 128, 128, 128, - 75, 75, 63, 63, 63, 118, 118, 118, 130, 130, - 119, 119, 121, 121, 121, 124, 124, 135, 135, 135, - 86, 137, 137, 137, 120, 120, 120, 120, 120, 120, + 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, + 33, 33, 123, 117, 117, 122, 122, 125, 126, 126, + 127, 128, 128, 128, 75, 75, 63, 63, 63, 118, + 118, 118, 130, 130, 119, 119, 121, 121, 121, 124, + 124, 135, 135, 135, 86, 137, 137, 137, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, - 49, 49, 133, 133, 133, 129, 129, 129, 138, 138, - 138, 138, 138, 138, 56, 56, 56, 97, 97, 97, - 97, 141, 140, 132, 132, 132, 132, 132, 132, 131, - 131, 131, 139, 139, 139, 139, 85, 142, 142, 143, - 143, 143, 143, 143, 143, 143, 136, 145, 145, 144, - 144, 146, 146, 146, 146, 146, 134, 134, 134, 134, - 148, 149, 147, 147, 147, 147, 147, 147, 147, 150, - 150, 150, 150 + 120, 120, 120, 120, 49, 49, 133, 133, 133, 129, + 129, 129, 138, 138, 138, 138, 138, 138, 56, 56, + 56, 97, 97, 97, 97, 141, 140, 132, 132, 132, + 132, 132, 132, 131, 131, 131, 139, 139, 139, 139, + 85, 142, 142, 143, 143, 143, 143, 143, 143, 143, + 136, 145, 145, 144, 144, 146, 146, 146, 146, 146, + 146, 134, 134, 134, 134, 148, 149, 147, 147, 147, + 147, 147, 147, 147, 150, 150, 150, 150 ); protected $ruleToLength = array( @@ -794,51 +807,51 @@ class Php7 extends \PhpParser\ParserAbstract 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, - 0, 1, 0, 1, 1, 1, 1, 1, 3, 5, - 4, 3, 4, 2, 3, 1, 1, 7, 8, 6, - 7, 2, 3, 1, 2, 3, 1, 2, 3, 1, - 1, 3, 1, 2, 1, 2, 2, 3, 1, 3, - 2, 3, 1, 3, 2, 0, 1, 1, 1, 1, - 1, 3, 7, 10, 5, 7, 9, 5, 3, 3, - 3, 3, 3, 3, 1, 2, 5, 7, 9, 6, - 5, 6, 3, 3, 2, 1, 1, 1, 0, 2, - 1, 3, 8, 0, 4, 2, 1, 3, 0, 1, - 0, 1, 3, 1, 8, 7, 6, 5, 1, 2, - 2, 0, 2, 0, 2, 0, 2, 2, 1, 3, - 1, 4, 1, 4, 1, 1, 4, 2, 1, 3, - 3, 3, 4, 4, 5, 0, 2, 4, 3, 1, - 1, 1, 4, 0, 2, 5, 0, 2, 6, 0, - 2, 0, 3, 1, 2, 1, 1, 2, 0, 1, - 3, 4, 6, 4, 1, 2, 1, 1, 1, 0, - 1, 0, 2, 2, 2, 4, 1, 3, 1, 2, - 2, 2, 3, 1, 1, 2, 3, 1, 1, 3, - 2, 0, 1, 4, 4, 9, 3, 1, 1, 3, - 0, 2, 4, 5, 4, 4, 4, 3, 1, 1, - 1, 1, 1, 1, 0, 1, 1, 2, 1, 1, - 1, 1, 1, 1, 2, 1, 3, 1, 1, 3, - 2, 3, 1, 0, 1, 1, 3, 3, 3, 4, - 1, 2, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 2, 2, 2, 2, 3, 3, + 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, + 1, 0, 1, 0, 1, 1, 1, 1, 1, 3, + 5, 4, 3, 4, 2, 3, 1, 1, 7, 8, + 6, 7, 2, 3, 1, 2, 3, 1, 2, 3, + 1, 1, 3, 1, 2, 1, 2, 2, 3, 1, + 3, 2, 3, 1, 3, 2, 0, 1, 1, 1, + 1, 1, 3, 7, 10, 5, 7, 9, 5, 3, + 3, 3, 3, 3, 3, 1, 2, 5, 7, 9, + 6, 5, 6, 3, 3, 2, 1, 1, 1, 0, + 2, 1, 3, 8, 0, 4, 2, 1, 3, 0, + 1, 0, 1, 3, 1, 8, 7, 6, 5, 1, + 2, 2, 0, 2, 0, 2, 0, 2, 2, 1, + 3, 1, 4, 1, 4, 1, 1, 4, 2, 1, + 3, 3, 3, 4, 4, 5, 0, 2, 4, 3, + 1, 1, 1, 4, 0, 2, 5, 0, 2, 6, + 0, 2, 0, 3, 1, 2, 1, 1, 2, 0, + 1, 3, 4, 6, 4, 1, 2, 1, 1, 1, + 0, 1, 0, 2, 2, 2, 4, 1, 3, 1, + 2, 2, 2, 3, 1, 1, 2, 3, 1, 1, + 3, 2, 0, 1, 4, 4, 9, 3, 1, 1, + 3, 0, 2, 4, 5, 4, 4, 4, 3, 1, + 1, 1, 1, 1, 1, 0, 1, 1, 2, 1, + 1, 1, 1, 1, 1, 2, 1, 3, 1, 1, + 3, 2, 3, 1, 0, 1, 1, 3, 3, 3, + 4, 1, 2, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 2, 2, 2, 2, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 5, 4, 3, 4, 4, 2, 2, 4, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, - 3, 2, 1, 2, 4, 2, 8, 9, 7, 3, - 2, 0, 4, 2, 1, 3, 2, 2, 2, 4, - 1, 1, 1, 2, 3, 1, 1, 1, 1, 1, - 0, 3, 0, 1, 1, 0, 1, 1, 3, 3, - 3, 4, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 3, 2, 3, 3, - 0, 1, 1, 3, 1, 1, 3, 1, 1, 4, - 4, 4, 1, 4, 1, 1, 3, 1, 4, 2, - 2, 1, 3, 1, 4, 4, 3, 3, 3, 1, - 3, 1, 1, 3, 1, 1, 4, 3, 1, 1, - 2, 1, 3, 4, 3, 0, 1, 1, 1, 3, - 1, 3, 1, 4, 2, 0, 2, 2, 1, 2, - 1, 1, 1, 4, 3, 3, 3, 6, 3, 1, - 1, 2, 1 + 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, + 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 5, 4, 3, 4, 4, 2, 2, 4, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 1, 3, 2, 1, 2, 4, 2, 8, 9, + 8, 9, 7, 3, 2, 0, 4, 2, 1, 3, + 2, 2, 2, 4, 1, 1, 1, 2, 3, 1, + 1, 1, 1, 1, 0, 3, 0, 1, 1, 0, + 1, 1, 3, 3, 3, 4, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 3, 2, 3, 3, 0, 1, 1, 3, 1, 1, + 3, 1, 1, 4, 4, 4, 1, 4, 1, 1, + 3, 1, 4, 2, 2, 1, 3, 1, 4, 4, + 3, 3, 3, 1, 3, 1, 1, 3, 1, 1, + 4, 3, 1, 1, 2, 1, 3, 4, 3, 0, + 1, 1, 1, 3, 1, 3, 1, 4, 2, 2, + 0, 2, 2, 1, 2, 1, 1, 1, 4, 3, + 3, 3, 6, 3, 1, 1, 2, 1 ); protected function initReduceCallbacks() { @@ -856,7 +869,7 @@ class Php7 extends \PhpParser\ParserAbstract $this->semValue = array(); }, 4 => function ($stackPos) { - $startAttributes = $this->lookaheadStartAttributes; if (isset($startAttributes['comments'])) { $nop = new Stmt\Nop($startAttributes + $this->endAttributes); } else { $nop = null; }; + $startAttributes = $this->lookaheadStartAttributes; if (isset($startAttributes['comments'])) { $nop = new Stmt\Nop($this->createZeroLengthAttributes($startAttributes)); } else { $nop = null; }; if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 5 => function ($stackPos) { @@ -1085,7 +1098,7 @@ class Php7 extends \PhpParser\ParserAbstract $this->semValue = $this->semStack[$stackPos]; }, 80 => function ($stackPos) { - $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos]; }, 81 => function ($stackPos) { $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); @@ -1097,19 +1110,19 @@ class Php7 extends \PhpParser\ParserAbstract $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 84 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 85 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 86 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 87 => function ($stackPos) { - $this->semValue = new Expr\Variable(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 88 => function ($stackPos) { - /* nothing */ + $this->semValue = new Expr\Variable(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 89 => function ($stackPos) { /* nothing */ @@ -1118,16 +1131,16 @@ class Php7 extends \PhpParser\ParserAbstract /* nothing */ }, 91 => function ($stackPos) { - $this->emitError(new Error('A trailing comma is not allowed here', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes)); + /* nothing */ }, 92 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; + $this->emitError(new Error('A trailing comma is not allowed here', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes)); }, 93 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos]; }, 94 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->semStack[$stackPos]; }, 95 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; @@ -1136,134 +1149,134 @@ class Php7 extends \PhpParser\ParserAbstract $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 97 => function ($stackPos) { - $this->semValue = new Stmt\HaltCompiler($this->lexer->handleHaltCompiler(), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 98 => function ($stackPos) { + $this->semValue = new Stmt\HaltCompiler($this->lexer->handleHaltCompiler(), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 99 => function ($stackPos) { $this->semValue = new Stmt\Namespace_($this->semStack[$stackPos-(3-2)], null, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->semValue->setAttribute('kind', Stmt\Namespace_::KIND_SEMICOLON); $this->checkNamespace($this->semValue); }, - 99 => function ($stackPos) { + 100 => function ($stackPos) { $this->semValue = new Stmt\Namespace_($this->semStack[$stackPos-(5-2)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); $this->semValue->setAttribute('kind', Stmt\Namespace_::KIND_BRACED); $this->checkNamespace($this->semValue); }, - 100 => function ($stackPos) { + 101 => function ($stackPos) { $this->semValue = new Stmt\Namespace_(null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); $this->semValue->setAttribute('kind', Stmt\Namespace_::KIND_BRACED); $this->checkNamespace($this->semValue); }, - 101 => function ($stackPos) { + 102 => function ($stackPos) { $this->semValue = new Stmt\Use_($this->semStack[$stackPos-(3-2)], Stmt\Use_::TYPE_NORMAL, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 102 => function ($stackPos) { + 103 => function ($stackPos) { $this->semValue = new Stmt\Use_($this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-2)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 103 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, 104 => function ($stackPos) { - $this->semValue = new Stmt\Const_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 105 => function ($stackPos) { - $this->semValue = Stmt\Use_::TYPE_FUNCTION; + $this->semValue = new Stmt\Const_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 106 => function ($stackPos) { - $this->semValue = Stmt\Use_::TYPE_CONSTANT; + $this->semValue = Stmt\Use_::TYPE_FUNCTION; }, 107 => function ($stackPos) { - $this->semValue = new Stmt\GroupUse(new Name($this->semStack[$stackPos-(7-3)], $this->startAttributeStack[$stackPos-(7-3)] + $this->endAttributeStack[$stackPos-(7-3)]), $this->semStack[$stackPos-(7-6)], $this->semStack[$stackPos-(7-2)], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); + $this->semValue = Stmt\Use_::TYPE_CONSTANT; }, 108 => function ($stackPos) { - $this->semValue = new Stmt\GroupUse(new Name($this->semStack[$stackPos-(8-4)], $this->startAttributeStack[$stackPos-(8-4)] + $this->endAttributeStack[$stackPos-(8-4)]), $this->semStack[$stackPos-(8-7)], $this->semStack[$stackPos-(8-2)], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); + $this->semValue = new Stmt\GroupUse(new Name($this->semStack[$stackPos-(7-3)], $this->startAttributeStack[$stackPos-(7-3)] + $this->endAttributeStack[$stackPos-(7-3)]), $this->semStack[$stackPos-(7-6)], $this->semStack[$stackPos-(7-2)], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); }, 109 => function ($stackPos) { - $this->semValue = new Stmt\GroupUse(new Name($this->semStack[$stackPos-(6-2)], $this->startAttributeStack[$stackPos-(6-2)] + $this->endAttributeStack[$stackPos-(6-2)]), $this->semStack[$stackPos-(6-5)], Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); + $this->semValue = new Stmt\GroupUse(new Name($this->semStack[$stackPos-(8-4)], $this->startAttributeStack[$stackPos-(8-4)] + $this->endAttributeStack[$stackPos-(8-4)]), $this->semStack[$stackPos-(8-7)], $this->semStack[$stackPos-(8-2)], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); }, 110 => function ($stackPos) { - $this->semValue = new Stmt\GroupUse(new Name($this->semStack[$stackPos-(7-3)], $this->startAttributeStack[$stackPos-(7-3)] + $this->endAttributeStack[$stackPos-(7-3)]), $this->semStack[$stackPos-(7-6)], Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); + $this->semValue = new Stmt\GroupUse(new Name($this->semStack[$stackPos-(6-2)], $this->startAttributeStack[$stackPos-(6-2)] + $this->endAttributeStack[$stackPos-(6-2)]), $this->semStack[$stackPos-(6-5)], Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); }, 111 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = new Stmt\GroupUse(new Name($this->semStack[$stackPos-(7-3)], $this->startAttributeStack[$stackPos-(7-3)] + $this->endAttributeStack[$stackPos-(7-3)]), $this->semStack[$stackPos-(7-6)], Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); }, 112 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 113 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 114 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 115 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 116 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 117 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 118 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 119 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 120 => function ($stackPos) { - $this->semValue = new Stmt\UseUse($this->semStack[$stackPos-(1-1)], null, Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $stackPos-(1-1)); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 121 => function ($stackPos) { - $this->semValue = new Stmt\UseUse($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $stackPos-(3-3)); + $this->semValue = new Stmt\UseUse($this->semStack[$stackPos-(1-1)], null, Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $stackPos-(1-1)); }, 122 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Stmt\UseUse($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $stackPos-(3-3)); }, 123 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 124 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; $this->semValue->type = Stmt\Use_::TYPE_NORMAL; + $this->semValue = $this->semStack[$stackPos-(2-2)]; }, 125 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; $this->semValue->type = $this->semStack[$stackPos-(2-1)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; $this->semValue->type = Stmt\Use_::TYPE_NORMAL; }, 126 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = $this->semStack[$stackPos-(2-2)]; $this->semValue->type = $this->semStack[$stackPos-(2-1)]; }, 127 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 128 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 129 => function ($stackPos) { - $this->semValue = new Node\Const_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 130 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 131 => function ($stackPos) { + 128 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 132 => function ($stackPos) { + 129 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 133 => function ($stackPos) { + 130 => function ($stackPos) { $this->semValue = new Node\Const_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, + 131 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(2-1)]; + }, + 132 => function ($stackPos) { + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + }, + 133 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(1-1)]); + }, 134 => function ($stackPos) { - if (is_array($this->semStack[$stackPos-(2-2)])) { $this->semValue = array_merge($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); } else { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }; + $this->semValue = new Node\Const_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 135 => function ($stackPos) { - $this->semValue = array(); + if (is_array($this->semStack[$stackPos-(2-2)])) { $this->semValue = array_merge($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); } else { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }; }, 136 => function ($stackPos) { - $startAttributes = $this->lookaheadStartAttributes; if (isset($startAttributes['comments'])) { $nop = new Stmt\Nop($startAttributes + $this->endAttributes); } else { $nop = null; }; - if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = array(); }, 137 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $startAttributes = $this->lookaheadStartAttributes; if (isset($startAttributes['comments'])) { $nop = new Stmt\Nop($this->createZeroLengthAttributes($startAttributes)); } else { $nop = null; }; + if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 138 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; @@ -1272,9 +1285,12 @@ class Php7 extends \PhpParser\ParserAbstract $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 140 => function ($stackPos) { - throw new Error('__HALT_COMPILER() can only be used from the outermost scope', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 141 => function ($stackPos) { + throw new Error('__HALT_COMPILER() can only be used from the outermost scope', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 142 => function ($stackPos) { if ($this->semStack[$stackPos-(3-2)]) { $this->semValue = $this->semStack[$stackPos-(3-2)]; $attrs = $this->startAttributeStack[$stackPos-(3-1)]; $stmts = $this->semValue; if (!empty($attrs['comments'])) {$stmts[0]->setAttribute('comments', array_merge($attrs['comments'], $stmts[0]->getAttribute('comments', []))); }; @@ -1284,536 +1300,533 @@ class Php7 extends \PhpParser\ParserAbstract } }, - 142 => function ($stackPos) { + 143 => function ($stackPos) { $this->semValue = new Stmt\If_($this->semStack[$stackPos-(7-3)], ['stmts' => is_array($this->semStack[$stackPos-(7-5)]) ? $this->semStack[$stackPos-(7-5)] : array($this->semStack[$stackPos-(7-5)]), 'elseifs' => $this->semStack[$stackPos-(7-6)], 'else' => $this->semStack[$stackPos-(7-7)]], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); }, - 143 => function ($stackPos) { + 144 => function ($stackPos) { $this->semValue = new Stmt\If_($this->semStack[$stackPos-(10-3)], ['stmts' => $this->semStack[$stackPos-(10-6)], 'elseifs' => $this->semStack[$stackPos-(10-7)], 'else' => $this->semStack[$stackPos-(10-8)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); }, - 144 => function ($stackPos) { + 145 => function ($stackPos) { $this->semValue = new Stmt\While_($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, - 145 => function ($stackPos) { + 146 => function ($stackPos) { $this->semValue = new Stmt\Do_($this->semStack[$stackPos-(7-5)], is_array($this->semStack[$stackPos-(7-2)]) ? $this->semStack[$stackPos-(7-2)] : array($this->semStack[$stackPos-(7-2)]), $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); }, - 146 => function ($stackPos) { + 147 => function ($stackPos) { $this->semValue = new Stmt\For_(['init' => $this->semStack[$stackPos-(9-3)], 'cond' => $this->semStack[$stackPos-(9-5)], 'loop' => $this->semStack[$stackPos-(9-7)], 'stmts' => $this->semStack[$stackPos-(9-9)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, - 147 => function ($stackPos) { + 148 => function ($stackPos) { $this->semValue = new Stmt\Switch_($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, - 148 => function ($stackPos) { + 149 => function ($stackPos) { $this->semValue = new Stmt\Break_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 149 => function ($stackPos) { + 150 => function ($stackPos) { $this->semValue = new Stmt\Continue_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 150 => function ($stackPos) { + 151 => function ($stackPos) { $this->semValue = new Stmt\Return_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 151 => function ($stackPos) { + 152 => function ($stackPos) { $this->semValue = new Stmt\Global_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 152 => function ($stackPos) { + 153 => function ($stackPos) { $this->semValue = new Stmt\Static_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 153 => function ($stackPos) { + 154 => function ($stackPos) { $this->semValue = new Stmt\Echo_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 154 => function ($stackPos) { + 155 => function ($stackPos) { $this->semValue = new Stmt\InlineHTML($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 155 => function ($stackPos) { + 156 => function ($stackPos) { $this->semValue = new Stmt\Expression($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 156 => function ($stackPos) { + 157 => function ($stackPos) { $this->semValue = new Stmt\Unset_($this->semStack[$stackPos-(5-3)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, - 157 => function ($stackPos) { + 158 => function ($stackPos) { $this->semValue = new Stmt\Foreach_($this->semStack[$stackPos-(7-3)], $this->semStack[$stackPos-(7-5)][0], ['keyVar' => null, 'byRef' => $this->semStack[$stackPos-(7-5)][1], 'stmts' => $this->semStack[$stackPos-(7-7)]], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); }, - 158 => function ($stackPos) { + 159 => function ($stackPos) { $this->semValue = new Stmt\Foreach_($this->semStack[$stackPos-(9-3)], $this->semStack[$stackPos-(9-7)][0], ['keyVar' => $this->semStack[$stackPos-(9-5)], 'byRef' => $this->semStack[$stackPos-(9-7)][1], 'stmts' => $this->semStack[$stackPos-(9-9)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, - 159 => function ($stackPos) { + 160 => function ($stackPos) { $this->semValue = new Stmt\Foreach_($this->semStack[$stackPos-(6-3)], new Expr\Error($this->startAttributeStack[$stackPos-(6-4)] + $this->endAttributeStack[$stackPos-(6-4)]), ['stmts' => $this->semStack[$stackPos-(6-6)]], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); }, - 160 => function ($stackPos) { + 161 => function ($stackPos) { $this->semValue = new Stmt\Declare_($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, - 161 => function ($stackPos) { + 162 => function ($stackPos) { $this->semValue = new Stmt\TryCatch($this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-5)], $this->semStack[$stackPos-(6-6)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); $this->checkTryCatch($this->semValue); }, - 162 => function ($stackPos) { + 163 => function ($stackPos) { $this->semValue = new Stmt\Throw_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 163 => function ($stackPos) { + 164 => function ($stackPos) { $this->semValue = new Stmt\Goto_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 164 => function ($stackPos) { + 165 => function ($stackPos) { $this->semValue = new Stmt\Label($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 165 => function ($stackPos) { + 166 => function ($stackPos) { $this->semValue = array(); /* means: no statement */ }, - 166 => function ($stackPos) { + 167 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 167 => function ($stackPos) { + 168 => function ($stackPos) { $startAttributes = $this->startAttributeStack[$stackPos-(1-1)]; if (isset($startAttributes['comments'])) { $this->semValue = new Stmt\Nop($startAttributes + $this->endAttributes); } else { $this->semValue = null; }; if ($this->semValue === null) $this->semValue = array(); /* means: no statement */ }, - 168 => function ($stackPos) { + 169 => function ($stackPos) { $this->semValue = array(); }, - 169 => function ($stackPos) { + 170 => function ($stackPos) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 170 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, 171 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 172 => function ($stackPos) { - $this->semValue = new Stmt\Catch_($this->semStack[$stackPos-(8-3)], $this->semStack[$stackPos-(8-4)], $this->semStack[$stackPos-(8-7)], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); - }, - 173 => function ($stackPos) { - $this->semValue = null; - }, - 174 => function ($stackPos) { - $this->semValue = new Stmt\Finally_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 175 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 176 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 177 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, + 173 => function ($stackPos) { + $this->semValue = new Stmt\Catch_($this->semStack[$stackPos-(8-3)], $this->semStack[$stackPos-(8-4)], $this->semStack[$stackPos-(8-7)], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); + }, + 174 => function ($stackPos) { + $this->semValue = null; + }, + 175 => function ($stackPos) { + $this->semValue = new Stmt\Finally_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + }, + 176 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(2-1)]; + }, + 177 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(1-1)]); + }, 178 => function ($stackPos) { - $this->semValue = false; + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 179 => function ($stackPos) { - $this->semValue = true; - }, - 180 => function ($stackPos) { $this->semValue = false; }, - 181 => function ($stackPos) { + 180 => function ($stackPos) { $this->semValue = true; }, + 181 => function ($stackPos) { + $this->semValue = false; + }, 182 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = true; }, 183 => function ($stackPos) { - $this->semValue = []; + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 184 => function ($stackPos) { - $this->semValue = new Stmt\Function_($this->semStack[$stackPos-(8-3)], ['byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-5)], 'returnType' => $this->semStack[$stackPos-(8-7)], 'stmts' => $this->semStack[$stackPos-(8-8)]], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); + $this->semValue = []; }, 185 => function ($stackPos) { + $this->semValue = new Stmt\Function_($this->semStack[$stackPos-(8-3)], ['byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-5)], 'returnType' => $this->semStack[$stackPos-(8-7)], 'stmts' => $this->semStack[$stackPos-(8-8)]], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); + }, + 186 => function ($stackPos) { $this->semValue = new Stmt\Class_($this->semStack[$stackPos-(7-2)], ['type' => $this->semStack[$stackPos-(7-1)], 'extends' => $this->semStack[$stackPos-(7-3)], 'implements' => $this->semStack[$stackPos-(7-4)], 'stmts' => $this->semStack[$stackPos-(7-6)]], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); $this->checkClass($this->semValue, $stackPos-(7-2)); }, - 186 => function ($stackPos) { + 187 => function ($stackPos) { $this->semValue = new Stmt\Interface_($this->semStack[$stackPos-(6-2)], ['extends' => $this->semStack[$stackPos-(6-3)], 'stmts' => $this->semStack[$stackPos-(6-5)]], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); $this->checkInterface($this->semValue, $stackPos-(6-2)); }, - 187 => function ($stackPos) { + 188 => function ($stackPos) { $this->semValue = new Stmt\Trait_($this->semStack[$stackPos-(5-2)], ['stmts' => $this->semStack[$stackPos-(5-4)]], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, - 188 => function ($stackPos) { + 189 => function ($stackPos) { $this->semValue = 0; }, - 189 => function ($stackPos) { + 190 => function ($stackPos) { $this->semValue = Stmt\Class_::MODIFIER_ABSTRACT; }, - 190 => function ($stackPos) { + 191 => function ($stackPos) { $this->semValue = Stmt\Class_::MODIFIER_FINAL; }, - 191 => function ($stackPos) { - $this->semValue = null; - }, 192 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; + $this->semValue = null; }, 193 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = $this->semStack[$stackPos-(2-2)]; }, 194 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; + $this->semValue = array(); }, 195 => function ($stackPos) { - $this->semValue = array(); - }, - 196 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-2)]; }, - 197 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 198 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 199 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 200 => function ($stackPos) { - $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); - }, - 201 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; - }, - 202 => function ($stackPos) { - $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); - }, - 203 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; - }, - 204 => function ($stackPos) { - $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); - }, - 205 => function ($stackPos) { - $this->semValue = null; - }, - 206 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; - }, - 207 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 208 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 209 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 210 => function ($stackPos) { - $this->semValue = new Stmt\DeclareDeclare($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 211 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 212 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-3)]; - }, - 213 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; - }, - 214 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(5-3)]; - }, - 215 => function ($stackPos) { + 196 => function ($stackPos) { $this->semValue = array(); }, + 197 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(2-2)]; + }, + 198 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(2-1)]; + }, + 199 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(1-1)]); + }, + 200 => function ($stackPos) { + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + }, + 201 => function ($stackPos) { + $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); + }, + 202 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(4-2)]; + }, + 203 => function ($stackPos) { + $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); + }, + 204 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(4-2)]; + }, + 205 => function ($stackPos) { + $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); + }, + 206 => function ($stackPos) { + $this->semValue = null; + }, + 207 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(4-2)]; + }, + 208 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(2-1)]; + }, + 209 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(1-1)]); + }, + 210 => function ($stackPos) { + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + }, + 211 => function ($stackPos) { + $this->semValue = new Stmt\DeclareDeclare($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 212 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(3-2)]; + }, + 213 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(4-3)]; + }, + 214 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(4-2)]; + }, + 215 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(5-3)]; + }, 216 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = array(); }, 217 => function ($stackPos) { - $this->semValue = new Stmt\Case_($this->semStack[$stackPos-(4-2)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 218 => function ($stackPos) { - $this->semValue = new Stmt\Case_(null, $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Stmt\Case_($this->semStack[$stackPos-(4-2)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 219 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; + $this->semValue = new Stmt\Case_(null, $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 220 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos]; }, 221 => function ($stackPos) { - $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); + $this->semValue = $this->semStack[$stackPos]; }, 222 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; + $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); }, 223 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = $this->semStack[$stackPos-(4-2)]; }, 224 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 225 => function ($stackPos) { - $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(5-3)], is_array($this->semStack[$stackPos-(5-5)]) ? $this->semStack[$stackPos-(5-5)] : array($this->semStack[$stackPos-(5-5)]), $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); - }, - 226 => function ($stackPos) { $this->semValue = array(); }, - 227 => function ($stackPos) { + 225 => function ($stackPos) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, + 226 => function ($stackPos) { + $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(5-3)], is_array($this->semStack[$stackPos-(5-5)]) ? $this->semStack[$stackPos-(5-5)] : array($this->semStack[$stackPos-(5-5)]), $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + }, + 227 => function ($stackPos) { + $this->semValue = array(); + }, 228 => function ($stackPos) { - $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-6)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 229 => function ($stackPos) { - $this->semValue = null; + $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-6)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); }, 230 => function ($stackPos) { - $this->semValue = new Stmt\Else_(is_array($this->semStack[$stackPos-(2-2)]) ? $this->semStack[$stackPos-(2-2)] : array($this->semStack[$stackPos-(2-2)]), $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 231 => function ($stackPos) { $this->semValue = null; }, + 231 => function ($stackPos) { + $this->semValue = new Stmt\Else_(is_array($this->semStack[$stackPos-(2-2)]) ? $this->semStack[$stackPos-(2-2)] : array($this->semStack[$stackPos-(2-2)]), $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, 232 => function ($stackPos) { - $this->semValue = new Stmt\Else_($this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = null; }, 233 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)], false); + $this->semValue = new Stmt\Else_($this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 234 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(2-2)], true); + $this->semValue = array($this->semStack[$stackPos-(1-1)], false); }, 235 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)], false); + $this->semValue = array($this->semStack[$stackPos-(2-2)], true); }, 236 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)], false); }, 237 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = array($this->semStack[$stackPos-(1-1)], false); }, 238 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 239 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = array(); }, 240 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 241 => function ($stackPos) { - $this->semValue = new Node\Param($this->semStack[$stackPos-(4-4)], null, $this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-2)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); $this->checkParam($this->semValue); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 242 => function ($stackPos) { - $this->semValue = new Node\Param($this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-6)], $this->semStack[$stackPos-(6-1)], $this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-3)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); $this->checkParam($this->semValue); + $this->semValue = new Node\Param($this->semStack[$stackPos-(4-4)], null, $this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-2)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); $this->checkParam($this->semValue); }, 243 => function ($stackPos) { - $this->semValue = new Node\Param(new Expr\Error($this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes), null, $this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-2)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Node\Param($this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-6)], $this->semStack[$stackPos-(6-1)], $this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-3)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); $this->checkParam($this->semValue); }, 244 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Node\Param(new Expr\Error($this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes), null, $this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-2)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 245 => function ($stackPos) { - $this->semValue = new Node\NullableType($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 246 => function ($stackPos) { - $this->semValue = $this->handleBuiltinTypes($this->semStack[$stackPos-(1-1)]); - }, - 247 => function ($stackPos) { - $this->semValue = new Node\Identifier('array', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 248 => function ($stackPos) { - $this->semValue = new Node\Identifier('callable', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 249 => function ($stackPos) { - $this->semValue = null; - }, - 250 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 251 => function ($stackPos) { + 246 => function ($stackPos) { + $this->semValue = new Node\NullableType($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 247 => function ($stackPos) { + $this->semValue = $this->handleBuiltinTypes($this->semStack[$stackPos-(1-1)]); + }, + 248 => function ($stackPos) { + $this->semValue = new Node\Identifier('array', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 249 => function ($stackPos) { + $this->semValue = new Node\Identifier('callable', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 250 => function ($stackPos) { $this->semValue = null; }, + 251 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, 252 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; - }, - 253 => function ($stackPos) { $this->semValue = null; }, + 253 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(2-2)]; + }, 254 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = null; }, 255 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; - }, - 256 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 257 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 258 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(1-1)], false, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 259 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], true, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 260 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], false, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 261 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 262 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 263 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 264 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 265 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 266 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 267 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 268 => function ($stackPos) { - $this->semValue = new Stmt\StaticVar($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 269 => function ($stackPos) { - $this->semValue = new Stmt\StaticVar($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 270 => function ($stackPos) { - if ($this->semStack[$stackPos-(2-2)] !== null) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; } - }, - 271 => function ($stackPos) { $this->semValue = array(); }, + 256 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(4-2)]; + }, + 257 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(1-1)]); + }, + 258 => function ($stackPos) { + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + }, + 259 => function ($stackPos) { + $this->semValue = new Node\Arg($this->semStack[$stackPos-(1-1)], false, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 260 => function ($stackPos) { + $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], true, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 261 => function ($stackPos) { + $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], false, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 262 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(2-1)]; + }, + 263 => function ($stackPos) { + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + }, + 264 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(1-1)]); + }, + 265 => function ($stackPos) { + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 266 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(2-1)]; + }, + 267 => function ($stackPos) { + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + }, + 268 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(1-1)]); + }, + 269 => function ($stackPos) { + $this->semValue = new Stmt\StaticVar($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 270 => function ($stackPos) { + $this->semValue = new Stmt\StaticVar($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 271 => function ($stackPos) { + if ($this->semStack[$stackPos-(2-2)] !== null) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; } + }, 272 => function ($stackPos) { - $startAttributes = $this->lookaheadStartAttributes; if (isset($startAttributes['comments'])) { $nop = new Stmt\Nop($startAttributes + $this->endAttributes); } else { $nop = null; }; - if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = array(); }, 273 => function ($stackPos) { + $startAttributes = $this->lookaheadStartAttributes; if (isset($startAttributes['comments'])) { $nop = new Stmt\Nop($this->createZeroLengthAttributes($startAttributes)); } else { $nop = null; }; + if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 274 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes; $this->semValue = new Stmt\Property($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $attrs, $this->semStack[$stackPos-(4-2)]); $this->checkProperty($this->semValue, $stackPos-(4-1)); }, - 274 => function ($stackPos) { + 275 => function ($stackPos) { $this->semValue = new Stmt\ClassConst($this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-1)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); $this->checkClassConst($this->semValue, $stackPos-(4-1)); }, - 275 => function ($stackPos) { + 276 => function ($stackPos) { $this->semValue = new Stmt\ClassMethod($this->semStack[$stackPos-(9-4)], ['type' => $this->semStack[$stackPos-(9-1)], 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-6)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); $this->checkClassMethod($this->semValue, $stackPos-(9-1)); }, - 276 => function ($stackPos) { + 277 => function ($stackPos) { $this->semValue = new Stmt\TraitUse($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 277 => function ($stackPos) { + 278 => function ($stackPos) { $this->semValue = null; /* will be skipped */ }, - 278 => function ($stackPos) { - $this->semValue = array(); - }, 279 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = array(); }, 280 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 281 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = array(); }, 282 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Precedence($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 283 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(5-1)][0], $this->semStack[$stackPos-(5-1)][1], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + $this->semValue = new Stmt\TraitUseAdaptation\Precedence($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 284 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], null, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(5-1)][0], $this->semStack[$stackPos-(5-1)][1], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, 285 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], null, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 286 => function ($stackPos) { $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 287 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); + $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 288 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); }, 289 => function ($stackPos) { - $this->semValue = array(null, $this->semStack[$stackPos-(1-1)]); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 290 => function ($stackPos) { - $this->semValue = null; + $this->semValue = array(null, $this->semStack[$stackPos-(1-1)]); }, 291 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = null; }, 292 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 293 => function ($stackPos) { - $this->semValue = 0; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 294 => function ($stackPos) { $this->semValue = 0; }, 295 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = 0; }, 296 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 297 => function ($stackPos) { - $this->checkModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 298 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PUBLIC; + $this->checkModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; }, 299 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PROTECTED; + $this->semValue = Stmt\Class_::MODIFIER_PUBLIC; }, 300 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PRIVATE; + $this->semValue = Stmt\Class_::MODIFIER_PROTECTED; }, 301 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_STATIC; + $this->semValue = Stmt\Class_::MODIFIER_PRIVATE; }, 302 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_ABSTRACT; + $this->semValue = Stmt\Class_::MODIFIER_STATIC; }, 303 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_FINAL; + $this->semValue = Stmt\Class_::MODIFIER_ABSTRACT; }, 304 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = Stmt\Class_::MODIFIER_FINAL; }, 305 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 306 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 307 => function ($stackPos) { - $this->semValue = new Node\VarLikeIdentifier(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 308 => function ($stackPos) { - $this->semValue = new Stmt\PropertyProperty($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 309 => function ($stackPos) { - $this->semValue = new Stmt\PropertyProperty($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 310 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 311 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 312 => function ($stackPos) { + 306 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, + 307 => function ($stackPos) { + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + }, + 308 => function ($stackPos) { + $this->semValue = new Node\VarLikeIdentifier(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 309 => function ($stackPos) { + $this->semValue = new Stmt\PropertyProperty($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 310 => function ($stackPos) { + $this->semValue = new Stmt\PropertyProperty($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 311 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(2-1)]; + }, + 312 => function ($stackPos) { + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + }, 313 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 314 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = array(); }, 315 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 316 => function ($stackPos) { - $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 317 => function ($stackPos) { $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); @@ -1822,624 +1835,639 @@ class Php7 extends \PhpParser\ParserAbstract $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 319 => function ($stackPos) { - $this->semValue = new Expr\AssignRef($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 320 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\AssignRef($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 321 => function ($stackPos) { - $this->semValue = new Expr\Clone_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 322 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\Clone_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 323 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 324 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 325 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 326 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 327 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 328 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 329 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 330 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 331 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 332 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 333 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 334 => function ($stackPos) { - $this->semValue = new Expr\PostInc($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 335 => function ($stackPos) { - $this->semValue = new Expr\PreInc($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 336 => function ($stackPos) { - $this->semValue = new Expr\PostDec($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\PostInc($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 337 => function ($stackPos) { - $this->semValue = new Expr\PreDec($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\PreInc($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 338 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BooleanOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\PostDec($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 339 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BooleanAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\PreDec($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 340 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\BooleanOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 341 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\BooleanAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 342 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\LogicalOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 343 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\LogicalAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 344 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\LogicalXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 345 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 346 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 347 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 348 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 349 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 350 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 351 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 352 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 353 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 354 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 355 => function ($stackPos) { - $this->semValue = new Expr\UnaryPlus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 356 => function ($stackPos) { - $this->semValue = new Expr\UnaryMinus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 357 => function ($stackPos) { - $this->semValue = new Expr\BooleanNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\UnaryPlus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 358 => function ($stackPos) { - $this->semValue = new Expr\BitwiseNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\UnaryMinus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 359 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Identical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BooleanNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 360 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\NotIdentical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BitwiseNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 361 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Equal($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Identical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 362 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\NotEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\NotIdentical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 363 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Spaceship($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Equal($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 364 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Smaller($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\NotEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 365 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\SmallerOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Spaceship($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 366 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Greater($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Smaller($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 367 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\GreaterOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\SmallerOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 368 => function ($stackPos) { - $this->semValue = new Expr\Instanceof_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Greater($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 369 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = new Expr\BinaryOp\GreaterOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 370 => function ($stackPos) { - $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(5-1)], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + $this->semValue = new Expr\Instanceof_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 371 => function ($stackPos) { - $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(4-1)], null, $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 372 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(5-1)], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, 373 => function ($stackPos) { - $this->semValue = new Expr\Isset_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(4-1)], null, $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 374 => function ($stackPos) { - $this->semValue = new Expr\Empty_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 375 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Isset_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 376 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Empty_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 377 => function ($stackPos) { - $this->semValue = new Expr\Eval_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 378 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 379 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Eval_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 380 => function ($stackPos) { - $this->semValue = new Expr\Cast\Int_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 381 => function ($stackPos) { + $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 382 => function ($stackPos) { + $this->semValue = new Expr\Cast\Int_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 383 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes; $attrs['kind'] = $this->getFloatCastKind($this->semStack[$stackPos-(2-1)]); $this->semValue = new Expr\Cast\Double($this->semStack[$stackPos-(2-2)], $attrs); }, - 382 => function ($stackPos) { + 384 => function ($stackPos) { $this->semValue = new Expr\Cast\String_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 383 => function ($stackPos) { + 385 => function ($stackPos) { $this->semValue = new Expr\Cast\Array_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 384 => function ($stackPos) { + 386 => function ($stackPos) { $this->semValue = new Expr\Cast\Object_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 385 => function ($stackPos) { + 387 => function ($stackPos) { $this->semValue = new Expr\Cast\Bool_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 386 => function ($stackPos) { + 388 => function ($stackPos) { $this->semValue = new Expr\Cast\Unset_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 387 => function ($stackPos) { + 389 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes; $attrs['kind'] = strtolower($this->semStack[$stackPos-(2-1)]) === 'exit' ? Expr\Exit_::KIND_EXIT : Expr\Exit_::KIND_DIE; $this->semValue = new Expr\Exit_($this->semStack[$stackPos-(2-2)], $attrs); }, - 388 => function ($stackPos) { + 390 => function ($stackPos) { $this->semValue = new Expr\ErrorSuppress($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 389 => function ($stackPos) { + 391 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 390 => function ($stackPos) { + 392 => function ($stackPos) { $this->semValue = new Expr\ShellExec($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 391 => function ($stackPos) { + 393 => function ($stackPos) { $this->semValue = new Expr\Print_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 392 => function ($stackPos) { + 394 => function ($stackPos) { $this->semValue = new Expr\Yield_(null, null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 393 => function ($stackPos) { + 395 => function ($stackPos) { $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(2-2)], null, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 394 => function ($stackPos) { + 396 => function ($stackPos) { $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-2)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 395 => function ($stackPos) { + 397 => function ($stackPos) { $this->semValue = new Expr\YieldFrom($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 396 => function ($stackPos) { + 398 => function ($stackPos) { + $this->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-4)], 'returnType' => $this->semStack[$stackPos-(8-6)], 'expr' => $this->semStack[$stackPos-(8-8)]], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); + }, + 399 => function ($stackPos) { + $this->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'returnType' => $this->semStack[$stackPos-(9-7)], 'expr' => $this->semStack[$stackPos-(9-9)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); + }, + 400 => function ($stackPos) { $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-4)], 'uses' => $this->semStack[$stackPos-(8-6)], 'returnType' => $this->semStack[$stackPos-(8-7)], 'stmts' => $this->semStack[$stackPos-(8-8)]], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); }, - 397 => function ($stackPos) { + 401 => function ($stackPos) { $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'uses' => $this->semStack[$stackPos-(9-7)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, - 398 => function ($stackPos) { + 402 => function ($stackPos) { $this->semValue = array(new Stmt\Class_(null, ['type' => 0, 'extends' => $this->semStack[$stackPos-(7-3)], 'implements' => $this->semStack[$stackPos-(7-4)], 'stmts' => $this->semStack[$stackPos-(7-6)]], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes), $this->semStack[$stackPos-(7-2)]); $this->checkClass($this->semValue[0], -1); }, - 399 => function ($stackPos) { + 403 => function ($stackPos) { $this->semValue = new Expr\New_($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 400 => function ($stackPos) { + 404 => function ($stackPos) { list($class, $ctorArgs) = $this->semStack[$stackPos-(2-2)]; $this->semValue = new Expr\New_($class, $ctorArgs, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 401 => function ($stackPos) { + 405 => function ($stackPos) { $this->semValue = array(); }, - 402 => function ($stackPos) { + 406 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(4-3)]; }, - 403 => function ($stackPos) { + 407 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 404 => function ($stackPos) { + 408 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 405 => function ($stackPos) { + 409 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 406 => function ($stackPos) { + 410 => function ($stackPos) { $this->semValue = new Expr\ClosureUse($this->semStack[$stackPos-(2-2)], $this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 407 => function ($stackPos) { - $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 408 => function ($stackPos) { - $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 409 => function ($stackPos) { - $this->semValue = new Expr\StaticCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 410 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, 411 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 412 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 413 => function ($stackPos) { - $this->semValue = new Name\FullyQualified($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\StaticCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 414 => function ($stackPos) { - $this->semValue = new Name\Relative($this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 415 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 416 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 417 => function ($stackPos) { - $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; + $this->semValue = new Name\FullyQualified($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 418 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Name\Relative($this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 419 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 420 => function ($stackPos) { - $this->semValue = null; - }, - 421 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 422 => function ($stackPos) { - $this->semValue = array(); - }, - 423 => function ($stackPos) { - $this->semValue = array(new Scalar\EncapsedStringPart(Scalar\String_::parseEscapeSequences($this->semStack[$stackPos-(1-1)], '`'), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes)); - }, - 424 => function ($stackPos) { - foreach ($this->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\Scalar\EncapsedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', true); } }; $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 425 => function ($stackPos) { - $this->semValue = array(); - }, - 426 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, + 421 => function ($stackPos) { + $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; + }, + 422 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 423 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 424 => function ($stackPos) { + $this->semValue = null; + }, + 425 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(3-2)]; + }, + 426 => function ($stackPos) { + $this->semValue = array(); + }, 427 => function ($stackPos) { - $this->semValue = new Expr\ConstFetch($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = array(new Scalar\EncapsedStringPart(Scalar\String_::parseEscapeSequences($this->semStack[$stackPos-(1-1)], '`'), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes)); }, 428 => function ($stackPos) { - $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + foreach ($this->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\Scalar\EncapsedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', true); } }; $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 429 => function ($stackPos) { - $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], new Expr\Error($this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)]), $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->errorState = 2; + $this->semValue = array(); }, 430 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 431 => function ($stackPos) { + $this->semValue = new Expr\ConstFetch($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 432 => function ($stackPos) { + $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 433 => function ($stackPos) { + $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], new Expr\Error($this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)]), $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->errorState = 2; + }, + 434 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_SHORT; $this->semValue = new Expr\Array_($this->semStack[$stackPos-(3-2)], $attrs); }, - 431 => function ($stackPos) { + 435 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_LONG; $this->semValue = new Expr\Array_($this->semStack[$stackPos-(4-3)], $attrs); }, - 432 => function ($stackPos) { + 436 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 433 => function ($stackPos) { + 437 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes; $attrs['kind'] = ($this->semStack[$stackPos-(1-1)][0] === "'" || ($this->semStack[$stackPos-(1-1)][1] === "'" && ($this->semStack[$stackPos-(1-1)][0] === 'b' || $this->semStack[$stackPos-(1-1)][0] === 'B')) ? Scalar\String_::KIND_SINGLE_QUOTED : Scalar\String_::KIND_DOUBLE_QUOTED); $this->semValue = new Scalar\String_(Scalar\String_::parse($this->semStack[$stackPos-(1-1)]), $attrs); }, - 434 => function ($stackPos) { + 438 => function ($stackPos) { $this->semValue = $this->parseLNumber($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 435 => function ($stackPos) { + 439 => function ($stackPos) { $this->semValue = new Scalar\DNumber(Scalar\DNumber::parse($this->semStack[$stackPos-(1-1)]), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 436 => function ($stackPos) { + 440 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Line($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 437 => function ($stackPos) { + 441 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\File($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 438 => function ($stackPos) { + 442 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Dir($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 439 => function ($stackPos) { + 443 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Class_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 440 => function ($stackPos) { + 444 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Trait_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 441 => function ($stackPos) { + 445 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Method($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 442 => function ($stackPos) { + 446 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Function_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 443 => function ($stackPos) { + 447 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Namespace_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 444 => function ($stackPos) { + 448 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 445 => function ($stackPos) { + 449 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 446 => function ($stackPos) { + 450 => function ($stackPos) { $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); }, - 447 => function ($stackPos) { + 451 => function ($stackPos) { $this->semValue = $this->parseDocString($this->semStack[$stackPos-(2-1)], '', $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(2-2)] + $this->endAttributeStack[$stackPos-(2-2)], true); }, - 448 => function ($stackPos) { + 452 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; foreach ($this->semStack[$stackPos-(3-2)] as $s) { if ($s instanceof Node\Scalar\EncapsedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '"', true); } }; $this->semValue = new Scalar\Encapsed($this->semStack[$stackPos-(3-2)], $attrs); }, - 449 => function ($stackPos) { + 453 => function ($stackPos) { $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); }, - 450 => function ($stackPos) { - $this->semValue = null; - }, - 451 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 452 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 453 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, 454 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = null; }, 455 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 456 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 457 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 458 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 459 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 460 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 461 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 462 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 463 => function ($stackPos) { - $this->semValue = new Expr\MethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 464 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 465 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 466 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 467 => function ($stackPos) { - $this->semValue = substr($this->semStack[$stackPos-(1-1)], 1); + $this->semValue = new Expr\MethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 468 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-3)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 469 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 470 => function ($stackPos) { - $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); $this->errorState = 2; + $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 471 => function ($stackPos) { - $var = $this->semStack[$stackPos-(1-1)]; $this->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes) : $var; + $this->semValue = substr($this->semStack[$stackPos-(1-1)], 1); }, 472 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(4-3)]; }, 473 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 474 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); $this->errorState = 2; }, 475 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $var = $this->semStack[$stackPos-(1-1)]; $this->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes) : $var; }, 476 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 477 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 478 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 479 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 480 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 481 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 482 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 483 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 484 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 485 => function ($stackPos) { - $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; - }, - 486 => function ($stackPos) { - $this->semValue = new Expr\List_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 487 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 488 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 489 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 490 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(2-2)], null, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 491 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 492 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 493 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-1)], true, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 494 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 495 => function ($stackPos) { - $this->semValue = null; - }, - 496 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; $end = count($this->semValue)-1; if ($this->semValue[$end] === null) array_pop($this->semValue); - }, - 497 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 498 => function ($stackPos) { - /* do nothing -- prevent default action of $$=$this->semStack[$1]. See $551. */ - }, - 499 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 500 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 501 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 502 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 503 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-1)], true, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 504 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(2-2)], null, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 505 => function ($stackPos) { - $this->semValue = null; - }, - 506 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 507 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 508 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 509 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); - }, - 510 => function ($stackPos) { - $this->semValue = new Scalar\EncapsedStringPart($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 511 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 512 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 513 => function ($stackPos) { $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 514 => function ($stackPos) { + 479 => function ($stackPos) { + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + }, + 480 => function ($stackPos) { $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 515 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + 481 => function ($stackPos) { + $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 516 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + 482 => function ($stackPos) { + $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 517 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-4)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); + 483 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 518 => function ($stackPos) { + 484 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, + 485 => function ($stackPos) { + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 486 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 487 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(3-2)]; + }, + 488 => function ($stackPos) { + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 489 => function ($stackPos) { + $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; + }, + 490 => function ($stackPos) { + $this->semValue = new Expr\List_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + }, + 491 => function ($stackPos) { + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + }, + 492 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(1-1)]); + }, + 493 => function ($stackPos) { + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 494 => function ($stackPos) { + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(2-2)], null, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 495 => function ($stackPos) { + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 496 => function ($stackPos) { + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 497 => function ($stackPos) { + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-1)], true, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + }, + 498 => function ($stackPos) { + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 499 => function ($stackPos) { + $this->semValue = null; + }, + 500 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; $end = count($this->semValue)-1; if ($this->semValue[$end] === null) array_pop($this->semValue); + }, + 501 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos]; + }, + 502 => function ($stackPos) { + /* do nothing -- prevent default action of $$=$this->semStack[$1]. See $551. */ + }, + 503 => function ($stackPos) { + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + }, + 504 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(1-1)]); + }, + 505 => function ($stackPos) { + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 506 => function ($stackPos) { + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 507 => function ($stackPos) { + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-1)], true, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + }, + 508 => function ($stackPos) { + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(2-2)], null, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 509 => function ($stackPos) { + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(2-2)], null, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 510 => function ($stackPos) { + $this->semValue = null; + }, + 511 => function ($stackPos) { + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + }, + 512 => function ($stackPos) { + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + }, + 513 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(1-1)]); + }, + 514 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); + }, + 515 => function ($stackPos) { + $this->semValue = new Scalar\EncapsedStringPart($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 516 => function ($stackPos) { + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 517 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 518 => function ($stackPos) { + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + }, 519 => function ($stackPos) { - $this->semValue = new Scalar\String_($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 520 => function ($stackPos) { - $this->semValue = $this->parseNumString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 521 => function ($stackPos) { - $this->semValue = $this->parseNumString('-' . $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 522 => function ($stackPos) { + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-4)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); + }, + 523 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(3-2)]; + }, + 524 => function ($stackPos) { + $this->semValue = new Scalar\String_($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 525 => function ($stackPos) { + $this->semValue = $this->parseNumString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 526 => function ($stackPos) { + $this->semValue = $this->parseNumString('-' . $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 527 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, ]; diff --git a/vendor/nikic/php-parser/lib/PhpParser/Parser/Tokens.php b/vendor/nikic/php-parser/lib/PhpParser/Parser/Tokens.php index 861663fa..50c5bf57 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Parser/Tokens.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Parser/Tokens.php @@ -30,115 +30,117 @@ final class Tokens const T_SL_EQUAL = 278; const T_SR_EQUAL = 279; const T_POW_EQUAL = 280; - const T_COALESCE = 281; - const T_BOOLEAN_OR = 282; - const T_BOOLEAN_AND = 283; - const T_IS_EQUAL = 284; - const T_IS_NOT_EQUAL = 285; - const T_IS_IDENTICAL = 286; - const T_IS_NOT_IDENTICAL = 287; - const T_SPACESHIP = 288; - const T_IS_SMALLER_OR_EQUAL = 289; - const T_IS_GREATER_OR_EQUAL = 290; - const T_SL = 291; - const T_SR = 292; - const T_INSTANCEOF = 293; - const T_INC = 294; - const T_DEC = 295; - const T_INT_CAST = 296; - const T_DOUBLE_CAST = 297; - const T_STRING_CAST = 298; - const T_ARRAY_CAST = 299; - const T_OBJECT_CAST = 300; - const T_BOOL_CAST = 301; - const T_UNSET_CAST = 302; - const T_POW = 303; - const T_NEW = 304; - const T_CLONE = 305; - const T_EXIT = 306; - const T_IF = 307; - const T_ELSEIF = 308; - const T_ELSE = 309; - const T_ENDIF = 310; - const T_LNUMBER = 311; - const T_DNUMBER = 312; - const T_STRING = 313; - const T_STRING_VARNAME = 314; - const T_VARIABLE = 315; - const T_NUM_STRING = 316; - const T_INLINE_HTML = 317; - const T_CHARACTER = 318; - const T_BAD_CHARACTER = 319; - const T_ENCAPSED_AND_WHITESPACE = 320; - const T_CONSTANT_ENCAPSED_STRING = 321; - const T_ECHO = 322; - const T_DO = 323; - const T_WHILE = 324; - const T_ENDWHILE = 325; - const T_FOR = 326; - const T_ENDFOR = 327; - const T_FOREACH = 328; - const T_ENDFOREACH = 329; - const T_DECLARE = 330; - const T_ENDDECLARE = 331; - const T_AS = 332; - const T_SWITCH = 333; - const T_ENDSWITCH = 334; - const T_CASE = 335; - const T_DEFAULT = 336; - const T_BREAK = 337; - const T_CONTINUE = 338; - const T_GOTO = 339; - const T_FUNCTION = 340; - const T_CONST = 341; - const T_RETURN = 342; - const T_TRY = 343; - const T_CATCH = 344; - const T_FINALLY = 345; - const T_THROW = 346; - const T_USE = 347; - const T_INSTEADOF = 348; - const T_GLOBAL = 349; - const T_STATIC = 350; - const T_ABSTRACT = 351; - const T_FINAL = 352; - const T_PRIVATE = 353; - const T_PROTECTED = 354; - const T_PUBLIC = 355; - const T_VAR = 356; - const T_UNSET = 357; - const T_ISSET = 358; - const T_EMPTY = 359; - const T_HALT_COMPILER = 360; - const T_CLASS = 361; - const T_TRAIT = 362; - const T_INTERFACE = 363; - const T_EXTENDS = 364; - const T_IMPLEMENTS = 365; - const T_OBJECT_OPERATOR = 366; - const T_LIST = 367; - const T_ARRAY = 368; - const T_CALLABLE = 369; - const T_CLASS_C = 370; - const T_TRAIT_C = 371; - const T_METHOD_C = 372; - const T_FUNC_C = 373; - const T_LINE = 374; - const T_FILE = 375; - const T_COMMENT = 376; - const T_DOC_COMMENT = 377; - const T_OPEN_TAG = 378; - const T_OPEN_TAG_WITH_ECHO = 379; - const T_CLOSE_TAG = 380; - const T_WHITESPACE = 381; - const T_START_HEREDOC = 382; - const T_END_HEREDOC = 383; - const T_DOLLAR_OPEN_CURLY_BRACES = 384; - const T_CURLY_OPEN = 385; - const T_PAAMAYIM_NEKUDOTAYIM = 386; - const T_NAMESPACE = 387; - const T_NS_C = 388; - const T_DIR = 389; - const T_NS_SEPARATOR = 390; - const T_ELLIPSIS = 391; + const T_COALESCE_EQUAL = 281; + const T_COALESCE = 282; + const T_BOOLEAN_OR = 283; + const T_BOOLEAN_AND = 284; + const T_IS_EQUAL = 285; + const T_IS_NOT_EQUAL = 286; + const T_IS_IDENTICAL = 287; + const T_IS_NOT_IDENTICAL = 288; + const T_SPACESHIP = 289; + const T_IS_SMALLER_OR_EQUAL = 290; + const T_IS_GREATER_OR_EQUAL = 291; + const T_SL = 292; + const T_SR = 293; + const T_INSTANCEOF = 294; + const T_INC = 295; + const T_DEC = 296; + const T_INT_CAST = 297; + const T_DOUBLE_CAST = 298; + const T_STRING_CAST = 299; + const T_ARRAY_CAST = 300; + const T_OBJECT_CAST = 301; + const T_BOOL_CAST = 302; + const T_UNSET_CAST = 303; + const T_POW = 304; + const T_NEW = 305; + const T_CLONE = 306; + const T_EXIT = 307; + const T_IF = 308; + const T_ELSEIF = 309; + const T_ELSE = 310; + const T_ENDIF = 311; + const T_LNUMBER = 312; + const T_DNUMBER = 313; + const T_STRING = 314; + const T_STRING_VARNAME = 315; + const T_VARIABLE = 316; + const T_NUM_STRING = 317; + const T_INLINE_HTML = 318; + const T_CHARACTER = 319; + const T_BAD_CHARACTER = 320; + const T_ENCAPSED_AND_WHITESPACE = 321; + const T_CONSTANT_ENCAPSED_STRING = 322; + const T_ECHO = 323; + const T_DO = 324; + const T_WHILE = 325; + const T_ENDWHILE = 326; + const T_FOR = 327; + const T_ENDFOR = 328; + const T_FOREACH = 329; + const T_ENDFOREACH = 330; + const T_DECLARE = 331; + const T_ENDDECLARE = 332; + const T_AS = 333; + const T_SWITCH = 334; + const T_ENDSWITCH = 335; + const T_CASE = 336; + const T_DEFAULT = 337; + const T_BREAK = 338; + const T_CONTINUE = 339; + const T_GOTO = 340; + const T_FUNCTION = 341; + const T_FN = 342; + const T_CONST = 343; + const T_RETURN = 344; + const T_TRY = 345; + const T_CATCH = 346; + const T_FINALLY = 347; + const T_THROW = 348; + const T_USE = 349; + const T_INSTEADOF = 350; + const T_GLOBAL = 351; + const T_STATIC = 352; + const T_ABSTRACT = 353; + const T_FINAL = 354; + const T_PRIVATE = 355; + const T_PROTECTED = 356; + const T_PUBLIC = 357; + const T_VAR = 358; + const T_UNSET = 359; + const T_ISSET = 360; + const T_EMPTY = 361; + const T_HALT_COMPILER = 362; + const T_CLASS = 363; + const T_TRAIT = 364; + const T_INTERFACE = 365; + const T_EXTENDS = 366; + const T_IMPLEMENTS = 367; + const T_OBJECT_OPERATOR = 368; + const T_LIST = 369; + const T_ARRAY = 370; + const T_CALLABLE = 371; + const T_CLASS_C = 372; + const T_TRAIT_C = 373; + const T_METHOD_C = 374; + const T_FUNC_C = 375; + const T_LINE = 376; + const T_FILE = 377; + const T_COMMENT = 378; + const T_DOC_COMMENT = 379; + const T_OPEN_TAG = 380; + const T_OPEN_TAG_WITH_ECHO = 381; + const T_CLOSE_TAG = 382; + const T_WHITESPACE = 383; + const T_START_HEREDOC = 384; + const T_END_HEREDOC = 385; + const T_DOLLAR_OPEN_CURLY_BRACES = 386; + const T_CURLY_OPEN = 387; + const T_PAAMAYIM_NEKUDOTAYIM = 388; + const T_NAMESPACE = 389; + const T_NS_C = 390; + const T_DIR = 391; + const T_NS_SEPARATOR = 392; + const T_ELLIPSIS = 393; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/ParserAbstract.php b/vendor/nikic/php-parser/lib/PhpParser/ParserAbstract.php index 4d95a6f6..975e17c6 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/ParserAbstract.php +++ b/vendor/nikic/php-parser/lib/PhpParser/ParserAbstract.php @@ -839,6 +839,26 @@ abstract class ParserAbstract implements Parser } } + /** + * Create attributes for a zero-length node with the given start attributes. + * + * @param array $startAttributes + * @return array + */ + protected function createZeroLengthAttributes(array $startAttributes) { + $attributes = $startAttributes; + if (isset($startAttributes['startLine'])) { + $attributes['endLine'] = $startAttributes['startLine']; + } + if (isset($startAttributes['startTokenPos'])) { + $attributes['endTokenPos'] = $startAttributes['startTokenPos'] - 1; + } + if (isset($startAttributes['startFilePos'])) { + $attributes['endFilePos'] = $startAttributes['startFilePos'] - 1; + } + return $attributes; + } + protected function checkModifier($a, $b, $modifierPos) { // Jumping through some hoops here because verifyModifier() is also used elsewhere try { diff --git a/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinter/Standard.php b/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinter/Standard.php index 993d5f65..78ee7d00 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinter/Standard.php +++ b/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinter/Standard.php @@ -260,6 +260,10 @@ class Standard extends PrettyPrinterAbstract return $this->pInfixOp(AssignOp\Pow::class, $node->var, ' **= ', $node->expr); } + protected function pExpr_AssignOp_Coalesce(AssignOp\Coalesce $node) { + return $this->pInfixOp(AssignOp\Coalesce::class, $node->var, ' ??= ', $node->expr); + } + // Binary expressions protected function pExpr_BinaryOp_Plus(BinaryOp\Plus $node) { @@ -541,7 +545,9 @@ class Standard extends PrettyPrinterAbstract protected function pExpr_ArrayItem(Expr\ArrayItem $node) { return (null !== $node->key ? $this->p($node->key) . ' => ' : '') - . ($node->byRef ? '&' : '') . $this->p($node->value); + . ($node->byRef ? '&' : '') + . ($node->unpack ? '...' : '') + . $this->p($node->value); } protected function pExpr_ArrayDimFetch(Expr\ArrayDimFetch $node) { @@ -578,6 +584,15 @@ class Standard extends PrettyPrinterAbstract . ' {' . $this->pStmts($node->stmts) . $this->nl . '}'; } + protected function pExpr_ArrowFunction(Expr\ArrowFunction $node) { + return ($node->static ? 'static ' : '') + . 'fn' . ($node->byRef ? '&' : '') + . '(' . $this->pCommaSeparated($node->params) . ')' + . (null !== $node->returnType ? ': ' . $this->p($node->returnType) : '') + . ' => ' + . $this->p($node->expr); + } + protected function pExpr_ClosureUse(Expr\ClosureUse $node) { return ($node->byRef ? '&' : '') . $this->p($node->var); } diff --git a/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php b/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php index 0cf0637e..90f10c46 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php +++ b/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php @@ -9,7 +9,6 @@ use PhpParser\Node\Expr; use PhpParser\Node\Expr\AssignOp; use PhpParser\Node\Expr\BinaryOp; use PhpParser\Node\Expr\Cast; -use PhpParser\Node\Name; use PhpParser\Node\Scalar; use PhpParser\Node\Stmt; @@ -83,6 +82,7 @@ abstract class PrettyPrinterAbstract AssignOp\ShiftLeft::class => [160, 1], AssignOp\ShiftRight::class => [160, 1], AssignOp\Pow::class => [160, 1], + AssignOp\Coalesce::class => [160, 1], Expr\YieldFrom::class => [165, 1], Expr\Print_::class => [168, 1], BinaryOp\LogicalAnd::class => [170, -1], @@ -120,7 +120,7 @@ abstract class PrettyPrinterAbstract */ protected $removalMap; /** - * @var mixed[] Map from "{$node->getType()}->{$subNode}" to [$find, $extraLeft, $extraRight]. + * @var mixed[] Map from "{$node->getType()}->{$subNode}" to [$find, $beforeToken, $extraLeft, $extraRight]. * $find is an optional token after which the insertion occurs. $extraLeft/Right * are optionally added before/after the main insertions. */ @@ -130,6 +130,7 @@ abstract class PrettyPrinterAbstract * between elements of this list subnode. */ protected $listInsertionMap; + protected $emptyListInsertionMap; /** @var int[] Map from "{$node->getType()}->{$subNode}" to token before which the modifiers * should be reprinted. */ protected $modifierChangeMap; @@ -479,6 +480,7 @@ abstract class PrettyPrinterAbstract $this->initializeRemovalMap(); $this->initializeInsertionMap(); $this->initializeListInsertionMap(); + $this->initializeEmptyListInsertionMap(); $this->initializeModifierChangeMap(); $this->resetState(); @@ -487,7 +489,7 @@ abstract class PrettyPrinterAbstract $this->preprocessNodes($stmts); $pos = 0; - $result = $this->pArray($stmts, $origStmts, $pos, 0, 'stmts', null, "\n"); + $result = $this->pArray($stmts, $origStmts, $pos, 0, 'File', 'stmts', null); if (null !== $result) { $result .= $this->origTokens->getTokenCode($pos, count($origTokens), 0); } else { @@ -568,9 +570,8 @@ abstract class PrettyPrinterAbstract if (is_array($subNode) && is_array($origSubNode)) { // Array subnode changed, we might be able to reconstruct it $listResult = $this->pArray( - $subNode, $origSubNode, $pos, $indentAdjustment, $subNodeName, - $fixupInfo[$subNodeName] ?? null, - $this->listInsertionMap[$type . '->' . $subNodeName] ?? null + $subNode, $origSubNode, $pos, $indentAdjustment, $type, $subNodeName, + $fixupInfo[$subNodeName] ?? null ); if (null === $listResult) { return $this->pFallback($fallbackNode); @@ -689,18 +690,21 @@ abstract class PrettyPrinterAbstract * @param array $origNodes Original nodes * @param int $pos Current token position (updated by reference) * @param int $indentAdjustment Adjustment for indentation + * @param string $parentNodeType Type of the containing node. * @param string $subNodeName Name of array subnode. * @param null|int $fixup Fixup information for array item nodes - * @param null|string $insertStr Separator string to use for insertions * * @return null|string Result of pretty print or null if cannot preserve formatting */ protected function pArray( array $nodes, array $origNodes, int &$pos, int $indentAdjustment, - string $subNodeName, $fixup, $insertStr + string $parentNodeType, string $subNodeName, $fixup ) { $diff = $this->nodeListDiffer->diffWithReplacements($origNodes, $nodes); + $mapKey = $parentNodeType . '->' . $subNodeName; + $insertStr = $this->listInsertionMap[$mapKey] ?? null; + $beforeFirstKeepOrReplace = true; $delayedAdd = []; $lastElemIndentLevel = $this->indentLevel; @@ -873,8 +877,27 @@ abstract class PrettyPrinterAbstract } if (!empty($delayedAdd)) { - // TODO Handle insertion into empty list - return null; + if (!isset($this->emptyListInsertionMap[$mapKey])) { + return null; + } + + list($findToken, $extraLeft, $extraRight) = $this->emptyListInsertionMap[$mapKey]; + if (null !== $findToken) { + $insertPos = $this->origTokens->findRight($pos, $findToken) + 1; + $result .= $this->origTokens->getTokenCode($pos, $insertPos, $indentAdjustment); + $pos = $insertPos; + } + + $first = true; + $result .= $extraLeft; + foreach ($delayedAdd as $delayedAddNode) { + if (!$first) { + $result .= $insertStr; + } + $result .= $this->p($delayedAddNode, true); + $first = false; + } + $result .= $extraRight; } return $result; @@ -1157,7 +1180,7 @@ abstract class PrettyPrinterAbstract Expr\Assign::class, Expr\AssignRef::class, AssignOp\Plus::class, AssignOp\Minus::class, AssignOp\Mul::class, AssignOp\Div::class, AssignOp\Concat::class, AssignOp\Mod::class, AssignOp\BitwiseAnd::class, AssignOp\BitwiseOr::class, AssignOp\BitwiseXor::class, - AssignOp\ShiftLeft::class, AssignOp\ShiftRight::class, AssignOp\Pow::class, + AssignOp\ShiftLeft::class, AssignOp\ShiftRight::class, AssignOp\Pow::class, AssignOp\Coalesce::class ]; foreach ($assignOps as $assignOp) { $this->fixupMap[$assignOp] = [ @@ -1195,6 +1218,7 @@ abstract class PrettyPrinterAbstract $this->removalMap = [ 'Expr_ArrayDimFetch->dim' => $stripBoth, 'Expr_ArrayItem->key' => $stripDoubleArrow, + 'Expr_ArrowFunction->returnType' => $stripColon, 'Expr_Closure->returnType' => $stripColon, 'Expr_Exit->expr' => $stripBoth, 'Expr_Ternary->if' => $stripBoth, @@ -1228,9 +1252,11 @@ abstract class PrettyPrinterAbstract if ($this->insertionMap) return; // TODO: "yield" where both key and value are inserted doesn't work + // [$find, $beforeToken, $extraLeft, $extraRight] $this->insertionMap = [ 'Expr_ArrayDimFetch->dim' => ['[', false, null, null], 'Expr_ArrayItem->key' => [null, false, null, ' => '], + 'Expr_ArrowFunction->returnType' => [')', false, ' : ', null], 'Expr_Closure->returnType' => [')', false, ' : ', null], 'Expr_Ternary->if' => ['?', false, ' ', ' '], 'Expr_Yield->key' => [\T_YIELD, false, null, ' => '], @@ -1274,6 +1300,7 @@ abstract class PrettyPrinterAbstract // comma-separated lists 'Expr_Array->items' => ', ', + 'Expr_ArrowFunction->params' => ', ', 'Expr_Closure->params' => ', ', 'Expr_Closure->uses' => ', ', 'Expr_FuncCall->args' => ', ', @@ -1327,6 +1354,59 @@ abstract class PrettyPrinterAbstract 'Stmt_TraitUse->adaptations' => "\n", 'Stmt_TryCatch->stmts' => "\n", 'Stmt_While->stmts' => "\n", + + // dummy for top-level context + 'File->stmts' => "\n", + ]; + } + + protected function initializeEmptyListInsertionMap() { + if ($this->emptyListInsertionMap) return; + + // TODO Insertion into empty statement lists. + + // [$find, $extraLeft, $extraRight] + $this->emptyListInsertionMap = [ + 'Expr_ArrowFunction->params' => ['(', '', ''], + 'Expr_Closure->uses' => [')', ' use(', ')'], + 'Expr_Closure->params' => ['(', '', ''], + 'Expr_FuncCall->args' => ['(', '', ''], + 'Expr_MethodCall->args' => ['(', '', ''], + 'Expr_New->args' => ['(', '', ''], + 'Expr_PrintableNewAnonClass->args' => ['(', '', ''], + 'Expr_PrintableNewAnonClass->implements' => [null, ' implements ', ''], + 'Expr_StaticCall->args' => ['(', '', ''], + 'Stmt_Class->implements' => [null, ' implements ', ''], + 'Stmt_ClassMethod->params' => ['(', '', ''], + 'Stmt_Interface->extends' => [null, ' extends ', ''], + 'Stmt_Function->params' => ['(', '', ''], + + /* These cannot be empty to start with: + * Expr_Isset->vars + * Stmt_Catch->types + * Stmt_Const->consts + * Stmt_ClassConst->consts + * Stmt_Declare->declares + * Stmt_Echo->exprs + * Stmt_Global->vars + * Stmt_GroupUse->uses + * Stmt_Property->props + * Stmt_StaticVar->vars + * Stmt_TraitUse->traits + * Stmt_TraitUseAdaptation_Precedence->insteadof + * Stmt_Unset->vars + * Stmt_Use->uses + */ + + /* TODO + * Stmt_If->elseifs + * Stmt_TryCatch->catches + * Expr_Array->items + * Expr_List->items + * Stmt_For->init + * Stmt_For->cond + * Stmt_For->loop + */ ]; } diff --git a/vendor/nikic/php-parser/test/PhpParser/Builder/ClassTest.php b/vendor/nikic/php-parser/test/PhpParser/Builder/ClassTest.php index 27d911b0..2cfa7872 100644 --- a/vendor/nikic/php-parser/test/PhpParser/Builder/ClassTest.php +++ b/vendor/nikic/php-parser/test/PhpParser/Builder/ClassTest.php @@ -6,9 +6,8 @@ use PhpParser\Comment; use PhpParser\Node; use PhpParser\Node\Name; use PhpParser\Node\Stmt; -use PHPUnit\Framework\TestCase; -class ClassTest extends TestCase +class ClassTest extends \PHPUnit\Framework\TestCase { protected function createClassBuilder($class) { return new Class_($class); diff --git a/vendor/nikic/php-parser/test/PhpParser/Builder/FunctionTest.php b/vendor/nikic/php-parser/test/PhpParser/Builder/FunctionTest.php index b7413e1f..c17045b8 100644 --- a/vendor/nikic/php-parser/test/PhpParser/Builder/FunctionTest.php +++ b/vendor/nikic/php-parser/test/PhpParser/Builder/FunctionTest.php @@ -8,9 +8,8 @@ use PhpParser\Node\Expr\Print_; use PhpParser\Node\Expr\Variable; use PhpParser\Node\Scalar\String_; use PhpParser\Node\Stmt; -use PHPUnit\Framework\TestCase; -class FunctionTest extends TestCase +class FunctionTest extends \PHPUnit\Framework\TestCase { public function createFunctionBuilder($name) { return new Function_($name); diff --git a/vendor/nikic/php-parser/test/PhpParser/Builder/InterfaceTest.php b/vendor/nikic/php-parser/test/PhpParser/Builder/InterfaceTest.php index 3ea3533c..7f7f56a2 100644 --- a/vendor/nikic/php-parser/test/PhpParser/Builder/InterfaceTest.php +++ b/vendor/nikic/php-parser/test/PhpParser/Builder/InterfaceTest.php @@ -6,9 +6,8 @@ use PhpParser\Comment; use PhpParser\Node; use PhpParser\Node\Scalar\DNumber; use PhpParser\Node\Stmt; -use PHPUnit\Framework\TestCase; -class InterfaceTest extends TestCase +class InterfaceTest extends \PHPUnit\Framework\TestCase { /** @var Interface_ */ protected $builder; diff --git a/vendor/nikic/php-parser/test/PhpParser/Builder/MethodTest.php b/vendor/nikic/php-parser/test/PhpParser/Builder/MethodTest.php index 14196790..529f0354 100644 --- a/vendor/nikic/php-parser/test/PhpParser/Builder/MethodTest.php +++ b/vendor/nikic/php-parser/test/PhpParser/Builder/MethodTest.php @@ -8,9 +8,8 @@ use PhpParser\Node\Expr\Print_; use PhpParser\Node\Expr\Variable; use PhpParser\Node\Scalar\String_; use PhpParser\Node\Stmt; -use PHPUnit\Framework\TestCase; -class MethodTest extends TestCase +class MethodTest extends \PHPUnit\Framework\TestCase { public function createMethodBuilder($name) { return new Method($name); diff --git a/vendor/nikic/php-parser/test/PhpParser/Builder/NamespaceTest.php b/vendor/nikic/php-parser/test/PhpParser/Builder/NamespaceTest.php index b8dce39c..689001bc 100644 --- a/vendor/nikic/php-parser/test/PhpParser/Builder/NamespaceTest.php +++ b/vendor/nikic/php-parser/test/PhpParser/Builder/NamespaceTest.php @@ -5,9 +5,8 @@ namespace PhpParser\Builder; use PhpParser\Comment\Doc; use PhpParser\Node; use PhpParser\Node\Stmt; -use PHPUnit\Framework\TestCase; -class NamespaceTest extends TestCase +class NamespaceTest extends \PHPUnit\Framework\TestCase { protected function createNamespaceBuilder($fqn) { return new Namespace_($fqn); diff --git a/vendor/nikic/php-parser/test/PhpParser/Builder/ParamTest.php b/vendor/nikic/php-parser/test/PhpParser/Builder/ParamTest.php index 9ed283b7..c9cbfcac 100644 --- a/vendor/nikic/php-parser/test/PhpParser/Builder/ParamTest.php +++ b/vendor/nikic/php-parser/test/PhpParser/Builder/ParamTest.php @@ -5,9 +5,8 @@ namespace PhpParser\Builder; use PhpParser\Node; use PhpParser\Node\Expr; use PhpParser\Node\Scalar; -use PHPUnit\Framework\TestCase; -class ParamTest extends TestCase +class ParamTest extends \PHPUnit\Framework\TestCase { public function createParamBuilder($name) { return new Param($name); diff --git a/vendor/nikic/php-parser/test/PhpParser/Builder/PropertyTest.php b/vendor/nikic/php-parser/test/PhpParser/Builder/PropertyTest.php index d7a5a70e..a15cd43c 100644 --- a/vendor/nikic/php-parser/test/PhpParser/Builder/PropertyTest.php +++ b/vendor/nikic/php-parser/test/PhpParser/Builder/PropertyTest.php @@ -7,9 +7,8 @@ use PhpParser\Node\Expr; use PhpParser\Node\Name; use PhpParser\Node\Scalar; use PhpParser\Node\Stmt; -use PHPUnit\Framework\TestCase; -class PropertyTest extends TestCase +class PropertyTest extends \PHPUnit\Framework\TestCase { public function createPropertyBuilder($name) { return new Property($name); diff --git a/vendor/nikic/php-parser/test/PhpParser/Builder/TraitTest.php b/vendor/nikic/php-parser/test/PhpParser/Builder/TraitTest.php index 31535b2c..4d99ef88 100644 --- a/vendor/nikic/php-parser/test/PhpParser/Builder/TraitTest.php +++ b/vendor/nikic/php-parser/test/PhpParser/Builder/TraitTest.php @@ -5,9 +5,8 @@ namespace PhpParser\Builder; use PhpParser\Comment; use PhpParser\Node\Name; use PhpParser\Node\Stmt; -use PHPUnit\Framework\TestCase; -class TraitTest extends TestCase +class TraitTest extends \PHPUnit\Framework\TestCase { protected function createTraitBuilder($class) { return new Trait_($class); diff --git a/vendor/nikic/php-parser/test/PhpParser/Builder/TraitUseAdaptationTest.php b/vendor/nikic/php-parser/test/PhpParser/Builder/TraitUseAdaptationTest.php index 18f00b9d..4961ccfa 100644 --- a/vendor/nikic/php-parser/test/PhpParser/Builder/TraitUseAdaptationTest.php +++ b/vendor/nikic/php-parser/test/PhpParser/Builder/TraitUseAdaptationTest.php @@ -2,14 +2,11 @@ namespace PhpParser\Builder; -use PhpParser\Comment; -use PhpParser\Node; use PhpParser\Node\Name; use PhpParser\Node\Stmt; use PhpParser\Node\Stmt\Class_; -use PHPUnit\Framework\TestCase; -class TraitUseAdaptationTest extends TestCase +class TraitUseAdaptationTest extends \PHPUnit\Framework\TestCase { protected function createTraitUseAdaptationBuilder($trait, $method) { return new TraitUseAdaptation($trait, $method); diff --git a/vendor/nikic/php-parser/test/PhpParser/Builder/TraitUseTest.php b/vendor/nikic/php-parser/test/PhpParser/Builder/TraitUseTest.php index ec4e9400..8d20dfbd 100644 --- a/vendor/nikic/php-parser/test/PhpParser/Builder/TraitUseTest.php +++ b/vendor/nikic/php-parser/test/PhpParser/Builder/TraitUseTest.php @@ -2,13 +2,10 @@ namespace PhpParser\Builder; -use PhpParser\Comment; -use PhpParser\Node; use PhpParser\Node\Name; use PhpParser\Node\Stmt; -use PHPUnit\Framework\TestCase; -class TraitUseTest extends TestCase +class TraitUseTest extends \PHPUnit\Framework\TestCase { protected function createTraitUseBuilder(...$traits) { return new TraitUse(...$traits); diff --git a/vendor/nikic/php-parser/test/PhpParser/Builder/UseTest.php b/vendor/nikic/php-parser/test/PhpParser/Builder/UseTest.php index 54ede584..f17da59b 100644 --- a/vendor/nikic/php-parser/test/PhpParser/Builder/UseTest.php +++ b/vendor/nikic/php-parser/test/PhpParser/Builder/UseTest.php @@ -1,11 +1,12 @@ hasColumnInfo()) { return $e->getMessageWithColumnInfo($code); - } else { - return $e->getMessage(); } + + return $e->getMessage(); } private function checkAttributes($stmts) { diff --git a/vendor/nikic/php-parser/test/PhpParser/CodeTestAbstract.php b/vendor/nikic/php-parser/test/PhpParser/CodeTestAbstract.php index 5eaf9d1b..f5f40875 100644 --- a/vendor/nikic/php-parser/test/PhpParser/CodeTestAbstract.php +++ b/vendor/nikic/php-parser/test/PhpParser/CodeTestAbstract.php @@ -2,11 +2,7 @@ namespace PhpParser; -use PHPUnit\Framework\TestCase; - -require_once __DIR__ . '/CodeTestParser.php'; - -abstract class CodeTestAbstract extends TestCase +abstract class CodeTestAbstract extends \PHPUnit\Framework\TestCase { protected function getTests($directory, $fileExtension, $chunksPerTest = 2) { $parser = new CodeTestParser; diff --git a/vendor/nikic/php-parser/test/PhpParser/CommentTest.php b/vendor/nikic/php-parser/test/PhpParser/CommentTest.php index 7b6c2aab..409841aa 100644 --- a/vendor/nikic/php-parser/test/PhpParser/CommentTest.php +++ b/vendor/nikic/php-parser/test/PhpParser/CommentTest.php @@ -2,9 +2,7 @@ namespace PhpParser; -use PHPUnit\Framework\TestCase; - -class CommentTest extends TestCase +class CommentTest extends \PHPUnit\Framework\TestCase { public function testGetSet() { $comment = new Comment('/* Some comment */', 1, 10, 2); diff --git a/vendor/nikic/php-parser/test/PhpParser/ConstExprEvaluatorTest.php b/vendor/nikic/php-parser/test/PhpParser/ConstExprEvaluatorTest.php index 7cd56b5b..02d992e5 100644 --- a/vendor/nikic/php-parser/test/PhpParser/ConstExprEvaluatorTest.php +++ b/vendor/nikic/php-parser/test/PhpParser/ConstExprEvaluatorTest.php @@ -4,9 +4,8 @@ namespace PhpParser; use PhpParser\Node\Expr; use PhpParser\Node\Scalar; -use PHPUnit\Framework\TestCase; -class ConstExprEvaluatorTest extends TestCase +class ConstExprEvaluatorTest extends \PHPUnit\Framework\TestCase { /** @dataProvider provideTestEvaluate */ public function testEvaluate($exprString, $expected) { diff --git a/vendor/nikic/php-parser/test/PhpParser/ErrorHandler/CollectingTest.php b/vendor/nikic/php-parser/test/PhpParser/ErrorHandler/CollectingTest.php index 842f131d..a20101a8 100644 --- a/vendor/nikic/php-parser/test/PhpParser/ErrorHandler/CollectingTest.php +++ b/vendor/nikic/php-parser/test/PhpParser/ErrorHandler/CollectingTest.php @@ -3,9 +3,8 @@ namespace PhpParser\ErrorHandler; use PhpParser\Error; -use PHPUnit\Framework\TestCase; -class CollectingTest extends TestCase +class CollectingTest extends \PHPUnit\Framework\TestCase { public function testHandleError() { $errorHandler = new Collecting(); diff --git a/vendor/nikic/php-parser/test/PhpParser/ErrorHandler/ThrowingTest.php b/vendor/nikic/php-parser/test/PhpParser/ErrorHandler/ThrowingTest.php index 8735be8c..be641ec7 100644 --- a/vendor/nikic/php-parser/test/PhpParser/ErrorHandler/ThrowingTest.php +++ b/vendor/nikic/php-parser/test/PhpParser/ErrorHandler/ThrowingTest.php @@ -3,9 +3,8 @@ namespace PhpParser\ErrorHandler; use PhpParser\Error; -use PHPUnit\Framework\TestCase; -class ThrowingTest extends TestCase +class ThrowingTest extends \PHPUnit\Framework\TestCase { public function testHandleError() { $this->expectException(Error::class); diff --git a/vendor/nikic/php-parser/test/PhpParser/ErrorTest.php b/vendor/nikic/php-parser/test/PhpParser/ErrorTest.php index 07a3288f..cc2d3fa5 100644 --- a/vendor/nikic/php-parser/test/PhpParser/ErrorTest.php +++ b/vendor/nikic/php-parser/test/PhpParser/ErrorTest.php @@ -2,9 +2,7 @@ namespace PhpParser; -use PHPUnit\Framework\TestCase; - -class ErrorTest extends TestCase +class ErrorTest extends \PHPUnit\Framework\TestCase { public function testConstruct() { $attributes = [ diff --git a/vendor/nikic/php-parser/test/PhpParser/Internal/DifferTest.php b/vendor/nikic/php-parser/test/PhpParser/Internal/DifferTest.php index 0cf878b6..6fac3fd3 100644 --- a/vendor/nikic/php-parser/test/PhpParser/Internal/DifferTest.php +++ b/vendor/nikic/php-parser/test/PhpParser/Internal/DifferTest.php @@ -2,9 +2,7 @@ namespace PhpParser\Internal; -use PHPUnit\Framework\TestCase; - -class DifferTest extends TestCase +class DifferTest extends \PHPUnit\Framework\TestCase { private function formatDiffString(array $diff) { $diffStr = ''; diff --git a/vendor/nikic/php-parser/test/PhpParser/JsonDecoderTest.php b/vendor/nikic/php-parser/test/PhpParser/JsonDecoderTest.php index 7ef60787..d5cb0597 100644 --- a/vendor/nikic/php-parser/test/PhpParser/JsonDecoderTest.php +++ b/vendor/nikic/php-parser/test/PhpParser/JsonDecoderTest.php @@ -2,9 +2,7 @@ namespace PhpParser; -use PHPUnit\Framework\TestCase; - -class JsonDecoderTest extends TestCase +class JsonDecoderTest extends \PHPUnit\Framework\TestCase { public function testRoundTrip() { $code = <<<'PHP' diff --git a/vendor/nikic/php-parser/test/PhpParser/Lexer/EmulativeTest.php b/vendor/nikic/php-parser/test/PhpParser/Lexer/EmulativeTest.php index 533547ae..a53c379b 100644 --- a/vendor/nikic/php-parser/test/PhpParser/Lexer/EmulativeTest.php +++ b/vendor/nikic/php-parser/test/PhpParser/Lexer/EmulativeTest.php @@ -6,8 +6,6 @@ use PhpParser\ErrorHandler; use PhpParser\LexerTest; use PhpParser\Parser\Tokens; -require_once __DIR__ . '/../LexerTest.php'; - class EmulativeTest extends LexerTest { protected function getLexer(array $options = []) { @@ -28,7 +26,7 @@ class EmulativeTest extends LexerTest /** * @dataProvider provideTestReplaceKeywords */ - public function testNoReplaceKeywordsAfterObjectOperator($keyword) { + public function testNoReplaceKeywordsAfterObjectOperator(string $keyword) { $lexer = $this->getLexer(); $lexer->startLexing('' . $keyword); @@ -37,8 +35,23 @@ class EmulativeTest extends LexerTest $this->assertSame(0, $lexer->getNextToken()); } + /** + * @dataProvider provideTestReplaceKeywords + */ + public function testNoReplaceKeywordsAfterObjectOperatorWithSpaces(string $keyword) { + $lexer = $this->getLexer(); + $lexer->startLexing(' ' . $keyword); + + $this->assertSame(Tokens::T_OBJECT_OPERATOR, $lexer->getNextToken()); + $this->assertSame(Tokens::T_STRING, $lexer->getNextToken()); + $this->assertSame(0, $lexer->getNextToken()); + } + public function provideTestReplaceKeywords() { return [ + // PHP 7.4 + ['fn', Tokens::T_FN], + // PHP 5.5 ['finally', Tokens::T_FINALLY], ['yield', Tokens::T_YIELD], @@ -90,7 +103,7 @@ class EmulativeTest extends LexerTest */ public function testErrorAfterEmulation($code) { $errorHandler = new ErrorHandler\Collecting; - $lexer = $this->getLexer([]); + $lexer = $this->getLexer(); $lexer->startLexing('getErrors(); @@ -110,6 +123,10 @@ class EmulativeTest extends LexerTest public function provideTestLexNewFeatures() { return [ + // PHP 7.4 + ['??=', [ + [Tokens::T_COALESCE_EQUAL, '??='], + ]], ['yield from', [ [Tokens::T_YIELD_FROM, 'yield from'], ]], diff --git a/vendor/nikic/php-parser/test/PhpParser/LexerTest.php b/vendor/nikic/php-parser/test/PhpParser/LexerTest.php index 99ed68a3..f24c64d5 100644 --- a/vendor/nikic/php-parser/test/PhpParser/LexerTest.php +++ b/vendor/nikic/php-parser/test/PhpParser/LexerTest.php @@ -3,9 +3,8 @@ namespace PhpParser; use PhpParser\Parser\Tokens; -use PHPUnit\Framework\TestCase; -class LexerTest extends TestCase +class LexerTest extends \PHPUnit\Framework\TestCase { /* To allow overwriting in parent class */ protected function getLexer(array $options = []) { diff --git a/vendor/nikic/php-parser/test/PhpParser/NameContextTest.php b/vendor/nikic/php-parser/test/PhpParser/NameContextTest.php index 41c3460d..ee8458b6 100644 --- a/vendor/nikic/php-parser/test/PhpParser/NameContextTest.php +++ b/vendor/nikic/php-parser/test/PhpParser/NameContextTest.php @@ -4,9 +4,8 @@ namespace PhpParser; use PhpParser\Node\Name; use PhpParser\Node\Stmt\Use_; -use PHPUnit\Framework\TestCase; -class NameContextTest extends TestCase +class NameContextTest extends \PHPUnit\Framework\TestCase { /** * @dataProvider provideTestGetPossibleNames diff --git a/vendor/nikic/php-parser/test/PhpParser/Node/IdentifierTest.php b/vendor/nikic/php-parser/test/PhpParser/Node/IdentifierTest.php index fa2e72a8..2bd58fc8 100644 --- a/vendor/nikic/php-parser/test/PhpParser/Node/IdentifierTest.php +++ b/vendor/nikic/php-parser/test/PhpParser/Node/IdentifierTest.php @@ -2,9 +2,7 @@ namespace PhpParser\Node; -use PHPUnit\Framework\TestCase; - -class IdentifierTest extends TestCase +class IdentifierTest extends \PHPUnit\Framework\TestCase { public function testToString() { $identifier = new Identifier('Foo'); diff --git a/vendor/nikic/php-parser/test/PhpParser/Node/NameTest.php b/vendor/nikic/php-parser/test/PhpParser/Node/NameTest.php index bf7d7967..5e69ebba 100644 --- a/vendor/nikic/php-parser/test/PhpParser/Node/NameTest.php +++ b/vendor/nikic/php-parser/test/PhpParser/Node/NameTest.php @@ -2,9 +2,7 @@ namespace PhpParser\Node; -use PHPUnit\Framework\TestCase; - -class NameTest extends TestCase +class NameTest extends \PHPUnit\Framework\TestCase { public function testConstruct() { $name = new Name(['foo', 'bar']); diff --git a/vendor/nikic/php-parser/test/PhpParser/Node/Scalar/MagicConstTest.php b/vendor/nikic/php-parser/test/PhpParser/Node/Scalar/MagicConstTest.php index 42b94874..c8ae433b 100644 --- a/vendor/nikic/php-parser/test/PhpParser/Node/Scalar/MagicConstTest.php +++ b/vendor/nikic/php-parser/test/PhpParser/Node/Scalar/MagicConstTest.php @@ -2,9 +2,7 @@ namespace PhpParser\Node\Scalar; -use PHPUnit\Framework\TestCase; - -class MagicConstTest extends TestCase +class MagicConstTest extends \PHPUnit\Framework\TestCase { /** * @dataProvider provideTestGetName diff --git a/vendor/nikic/php-parser/test/PhpParser/Node/Scalar/StringTest.php b/vendor/nikic/php-parser/test/PhpParser/Node/Scalar/StringTest.php index d7629f35..814a7758 100644 --- a/vendor/nikic/php-parser/test/PhpParser/Node/Scalar/StringTest.php +++ b/vendor/nikic/php-parser/test/PhpParser/Node/Scalar/StringTest.php @@ -2,9 +2,7 @@ namespace PhpParser\Node\Scalar; -use PHPUnit\Framework\TestCase; - -class StringTest extends TestCase +class StringTest extends \PHPUnit\Framework\TestCase { /** * @dataProvider provideTestParseEscapeSequences diff --git a/vendor/nikic/php-parser/test/PhpParser/Node/Stmt/ClassConstTest.php b/vendor/nikic/php-parser/test/PhpParser/Node/Stmt/ClassConstTest.php index a5b6ce46..9a1b4697 100644 --- a/vendor/nikic/php-parser/test/PhpParser/Node/Stmt/ClassConstTest.php +++ b/vendor/nikic/php-parser/test/PhpParser/Node/Stmt/ClassConstTest.php @@ -2,9 +2,7 @@ namespace PhpParser\Node\Stmt; -use PHPUnit\Framework\TestCase; - -class ClassConstTest extends TestCase +class ClassConstTest extends \PHPUnit\Framework\TestCase { /** * @dataProvider provideModifiers diff --git a/vendor/nikic/php-parser/test/PhpParser/Node/Stmt/ClassMethodTest.php b/vendor/nikic/php-parser/test/PhpParser/Node/Stmt/ClassMethodTest.php index 4000495e..51c5f1c2 100644 --- a/vendor/nikic/php-parser/test/PhpParser/Node/Stmt/ClassMethodTest.php +++ b/vendor/nikic/php-parser/test/PhpParser/Node/Stmt/ClassMethodTest.php @@ -5,9 +5,8 @@ namespace PhpParser\Node\Stmt; use PhpParser\Node\Expr\Variable; use PhpParser\Node\Name; use PhpParser\Node\Param; -use PHPUnit\Framework\TestCase; -class ClassMethodTest extends TestCase +class ClassMethodTest extends \PHPUnit\Framework\TestCase { /** * @dataProvider provideModifiers diff --git a/vendor/nikic/php-parser/test/PhpParser/Node/Stmt/ClassTest.php b/vendor/nikic/php-parser/test/PhpParser/Node/Stmt/ClassTest.php index 5d2b5dc0..9b7c7de1 100644 --- a/vendor/nikic/php-parser/test/PhpParser/Node/Stmt/ClassTest.php +++ b/vendor/nikic/php-parser/test/PhpParser/Node/Stmt/ClassTest.php @@ -2,9 +2,7 @@ namespace PhpParser\Node\Stmt; -use PHPUnit\Framework\TestCase; - -class ClassTest extends TestCase +class ClassTest extends \PHPUnit\Framework\TestCase { public function testIsAbstract() { $class = new Class_('Foo', ['type' => Class_::MODIFIER_ABSTRACT]); diff --git a/vendor/nikic/php-parser/test/PhpParser/Node/Stmt/InterfaceTest.php b/vendor/nikic/php-parser/test/PhpParser/Node/Stmt/InterfaceTest.php index e3e90e47..da6e8eb6 100644 --- a/vendor/nikic/php-parser/test/PhpParser/Node/Stmt/InterfaceTest.php +++ b/vendor/nikic/php-parser/test/PhpParser/Node/Stmt/InterfaceTest.php @@ -3,9 +3,8 @@ namespace PhpParser\Node\Stmt; use PhpParser\Node; -use PHPUnit\Framework\TestCase; -class InterfaceTest extends TestCase +class InterfaceTest extends \PHPUnit\Framework\TestCase { public function testGetMethods() { $methods = [ diff --git a/vendor/nikic/php-parser/test/PhpParser/Node/Stmt/PropertyTest.php b/vendor/nikic/php-parser/test/PhpParser/Node/Stmt/PropertyTest.php index 39387f96..e5d69fba 100644 --- a/vendor/nikic/php-parser/test/PhpParser/Node/Stmt/PropertyTest.php +++ b/vendor/nikic/php-parser/test/PhpParser/Node/Stmt/PropertyTest.php @@ -2,9 +2,7 @@ namespace PhpParser\Node\Stmt; -use PHPUnit\Framework\TestCase; - -class PropertyTest extends TestCase +class PropertyTest extends \PHPUnit\Framework\TestCase { /** * @dataProvider provideModifiers diff --git a/vendor/nikic/php-parser/test/PhpParser/NodeAbstractTest.php b/vendor/nikic/php-parser/test/PhpParser/NodeAbstractTest.php index c8c785db..071b8f2a 100644 --- a/vendor/nikic/php-parser/test/PhpParser/NodeAbstractTest.php +++ b/vendor/nikic/php-parser/test/PhpParser/NodeAbstractTest.php @@ -2,8 +2,6 @@ namespace PhpParser; -use PHPUnit\Framework\TestCase; - class DummyNode extends NodeAbstract { public $subNode1; @@ -25,7 +23,7 @@ class DummyNode extends NodeAbstract } } -class NodeAbstractTest extends TestCase +class NodeAbstractTest extends \PHPUnit\Framework\TestCase { public function provideNodes() { $attributes = [ diff --git a/vendor/nikic/php-parser/test/PhpParser/NodeDumperTest.php b/vendor/nikic/php-parser/test/PhpParser/NodeDumperTest.php index 9f887a7d..036c3d1e 100644 --- a/vendor/nikic/php-parser/test/PhpParser/NodeDumperTest.php +++ b/vendor/nikic/php-parser/test/PhpParser/NodeDumperTest.php @@ -2,9 +2,7 @@ namespace PhpParser; -use PHPUnit\Framework\TestCase; - -class NodeDumperTest extends TestCase +class NodeDumperTest extends \PHPUnit\Framework\TestCase { private function canonicalize($string) { return str_replace("\r\n", "\n", $string); @@ -55,6 +53,7 @@ class NodeDumperTest extends TestCase value: Foo ) byRef: false + unpack: false ) ) )' diff --git a/vendor/nikic/php-parser/test/PhpParser/NodeFinderTest.php b/vendor/nikic/php-parser/test/PhpParser/NodeFinderTest.php index daf42729..909738a7 100644 --- a/vendor/nikic/php-parser/test/PhpParser/NodeFinderTest.php +++ b/vendor/nikic/php-parser/test/PhpParser/NodeFinderTest.php @@ -3,9 +3,8 @@ namespace PhpParser; use PhpParser\Node\Expr; -use PHPUnit\Framework\TestCase; -class NodeFinderTest extends TestCase +class NodeFinderTest extends \PHPUnit\Framework\TestCase { private function getStmtsAndVars() { $assign = new Expr\Assign(new Expr\Variable('a'), new Expr\BinaryOp\Concat( diff --git a/vendor/nikic/php-parser/test/PhpParser/NodeTraverserTest.php b/vendor/nikic/php-parser/test/PhpParser/NodeTraverserTest.php index 4818457a..2daa9cea 100644 --- a/vendor/nikic/php-parser/test/PhpParser/NodeTraverserTest.php +++ b/vendor/nikic/php-parser/test/PhpParser/NodeTraverserTest.php @@ -4,10 +4,8 @@ namespace PhpParser; use PhpParser\Node\Expr; use PhpParser\Node\Scalar\String_; -use PhpParser\NodeVisitor; -use PHPUnit\Framework\TestCase; -class NodeTraverserTest extends TestCase +class NodeTraverserTest extends \PHPUnit\Framework\TestCase { public function testNonModifying() { $str1Node = new String_('Foo'); @@ -43,32 +41,32 @@ class NodeTraverserTest extends TestCase // replace empty statements with string1 node $visitor1->expects($this->at(0))->method('beforeTraverse')->with([]) - ->will($this->returnValue([$str1Node])); + ->willReturn([$str1Node]); $visitor2->expects($this->at(0))->method('beforeTraverse')->with([$str1Node]); // replace string1 node with print node $visitor1->expects($this->at(1))->method('enterNode')->with($str1Node) - ->will($this->returnValue($printNode)); + ->willReturn($printNode); $visitor2->expects($this->at(1))->method('enterNode')->with($printNode); // replace string1 node with string2 node $visitor1->expects($this->at(2))->method('enterNode')->with($str1Node) - ->will($this->returnValue($str2Node)); + ->willReturn($str2Node); $visitor2->expects($this->at(2))->method('enterNode')->with($str2Node); // replace string2 node with string1 node again $visitor1->expects($this->at(3))->method('leaveNode')->with($str2Node) - ->will($this->returnValue($str1Node)); + ->willReturn($str1Node); $visitor2->expects($this->at(3))->method('leaveNode')->with($str1Node); // replace print node with string1 node again $visitor1->expects($this->at(4))->method('leaveNode')->with($printNode) - ->will($this->returnValue($str1Node)); + ->willReturn($str1Node); $visitor2->expects($this->at(4))->method('leaveNode')->with($str1Node); // replace string1 node with empty statements again $visitor1->expects($this->at(5))->method('afterTraverse')->with([$str1Node]) - ->will($this->returnValue([])); + ->willReturn([]); $visitor2->expects($this->at(5))->method('afterTraverse')->with([]); $traverser = new NodeTraverser; @@ -87,7 +85,7 @@ class NodeTraverserTest extends TestCase // remove the string1 node, leave the string2 node $visitor->expects($this->at(2))->method('leaveNode')->with($str1Node) - ->will($this->returnValue(NodeTraverser::REMOVE_NODE)); + ->willReturn(NodeTraverser::REMOVE_NODE); $traverser = new NodeTraverser; $traverser->addVisitor($visitor); @@ -106,7 +104,7 @@ class NodeTraverserTest extends TestCase // replace strMiddle with strR1 and strR2 by merge $visitor->expects($this->at(4))->method('leaveNode')->with($strMiddle) - ->will($this->returnValue([$strR1, $strR2])); + ->willReturn([$strR1, $strR2]); $traverser = new NodeTraverser; $traverser->addVisitor($visitor); @@ -139,7 +137,7 @@ class NodeTraverserTest extends TestCase $visitor2 = $this->getMockBuilder(NodeVisitor::class)->getMock(); $visitor1->expects($this->at(1))->method('enterNode')->with($printNode) - ->will($this->returnValue(NodeTraverser::DONT_TRAVERSE_CHILDREN)); + ->willReturn(NodeTraverser::DONT_TRAVERSE_CHILDREN); $visitor2->expects($this->at(1))->method('enterNode')->with($printNode); $visitor1->expects($this->at(2))->method('leaveNode')->with($printNode); @@ -150,7 +148,7 @@ class NodeTraverserTest extends TestCase $visitor1->expects($this->at(4))->method('enterNode')->with($mulNode); $visitor2->expects($this->at(4))->method('enterNode')->with($mulNode) - ->will($this->returnValue(NodeTraverser::DONT_TRAVERSE_CHILDREN)); + ->willReturn(NodeTraverser::DONT_TRAVERSE_CHILDREN); $visitor1->expects($this->at(5))->method('leaveNode')->with($mulNode); $visitor2->expects($this->at(5))->method('leaveNode')->with($mulNode); @@ -179,14 +177,14 @@ class NodeTraverserTest extends TestCase $visitor2 = $this->getMockBuilder(NodeVisitor::class)->getMock(); $visitor1->expects($this->at(1))->method('enterNode')->with($printNode) - ->will($this->returnValue(NodeTraverser::DONT_TRAVERSE_CURRENT_AND_CHILDREN)); + ->willReturn(NodeTraverser::DONT_TRAVERSE_CURRENT_AND_CHILDREN); $visitor1->expects($this->at(2))->method('leaveNode')->with($printNode); $visitor1->expects($this->at(3))->method('enterNode')->with($negNode); $visitor2->expects($this->at(1))->method('enterNode')->with($negNode); $visitor1->expects($this->at(4))->method('enterNode')->with($mulNode) - ->will($this->returnValue(NodeTraverser::DONT_TRAVERSE_CURRENT_AND_CHILDREN)); + ->willReturn(NodeTraverser::DONT_TRAVERSE_CURRENT_AND_CHILDREN); $visitor1->expects($this->at(5))->method('leaveNode')->with($mulNode)->willReturn($divNode); $visitor1->expects($this->at(6))->method('leaveNode')->with($negNode); @@ -212,7 +210,7 @@ class NodeTraverserTest extends TestCase // From enterNode() with array parent $visitor = $this->getMockBuilder(NodeVisitor::class)->getMock(); $visitor->expects($this->at(1))->method('enterNode')->with($mulNode) - ->will($this->returnValue(NodeTraverser::STOP_TRAVERSAL)); + ->willReturn(NodeTraverser::STOP_TRAVERSAL); $visitor->expects($this->at(2))->method('afterTraverse'); $traverser = new NodeTraverser; $traverser->addVisitor($visitor); @@ -221,7 +219,7 @@ class NodeTraverserTest extends TestCase // From enterNode with Node parent $visitor = $this->getMockBuilder(NodeVisitor::class)->getMock(); $visitor->expects($this->at(2))->method('enterNode')->with($varNode1) - ->will($this->returnValue(NodeTraverser::STOP_TRAVERSAL)); + ->willReturn(NodeTraverser::STOP_TRAVERSAL); $visitor->expects($this->at(3))->method('afterTraverse'); $traverser = new NodeTraverser; $traverser->addVisitor($visitor); @@ -230,7 +228,7 @@ class NodeTraverserTest extends TestCase // From leaveNode with Node parent $visitor = $this->getMockBuilder(NodeVisitor::class)->getMock(); $visitor->expects($this->at(3))->method('leaveNode')->with($varNode1) - ->will($this->returnValue(NodeTraverser::STOP_TRAVERSAL)); + ->willReturn(NodeTraverser::STOP_TRAVERSAL); $visitor->expects($this->at(4))->method('afterTraverse'); $traverser = new NodeTraverser; $traverser->addVisitor($visitor); @@ -239,7 +237,7 @@ class NodeTraverserTest extends TestCase // From leaveNode with array parent $visitor = $this->getMockBuilder(NodeVisitor::class)->getMock(); $visitor->expects($this->at(6))->method('leaveNode')->with($mulNode) - ->will($this->returnValue(NodeTraverser::STOP_TRAVERSAL)); + ->willReturn(NodeTraverser::STOP_TRAVERSAL); $visitor->expects($this->at(7))->method('afterTraverse'); $traverser = new NodeTraverser; $traverser->addVisitor($visitor); @@ -248,9 +246,9 @@ class NodeTraverserTest extends TestCase // Check that pending array modifications are still carried out $visitor = $this->getMockBuilder(NodeVisitor::class)->getMock(); $visitor->expects($this->at(6))->method('leaveNode')->with($mulNode) - ->will($this->returnValue(NodeTraverser::REMOVE_NODE)); + ->willReturn(NodeTraverser::REMOVE_NODE); $visitor->expects($this->at(7))->method('enterNode')->with($printNode) - ->will($this->returnValue(NodeTraverser::STOP_TRAVERSAL)); + ->willReturn(NodeTraverser::STOP_TRAVERSAL); $visitor->expects($this->at(8))->method('afterTraverse'); $traverser = new NodeTraverser; $traverser->addVisitor($visitor); diff --git a/vendor/nikic/php-parser/test/PhpParser/NodeVisitor/FindingVisitorTest.php b/vendor/nikic/php-parser/test/PhpParser/NodeVisitor/FindingVisitorTest.php index 2e87600b..27cb6dd4 100644 --- a/vendor/nikic/php-parser/test/PhpParser/NodeVisitor/FindingVisitorTest.php +++ b/vendor/nikic/php-parser/test/PhpParser/NodeVisitor/FindingVisitorTest.php @@ -5,9 +5,8 @@ namespace PhpParser\NodeVisitor; use PhpParser\Node; use PhpParser\Node\Expr; use PhpParser\NodeTraverser; -use PHPUnit\Framework\TestCase; -class FindingVisitorTest extends TestCase +class FindingVisitorTest extends \PHPUnit\Framework\TestCase { public function testFindVariables() { $traverser = new NodeTraverser(); diff --git a/vendor/nikic/php-parser/test/PhpParser/NodeVisitor/FirstFindingVisitorTest.php b/vendor/nikic/php-parser/test/PhpParser/NodeVisitor/FirstFindingVisitorTest.php index 78bc1c7a..9ae8932f 100644 --- a/vendor/nikic/php-parser/test/PhpParser/NodeVisitor/FirstFindingVisitorTest.php +++ b/vendor/nikic/php-parser/test/PhpParser/NodeVisitor/FirstFindingVisitorTest.php @@ -5,9 +5,8 @@ namespace PhpParser\NodeVisitor; use PhpParser\Node; use PhpParser\Node\Expr; use PhpParser\NodeTraverser; -use PHPUnit\Framework\TestCase; -class FirstFindingVisitorTest extends TestCase +class FirstFindingVisitorTest extends \PHPUnit\Framework\TestCase { public function testFindFirstVariable() { $traverser = new NodeTraverser(); diff --git a/vendor/nikic/php-parser/test/PhpParser/NodeVisitor/NameResolverTest.php b/vendor/nikic/php-parser/test/PhpParser/NodeVisitor/NameResolverTest.php index 69438ca4..571eaaea 100644 --- a/vendor/nikic/php-parser/test/PhpParser/NodeVisitor/NameResolverTest.php +++ b/vendor/nikic/php-parser/test/PhpParser/NodeVisitor/NameResolverTest.php @@ -7,16 +7,15 @@ use PhpParser\Node; use PhpParser\Node\Expr; use PhpParser\Node\Name; use PhpParser\Node\Stmt; -use PHPUnit\Framework\TestCase; -class NameResolverTest extends TestCase +class NameResolverTest extends \PHPUnit\Framework\TestCase { private function canonicalize($string) { return str_replace("\r\n", "\n", $string); } /** - * @covers PhpParser\NodeVisitor\NameResolver + * @covers \PhpParser\NodeVisitor\NameResolver */ public function testResolveNames() { $code = <<<'EOC' @@ -194,7 +193,7 @@ EOC; } /** - * @covers PhpParser\NodeVisitor\NameResolver + * @covers \PhpParser\NodeVisitor\NameResolver */ public function testResolveLocations() { $code = <<<'EOC' @@ -213,8 +212,8 @@ interface A extends C, D { public function a(A $a) : A; } -function fn(A $a) : A {} -function fn2(array $a) : array {} +function f(A $a) : A {} +function f2(array $a) : array {} function(A $a) : A {}; function fn3(?A $a) : ?A {} @@ -250,10 +249,10 @@ interface A extends \NS\C, \NS\D { public function a(\NS\A $a) : \NS\A; } -function fn(\NS\A $a) : \NS\A +function f(\NS\A $a) : \NS\A { } -function fn2(array $a) : array +function f2(array $a) : array { } function (\NS\A $a) : \NS\A { diff --git a/vendor/nikic/php-parser/test/PhpParser/Parser/MultipleTest.php b/vendor/nikic/php-parser/test/PhpParser/Parser/MultipleTest.php index f7decb76..f89e7bf6 100644 --- a/vendor/nikic/php-parser/test/PhpParser/Parser/MultipleTest.php +++ b/vendor/nikic/php-parser/test/PhpParser/Parser/MultipleTest.php @@ -9,8 +9,6 @@ use PhpParser\Node\Scalar\LNumber; use PhpParser\Node\Stmt; use PhpParser\ParserTest; -require_once __DIR__ . '/../ParserTest.php'; - class MultipleTest extends ParserTest { // This provider is for the generic parser tests, just pick an arbitrary order here @@ -84,11 +82,11 @@ class MultipleTest extends ParserTest $parserA = $this->getMockBuilder(\PhpParser\Parser::class)->getMock(); $parserA->expects($this->at(0)) - ->method('parse')->will($this->throwException(new Error('FAIL A'))); + ->method('parse')->willThrowException(new Error('FAIL A')); $parserB = $this->getMockBuilder(\PhpParser\Parser::class)->getMock(); $parserB->expects($this->at(0)) - ->method('parse')->will($this->throwException(new Error('FAIL B'))); + ->method('parse')->willThrowException(new Error('FAIL B')); $parser = new Multiple([$parserA, $parserB]); $parser->parse('dummy'); diff --git a/vendor/nikic/php-parser/test/PhpParser/Parser/Php5Test.php b/vendor/nikic/php-parser/test/PhpParser/Parser/Php5Test.php index bb36a251..4386b512 100644 --- a/vendor/nikic/php-parser/test/PhpParser/Parser/Php5Test.php +++ b/vendor/nikic/php-parser/test/PhpParser/Parser/Php5Test.php @@ -5,8 +5,6 @@ namespace PhpParser\Parser; use PhpParser\Lexer; use PhpParser\ParserTest; -require_once __DIR__ . '/../ParserTest.php'; - class Php5Test extends ParserTest { protected function getParser(Lexer $lexer) { diff --git a/vendor/nikic/php-parser/test/PhpParser/Parser/Php7Test.php b/vendor/nikic/php-parser/test/PhpParser/Parser/Php7Test.php index e2e4b3a2..22a4c519 100644 --- a/vendor/nikic/php-parser/test/PhpParser/Parser/Php7Test.php +++ b/vendor/nikic/php-parser/test/PhpParser/Parser/Php7Test.php @@ -5,8 +5,6 @@ namespace PhpParser\Parser; use PhpParser\Lexer; use PhpParser\ParserTest; -require_once __DIR__ . '/../ParserTest.php'; - class Php7Test extends ParserTest { protected function getParser(Lexer $lexer) { diff --git a/vendor/nikic/php-parser/test/PhpParser/ParserFactoryTest.php b/vendor/nikic/php-parser/test/PhpParser/ParserFactoryTest.php index 2c3ea2b7..d50981f2 100644 --- a/vendor/nikic/php-parser/test/PhpParser/ParserFactoryTest.php +++ b/vendor/nikic/php-parser/test/PhpParser/ParserFactoryTest.php @@ -4,9 +4,8 @@ namespace PhpParser; /* This test is very weak, because PHPUnit's assertEquals assertion is way too slow dealing with the * large objects involved here. So we just do some basic instanceof tests instead. */ -use PHPUnit\Framework\TestCase; -class ParserFactoryTest extends TestCase +class ParserFactoryTest extends \PHPUnit\Framework\TestCase { /** @dataProvider provideTestCreate */ public function testCreate($kind, $lexer, $expected) { diff --git a/vendor/nikic/php-parser/test/PhpParser/ParserTest.php b/vendor/nikic/php-parser/test/PhpParser/ParserTest.php index 5bbee190..0f7f1b79 100644 --- a/vendor/nikic/php-parser/test/PhpParser/ParserTest.php +++ b/vendor/nikic/php-parser/test/PhpParser/ParserTest.php @@ -6,9 +6,8 @@ use PhpParser\Node\Expr; use PhpParser\Node\Scalar; use PhpParser\Node\Scalar\String_; use PhpParser\Node\Stmt; -use PHPUnit\Framework\TestCase; -abstract class ParserTest extends TestCase +abstract class ParserTest extends \PHPUnit\Framework\TestCase { /** @returns Parser */ abstract protected function getParser(Lexer $lexer); diff --git a/vendor/nikic/php-parser/test/PhpParser/PrettyPrinterTest.php b/vendor/nikic/php-parser/test/PhpParser/PrettyPrinterTest.php index d3c3f08a..e5b8a1ae 100644 --- a/vendor/nikic/php-parser/test/PhpParser/PrettyPrinterTest.php +++ b/vendor/nikic/php-parser/test/PhpParser/PrettyPrinterTest.php @@ -12,8 +12,6 @@ use PhpParser\Node\Scalar\String_; use PhpParser\Node\Stmt; use PhpParser\PrettyPrinter\Standard; -require_once __DIR__ . '/CodeTestAbstract.php'; - class PrettyPrinterTest extends CodeTestAbstract { protected function doTestPrettyPrintMethod($method, $name, $code, $expected, $modeLine) { diff --git a/vendor/nikic/php-parser/test/code/formatPreservation/array_spread.test b/vendor/nikic/php-parser/test/code/formatPreservation/array_spread.test new file mode 100644 index 00000000..ce83e165 --- /dev/null +++ b/vendor/nikic/php-parser/test/code/formatPreservation/array_spread.test @@ -0,0 +1,29 @@ +Array spread +----- +expr->expr; +$array->items[] = new Expr\ArrayItem(new Expr\Variable('b')); +----- +expr->expr; +$array->items[] = new Expr\ArrayItem(new Expr\Variable('c'), null, false, [], true); +----- + +$a; +----- +$stmts[0]->expr->expr = new Expr\Variable('b'); +----- + +$b; +----- + $a; +----- +$stmts[0]->expr->params[] = new Node\Param(new Expr\Variable('b')); +----- + $a; +----- + +$a; +----- +// TODO: Format preserving currently not supported +$stmts[0]->expr->params = []; +----- + $a; +----- + $a; +----- +$stmts[0]->expr->returnType = new Node\Identifier('bool'); +----- + $a; +----- + $a; +----- +$stmts[0]->expr->returnType = null; +----- + $a; +----- + $a; + +static fn($a) +: int +=> $a; +----- +// TODO: Format preserving currently not supported +$stmts[0]->expr->static = true; +$stmts[1]->expr->static = false; +----- + $a; + +fn($a): int => $a; +----- + $a; + +fn&($a) +: int +=> $a; +----- +// TODO: Format preserving currently not supported +$stmts[0]->expr->byRef = true; +$stmts[1]->expr->byRef = false; +----- + $a; + +fn($a): int => $a; diff --git a/vendor/nikic/php-parser/test/code/formatPreservation/emptyListInsertion.test b/vendor/nikic/php-parser/test/code/formatPreservation/emptyListInsertion.test new file mode 100644 index 00000000..ad3137bf --- /dev/null +++ b/vendor/nikic/php-parser/test/code/formatPreservation/emptyListInsertion.test @@ -0,0 +1,110 @@ +Inserting into an empty list +----- +implements[] = new Node\Name('Iface'); +$stmts[0]->implements[] = new Node\Name('Iface2'); +$stmts[1]->extends[] = new Node\Name('Iface'); +$stmts[1]->extends[] = new Node\Name('Iface2'); +----- + 42; +----- +$stmts[0]->params[] = new Node\Param(new Node\Expr\Variable('a')); +$stmts[0]->params[] = new Node\Param(new Node\Expr\Variable('b')); +$stmts[1]->stmts[0]->params[] = new Node\Param(new Node\Expr\Variable('a')); +$stmts[1]->stmts[0]->params[] = new Node\Param(new Node\Expr\Variable('b')); +$stmts[2]->expr->params[] = new Node\Param(new Node\Expr\Variable('a')); +$stmts[2]->expr->params[] = new Node\Param(new Node\Expr\Variable('b')); +$stmts[2]->expr->uses[] = new Node\Expr\Variable('c'); +$stmts[2]->expr->uses[] = new Node\Expr\Variable('d'); +$stmts[3]->expr->params[] = new Node\Param(new Node\Expr\Variable('a')); +$stmts[3]->expr->params[] = new Node\Param(new Node\Expr\Variable('b')); +----- + 42; +----- + +bar(); + +Foo +::bar (); + +new +Foo +(); + +new class +() +extends Foo {}; +----- +$stmts[0]->expr->args[] = new Node\Expr\Variable('a'); +$stmts[0]->expr->args[] = new Node\Expr\Variable('b'); +$stmts[1]->expr->args[] = new Node\Expr\Variable('a'); +$stmts[1]->expr->args[] = new Node\Expr\Variable('b'); +$stmts[2]->expr->args[] = new Node\Expr\Variable('a'); +$stmts[2]->expr->args[] = new Node\Expr\Variable('b'); +$stmts[3]->expr->args[] = new Node\Expr\Variable('a'); +$stmts[3]->expr->args[] = new Node\Expr\Variable('b'); +$stmts[4]->expr->args[] = new Node\Expr\Variable('a'); +$stmts[4]->expr->args[] = new Node\Expr\Variable('b'); +----- + +bar($a, $b); + +Foo +::bar ($a, $b); + +new +Foo +($a, $b); + +new class +($a, $b) +extends Foo {}; \ No newline at end of file diff --git a/vendor/nikic/php-parser/test/code/formatPreservation/listInsertion.test b/vendor/nikic/php-parser/test/code/formatPreservation/listInsertion.test index b23bfd58..9211958d 100644 --- a/vendor/nikic/php-parser/test/code/formatPreservation/listInsertion.test +++ b/vendor/nikic/php-parser/test/code/formatPreservation/listInsertion.test @@ -73,13 +73,10 @@ function test($param0, Foo $param1) {} function test() {} ----- $stmts[0]->params[] = new Node\Param(new Expr\Variable('param0')); -/* Insertion into empty list not handled yet */ ----- $a; +fn($x = 42) => $x; +static fn(&$x) => $x; +fn&($x) => $x; +fn($x, ...$rest) => $rest; +fn(): int => $x; +----- +!!php7 +array( + 0: Stmt_Expression( + expr: Expr_ArrowFunction( + static: false + byRef: false + params: array( + 0: Param( + type: Identifier( + name: bool + ) + byRef: false + variadic: false + var: Expr_Variable( + name: a + ) + default: null + ) + ) + returnType: null + expr: Expr_Variable( + name: a + ) + ) + ) + 1: Stmt_Expression( + expr: Expr_ArrowFunction( + static: false + byRef: false + params: array( + 0: Param( + type: null + byRef: false + variadic: false + var: Expr_Variable( + name: x + ) + default: Scalar_LNumber( + value: 42 + ) + ) + ) + returnType: null + expr: Expr_Variable( + name: x + ) + ) + ) + 2: Stmt_Expression( + expr: Expr_ArrowFunction( + static: true + byRef: false + params: array( + 0: Param( + type: null + byRef: true + variadic: false + var: Expr_Variable( + name: x + ) + default: null + ) + ) + returnType: null + expr: Expr_Variable( + name: x + ) + ) + ) + 3: Stmt_Expression( + expr: Expr_ArrowFunction( + static: false + byRef: true + params: array( + 0: Param( + type: null + byRef: false + variadic: false + var: Expr_Variable( + name: x + ) + default: null + ) + ) + returnType: null + expr: Expr_Variable( + name: x + ) + ) + ) + 4: Stmt_Expression( + expr: Expr_ArrowFunction( + static: false + byRef: false + params: array( + 0: Param( + type: null + byRef: false + variadic: false + var: Expr_Variable( + name: x + ) + default: null + ) + 1: Param( + type: null + byRef: false + variadic: true + var: Expr_Variable( + name: rest + ) + default: null + ) + ) + returnType: null + expr: Expr_Variable( + name: rest + ) + ) + ) + 5: Stmt_Expression( + expr: Expr_ArrowFunction( + static: false + byRef: false + params: array( + ) + returnType: Identifier( + name: int + ) + expr: Expr_Variable( + name: x + ) + ) + ) +) diff --git a/vendor/nikic/php-parser/test/code/parser/expr/assign.test b/vendor/nikic/php-parser/test/code/parser/expr/assign.test index 33335f89..423f48af 100644 --- a/vendor/nikic/php-parser/test/code/parser/expr/assign.test +++ b/vendor/nikic/php-parser/test/code/parser/expr/assign.test @@ -17,6 +17,7 @@ $a += $b; $a <<= $b; $a >>= $b; $a **= $b; +$a ??= $b; // chained assign $a = $b *= $c **= $d; @@ -185,6 +186,16 @@ array( ) ) 13: Stmt_Expression( + expr: Expr_AssignOp_Coalesce( + var: Expr_Variable( + name: a + ) + expr: Expr_Variable( + name: b + ) + ) + ) + 14: Stmt_Expression( expr: Expr_Assign( var: Expr_Variable( name: a @@ -213,7 +224,7 @@ array( 0: // chained assign ) ) - 14: Stmt_Expression( + 15: Stmt_Expression( expr: Expr_AssignRef( var: Expr_Variable( name: a @@ -232,7 +243,7 @@ array( 0: // by ref assign ) ) - 15: Stmt_Expression( + 16: Stmt_Expression( expr: Expr_Assign( var: Expr_List( items: array( @@ -242,6 +253,7 @@ array( name: a ) byRef: false + unpack: false ) ) comments: array( @@ -259,32 +271,6 @@ array( 0: // list() assign ) ) - 16: Stmt_Expression( - expr: Expr_Assign( - var: Expr_List( - items: array( - 0: Expr_ArrayItem( - key: null - value: Expr_Variable( - name: a - ) - byRef: false - ) - 1: null - 2: Expr_ArrayItem( - key: null - value: Expr_Variable( - name: b - ) - byRef: false - ) - ) - ) - expr: Expr_Variable( - name: c - ) - ) - ) 17: Stmt_Expression( expr: Expr_Assign( var: Expr_List( @@ -295,6 +281,35 @@ array( name: a ) byRef: false + unpack: false + ) + 1: null + 2: Expr_ArrayItem( + key: null + value: Expr_Variable( + name: b + ) + byRef: false + unpack: false + ) + ) + ) + expr: Expr_Variable( + name: c + ) + ) + ) + 18: Stmt_Expression( + expr: Expr_Assign( + var: Expr_List( + items: array( + 0: Expr_ArrayItem( + key: null + value: Expr_Variable( + name: a + ) + byRef: false + unpack: false ) 1: Expr_ArrayItem( key: null @@ -307,10 +322,12 @@ array( name: c ) byRef: false + unpack: false ) ) ) byRef: false + unpack: false ) 2: Expr_ArrayItem( key: null @@ -318,6 +335,7 @@ array( name: d ) byRef: false + unpack: false ) ) ) @@ -326,7 +344,7 @@ array( ) ) ) - 18: Stmt_Expression( + 19: Stmt_Expression( expr: Expr_PreInc( var: Expr_Variable( name: a @@ -339,21 +357,21 @@ array( 0: // inc/dec ) ) - 19: Stmt_Expression( + 20: Stmt_Expression( expr: Expr_PostInc( var: Expr_Variable( name: a ) ) ) - 20: Stmt_Expression( + 21: Stmt_Expression( expr: Expr_PreDec( var: Expr_Variable( name: a ) ) ) - 21: Stmt_Expression( + 22: Stmt_Expression( expr: Expr_PostDec( var: Expr_Variable( name: a diff --git a/vendor/nikic/php-parser/test/code/parser/expr/constant_expr.test b/vendor/nikic/php-parser/test/code/parser/expr/constant_expr.test index d774de71..0f9815f9 100644 --- a/vendor/nikic/php-parser/test/code/parser/expr/constant_expr.test +++ b/vendor/nikic/php-parser/test/code/parser/expr/constant_expr.test @@ -544,6 +544,7 @@ array( value: 1 ) byRef: false + unpack: false ) 1: Expr_ArrayItem( key: null @@ -551,6 +552,7 @@ array( value: 2 ) byRef: false + unpack: false ) 2: Expr_ArrayItem( key: null @@ -558,6 +560,7 @@ array( value: 3 ) byRef: false + unpack: false ) ) ) diff --git a/vendor/nikic/php-parser/test/code/parser/expr/fetchAndCall/constantDeref.test b/vendor/nikic/php-parser/test/code/parser/expr/fetchAndCall/constantDeref.test index 4d14c09a..557532f1 100644 --- a/vendor/nikic/php-parser/test/code/parser/expr/fetchAndCall/constantDeref.test +++ b/vendor/nikic/php-parser/test/code/parser/expr/fetchAndCall/constantDeref.test @@ -56,6 +56,7 @@ array( value: 1 ) byRef: false + unpack: false ) 1: Expr_ArrayItem( key: null @@ -63,6 +64,7 @@ array( value: 2 ) byRef: false + unpack: false ) 2: Expr_ArrayItem( key: null @@ -70,6 +72,7 @@ array( value: 3 ) byRef: false + unpack: false ) ) ) @@ -90,6 +93,7 @@ array( value: 1 ) byRef: false + unpack: false ) 1: Expr_ArrayItem( key: null @@ -97,6 +101,7 @@ array( value: 2 ) byRef: false + unpack: false ) 2: Expr_ArrayItem( key: null @@ -104,6 +109,7 @@ array( value: 3 ) byRef: false + unpack: false ) ) ) @@ -130,6 +136,7 @@ array( value: 1 ) byRef: false + unpack: false ) 1: Expr_ArrayItem( key: null @@ -137,6 +144,7 @@ array( value: 2 ) byRef: false + unpack: false ) 2: Expr_ArrayItem( key: null @@ -144,6 +152,7 @@ array( value: 3 ) byRef: false + unpack: false ) ) ) @@ -164,6 +173,7 @@ array( value: 1 ) byRef: false + unpack: false ) 1: Expr_ArrayItem( key: null @@ -171,6 +181,7 @@ array( value: 2 ) byRef: false + unpack: false ) 2: Expr_ArrayItem( key: null @@ -178,6 +189,7 @@ array( value: 3 ) byRef: false + unpack: false ) ) ) diff --git a/vendor/nikic/php-parser/test/code/parser/expr/issetAndEmpty.test b/vendor/nikic/php-parser/test/code/parser/expr/issetAndEmpty.test index cd074b1a..989b3a55 100644 --- a/vendor/nikic/php-parser/test/code/parser/expr/issetAndEmpty.test +++ b/vendor/nikic/php-parser/test/code/parser/expr/issetAndEmpty.test @@ -63,6 +63,7 @@ array( value: 1 ) byRef: false + unpack: false ) 1: Expr_ArrayItem( key: null @@ -70,6 +71,7 @@ array( value: 2 ) byRef: false + unpack: false ) 2: Expr_ArrayItem( key: null @@ -77,6 +79,7 @@ array( value: 3 ) byRef: false + unpack: false ) ) ) diff --git a/vendor/nikic/php-parser/test/code/parser/expr/listReferences.test b/vendor/nikic/php-parser/test/code/parser/expr/listReferences.test index fd9b1e87..436d45ff 100644 --- a/vendor/nikic/php-parser/test/code/parser/expr/listReferences.test +++ b/vendor/nikic/php-parser/test/code/parser/expr/listReferences.test @@ -19,6 +19,7 @@ array( name: v ) byRef: true + unpack: false ) ) ) @@ -39,6 +40,7 @@ array( name: v ) byRef: true + unpack: false ) ) ) @@ -57,6 +59,7 @@ array( name: v ) byRef: true + unpack: false ) ) ) @@ -77,6 +80,7 @@ array( name: v ) byRef: true + unpack: false ) ) ) diff --git a/vendor/nikic/php-parser/test/code/parser/expr/listWithKeys.test b/vendor/nikic/php-parser/test/code/parser/expr/listWithKeys.test index d0cfbb5f..e2eeedf0 100644 --- a/vendor/nikic/php-parser/test/code/parser/expr/listWithKeys.test +++ b/vendor/nikic/php-parser/test/code/parser/expr/listWithKeys.test @@ -19,6 +19,7 @@ array( name: b ) byRef: false + unpack: false ) ) ) @@ -32,6 +33,7 @@ array( value: b ) byRef: false + unpack: false ) ) ) @@ -55,10 +57,12 @@ array( name: c ) byRef: false + unpack: false ) ) ) byRef: false + unpack: false ) 1: Expr_ArrayItem( key: Scalar_String( @@ -68,6 +72,7 @@ array( name: e ) byRef: false + unpack: false ) ) ) diff --git a/vendor/nikic/php-parser/test/code/parser/expr/uvs/indirectCall.test b/vendor/nikic/php-parser/test/code/parser/expr/uvs/indirectCall.test index 2f36cc7a..39db60c0 100644 --- a/vendor/nikic/php-parser/test/code/parser/expr/uvs/indirectCall.test +++ b/vendor/nikic/php-parser/test/code/parser/expr/uvs/indirectCall.test @@ -144,6 +144,7 @@ array( value: udef ) byRef: false + unpack: false ) 1: Expr_ArrayItem( key: null @@ -151,6 +152,7 @@ array( value: id ) byRef: false + unpack: false ) ) ) @@ -345,6 +347,7 @@ array( name: obj ) byRef: false + unpack: false ) 1: Expr_ArrayItem( key: null @@ -352,6 +355,7 @@ array( value: id ) byRef: false + unpack: false ) ) ) diff --git a/vendor/nikic/php-parser/test/code/parser/expr/uvs/isset.test b/vendor/nikic/php-parser/test/code/parser/expr/uvs/isset.test index 68133a86..828fd9b1 100644 --- a/vendor/nikic/php-parser/test/code/parser/expr/uvs/isset.test +++ b/vendor/nikic/php-parser/test/code/parser/expr/uvs/isset.test @@ -21,6 +21,7 @@ array( value: 0 ) byRef: false + unpack: false ) 1: Expr_ArrayItem( key: null @@ -28,6 +29,7 @@ array( value: 1 ) byRef: false + unpack: false ) ) ) @@ -57,6 +59,7 @@ array( value: b ) byRef: false + unpack: false ) ) ) diff --git a/vendor/nikic/php-parser/test/code/parser/expr/uvs/misc.test b/vendor/nikic/php-parser/test/code/parser/expr/uvs/misc.test index 73b515f0..801eb37c 100644 --- a/vendor/nikic/php-parser/test/code/parser/expr/uvs/misc.test +++ b/vendor/nikic/php-parser/test/code/parser/expr/uvs/misc.test @@ -105,6 +105,7 @@ array( value: 0 ) byRef: false + unpack: false ) 1: Expr_ArrayItem( key: null @@ -112,6 +113,7 @@ array( value: 1 ) byRef: false + unpack: false ) ) ) diff --git a/vendor/nikic/php-parser/test/code/parser/exprStmtMode.test b/vendor/nikic/php-parser/test/code/parser/exprStmtMode.test deleted file mode 100644 index 759e9e54..00000000 --- a/vendor/nikic/php-parser/test/code/parser/exprStmtMode.test +++ /dev/null @@ -1,57 +0,0 @@ -Expression statement mode ------ - $a; +fn($x = 42) => $x; +fn(&$x) => $x; +fn&($x) => $x; +static fn($x, ...$rest) => $rest; +fn(): int => $x; +----- +!!php7 +fn($a) => $a; +fn($x = 42) => $x; +fn(&$x) => $x; +fn&($x) => $x; +static fn($x, ...$rest) => $rest; +fn(): int => $x; diff --git a/vendor/nikic/php-parser/test/code/prettyPrinter/expr/operators.test b/vendor/nikic/php-parser/test/code/prettyPrinter/expr/operators.test index 69817690..2b5ab01d 100644 --- a/vendor/nikic/php-parser/test/code/prettyPrinter/expr/operators.test +++ b/vendor/nikic/php-parser/test/code/prettyPrinter/expr/operators.test @@ -56,9 +56,9 @@ $a || $b; $a ? $b : $c; $a ?: $c; $a ?? $c; - $a = $b; $a **= $b; +$a ??= $c; $a *= $b; $a /= $b; $a %= $b; @@ -131,6 +131,7 @@ $a ?: $c; $a ?? $c; $a = $b; $a **= $b; +$a ??= $c; $a *= $b; $a /= $b; $a %= $b; diff --git a/vendor/nikic/php-parser/test_old/run-php-src.sh b/vendor/nikic/php-parser/test_old/run-php-src.sh index 944cfffa..d4f38894 100755 --- a/vendor/nikic/php-parser/test_old/run-php-src.sh +++ b/vendor/nikic/php-parser/test_old/run-php-src.sh @@ -1,4 +1,4 @@ -wget -q https://github.com/php/php-src/archive/php-7.3.0RC1.tar.gz +wget -q https://github.com/php/php-src/archive/PHP-7.4.tar.gz mkdir -p ./data/php-src -tar -xzf ./php-7.3.0RC1.tar.gz -C ./data/php-src --strip-components=1 +tar -xzf ./PHP-7.4.tar.gz -C ./data/php-src --strip-components=1 php -n test_old/run.php --verbose --no-progress PHP7 ./data/php-src diff --git a/vendor/opis/closure/CHANGELOG.md b/vendor/opis/closure/CHANGELOG.md index 78b8219e..fc7dbdb0 100644 --- a/vendor/opis/closure/CHANGELOG.md +++ b/vendor/opis/closure/CHANGELOG.md @@ -1,6 +1,25 @@ CHANGELOG --------- +### v3.3.0, 2019.05.31 + +- Fixed a bug that prevented signed closures to properly work when the serialized string +contains invalid UTF-8 chars. Starting with this version `json_encode` is no longer used +when signing a closure. Backward compatibility is maintained and all closures that were +previously signed using the old method will continue to work. + +### v3.2.0, 2019.05.05 + +- Since an unsigned closure can be unserialized when no security provider is set, +there is no reason to treat differently a signed closure in the same situation. +Therefore, the `Opis\Closure\SecurityException` exception is no longer thrown when +unserializing a signed closure, if no security provider is set. + +### v3.1.6, 2019.02.22 + +- Fixed a bug that occurred when trying to set properties of classes that were not defined in user-land. +Those properties are now ignored. + ### v3.1.5, 2019.01.14 - Improved parser diff --git a/vendor/opis/closure/LICENSE b/vendor/opis/closure/LICENSE index 0d3d8dc4..9c0a19ba 100644 --- a/vendor/opis/closure/LICENSE +++ b/vendor/opis/closure/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2018 Zindex Software +Copyright (c) 2018-2019 Zindex Software 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/opis/closure/README.md b/vendor/opis/closure/README.md index 47d0434d..4169d63a 100644 --- a/vendor/opis/closure/README.md +++ b/vendor/opis/closure/README.md @@ -61,7 +61,7 @@ Or you could directly reference it into your `composer.json` file as a dependenc ```json { "require": { - "opis/closure": "^3.1" + "opis/closure": "^3.3" } } ``` diff --git a/vendor/opis/closure/autoload.php b/vendor/opis/closure/autoload.php index 5c214b34..a928014f 100644 --- a/vendor/opis/closure/autoload.php +++ b/vendor/opis/closure/autoload.php @@ -1,6 +1,6 @@ $this->reference, )); - if(static::$securityProvider !== null){ - $ret = '@' . json_encode(static::$securityProvider->sign($ret)); + if (static::$securityProvider !== null) { + $data = static::$securityProvider->sign($ret); + $ret = '@' . $data['hash'] . '.' . $data['closure']; } if (!--$this->scope->serializations && !--$this->scope->toserialize) { @@ -193,7 +194,20 @@ class SerializableClosure implements Serializable "Make sure you use a security provider for both serialization and unserialization."); } - $data = json_decode(substr($data, 1), true); + if ($data[1] !== '{') { + $separator = strpos($data, '.'); + if ($separator === false) { + throw new SecurityException('Invalid signed closure'); + } + $hash = substr($data, 1, $separator - 1); + $closure = substr($data, $separator + 1); + + $data = ['hash' => $hash, 'closure' => $closure]; + + unset($hash, $closure); + } else { + $data = json_decode(substr($data, 1), true); + } if (!is_array($data) || !static::$securityProvider->verify($data)) { throw new SecurityException("Your serialized closure might have been modified and it's unsafe to be unserialized. " . @@ -203,8 +217,26 @@ class SerializableClosure implements Serializable $data = $data['closure']; } elseif ($data[0] === '@') { - throw new SecurityException("The serialized closure is signed. ". - "Make sure you use a security provider for both serialization and unserialization."); + if ($data[1] !== '{') { + $separator = strpos($data, '.'); + if ($separator === false) { + throw new SecurityException('Invalid signed closure'); + } + $hash = substr($data, 1, $separator - 1); + $closure = substr($data, $separator + 1); + + $data = ['hash' => $hash, 'closure' => $closure]; + + unset($hash, $closure); + } else { + $data = json_decode(substr($data, 1), true); + } + + if (!is_array($data) || !isset($data['closure']) || !isset($data['hash'])) { + throw new SecurityException('Invalid signed closure'); + } + + $data = $data['closure']; } $this->code = \unserialize($data); @@ -387,7 +419,7 @@ class SerializableClosure implements Serializable break; } foreach ($reflection->getProperties() as $property){ - if($property->isStatic()){ + if($property->isStatic() || !$property->getDeclaringClass()->isUserDefined()){ continue; } $property->setAccessible(true); @@ -450,7 +482,7 @@ class SerializableClosure implements Serializable break; } foreach ($reflection->getProperties() as $property){ - if($property->isStatic()){ + if($property->isStatic() || !$property->getDeclaringClass()->isUserDefined()){ continue; } $property->setAccessible(true); @@ -517,7 +549,7 @@ class SerializableClosure implements Serializable break; } foreach ($reflection->getProperties() as $property){ - if($property->isStatic()){ + if($property->isStatic() || !$property->getDeclaringClass()->isUserDefined()){ continue; } $property->setAccessible(true); @@ -609,7 +641,7 @@ class SerializableClosure implements Serializable break; } foreach ($reflection->getProperties() as $property){ - if($property->isStatic()){ + if($property->isStatic() || !$property->getDeclaringClass()->isUserDefined()){ continue; } $property->setAccessible(true); diff --git a/vendor/php-http/cache-plugin/CHANGELOG.md b/vendor/php-http/cache-plugin/CHANGELOG.md index 795a3ff7..4491df15 100644 --- a/vendor/php-http/cache-plugin/CHANGELOG.md +++ b/vendor/php-http/cache-plugin/CHANGELOG.md @@ -1,5 +1,12 @@ # Change Log +## 1.6.0 - 2019-01-23 + +### Added + +* Support for HTTPlug 2 / PSR-18 +* Added `cache_listeners` option, which takes an array of `CacheListener`s, who get notified and can optionally act on a Response based on a cache hit or miss event. An implementation, `AddHeaderCacheListener`, is provided which will add an `X-Cache` header to the response with this information. + ## 1.5.0 - 2017-11-29 ### Added diff --git a/vendor/php-http/cache-plugin/composer.json b/vendor/php-http/cache-plugin/composer.json index 3ce18bee..355e82a9 100644 --- a/vendor/php-http/cache-plugin/composer.json +++ b/vendor/php-http/cache-plugin/composer.json @@ -13,7 +13,7 @@ "require": { "php": "^5.4 || ^7.0", "psr/cache": "^1.0", - "php-http/client-common": "^1.1", + "php-http/client-common": "^1.9 || ^2.0", "php-http/message-factory": "^1.0", "symfony/options-resolver": "^2.6 || ^3.0 || ^4.0" }, @@ -37,7 +37,9 @@ }, "extra": { "branch-alias": { - "dev-master": "1.5-dev" + "dev-master": "1.6-dev" } - } + }, + "prefer-stable": true, + "minimum-stability": "dev" } diff --git a/vendor/php-http/cache-plugin/src/Cache/Listener/AddHeaderCacheListener.php b/vendor/php-http/cache-plugin/src/Cache/Listener/AddHeaderCacheListener.php new file mode 100644 index 00000000..ed306e3f --- /dev/null +++ b/vendor/php-http/cache-plugin/src/Cache/Listener/AddHeaderCacheListener.php @@ -0,0 +1,42 @@ + + */ +class AddHeaderCacheListener implements CacheListener +{ + /** @var string */ + private $headerName; + + /** + * @param string $headerName + */ + public function __construct($headerName = 'X-Cache') + { + $this->headerName = $headerName; + } + + /** + * Called before the cache plugin returns the response, with information on whether that response came from cache. + * + * @param RequestInterface $request + * @param ResponseInterface $response + * @param bool $fromCache Whether the `$response` was from the cache or not. + * Note that checking `$cacheItem->isHit()` is not sufficent to determine this. + * @param CacheItemInterface|null $cacheItem + * + * @return ResponseInterface + */ + public function onCacheResponse(RequestInterface $request, ResponseInterface $response, $fromCache, $cacheItem) + { + return $response->withHeader($this->headerName, $fromCache ? 'HIT' : 'MISS'); + } +} diff --git a/vendor/php-http/cache-plugin/src/Cache/Listener/CacheListener.php b/vendor/php-http/cache-plugin/src/Cache/Listener/CacheListener.php new file mode 100644 index 00000000..3bf6007e --- /dev/null +++ b/vendor/php-http/cache-plugin/src/Cache/Listener/CacheListener.php @@ -0,0 +1,30 @@ + + */ +interface CacheListener +{ + /** + * Called before the cache plugin returns the response, with information on whether that response came from cache. + * + * @param RequestInterface $request + * @param ResponseInterface $response + * @param bool $fromCache Whether the `$response` was from the cache or not. + * Note that checking `$cacheItem->isHit()` is not sufficent to determine this. + * @param CacheItemInterface|null $cacheItem + * + * @return ResponseInterface + */ + public function onCacheResponse(RequestInterface $request, ResponseInterface $response, $fromCache, $cacheItem); +} diff --git a/vendor/php-http/cache-plugin/src/CachePlugin.php b/vendor/php-http/cache-plugin/src/CachePlugin.php index 166cf9be..5ca9b6d0 100644 --- a/vendor/php-http/cache-plugin/src/CachePlugin.php +++ b/vendor/php-http/cache-plugin/src/CachePlugin.php @@ -6,6 +6,7 @@ use Http\Client\Common\Plugin; use Http\Client\Common\Plugin\Exception\RewindStreamException; use Http\Client\Common\Plugin\Cache\Generator\CacheKeyGenerator; use Http\Client\Common\Plugin\Cache\Generator\SimpleGenerator; +use Http\Client\Common\Plugin\Cache\Listener\CacheListener; use Http\Message\StreamFactory; use Http\Promise\FulfilledPromise; use Psr\Cache\CacheItemInterface; @@ -22,6 +23,8 @@ use Symfony\Component\OptionsResolver\OptionsResolver; */ final class CachePlugin implements Plugin { + use VersionBridgePlugin; + /** * @var CacheItemPoolInterface */ @@ -59,6 +62,8 @@ final class CachePlugin implements Plugin * @var array $methods list of request methods which can be cached * @var array $respect_response_cache_directives list of cache directives this plugin will respect while caching responses * @var CacheKeyGenerator $cache_key_generator an object to generate the cache key. Defaults to a new instance of SimpleGenerator + * @var CacheListener[] $cache_listeners an array of objects to act on the response based on the results of the cache check. + * Defaults to an empty array * } */ public function __construct(CacheItemPoolInterface $pool, StreamFactory $streamFactory, array $config = []) @@ -121,15 +126,16 @@ final class CachePlugin implements Plugin return new self($pool, $streamFactory, $config); } - /** - * {@inheritdoc} - */ - public function handleRequest(RequestInterface $request, callable $next, callable $first) + protected function doHandleRequest(RequestInterface $request, callable $next, callable $first) { $method = strtoupper($request->getMethod()); // if the request not is cachable, move to $next if (!in_array($method, $this->config['methods'])) { - return $next($request); + return $next($request)->then(function (ResponseInterface $response) use ($request) { + $response = $this->handleCacheListeners($request, $response, false, null); + + return $response; + }); } // If we can cache the request @@ -141,7 +147,10 @@ final class CachePlugin implements Plugin // The array_key_exists() is to be removed in 2.0. if (array_key_exists('expiresAt', $data) && (null === $data['expiresAt'] || time() < $data['expiresAt'])) { // This item is still valid according to previous cache headers - return new FulfilledPromise($this->createResponseFromCacheItem($cacheItem)); + $response = $this->createResponseFromCacheItem($cacheItem); + $response = $this->handleCacheListeners($request, $response, true, $cacheItem); + + return new FulfilledPromise($response); } // Add headers to ask the server if this cache is still valid @@ -154,14 +163,14 @@ final class CachePlugin implements Plugin } } - return $next($request)->then(function (ResponseInterface $response) use ($cacheItem) { + return $next($request)->then(function (ResponseInterface $response) use ($request, $cacheItem) { if (304 === $response->getStatusCode()) { if (!$cacheItem->isHit()) { /* * We do not have the item in cache. This plugin did not add If-Modified-Since * or If-None-Match headers. Return the response from server. */ - return $response; + return $this->handleCacheListeners($request, $response, false, $cacheItem); } // The cached response we have is still valid @@ -171,7 +180,7 @@ final class CachePlugin implements Plugin $cacheItem->set($data)->expiresAfter($this->calculateCacheItemExpiresAfter($maxAge)); $this->pool->save($cacheItem); - return $this->createResponseFromCacheItem($cacheItem); + return $this->handleCacheListeners($request, $this->createResponseFromCacheItem($cacheItem), true, $cacheItem); } if ($this->isCacheable($response)) { @@ -196,7 +205,7 @@ final class CachePlugin implements Plugin $this->pool->save($cacheItem); } - return $response; + return $this->handleCacheListeners($request, $response, false, isset($cacheItem) ? $cacheItem : null); }); } @@ -343,6 +352,7 @@ final class CachePlugin implements Plugin 'methods' => ['GET', 'HEAD'], 'respect_response_cache_directives' => ['no-cache', 'private', 'max-age', 'no-store'], 'cache_key_generator' => null, + 'cache_listeners' => [], ]); $resolver->setAllowedTypes('cache_lifetime', ['int', 'null']); @@ -357,6 +367,7 @@ final class CachePlugin implements Plugin return empty($matches); }); + $resolver->setAllowedTypes('cache_listeners', ['array']); $resolver->setNormalizer('respect_cache_headers', function (Options $options, $value) { if (null !== $value) { @@ -441,4 +452,23 @@ final class CachePlugin implements Plugin } } } + + /** + * Call the cache listeners, if they are set. + * + * @param RequestInterface $request + * @param ResponseInterface $response + * @param bool $cacheHit + * @param CacheItemInterface|null $cacheItem + * + * @return ResponseInterface + */ + private function handleCacheListeners(RequestInterface $request, ResponseInterface $response, $cacheHit, $cacheItem) + { + foreach ($this->config['cache_listeners'] as $cacheListener) { + $response = $cacheListener->onCacheResponse($request, $response, $cacheHit, $cacheItem); + } + + return $response; + } } diff --git a/vendor/php-http/client-common/CHANGELOG.md b/vendor/php-http/client-common/CHANGELOG.md index ff6b43cb..a93065ee 100644 --- a/vendor/php-http/client-common/CHANGELOG.md +++ b/vendor/php-http/client-common/CHANGELOG.md @@ -1,5 +1,11 @@ # Change Log +## 1.9.1 - 2019-02-02 + +### Added + +- Updated type hints in doc blocks. + ## 1.9.0 - 2019-01-03 ### Added diff --git a/vendor/php-http/client-common/src/HttpClientPool.php b/vendor/php-http/client-common/src/HttpClientPool.php index 7ac292ca..c51d0442 100644 --- a/vendor/php-http/client-common/src/HttpClientPool.php +++ b/vendor/php-http/client-common/src/HttpClientPool.php @@ -5,6 +5,7 @@ namespace Http\Client\Common; use Http\Client\Common\Exception\HttpClientNotFoundException; use Http\Client\HttpAsyncClient; use Http\Client\HttpClient; +use Psr\Http\Client\ClientInterface; use Psr\Http\Message\RequestInterface; /** @@ -21,7 +22,7 @@ abstract class HttpClientPool implements HttpAsyncClient, HttpClient /** * Add a client to the pool. * - * @param HttpClient|HttpAsyncClient|HttpClientPoolItem $client + * @param HttpClient|HttpAsyncClient|HttpClientPoolItem|ClientInterface $client */ public function addHttpClient($client) { diff --git a/vendor/php-http/client-common/src/HttpClientPoolItem.php b/vendor/php-http/client-common/src/HttpClientPoolItem.php index 09cd6ddf..5c791374 100644 --- a/vendor/php-http/client-common/src/HttpClientPoolItem.php +++ b/vendor/php-http/client-common/src/HttpClientPoolItem.php @@ -4,6 +4,7 @@ namespace Http\Client\Common; use Http\Client\HttpAsyncClient; use Http\Client\HttpClient; +use Psr\Http\Client\ClientInterface; use Psr\Http\Message\RequestInterface; use Http\Client\Exception; @@ -38,7 +39,7 @@ class HttpClientPoolItem implements HttpClient, HttpAsyncClient private $client; /** - * @param HttpClient|HttpAsyncClient $client + * @param HttpClient|HttpAsyncClient|ClientInterface $client * @param null|int $reenableAfter Number of seconds after this client is reenable */ public function __construct($client, $reenableAfter = null) diff --git a/vendor/php-http/client-common/src/HttpClientRouter.php b/vendor/php-http/client-common/src/HttpClientRouter.php index 9f721336..8f897d27 100644 --- a/vendor/php-http/client-common/src/HttpClientRouter.php +++ b/vendor/php-http/client-common/src/HttpClientRouter.php @@ -6,6 +6,7 @@ use Http\Client\Exception\RequestException; use Http\Client\HttpAsyncClient; use Http\Client\HttpClient; use Http\Message\RequestMatcher; +use Psr\Http\Client\ClientInterface; use Psr\Http\Message\RequestInterface; /** @@ -43,7 +44,7 @@ final class HttpClientRouter implements HttpClient, HttpAsyncClient /** * Add a client to the router. * - * @param HttpClient|HttpAsyncClient $client + * @param HttpClient|HttpAsyncClient|ClientInterface $client * @param RequestMatcher $requestMatcher */ public function addClient($client, RequestMatcher $requestMatcher) @@ -59,7 +60,7 @@ final class HttpClientRouter implements HttpClient, HttpAsyncClient * * @param RequestInterface $request * - * @return HttpClient|HttpAsyncClient + * @return HttpClient|HttpAsyncClient|ClientInterface */ protected function chooseHttpClient(RequestInterface $request) { diff --git a/vendor/php-http/client-common/src/PluginClient.php b/vendor/php-http/client-common/src/PluginClient.php index 8cedcf65..625033be 100644 --- a/vendor/php-http/client-common/src/PluginClient.php +++ b/vendor/php-http/client-common/src/PluginClient.php @@ -41,9 +41,9 @@ final class PluginClient implements HttpClient, HttpAsyncClient private $options; /** - * @param HttpClient|HttpAsyncClient $client - * @param Plugin[] $plugins - * @param array $options { + * @param HttpClient|HttpAsyncClient|ClientInterface $client + * @param Plugin[] $plugins + * @param array $options { * * @var int $max_restarts * @var Plugin[] $debug_plugins an array of plugins that are injected between each normal plugin diff --git a/vendor/php-http/discovery/CHANGELOG.md b/vendor/php-http/discovery/CHANGELOG.md index ee43ffd2..4fc71df7 100644 --- a/vendor/php-http/discovery/CHANGELOG.md +++ b/vendor/php-http/discovery/CHANGELOG.md @@ -1,10 +1,25 @@ # Change Log +## 1.6.1 - 2019-02-23 + +### Fixed + +- MockClientStrategy also provides the mock client when requesting an async client + +## 1.6.0 - 2019-01-23 + +### Added + +- Support for PSR-17 factories +- Support for PSR-18 clients + ## 1.5.2 - 2018-12-31 Corrected mistakes in 1.5.1. The different between 1.5.2 and 1.5.0 is that we removed some PHP 7 code. +https://github.com/php-http/discovery/compare/1.5.0...1.5.2 + ## 1.5.1 - 2018-12-31 This version added new features by mistake. These are reverted in 1.5.2. diff --git a/vendor/php-http/discovery/README.md b/vendor/php-http/discovery/README.md index 7c5151ea..6a3d18bc 100644 --- a/vendor/php-http/discovery/README.md +++ b/vendor/php-http/discovery/README.md @@ -2,7 +2,7 @@ [![Latest Version](https://img.shields.io/github/release/php-http/discovery.svg?style=flat-square)](https://github.com/php-http/discovery/releases) [![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE) -[![Build Status](https://img.shields.io/travis/php-http/discovery.svg?style=flat-square)](https://travis-ci.org/php-http/discovery) +[![Build Status](https://img.shields.io/travis/php-http/discovery/master.svg?style=flat-square)](https://travis-ci.org/php-http/discovery) [![Code Coverage](https://img.shields.io/scrutinizer/coverage/g/php-http/discovery.svg?style=flat-square)](https://scrutinizer-ci.com/g/php-http/discovery) [![Quality Score](https://img.shields.io/scrutinizer/g/php-http/discovery.svg?style=flat-square)](https://scrutinizer-ci.com/g/php-http/discovery) [![Total Downloads](https://img.shields.io/packagist/dt/php-http/discovery.svg?style=flat-square)](https://packagist.org/packages/php-http/discovery) diff --git a/vendor/php-http/discovery/composer.json b/vendor/php-http/discovery/composer.json index 97141f3b..e6b64140 100644 --- a/vendor/php-http/discovery/composer.json +++ b/vendor/php-http/discovery/composer.json @@ -14,11 +14,10 @@ "php": "^5.5 || ^7.0" }, "require-dev": { - "php-http/httplug": "^1.0|^2.0", + "php-http/httplug": "^1.0 || ^2.0", "php-http/message-factory": "^1.0", "puli/composer-plugin": "1.0.0-beta10", - "phpspec/phpspec": "^2.4", - "henrikbjorn/phpspec-code-coverage" : "^2.0.2" + "phpspec/phpspec": "^2.4" }, "suggest": { "puli/composer-plugin": "Sets up Puli which is recommended for Discovery to work. Check http://docs.php-http.org/en/latest/discovery.html for more details.", diff --git a/vendor/php-http/discovery/src/ClassDiscovery.php b/vendor/php-http/discovery/src/ClassDiscovery.php index 40e2d1c5..ac4b2d81 100644 --- a/vendor/php-http/discovery/src/ClassDiscovery.php +++ b/vendor/php-http/discovery/src/ClassDiscovery.php @@ -24,6 +24,7 @@ abstract class ClassDiscovery private static $strategies = [ Strategy\PuliBetaStrategy::class, Strategy\CommonClassesStrategy::class, + Strategy\CommonPsr17ClassesStrategy::class, ]; /** diff --git a/vendor/php-http/discovery/src/Exception/NoCandidateFoundException.php b/vendor/php-http/discovery/src/Exception/NoCandidateFoundException.php index 240b5688..e53fb798 100644 --- a/vendor/php-http/discovery/src/Exception/NoCandidateFoundException.php +++ b/vendor/php-http/discovery/src/Exception/NoCandidateFoundException.php @@ -27,9 +27,22 @@ final class NoCandidateFoundException extends \Exception implements Exception $message = sprintf( 'No valid candidate found using strategy "%s". We tested the following candidates: %s.', $strategy, - implode(', ', $classes) + implode(', ', array_map([$this, 'stringify'], $classes)) ); parent::__construct($message); } + + private function stringify($mixed) + { + if (is_string($mixed)) { + return $mixed; + } + + if (is_array($mixed) && 2 === count($mixed)) { + return sprintf('%s::%s', $this->stringify($mixed[0]), $mixed[1]); + } + + return is_object($mixed) ? get_class($mixed) : gettype($mixed); + } } diff --git a/vendor/php-http/discovery/src/MessageFactoryDiscovery.php b/vendor/php-http/discovery/src/MessageFactoryDiscovery.php index c21b9bf4..4ccc90f8 100644 --- a/vendor/php-http/discovery/src/MessageFactoryDiscovery.php +++ b/vendor/php-http/discovery/src/MessageFactoryDiscovery.php @@ -9,6 +9,8 @@ use Http\Message\MessageFactory; * Finds a Message Factory. * * @author Márk Sági-Kazár + * + * @deprecated This will be removed in 2.0. Consider using Psr17FactoryDiscovery. */ final class MessageFactoryDiscovery extends ClassDiscovery { diff --git a/vendor/php-http/discovery/src/Psr17FactoryDiscovery.php b/vendor/php-http/discovery/src/Psr17FactoryDiscovery.php new file mode 100644 index 00000000..b8a2fa4c --- /dev/null +++ b/vendor/php-http/discovery/src/Psr17FactoryDiscovery.php @@ -0,0 +1,124 @@ + + */ +final class Psr17FactoryDiscovery extends ClassDiscovery +{ + private static function createException($type, Exception $e) + { + return new \Http\Discovery\Exception\NotFoundException( + 'No PSR-17 '.$type.' found. Install a package from this list: https://packagist.org/providers/psr/http-factory-implementation', + 0, + $e + ); + } + + /** + * @return RequestFactoryInterface + * + * @throws Exception\NotFoundException + */ + public static function findRequestFactory() + { + try { + $messageFactory = static::findOneByType(RequestFactoryInterface::class); + } catch (DiscoveryFailedException $e) { + throw self::createException('request factory', $e); + } + + return static::instantiateClass($messageFactory); + } + + /** + * @return ResponseFactoryInterface + * + * @throws Exception\NotFoundException + */ + public static function findResponseFactory() + { + try { + $messageFactory = static::findOneByType(ResponseFactoryInterface::class); + } catch (DiscoveryFailedException $e) { + throw self::createException('response factory', $e); + } + + return static::instantiateClass($messageFactory); + } + + /** + * @return ServerRequestFactoryInterface + * + * @throws Exception\NotFoundException + */ + public static function findServerRequestFactory() + { + try { + $messageFactory = static::findOneByType(ServerRequestFactoryInterface::class); + } catch (DiscoveryFailedException $e) { + throw self::createException('server request factory', $e); + } + + return static::instantiateClass($messageFactory); + } + + /** + * @return StreamFactoryInterface + * + * @throws Exception\NotFoundException + */ + public static function findStreamFactory() + { + try { + $messageFactory = static::findOneByType(StreamFactoryInterface::class); + } catch (DiscoveryFailedException $e) { + throw self::createException('stream factory', $e); + } + + return static::instantiateClass($messageFactory); + } + + /** + * @return UploadedFileFactoryInterface + * + * @throws Exception\NotFoundException + */ + public static function findUploadedFileFactory() + { + try { + $messageFactory = static::findOneByType(UploadedFileFactoryInterface::class); + } catch (DiscoveryFailedException $e) { + throw self::createException('uploaded file factory', $e); + } + + return static::instantiateClass($messageFactory); + } + + /** + * @return UriFactoryInterface + * + * @throws Exception\NotFoundException + */ + public static function findUrlFactory() + { + try { + $messageFactory = static::findOneByType(UriFactoryInterface::class); + } catch (DiscoveryFailedException $e) { + throw self::createException('url factory', $e); + } + + return static::instantiateClass($messageFactory); + } +} diff --git a/vendor/php-http/discovery/src/Psr18ClientDiscovery.php b/vendor/php-http/discovery/src/Psr18ClientDiscovery.php new file mode 100644 index 00000000..eacdc3ab --- /dev/null +++ b/vendor/php-http/discovery/src/Psr18ClientDiscovery.php @@ -0,0 +1,36 @@ + + */ +final class Psr18ClientDiscovery extends ClassDiscovery +{ + /** + * Finds a PSR-18 HTTP Client. + * + * @return ClientInterface + * + * @throws Exception\NotFoundException + */ + public static function find() + { + try { + $client = static::findOneByType(ClientInterface::class); + } catch (DiscoveryFailedException $e) { + throw new \Http\Discovery\Exception\NotFoundException( + 'No PSR-18 clients found. Make sure to install a package providing "psr/http-client-implementation". Example: "php-http/guzzle6-adapter".', + 0, + $e + ); + } + + return static::instantiateClass($client); + } +} diff --git a/vendor/php-http/discovery/src/Strategy/CommonClassesStrategy.php b/vendor/php-http/discovery/src/Strategy/CommonClassesStrategy.php index eff2c0a6..ab7e4c09 100644 --- a/vendor/php-http/discovery/src/Strategy/CommonClassesStrategy.php +++ b/vendor/php-http/discovery/src/Strategy/CommonClassesStrategy.php @@ -15,6 +15,7 @@ use Http\Message\UriFactory\GuzzleUriFactory; use Http\Message\MessageFactory\DiactorosMessageFactory; use Http\Message\StreamFactory\DiactorosStreamFactory; use Http\Message\UriFactory\DiactorosUriFactory; +use Psr\Http\Client\ClientInterface as Psr18Client; use Zend\Diactoros\Request as DiactorosRequest; use Http\Message\MessageFactory\SlimMessageFactory; use Http\Message\StreamFactory\SlimStreamFactory; @@ -80,6 +81,12 @@ final class CommonClassesStrategy implements DiscoveryStrategy 'condition' => [\Buzz\Client\FileGetContents::class, \Buzz\Message\ResponseBuilder::class], ], ], + Psr18Client::class => [ + [ + 'class' => [self::class, 'buzzInstantiate'], + 'condition' => [\Buzz\Client\FileGetContents::class, \Buzz\Message\ResponseBuilder::class], + ], + ], ]; /** @@ -87,6 +94,19 @@ final class CommonClassesStrategy implements DiscoveryStrategy */ public static function getCandidates($type) { + if (Psr18Client::class === $type) { + $candidates = self::$classes[PSR18Client::class]; + + // HTTPlug 2.0 clients implements PSR18Client too. + foreach (self::$classes[HttpClient::class] as $c) { + if (is_subclass_of($c['class'], Psr18Client::class)) { + $candidates[] = $c; + } + } + + return $candidates; + } + if (isset(self::$classes[$type])) { return self::$classes[$type]; } diff --git a/vendor/php-http/discovery/src/Strategy/CommonPsr17ClassesStrategy.php b/vendor/php-http/discovery/src/Strategy/CommonPsr17ClassesStrategy.php new file mode 100644 index 00000000..05062eb7 --- /dev/null +++ b/vendor/php-http/discovery/src/Strategy/CommonPsr17ClassesStrategy.php @@ -0,0 +1,81 @@ + + */ +final class CommonPsr17ClassesStrategy implements DiscoveryStrategy +{ + /** + * @var array + */ + private static $classes = [ + RequestFactoryInterface::class => [ + 'Nyholm\Psr7\Factory\Psr17Factory', + 'Zend\Diactoros\RequestFactory', + 'Http\Factory\Diactoros\RequestFactory', + 'Http\Factory\Guzzle\RequestFactory', + 'Http\Factory\Slim\RequestFactory', + ], + ResponseFactoryInterface::class => [ + 'Nyholm\Psr7\Factory\Psr17Factory', + 'Zend\Diactoros\ResponseFactory', + 'Http\Factory\Diactoros\ResponseFactory', + 'Http\Factory\Guzzle\ResponseFactory', + 'Http\Factory\Slim\ResponseFactory', + ], + ServerRequestFactoryInterface::class => [ + 'Nyholm\Psr7\Factory\Psr17Factory', + 'Zend\Diactoros\ServerRequestFactory', + 'Http\Factory\Diactoros\ServerRequestFactory', + 'Http\Factory\Guzzle\ServerRequestFactory', + 'Http\Factory\Slim\ServerRequestFactory', + ], + StreamFactoryInterface::class => [ + 'Nyholm\Psr7\Factory\Psr17Factory', + 'Zend\Diactoros\StreamFactory', + 'Http\Factory\Diactoros\StreamFactory', + 'Http\Factory\Guzzle\StreamFactory', + 'Http\Factory\Slim\StreamFactory', + ], + UploadedFileFactoryInterface::class => [ + 'Nyholm\Psr7\Factory\Psr17Factory', + 'Zend\Diactoros\UploadedFileFactory', + 'Http\Factory\Diactoros\UploadedFileFactory', + 'Http\Factory\Guzzle\UploadedFileFactory', + 'Http\Factory\Slim\UploadedFileFactory', + ], + UriFactoryInterface::class => [ + 'Nyholm\Psr7\Factory\Psr17Factory', + 'Zend\Diactoros\UriFactory', + 'Http\Factory\Diactoros\UriFactory', + 'Http\Factory\Guzzle\UriFactory', + 'Http\Factory\Slim\UriFactory', + ], + ]; + + /** + * {@inheritdoc} + */ + public static function getCandidates($type) + { + $candidates = []; + if (isset(self::$classes[$type])) { + foreach (self::$classes[$type] as $class) { + $candidates[] = ['class' => $class, 'condition' => [$class]]; + } + } + + return $candidates; + } +} diff --git a/vendor/php-http/discovery/src/Strategy/MockClientStrategy.php b/vendor/php-http/discovery/src/Strategy/MockClientStrategy.php index 57447877..01143ba0 100644 --- a/vendor/php-http/discovery/src/Strategy/MockClientStrategy.php +++ b/vendor/php-http/discovery/src/Strategy/MockClientStrategy.php @@ -2,6 +2,7 @@ namespace Http\Discovery\Strategy; +use Http\Client\HttpAsyncClient; use Http\Client\HttpClient; use Http\Mock\Client as Mock; @@ -17,8 +18,12 @@ final class MockClientStrategy implements DiscoveryStrategy */ public static function getCandidates($type) { - return (HttpClient::class === $type) - ? [['class' => Mock::class, 'condition' => Mock::class]] - : []; + switch ($type) { + case HttpClient::class: + case HttpAsyncClient::class: + return [['class' => Mock::class, 'condition' => Mock::class]]; + default: + return []; + } } } diff --git a/vendor/php-http/discovery/src/StreamFactoryDiscovery.php b/vendor/php-http/discovery/src/StreamFactoryDiscovery.php index 7bcc8ce1..75b15ac4 100644 --- a/vendor/php-http/discovery/src/StreamFactoryDiscovery.php +++ b/vendor/php-http/discovery/src/StreamFactoryDiscovery.php @@ -9,6 +9,8 @@ use Http\Message\StreamFactory; * Finds a Stream Factory. * * @author Михаил КраÑильников + * + * @deprecated This will be removed in 2.0. Consider using Psr17FactoryDiscovery. */ final class StreamFactoryDiscovery extends ClassDiscovery { diff --git a/vendor/php-http/discovery/src/UriFactoryDiscovery.php b/vendor/php-http/discovery/src/UriFactoryDiscovery.php index 1eef1e6f..c31f783d 100644 --- a/vendor/php-http/discovery/src/UriFactoryDiscovery.php +++ b/vendor/php-http/discovery/src/UriFactoryDiscovery.php @@ -9,6 +9,8 @@ use Http\Message\UriFactory; * Finds a URI Factory. * * @author David de Boer + * + * @deprecated This will be removed in 2.0. Consider using Psr17FactoryDiscovery. */ final class UriFactoryDiscovery extends ClassDiscovery { diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Generic.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Generic.php index e4c53e00..88b4ebf8 100644 --- a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Generic.php +++ b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Generic.php @@ -57,7 +57,7 @@ class Generic extends BaseTag implements Factory\StaticMethod Assert::stringNotEmpty($name); Assert::notNull($descriptionFactory); - $description = $descriptionFactory && $body ? $descriptionFactory->create($body, $context) : null; + $description = $descriptionFactory && $body !== "" ? $descriptionFactory->create($body, $context) : null; return new static($name, $description); } diff --git a/vendor/phpunit/phpunit/.github/CONTRIBUTING.md b/vendor/phpunit/phpunit/.github/CONTRIBUTING.md index 1a0916f7..c6507403 100644 --- a/vendor/phpunit/phpunit/.github/CONTRIBUTING.md +++ b/vendor/phpunit/phpunit/.github/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 `master` branch. +Pull requests for bug fixes must be made for the oldest branch that is [supported](https://phpunit.de/supported-versions.html). Pull requests for new features must be based on the `master` branch. We are trying to keep backwards compatibility breaks in PHPUnit to an absolute minimum. Please take this into account when proposing changes. diff --git a/vendor/phpunit/phpunit/.php_cs.dist b/vendor/phpunit/phpunit/.php_cs.dist index 3c71a791..e9852c2e 100644 --- a/vendor/phpunit/phpunit/.php_cs.dist +++ b/vendor/phpunit/phpunit/.php_cs.dist @@ -66,7 +66,7 @@ return PhpCsFixer\Config::create() 'phpdoc_separation' => true, 'phpdoc_to_comment' => true, 'phpdoc_trim' => true, - 'phpdoc_types' => true, + 'phpdoc_types' => ['groups' => ['simple', 'meta']], 'phpdoc_var_without_name' => true, 'self_accessor' => true, 'simplified_null_return' => true, diff --git a/vendor/phpunit/phpunit/.travis.yml b/vendor/phpunit/phpunit/.travis.yml index b21b0277..51558919 100644 --- a/vendor/phpunit/phpunit/.travis.yml +++ b/vendor/phpunit/phpunit/.travis.yml @@ -11,11 +11,8 @@ php: - 7.0 - 7.1 - 7.2 - - master matrix: - allow_failures: - - php: master fast_finish: true env: diff --git a/vendor/phpunit/phpunit/ChangeLog-5.7.md b/vendor/phpunit/phpunit/ChangeLog-5.7.md deleted file mode 100644 index c8c77874..00000000 --- a/vendor/phpunit/phpunit/ChangeLog-5.7.md +++ /dev/null @@ -1,242 +0,0 @@ -# Changes in PHPUnit 5.7 - -All notable changes of the PHPUnit 5.7 release series are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles. - -## [5.7.27] - 2018-02-01 - -### Fixed - -* Fixed [#2236](https://github.com/sebastianbergmann/phpunit/issues/2236): Exceptions in `tearDown()` do not affect `getStatus()` -* Fixed [#2950](https://github.com/sebastianbergmann/phpunit/issues/2950): Class extending `PHPUnit\Framework\TestSuite` does not extend `PHPUnit\FrameworkTestCase` -* Fixed [#2972](https://github.com/sebastianbergmann/phpunit/issues/2972): PHPUnit crashes when test suite contains both `.phpt` files and unconventionally named tests - -## [5.7.26] - 2017-12-17 - -### Fixed - -* Fixed [#2472](https://github.com/sebastianbergmann/phpunit/issues/2472): `PHPUnit\Util\Getopt` uses deprecated `each()` function -* Fixed [#2833](https://github.com/sebastianbergmann/phpunit/issues/2833): Test class loaded during data provider execution is not discovered -* Fixed [#2922](https://github.com/sebastianbergmann/phpunit/issues/2922): Test class is not discovered when there is a test class with `@group` and provider throwing exception in it, tests are run with `--exclude-group` for that group, there is another class called later (after the class from above), and the name of that another class does not match its filename - -## [5.7.25] - 2017-11-14 - -### Fixed - -* Fixed [#2859](https://github.com/sebastianbergmann/phpunit/issues/2859): Regression caused by fix for [#2833](https://github.com/sebastianbergmann/phpunit/issues/2833) - -## [5.7.24] - 2017-11-14 - -### Fixed - -* Fixed [#2833](https://github.com/sebastianbergmann/phpunit/issues/2833): Test class loaded during data provider execution is not discovered - -## [5.7.23] - 2017-10-15 - -### Fixed - -* Fixed [#2731](https://github.com/sebastianbergmann/phpunit/issues/2731): Empty exception message cannot be expected - -## [5.7.22] - 2017-09-24 - -### Fixed - -* Fixed [#2769](https://github.com/sebastianbergmann/phpunit/issues/2769): Usage of `setUseErrorHandler()` produces `Undefined variable` error - -## [5.7.21] - 2017-06-21 - -### Added - -* Added `PHPUnit\Framework\AssertionFailedError`, `PHPUnit\Framework\Test`, and `PHPUnit\Framework\TestSuite` to the forward compatibility layer for PHPUnit 6 - -### Fixed - -* Fixed [#2705](https://github.com/sebastianbergmann/phpunit/issues/2705): `stderr` parameter in `phpunit.xml` always considered `true` - -## [5.7.20] - 2017-05-22 - -### Fixed - -* Fixed [#2563](https://github.com/sebastianbergmann/phpunit/pull/2563): `phpunit --version` does not display version when running unsupported PHP - -## [5.7.19] - 2017-04-03 - -### Fixed - -* Fixed [#2638](https://github.com/sebastianbergmann/phpunit/pull/2638): Regression in `PHPUnit\Framework\TestCase:registerMockObjectsFromTestArguments()` - -## [5.7.18] - 2017-04-02 - -### Fixed - -* Fixed [#2145](https://github.com/sebastianbergmann/phpunit/issues/2145): `--stop-on-failure` fails to stop on PHP 7 -* Fixed [#2572](https://github.com/sebastianbergmann/phpunit/issues/2572): `PHPUnit\Framework\TestCase:registerMockObjectsFromTestArguments()` does not correctly handle arrays that reference themselves - -## [5.7.17] - 2017-03-19 - -### Fixed - -* Fixed [#2016](https://github.com/sebastianbergmann/phpunit/issues/2016): `prophesize()` does not work when static attributes are backed up -* Fixed [#2568](https://github.com/sebastianbergmann/phpunit/issues/2568): `ArraySubsetConstraint` uses invalid cast to array -* Fixed [#2573](https://github.com/sebastianbergmann/phpunit/issues/2573): `getMockFromWsdl()` does not handle URLs with query parameters -* `PHPUnit\Util\Test::getDataFromTestWithAnnotation()` raises notice when docblock contains Windows line endings - -## [5.7.16] - 2017-03-15 - -### Fixed - -* Fixed [#2547](https://github.com/sebastianbergmann/phpunit/issues/2547): Code Coverage data is collected for test annotated with `@coversNothing` -* Fixed [#2558](https://github.com/sebastianbergmann/phpunit/issues/2558): `countOf()` function is missing - -## [5.7.15] - 2017-03-02 - -### Fixed - -* Fixed [#1999](https://github.com/sebastianbergmann/phpunit/issues/1999): Handler is inherited from previous custom option with handler -* Fixed [#2149](https://github.com/sebastianbergmann/phpunit/issues/2149): `assertCount()` does not handle generators properly -* Fixed [#2478](https://github.com/sebastianbergmann/phpunit/issues/2478): Tests that take too long are not reported as risky test - -## [5.7.14] - 2017-02-19 - -### Fixed - -* Fixed [#2489](https://github.com/sebastianbergmann/phpunit/issues/2489): `processUncoveredFilesFromWhitelist` is not handled correctly -* Fixed default values for `addUncoveredFilesFromWhitelist` and `processUncoveredFilesFromWhitelist` in `phpunit.xsd` - -## [5.7.13] - 2017-02-10 - -### Fixed - -* Fixed [#2493](https://github.com/sebastianbergmann/phpunit/issues/2493): Fix for [#2475](https://github.com/sebastianbergmann/phpunit/pull/2475) does not apply to PHPUnit 5.7 - -## [5.7.12] - 2017-02-08 - -### Fixed - -* Fixed [#2475](https://github.com/sebastianbergmann/phpunit/pull/2475): Defining a test suite with only one file does not work - -## [5.7.11] - 2017-02-05 - -### Fixed - -* Deprecation errors when used with PHP 7.2 - -## [5.7.10] - 2017-02-04 - -### Fixed - -* Fixed [#2462](https://github.com/sebastianbergmann/phpunit/issues/2462): Code Coverage whitelist is filled even if no code coverage data is to be collected - -## [5.7.9] - 2017-01-28 - -### Fixed - -* Fixed [#2447](https://github.com/sebastianbergmann/phpunit/issues/2447): Reverted backwards incompatible change to handling of boolean environment variable values specified in XML - -## [5.7.8] - 2017-01-26 - -### Fixed - -* Fixed [#2446](https://github.com/sebastianbergmann/phpunit/issues/2446): Reverted backwards incompatible change to exit code in case of warnings - -## [5.7.7] - 2017-01-25 - -### Fixed - -* Fixed [#1896](https://github.com/sebastianbergmann/phpunit/issues/1896): Wrong test location when `@depends` and `@dataProvider` are combined -* Fixed [#1983](https://github.com/sebastianbergmann/phpunit/pull/1983): Tests with `@expectedException` annotation cannot be skipped -* Fixed [#2137](https://github.com/sebastianbergmann/phpunit/issues/2137): Warnings for invalid data providers are suppressed when test execution is filtered -* Fixed [#2275](https://github.com/sebastianbergmann/phpunit/pull/2275): Invalid UTF-8 characters can lead to missing output -* Fixed [#2299](https://github.com/sebastianbergmann/phpunit/issues/2299): `expectExceptionMessage()` and `expectExceptionCode()` do not work without `expectException()` -* Fixed [#2328](https://github.com/sebastianbergmann/phpunit/issues/2328): `TestListener` callbacks `startTest()` and `endTest()` are not called when test is skipped due to `@depends` -* Fixed [#2331](https://github.com/sebastianbergmann/phpunit/issues/2331): Boolean environment variable values specified in XML get mangled -* Fixed [#2333](https://github.com/sebastianbergmann/phpunit/issues/2333): `assertContains()` and `assertNotContains()` do not handle UTF-8 strings correctly -* Fixed [#2340](https://github.com/sebastianbergmann/phpunit/pull/2340): Data providers that use `yield` or implement `Iterator` cannot be combined -* Fixed [#2349](https://github.com/sebastianbergmann/phpunit/pull/2349): `PHPUnit_TextUI_Command` does not `exit()` when it should -* Fixed [#2392](https://github.com/sebastianbergmann/phpunit/issues/2392): Empty (but valid) data provider should skip the test -* Fixed [#2431](https://github.com/sebastianbergmann/phpunit/issues/2431): `assertArraySubset()` does not support `ArrayAccess` -* Fixed [#2435](https://github.com/sebastianbergmann/phpunit/issues/2435): Empty `@group` annotation causes error on PHP 7.2+ - -## [5.7.6] - 2017-01-22 - -### Fixed - -* Fixed [#2424](https://github.com/sebastianbergmann/phpunit/issues/2424): `TestCase::getStatus()` returns `STATUS_PASSED` instead of `STATUS_RISKY` for risky test -* Fixed [#2427](https://github.com/sebastianbergmann/phpunit/issues/2427): TestDox group configuration is not handled -* Fixed [#2428](https://github.com/sebastianbergmann/phpunit/pull/2428): Nested arrays specificied in XML configuration file are not handled correctly - -## [5.7.5] - 2016-12-28 - -### Fixed - -* Fixed [#2404](https://github.com/sebastianbergmann/phpunit/pull/2404): `assertDirectoryNotIsWriteable()` calls itself - -## [5.7.4] - 2016-12-13 - -### Fixed - -* Fixed [#2394](https://github.com/sebastianbergmann/phpunit/issues/2394): Do not treat `AssertionError` as assertion failure on PHP 5 - -## [5.7.3] - 2016-12-09 - -### Fixed - -* Fixed [#2384](https://github.com/sebastianbergmann/phpunit/pull/2384): Handle `PHPUnit_Framework_Exception` correctly when expecting exceptions - -## [5.7.2] - 2016-12-03 - -### Fixed - -* Fixed [#2382](https://github.com/sebastianbergmann/phpunit/issues/2382): Uncloneable test doubles passed via data provider do not work - -## [5.7.1] - 2016-12-02 - -### Fixed - -* Fixed [#2380](https://github.com/sebastianbergmann/phpunit/issues/2380): Data Providers cannot be generators anymore - -## [5.7.0] - 2016-12-02 - -### Added - -* Merged [#2223](https://github.com/sebastianbergmann/phpunit/pull/2223): Add support for multiple data providers -* Added `extensionsDirectory` configuration directive to configure a directory from which all `.phar` files are loaded as PHPUnit extensions -* Added `--no-extensions` commandline option to suppress loading of extensions (from configured extension directory) -* Added `PHPUnit\Framework\Assert` as an alias for `PHPUnit_Framework_Assert` for forward compatibility -* Added `PHPUnit\Framework\BaseTestListener` as an alias for `PHPUnit_Framework_BaseTestListener` for forward compatibility -* Added `PHPUnit\Framework\TestListener` as an alias for `PHPUnit_Framework_TestListener` for forward compatibility - -### Changed - -* The `--log-json` commandline option has been deprecated -* The `--tap` and `--log-tap` commandline options have been deprecated -* The `--self-update` and `--self-upgrade` commandline options have been deprecated (PHAR binary only) - -[5.7.27]: https://github.com/sebastianbergmann/phpunit/compare/5.7.26...5.7.27 -[5.7.26]: https://github.com/sebastianbergmann/phpunit/compare/5.7.25...5.7.26 -[5.7.25]: https://github.com/sebastianbergmann/phpunit/compare/5.7.24...5.7.25 -[5.7.24]: https://github.com/sebastianbergmann/phpunit/compare/5.7.23...5.7.24 -[5.7.23]: https://github.com/sebastianbergmann/phpunit/compare/5.7.22...5.7.23 -[5.7.22]: https://github.com/sebastianbergmann/phpunit/compare/5.7.21...5.7.22 -[5.7.21]: https://github.com/sebastianbergmann/phpunit/compare/5.7.20...5.7.21 -[5.7.20]: https://github.com/sebastianbergmann/phpunit/compare/5.7.19...5.7.20 -[5.7.19]: https://github.com/sebastianbergmann/phpunit/compare/5.7.18...5.7.19 -[5.7.18]: https://github.com/sebastianbergmann/phpunit/compare/5.7.17...5.7.18 -[5.7.17]: https://github.com/sebastianbergmann/phpunit/compare/5.7.16...5.7.17 -[5.7.16]: https://github.com/sebastianbergmann/phpunit/compare/5.7.15...5.7.16 -[5.7.15]: https://github.com/sebastianbergmann/phpunit/compare/5.7.14...5.7.15 -[5.7.14]: https://github.com/sebastianbergmann/phpunit/compare/5.7.13...5.7.14 -[5.7.13]: https://github.com/sebastianbergmann/phpunit/compare/5.7.12...5.7.13 -[5.7.12]: https://github.com/sebastianbergmann/phpunit/compare/5.7.11...5.7.12 -[5.7.11]: https://github.com/sebastianbergmann/phpunit/compare/5.7.10...5.7.11 -[5.7.10]: https://github.com/sebastianbergmann/phpunit/compare/5.7.9...5.7.10 -[5.7.9]: https://github.com/sebastianbergmann/phpunit/compare/5.7.8...5.7.9 -[5.7.8]: https://github.com/sebastianbergmann/phpunit/compare/5.7.7...5.7.8 -[5.7.7]: https://github.com/sebastianbergmann/phpunit/compare/5.7.6...5.7.7 -[5.7.6]: https://github.com/sebastianbergmann/phpunit/compare/5.7.5...5.7.6 -[5.7.5]: https://github.com/sebastianbergmann/phpunit/compare/5.7.4...5.7.5 -[5.7.4]: https://github.com/sebastianbergmann/phpunit/compare/5.7.3...5.7.4 -[5.7.3]: https://github.com/sebastianbergmann/phpunit/compare/5.7.2...5.7.3 -[5.7.2]: https://github.com/sebastianbergmann/phpunit/compare/5.7.1...5.7.2 -[5.7.1]: https://github.com/sebastianbergmann/phpunit/compare/5.7.0...5.7.1 -[5.7.0]: https://github.com/sebastianbergmann/phpunit/compare/5.6...5.7.0 - diff --git a/vendor/phpunit/phpunit/ChangeLog-6.5.md b/vendor/phpunit/phpunit/ChangeLog-6.5.md index 0875178f..366b627d 100644 --- a/vendor/phpunit/phpunit/ChangeLog-6.5.md +++ b/vendor/phpunit/phpunit/ChangeLog-6.5.md @@ -2,19 +2,31 @@ All notable changes of the PHPUnit 6.5 release series are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles. +## [6.5.14] - 2019-02-01 + +### Fixed + +* Fixed [#3459](https://github.com/sebastianbergmann/phpunit/issues/3459): `@requires` function swallows digits at the end of function name + ## [6.5.13] - 2018-09-08 +### Fixed + * Fixed [#3181](https://github.com/sebastianbergmann/phpunit/issues/3181): `--filter` should be case-insensitive * Fixed [#3234](https://github.com/sebastianbergmann/phpunit/issues/3234): `assertArraySubset()` with `$strict=true` does not display differences properly * Fixed [#3254](https://github.com/sebastianbergmann/phpunit/issues/3254): TextUI test runner cannot run a `Test` instance that is not a `TestSuite` ## [6.5.12] - 2018-08-22 +### Fixed + * Fixed [#3248](https://github.com/sebastianbergmann/phpunit/issues/3248) and [#3233](https://github.com/sebastianbergmann/phpunit/issues/3233): `phpunit.xsd` dictates element order where it should not * Fixed [#3251](https://github.com/sebastianbergmann/phpunit/issues/3251): TeamCity result logger is missing test duration information ## [6.5.11] - 2018-08-07 +### Fixed + * Fixed [#3219](https://github.com/sebastianbergmann/phpunit/issues/3219): `getMockFromWsdl()` generates invalid PHP code when WSDL filename contains special characters ## [6.5.10] - 2018-08-03 @@ -91,6 +103,7 @@ All notable changes of the PHPUnit 6.5 release series are documented in this fil * Fixed [#2654](https://github.com/sebastianbergmann/phpunit/issues/2654): Problems with `assertJsonStringEqualsJsonString()` * Fixed [#2810](https://github.com/sebastianbergmann/phpunit/pull/2810): Code Coverage for PHPT tests does not work +[6.5.14]: https://github.com/sebastianbergmann/phpunit/compare/6.5.13...6.5.14 [6.5.13]: https://github.com/sebastianbergmann/phpunit/compare/6.5.12...6.5.13 [6.5.12]: https://github.com/sebastianbergmann/phpunit/compare/6.5.11...6.5.12 [6.5.11]: https://github.com/sebastianbergmann/phpunit/compare/6.5.10...6.5.11 diff --git a/vendor/phpunit/phpunit/LICENSE b/vendor/phpunit/phpunit/LICENSE index faba2668..46fabcbd 100644 --- a/vendor/phpunit/phpunit/LICENSE +++ b/vendor/phpunit/phpunit/LICENSE @@ -1,6 +1,6 @@ PHPUnit -Copyright (c) 2001-2018, Sebastian Bergmann . +Copyright (c) 2001-2019, Sebastian Bergmann . All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/vendor/phpunit/phpunit/build.xml b/vendor/phpunit/phpunit/build.xml index af03dffa..ae14a6d9 100644 --- a/vendor/phpunit/phpunit/build.xml +++ b/vendor/phpunit/phpunit/build.xml @@ -26,10 +26,9 @@ - + - @@ -51,6 +50,17 @@ + + + + + + + + + + + @@ -100,7 +110,7 @@ - + diff --git a/vendor/phpunit/phpunit/phive.xml b/vendor/phpunit/phpunit/phive.xml index d5bff01a..8438a7a7 100644 --- a/vendor/phpunit/phpunit/phive.xml +++ b/vendor/phpunit/phpunit/phive.xml @@ -1,7 +1,7 @@ - - + + diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/IsEqual.php b/vendor/phpunit/phpunit/src/Framework/Constraint/IsEqual.php index 768f677b..1067c47b 100644 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/IsEqual.php +++ b/vendor/phpunit/phpunit/src/Framework/Constraint/IsEqual.php @@ -157,7 +157,7 @@ class IsEqual extends Constraint } return \sprintf( - 'is equal to "%s"', + "is equal to '%s'", $this->value ); } diff --git a/vendor/phpunit/phpunit/src/Runner/Version.php b/vendor/phpunit/phpunit/src/Runner/Version.php index ad98c050..2f82f36d 100644 --- a/vendor/phpunit/phpunit/src/Runner/Version.php +++ b/vendor/phpunit/phpunit/src/Runner/Version.php @@ -32,7 +32,7 @@ class Version } if (self::$version === null) { - $version = new VersionId('6.5.13', \dirname(\dirname(__DIR__))); + $version = new VersionId('6.5.14', \dirname(\dirname(__DIR__))); self::$version = $version->getVersion(); } diff --git a/vendor/phpunit/phpunit/src/Util/Test.php b/vendor/phpunit/phpunit/src/Util/Test.php index 1e16bf18..5bc89a45 100644 --- a/vendor/phpunit/phpunit/src/Util/Test.php +++ b/vendor/phpunit/phpunit/src/Util/Test.php @@ -37,7 +37,7 @@ class Test const REGEX_REQUIRES_VERSION = '/@requires\s+(?PPHP(?:Unit)?)\s+(?P[<>=!]{0,2})\s*(?P[\d\.-]+(dev|(RC|alpha|beta)[\d\.])?)[ \t]*\r?$/m'; const REGEX_REQUIRES_VERSION_CONSTRAINT = '/@requires\s+(?PPHP(?:Unit)?)\s+(?P[\d\t -.|~^]+)[ \t]*\r?$/m'; const REGEX_REQUIRES_OS = '/@requires\s+(?POS(?:FAMILY)?)\s+(?P.+?)[ \t]*\r?$/m'; - const REGEX_REQUIRES = '/@requires\s+(?Pfunction|extension)\s+(?P([^ ]+?))\s*(?P[<>=!]{0,2})\s*(?P[\d\.-]+[\d\.]?)?[ \t]*\r?$/m'; + const REGEX_REQUIRES = '/@requires\s+(?Pfunction|extension)\s+(?P([^\s<>=!]+))\s*(?P[<>=!]{0,2})\s*(?P[\d\.-]+[\d\.]?)?[ \t]*\r?$/m'; const UNKNOWN = -1; const SMALL = 0; diff --git a/vendor/phpunit/phpunit/tests/_files/RequirementsTest.php b/vendor/phpunit/phpunit/tests/_files/RequirementsTest.php index 28788f10..e21c9d29 100644 --- a/vendor/phpunit/phpunit/tests/_files/RequirementsTest.php +++ b/vendor/phpunit/phpunit/tests/_files/RequirementsTest.php @@ -79,6 +79,14 @@ class RequirementsTest extends TestCase { } + /** + * @requires function testFunc2 + * @see https://github.com/sebastianbergmann/phpunit/issues/3459 + */ + public function testRequiresFunctionWithDigit() + { + } + /** * @requires OS SunOS * @requires OSFAMILY Solaris @@ -92,9 +100,9 @@ class RequirementsTest extends TestCase * @requires PHPUnit 9-dev * @requires OS DOESNOTEXIST * @requires function testFuncOne - * @requires function testFuncTwo + * @requires function testFunc2 * @requires extension testExtOne - * @requires extension testExtTwo + * @requires extension testExt2 * @requires extension testExtThree 2.0 */ public function testAllPossibleRequirements() diff --git a/vendor/phpunit/phpunit/tests/unit/Framework/TestCaseTest.php b/vendor/phpunit/phpunit/tests/unit/Framework/TestCaseTest.php index 8f4383ce..3b0dfb41 100644 --- a/vendor/phpunit/phpunit/tests/unit/Framework/TestCaseTest.php +++ b/vendor/phpunit/phpunit/tests/unit/Framework/TestCaseTest.php @@ -556,9 +556,9 @@ class TestCaseTest extends TestCase 'PHPUnit >= 9-dev is required.' . PHP_EOL . 'Operating system matching /DOESNOTEXIST/i is required.' . PHP_EOL . 'Function testFuncOne is required.' . PHP_EOL . - 'Function testFuncTwo is required.' . PHP_EOL . + 'Function testFunc2 is required.' . PHP_EOL . 'Extension testExtOne is required.' . PHP_EOL . - 'Extension testExtTwo is required.' . PHP_EOL . + 'Extension testExt2 is required.' . PHP_EOL . 'Extension testExtThree >= 2.0 is required.', $test->getStatusMessage() ); diff --git a/vendor/phpunit/phpunit/tests/unit/Util/TestTest.php b/vendor/phpunit/phpunit/tests/unit/Util/TestTest.php index d2f5f44d..bd4cd56f 100644 --- a/vendor/phpunit/phpunit/tests/unit/Util/TestTest.php +++ b/vendor/phpunit/phpunit/tests/unit/Util/TestTest.php @@ -154,11 +154,11 @@ class TestTest extends TestCase 'OS' => 'DOESNOTEXIST', 'functions' => [ 'testFuncOne', - 'testFuncTwo', + 'testFunc2', ], 'extensions' => [ 'testExtOne', - 'testExtTwo', + 'testExt2', 'testExtThree', ], 'extension_versions' => [ @@ -508,9 +508,9 @@ class TestTest extends TestCase 'PHPUnit >= 9-dev is required.', 'Operating system matching /DOESNOTEXIST/i is required.', 'Function testFuncOne is required.', - 'Function testFuncTwo is required.', + 'Function testFunc2 is required.', 'Extension testExtOne is required.', - 'Extension testExtTwo is required.', + 'Extension testExt2 is required.', 'Extension testExtThree >= 2.0 is required.', ]], ['testPHPVersionOperatorLessThan', ['PHP < 5.4 is required.']], diff --git a/vendor/psr/http-factory/.gitignore b/vendor/psr/http-factory/.gitignore new file mode 100644 index 00000000..d8a7996a --- /dev/null +++ b/vendor/psr/http-factory/.gitignore @@ -0,0 +1,2 @@ +composer.lock +vendor/ diff --git a/vendor/psr/http-factory/.pullapprove.yml b/vendor/psr/http-factory/.pullapprove.yml new file mode 100644 index 00000000..8cf08194 --- /dev/null +++ b/vendor/psr/http-factory/.pullapprove.yml @@ -0,0 +1,7 @@ +extends: default +reviewers: + - + name: contributors + required: 1 + teams: + - http-factory-contributors diff --git a/vendor/psr/http-factory/LICENSE b/vendor/psr/http-factory/LICENSE new file mode 100644 index 00000000..3f1559b2 --- /dev/null +++ b/vendor/psr/http-factory/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2018 PHP-FIG + +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 the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/vendor/psr/http-factory/README.md b/vendor/psr/http-factory/README.md new file mode 100644 index 00000000..41d362a6 --- /dev/null +++ b/vendor/psr/http-factory/README.md @@ -0,0 +1,10 @@ +HTTP Factories +============== + +This repository holds all interfaces related to [PSR-17 (HTTP Message Factories)][psr-17]. +Please refer to the specification for a description. + +You can find implementations of the specification by looking for packages providing the +[psr/http-factory-implementation](https://packagist.org/providers/psr/http-factory-implementation) virtual package. + +[psr-17]: https://www.php-fig.org/psr/psr-17/ diff --git a/vendor/psr/http-factory/composer.json b/vendor/psr/http-factory/composer.json new file mode 100644 index 00000000..af62b290 --- /dev/null +++ b/vendor/psr/http-factory/composer.json @@ -0,0 +1,35 @@ +{ + "name": "psr/http-factory", + "description": "Common interfaces for PSR-7 HTTP message factories", + "keywords": [ + "psr", + "psr-7", + "psr-17", + "http", + "factory", + "message", + "request", + "response" + ], + "license": "MIT", + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "require": { + "php": ">=7.0.0", + "psr/http-message": "^1.0" + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + } +} diff --git a/vendor/psr/http-factory/src/RequestFactoryInterface.php b/vendor/psr/http-factory/src/RequestFactoryInterface.php new file mode 100644 index 00000000..cb39a08b --- /dev/null +++ b/vendor/psr/http-factory/src/RequestFactoryInterface.php @@ -0,0 +1,18 @@ +=7.0.0", - "egulias/email-validator": "~2.0" + "egulias/email-validator": "~2.0", + "symfony/polyfill-iconv": "^1.0", + "symfony/polyfill-mbstring": "^1.0", + "symfony/polyfill-intl-idn": "^1.10" }, "require-dev": { "mockery/mockery": "~0.9.1", - "symfony/phpunit-bridge": "~3.3@dev" + "symfony/phpunit-bridge": "^3.4.19|^4.1.8" }, "suggest": { "ext-intl": "Needed to support internationalized email addresses", @@ -34,7 +37,7 @@ }, "extra": { "branch-alias": { - "dev-master": "6.1-dev" + "dev-master": "6.2-dev" } } } diff --git a/vendor/swiftmailer/swiftmailer/doc/plugins.rst b/vendor/swiftmailer/swiftmailer/doc/plugins.rst index c19c6d6a..548b07ff 100644 --- a/vendor/swiftmailer/swiftmailer/doc/plugins.rst +++ b/vendor/swiftmailer/swiftmailer/doc/plugins.rst @@ -265,7 +265,7 @@ this to one user: Subject: Important notice for smilingsunshine2009 - Hello smilingsunshine2009,you requested to reset your password. + Hello smilingsunshine2009, you requested to reset your password. Please visit https://example.com/pwreset and use the reset code 183457 to set a new password. While another use may receive the message as: diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift.php index 93e596ce..4d478a29 100644 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift.php +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift.php @@ -15,7 +15,7 @@ */ abstract class Swift { - const VERSION = '6.1.3'; + const VERSION = '6.2.1'; public static $initialized = false; public static $inits = []; diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/AddressEncoder/IdnAddressEncoder.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/AddressEncoder/IdnAddressEncoder.php index 56935b13..a373ef9d 100644 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/AddressEncoder/IdnAddressEncoder.php +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/AddressEncoder/IdnAddressEncoder.php @@ -27,8 +27,7 @@ class Swift_AddressEncoder_IdnAddressEncoder implements Swift_AddressEncoder /** * Encodes the domain part of an address using IDN. * - * @throws Swift_AddressEncoderException If local-part contains non-ASCII characters, - * or if no suitable IDN encoder is installed. + * @throws Swift_AddressEncoderException If local-part contains non-ASCII characters */ public function encodeString(string $address): string { @@ -42,28 +41,10 @@ class Swift_AddressEncoder_IdnAddressEncoder implements Swift_AddressEncoder } if (preg_match('/[^\x00-\x7F]/', $domain)) { - $address = sprintf('%s@%s', $local, $this->idnToAscii($domain)); + $address = sprintf('%s@%s', $local, idn_to_ascii($domain, 0, INTL_IDNA_VARIANT_UTS46)); } } return $address; } - - /** - * IDN-encodes a UTF-8 string to ASCII. - */ - protected function idnToAscii(string $string): string - { - if (function_exists('idn_to_ascii')) { - return idn_to_ascii($string, 0, INTL_IDNA_VARIANT_UTS46); - } - - if (class_exists('TrueBV\Punycode')) { - $punycode = new \TrueBV\Punycode(); - - return $punycode->encode($string); - } - - throw new Swift_AddressEncoderException('Non-ASCII characters in address, but no IDN encoder found (install the intl extension or the true/punycode package)', $string); - } } diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Attachment.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Attachment.php index 79aac6a0..642aa6f2 100644 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Attachment.php +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Attachment.php @@ -42,7 +42,7 @@ class Swift_Attachment extends Swift_Mime_Attachment * @param string $path * @param string $contentType optional * - * @return Swift_Mime_Attachment + * @return self */ public static function fromPath($path, $contentType = null) { diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/MimePart.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/MimePart.php index 54c8b3ac..0acfd4e2 100644 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/MimePart.php +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/MimePart.php @@ -191,16 +191,7 @@ class Swift_Mime_MimePart extends Swift_Mime_SimpleMimeEntity { $charset = strtolower($this->getCharset()); if (!in_array($charset, ['utf-8', 'iso-8859-1', 'iso-8859-15', ''])) { - // mb_convert_encoding must be the first one to check, since iconv cannot convert some words. - if (function_exists('mb_convert_encoding')) { - $string = mb_convert_encoding($string, $charset, 'utf-8'); - } elseif (function_exists('iconv')) { - $string = iconv('utf-8//TRANSLIT//IGNORE', $charset, $string); - } else { - throw new Swift_SwiftException('No suitable convert encoding function (use UTF-8 as your charset or install the mbstring or iconv extension).'); - } - - return $string; + return mb_convert_encoding($string, $charset, 'utf-8'); } return $string; diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Signers/DKIMSigner.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Signers/DKIMSigner.php index 279f44c8..7f1bf4a5 100644 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Signers/DKIMSigner.php +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Signers/DKIMSigner.php @@ -129,9 +129,9 @@ class Swift_Signers_DKIMSigner implements Swift_Signers_HeaderSigner /** * If debugHeaders is set store debugData here. * - * @var string + * @var string[] */ - private $debugHeadersData = ''; + private $debugHeadersData = []; /** * Stores the bodyHash. diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/AuthHandler.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/AuthHandler.php index 4798dbd1..37334208 100644 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/AuthHandler.php +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/AuthHandler.php @@ -179,7 +179,7 @@ class Swift_Transport_Esmtp_AuthHandler implements Swift_Transport_EsmtpHandler } } catch (Swift_TransportException $e) { // keep the error message, but tries the other authenticators - $errors[] = [$authenticator->getAuthKeyword(), $e]; + $errors[] = [$authenticator->getAuthKeyword(), $e->getMessage()]; } } } diff --git a/vendor/swiftmailer/swiftmailer/tests/smoke/Swift/Smoke/HtmlWithAttachmentSmokeTest.php b/vendor/swiftmailer/swiftmailer/tests/smoke/Swift/Smoke/HtmlWithAttachmentSmokeTest.php index 8a2647a7..5ed6c33b 100644 --- a/vendor/swiftmailer/swiftmailer/tests/smoke/Swift/Smoke/HtmlWithAttachmentSmokeTest.php +++ b/vendor/swiftmailer/swiftmailer/tests/smoke/Swift/Smoke/HtmlWithAttachmentSmokeTest.php @@ -5,10 +5,12 @@ */ class Swift_Smoke_HtmlWithAttachmentSmokeTest extends SwiftMailerSmokeTestCase { - private $_attFile; + private $attFile; protected function setUp() { + parent::setUp(); + $this->attFile = __DIR__.'/../../../_samples/files/textfile.zip'; } diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/IdGeneratorTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/IdGeneratorTest.php index e0571a30..dfea5806 100644 --- a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/IdGeneratorTest.php +++ b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/IdGeneratorTest.php @@ -24,7 +24,7 @@ class Swift_Mime_IdGeneratorTest extends \PHPUnit\Framework\TestCase $id = $idGenerator->generateId(); $this->assertTrue($emailValidator->isValid($id, new RFCValidation())); - $this->assertEquals(1, preg_match('/^.{32}@example.net$/', $id)); + $this->assertRegExp('/^.{32}@example.net$/', $id); $anotherId = $idGenerator->generateId(); $this->assertNotEquals($id, $anotherId); diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Transport/Esmtp/Auth/NTLMAuthenticatorTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Transport/Esmtp/Auth/NTLMAuthenticatorTest.php index df306eb4..98e2e25d 100644 --- a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Transport/Esmtp/Auth/NTLMAuthenticatorTest.php +++ b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Transport/Esmtp/Auth/NTLMAuthenticatorTest.php @@ -8,7 +8,7 @@ class Swift_Transport_Esmtp_Auth_NTLMAuthenticatorTest extends \SwiftMailerTestC protected function setUp() { - if (!function_exists('openssl_encrypt') || !function_exists('bcmul') || !function_exists('iconv')) { + if (!function_exists('openssl_encrypt') || !function_exists('bcmul')) { $this->markTestSkipped('One of the required functions is not available.'); } } diff --git a/vendor/symfony/console/Application.php b/vendor/symfony/console/Application.php index 2686019c..5a9b1855 100644 --- a/vendor/symfony/console/Application.php +++ b/vendor/symfony/console/Application.php @@ -44,6 +44,7 @@ use Symfony\Component\Console\Style\SymfonyStyle; use Symfony\Component\Debug\ErrorHandler; use Symfony\Component\Debug\Exception\FatalThrowableError; use Symfony\Component\EventDispatcher\EventDispatcherInterface; +use Symfony\Component\EventDispatcher\LegacyEventDispatcherProxy; /** * An Application is the container for a collection of commands. @@ -62,7 +63,7 @@ use Symfony\Component\EventDispatcher\EventDispatcherInterface; */ class Application { - private $commands = array(); + private $commands = []; private $wantHelps = false; private $runningCommand; private $name; @@ -90,9 +91,12 @@ class Application $this->defaultCommand = 'list'; } + /** + * @final since Symfony 4.3, the type-hint will be updated to the interface from symfony/contracts in 5.0 + */ public function setDispatcher(EventDispatcherInterface $dispatcher) { - $this->dispatcher = $dispatcher; + $this->dispatcher = LegacyEventDispatcherProxy::decorate($dispatcher); } public function setCommandLoader(CommandLoaderInterface $commandLoader) @@ -193,17 +197,24 @@ class Application */ public function doRun(InputInterface $input, OutputInterface $output) { - if (true === $input->hasParameterOption(array('--version', '-V'), true)) { + if (true === $input->hasParameterOption(['--version', '-V'], true)) { $output->writeln($this->getLongVersion()); return 0; } + try { + // Makes ArgvInput::getFirstArgument() able to distinguish an option from an argument. + $input->bind($this->getDefinition()); + } catch (ExceptionInterface $e) { + // Errors must be ignored, full binding/validation happens later when the command is known. + } + $name = $this->getCommandName($input); - if (true === $input->hasParameterOption(array('--help', '-h'), true)) { + if (true === $input->hasParameterOption(['--help', '-h'], true)) { if (!$name) { $name = 'help'; - $input = new ArrayInput(array('command_name' => $this->defaultCommand)); + $input = new ArrayInput(['command_name' => $this->defaultCommand]); } else { $this->wantHelps = true; } @@ -214,9 +225,9 @@ class Application $definition = $this->getDefinition(); $definition->setArguments(array_merge( $definition->getArguments(), - array( + [ 'command' => new InputArgument('command', InputArgument::OPTIONAL, $definition->getArgument('command')->getDescription(), $name), - ) + ] )); } @@ -228,7 +239,7 @@ class Application if (!($e instanceof CommandNotFoundException && !$e instanceof NamespaceNotFoundException) || 1 !== \count($alternatives = $e->getAlternatives()) || !$input->isInteractive()) { if (null !== $this->dispatcher) { $event = new ConsoleErrorEvent($input, $output, $e); - $this->dispatcher->dispatch(ConsoleEvents::ERROR, $event); + $this->dispatcher->dispatch($event, ConsoleEvents::ERROR); if (0 === $event->getExitCode()) { return 0; @@ -247,7 +258,7 @@ class Application if (!$style->confirm(sprintf('Do you want to run "%s" instead? ', $alternative), false)) { if (null !== $this->dispatcher) { $event = new ConsoleErrorEvent($input, $output, $e); - $this->dispatcher->dispatch(ConsoleEvents::ERROR, $event); + $this->dispatcher->dispatch($event, ConsoleEvents::ERROR); return $event->getExitCode(); } @@ -535,7 +546,7 @@ class Application */ public function getNamespaces() { - $namespaces = array(); + $namespaces = []; foreach ($this->all() as $command) { $namespaces = array_merge($namespaces, $this->extractAllNamespaces($command->getName())); @@ -602,7 +613,16 @@ class Application { $this->init(); - $aliases = array(); + $aliases = []; + + foreach ($this->commands as $command) { + foreach ($command->getAliases() as $alias) { + if (!$this->has($alias)) { + $this->commands[$alias] = $command; + } + } + } + $allCommands = $this->commandLoader ? array_merge($this->commandLoader->getNames(), array_keys($this->commands)) : array_keys($this->commands); $expr = preg_replace_callback('{([^:]+|)}', function ($matches) { return preg_quote($matches[1]).'[^:]*'; }, $name); $commands = preg_grep('{^'.$expr.'}', $allCommands); @@ -695,7 +715,7 @@ class Application return $commands; } - $commands = array(); + $commands = []; foreach ($this->commands as $name => $command) { if ($namespace === $this->extractNamespace($name, substr_count($namespace, ':') + 1)) { $commands[$name] = $command; @@ -722,7 +742,7 @@ class Application */ public static function getAbbreviations($names) { - $abbrevs = array(); + $abbrevs = []; foreach ($names as $name) { for ($len = \strlen($name); $len > 0; --$len) { $abbrev = substr($name, 0, $len); @@ -768,18 +788,18 @@ class Application } $width = $this->terminal->getWidth() ? $this->terminal->getWidth() - 1 : PHP_INT_MAX; - $lines = array(); - foreach ('' !== $message ? preg_split('/\r?\n/', $message) : array() as $line) { + $lines = []; + foreach ('' !== $message ? preg_split('/\r?\n/', $message) : [] as $line) { foreach ($this->splitStringByWidth($line, $width - 4) as $line) { // pre-format lines to get the right string length $lineLength = Helper::strlen($line) + 4; - $lines[] = array($line, $lineLength); + $lines[] = [$line, $lineLength]; $len = max($lineLength, $len); } } - $messages = array(); + $messages = []; if (!$e instanceof ExceptionInterface || OutputInterface::VERBOSITY_VERBOSE <= $output->getVerbosity()) { $messages[] = sprintf('%s', OutputFormatter::escape(sprintf('In %s line %s:', basename($e->getFile()) ?: 'n/a', $e->getLine() ?: 'n/a'))); } @@ -801,12 +821,12 @@ class Application // exception related properties $trace = $e->getTrace(); - array_unshift($trace, array( + array_unshift($trace, [ 'function' => '', 'file' => $e->getFile() ?: 'n/a', 'line' => $e->getLine() ?: 'n/a', - 'args' => array(), - )); + 'args' => [], + ]); for ($i = 0, $count = \count($trace); $i < $count; ++$i) { $class = isset($trace[$i]['class']) ? $trace[$i]['class'] : ''; @@ -828,13 +848,13 @@ class Application */ protected function configureIO(InputInterface $input, OutputInterface $output) { - if (true === $input->hasParameterOption(array('--ansi'), true)) { + if (true === $input->hasParameterOption(['--ansi'], true)) { $output->setDecorated(true); - } elseif (true === $input->hasParameterOption(array('--no-ansi'), true)) { + } elseif (true === $input->hasParameterOption(['--no-ansi'], true)) { $output->setDecorated(false); } - if (true === $input->hasParameterOption(array('--no-interaction', '-n'), true)) { + if (true === $input->hasParameterOption(['--no-interaction', '-n'], true)) { $input->setInteractive(false); } elseif (\function_exists('posix_isatty')) { $inputStream = null; @@ -856,7 +876,7 @@ class Application default: $shellVerbosity = 0; break; } - if (true === $input->hasParameterOption(array('--quiet', '-q'), true)) { + if (true === $input->hasParameterOption(['--quiet', '-q'], true)) { $output->setVerbosity(OutputInterface::VERBOSITY_QUIET); $shellVerbosity = -1; } else { @@ -913,7 +933,7 @@ class Application $e = null; try { - $this->dispatcher->dispatch(ConsoleEvents::COMMAND, $event); + $this->dispatcher->dispatch($event, ConsoleEvents::COMMAND); if ($event->commandShouldRun()) { $exitCode = $command->run($input, $output); @@ -922,7 +942,7 @@ class Application } } catch (\Throwable $e) { $event = new ConsoleErrorEvent($input, $output, $e, $command); - $this->dispatcher->dispatch(ConsoleEvents::ERROR, $event); + $this->dispatcher->dispatch($event, ConsoleEvents::ERROR); $e = $event->getError(); if (0 === $exitCode = $event->getExitCode()) { @@ -931,7 +951,7 @@ class Application } $event = new ConsoleTerminateEvent($command, $input, $output, $exitCode); - $this->dispatcher->dispatch(ConsoleEvents::TERMINATE, $event); + $this->dispatcher->dispatch($event, ConsoleEvents::TERMINATE); if (null !== $e) { throw $e; @@ -957,7 +977,7 @@ class Application */ protected function getDefaultInputDefinition() { - return new InputDefinition(array( + return new InputDefinition([ new InputArgument('command', InputArgument::REQUIRED, 'The command to execute'), new InputOption('--help', '-h', InputOption::VALUE_NONE, 'Display this help message'), @@ -967,7 +987,7 @@ class Application new InputOption('--ansi', '', InputOption::VALUE_NONE, 'Force ANSI output'), new InputOption('--no-ansi', '', InputOption::VALUE_NONE, 'Disable ANSI output'), new InputOption('--no-interaction', '-n', InputOption::VALUE_NONE, 'Do not ask any interactive question'), - )); + ]); } /** @@ -977,7 +997,7 @@ class Application */ protected function getDefaultCommands() { - return array(new HelpCommand(), new ListCommand()); + return [new HelpCommand(), new ListCommand()]; } /** @@ -987,12 +1007,12 @@ class Application */ protected function getDefaultHelperSet() { - return new HelperSet(array( + return new HelperSet([ new FormatterHelper(), new DebugFormatterHelper(), new ProcessHelper(), new QuestionHelper(), - )); + ]); } /** @@ -1037,9 +1057,9 @@ class Application private function findAlternatives($name, $collection) { $threshold = 1e3; - $alternatives = array(); + $alternatives = []; - $collectionParts = array(); + $collectionParts = []; foreach ($collection as $item) { $collectionParts[$item] = explode(':', $item); } @@ -1116,7 +1136,7 @@ class Application } $utf8String = mb_convert_encoding($string, 'utf8', $encoding); - $lines = array(); + $lines = []; $line = ''; foreach (preg_split('//u', $utf8String) as $char) { // test if $char could be appended to current line @@ -1147,7 +1167,7 @@ class Application { // -1 as third argument is needed to skip the command short name when exploding $parts = explode(':', $name, -1); - $namespaces = array(); + $namespaces = []; foreach ($parts as $part) { if (\count($namespaces)) { diff --git a/vendor/symfony/console/CHANGELOG.md b/vendor/symfony/console/CHANGELOG.md index b9175109..67decd30 100644 --- a/vendor/symfony/console/CHANGELOG.md +++ b/vendor/symfony/console/CHANGELOG.md @@ -1,10 +1,18 @@ CHANGELOG ========= +4.3.0 +----- + + * added support for hyperlinks + * added `ProgressBar::iterate()` method that simplify updating the progress bar when iterating + * added `Question::setAutocompleterCallback()` to provide a callback function + that dynamically generates suggestions as the user types + 4.2.0 ----- - * allowed passing commands as `array($process, 'ENV_VAR' => 'value')` to + * allowed passing commands as `[$process, 'ENV_VAR' => 'value']` to `ProcessHelper::run()` to pass environment variables * deprecated passing a command as a string to `ProcessHelper::run()`, pass it the command as an array of its arguments instead diff --git a/vendor/symfony/console/Command/Command.php b/vendor/symfony/console/Command/Command.php index 436c9139..18d683de 100644 --- a/vendor/symfony/console/Command/Command.php +++ b/vendor/symfony/console/Command/Command.php @@ -37,7 +37,7 @@ class Command private $application; private $name; private $processTitle; - private $aliases = array(); + private $aliases = []; private $definition; private $hidden = false; private $help; @@ -46,8 +46,8 @@ class Command private $applicationDefinitionMerged = false; private $applicationDefinitionMergedWithArgs = false; private $code; - private $synopsis = array(); - private $usages = array(); + private $synopsis = []; + private $usages = []; private $helperSet; /** @@ -380,7 +380,7 @@ class Command * Adds an option. * * @param string $name The option name - * @param string|array $shortcut The shortcuts, can be null, a string of shortcuts delimited by | or an array of shortcuts + * @param string|array|null $shortcut The shortcuts, can be null, a string of shortcuts delimited by | or an array of shortcuts * @param int|null $mode The option mode: One of the InputOption::VALUE_* constants * @param string $description A description text * @param string|string[]|int|bool|null $default The default value (must be null for InputOption::VALUE_NONE) @@ -527,14 +527,14 @@ class Command $name = $this->name; $isSingleCommand = $this->application && $this->application->isSingleCommand(); - $placeholders = array( + $placeholders = [ '%command.name%', '%command.full_name%', - ); - $replacements = array( + ]; + $replacements = [ $name, $isSingleCommand ? $_SERVER['PHP_SELF'] : $_SERVER['PHP_SELF'].' '.$name, - ); + ]; return str_replace($placeholders, $replacements, $this->getHelp() ?: $this->getDescription()); } diff --git a/vendor/symfony/console/Command/HelpCommand.php b/vendor/symfony/console/Command/HelpCommand.php index 1e20b008..23847766 100644 --- a/vendor/symfony/console/Command/HelpCommand.php +++ b/vendor/symfony/console/Command/HelpCommand.php @@ -35,11 +35,11 @@ class HelpCommand extends Command $this ->setName('help') - ->setDefinition(array( + ->setDefinition([ new InputArgument('command_name', InputArgument::OPTIONAL, 'The command name', 'help'), new InputOption('format', null, InputOption::VALUE_REQUIRED, 'The output format (txt, xml, json, or md)', 'txt'), new InputOption('raw', null, InputOption::VALUE_NONE, 'To output raw command help'), - )) + ]) ->setDescription('Displays help for a command') ->setHelp(<<<'EOF' The %command.name% command displays help for a given command: @@ -71,10 +71,10 @@ EOF } $helper = new DescriptorHelper(); - $helper->describe($output, $this->command, array( + $helper->describe($output, $this->command, [ 'format' => $input->getOption('format'), 'raw_text' => $input->getOption('raw'), - )); + ]); $this->command = null; } diff --git a/vendor/symfony/console/Command/ListCommand.php b/vendor/symfony/console/Command/ListCommand.php index 5d932338..7259b126 100644 --- a/vendor/symfony/console/Command/ListCommand.php +++ b/vendor/symfony/console/Command/ListCommand.php @@ -69,11 +69,11 @@ EOF protected function execute(InputInterface $input, OutputInterface $output) { $helper = new DescriptorHelper(); - $helper->describe($output, $this->getApplication(), array( + $helper->describe($output, $this->getApplication(), [ 'format' => $input->getOption('format'), 'raw_text' => $input->getOption('raw'), 'namespace' => $input->getArgument('namespace'), - )); + ]); } /** @@ -81,10 +81,10 @@ EOF */ private function createDefinition() { - return new InputDefinition(array( + return new InputDefinition([ new InputArgument('namespace', InputArgument::OPTIONAL, 'The namespace name'), new InputOption('raw', null, InputOption::VALUE_NONE, 'To output raw command list'), new InputOption('format', null, InputOption::VALUE_REQUIRED, 'The output format (txt, xml, json, or md)', 'txt'), - )); + ]); } } diff --git a/vendor/symfony/console/DependencyInjection/AddConsoleCommandPass.php b/vendor/symfony/console/DependencyInjection/AddConsoleCommandPass.php index bf14ba2d..666c8fa5 100644 --- a/vendor/symfony/console/DependencyInjection/AddConsoleCommandPass.php +++ b/vendor/symfony/console/DependencyInjection/AddConsoleCommandPass.php @@ -38,9 +38,9 @@ class AddConsoleCommandPass implements CompilerPassInterface public function process(ContainerBuilder $container) { $commandServices = $container->findTaggedServiceIds($this->commandTag, true); - $lazyCommandMap = array(); - $lazyCommandRefs = array(); - $serviceIds = array(); + $lazyCommandMap = []; + $lazyCommandRefs = []; + $serviceIds = []; foreach ($commandServices as $id => $tags) { $definition = $container->getDefinition($id); @@ -72,7 +72,7 @@ class AddConsoleCommandPass implements CompilerPassInterface unset($tags[0]); $lazyCommandMap[$commandName] = $id; $lazyCommandRefs[$id] = new TypedReference($id, $class); - $aliases = array(); + $aliases = []; foreach ($tags as $tag) { if (isset($tag['command'])) { @@ -81,17 +81,17 @@ class AddConsoleCommandPass implements CompilerPassInterface } } - $definition->addMethodCall('setName', array($commandName)); + $definition->addMethodCall('setName', [$commandName]); if ($aliases) { - $definition->addMethodCall('setAliases', array($aliases)); + $definition->addMethodCall('setAliases', [$aliases]); } } $container ->register($this->commandLoaderServiceId, ContainerCommandLoader::class) ->setPublic(true) - ->setArguments(array(ServiceLocatorTagPass::register($container, $lazyCommandRefs), $lazyCommandMap)); + ->setArguments([ServiceLocatorTagPass::register($container, $lazyCommandRefs), $lazyCommandMap]); $container->setParameter('console.command.ids', $serviceIds); } diff --git a/vendor/symfony/console/Descriptor/ApplicationDescription.php b/vendor/symfony/console/Descriptor/ApplicationDescription.php index 5d347786..03bfcfcd 100644 --- a/vendor/symfony/console/Descriptor/ApplicationDescription.php +++ b/vendor/symfony/console/Descriptor/ApplicationDescription.php @@ -92,12 +92,12 @@ class ApplicationDescription private function inspectApplication() { - $this->commands = array(); - $this->namespaces = array(); + $this->commands = []; + $this->namespaces = []; $all = $this->application->all($this->namespace ? $this->application->findNamespace($this->namespace) : null); foreach ($this->sortCommands($all) as $namespace => $commands) { - $names = array(); + $names = []; /** @var Command $command */ foreach ($commands as $name => $command) { @@ -114,14 +114,14 @@ class ApplicationDescription $names[] = $name; } - $this->namespaces[$namespace] = array('id' => $namespace, 'commands' => $names); + $this->namespaces[$namespace] = ['id' => $namespace, 'commands' => $names]; } } private function sortCommands(array $commands): array { - $namespacedCommands = array(); - $globalCommands = array(); + $namespacedCommands = []; + $globalCommands = []; foreach ($commands as $name => $command) { $key = $this->application->extractNamespace($name, 1); if (!$key) { diff --git a/vendor/symfony/console/Descriptor/Descriptor.php b/vendor/symfony/console/Descriptor/Descriptor.php index 151d84f7..d25a708e 100644 --- a/vendor/symfony/console/Descriptor/Descriptor.php +++ b/vendor/symfony/console/Descriptor/Descriptor.php @@ -34,7 +34,7 @@ abstract class Descriptor implements DescriptorInterface /** * {@inheritdoc} */ - public function describe(OutputInterface $output, $object, array $options = array()) + public function describe(OutputInterface $output, $object, array $options = []) { $this->output = $output; @@ -75,33 +75,33 @@ abstract class Descriptor implements DescriptorInterface * * @return string|mixed */ - abstract protected function describeInputArgument(InputArgument $argument, array $options = array()); + abstract protected function describeInputArgument(InputArgument $argument, array $options = []); /** * Describes an InputOption instance. * * @return string|mixed */ - abstract protected function describeInputOption(InputOption $option, array $options = array()); + abstract protected function describeInputOption(InputOption $option, array $options = []); /** * Describes an InputDefinition instance. * * @return string|mixed */ - abstract protected function describeInputDefinition(InputDefinition $definition, array $options = array()); + abstract protected function describeInputDefinition(InputDefinition $definition, array $options = []); /** * Describes a Command instance. * * @return string|mixed */ - abstract protected function describeCommand(Command $command, array $options = array()); + abstract protected function describeCommand(Command $command, array $options = []); /** * Describes an Application instance. * * @return string|mixed */ - abstract protected function describeApplication(Application $application, array $options = array()); + abstract protected function describeApplication(Application $application, array $options = []); } diff --git a/vendor/symfony/console/Descriptor/DescriptorInterface.php b/vendor/symfony/console/Descriptor/DescriptorInterface.php index 5d3339a9..fbc07df8 100644 --- a/vendor/symfony/console/Descriptor/DescriptorInterface.php +++ b/vendor/symfony/console/Descriptor/DescriptorInterface.php @@ -27,5 +27,5 @@ interface DescriptorInterface * @param object $object * @param array $options */ - public function describe(OutputInterface $output, $object, array $options = array()); + public function describe(OutputInterface $output, $object, array $options = []); } diff --git a/vendor/symfony/console/Descriptor/JsonDescriptor.php b/vendor/symfony/console/Descriptor/JsonDescriptor.php index f60323be..f5a14380 100644 --- a/vendor/symfony/console/Descriptor/JsonDescriptor.php +++ b/vendor/symfony/console/Descriptor/JsonDescriptor.php @@ -29,7 +29,7 @@ class JsonDescriptor extends Descriptor /** * {@inheritdoc} */ - protected function describeInputArgument(InputArgument $argument, array $options = array()) + protected function describeInputArgument(InputArgument $argument, array $options = []) { $this->writeData($this->getInputArgumentData($argument), $options); } @@ -37,7 +37,7 @@ class JsonDescriptor extends Descriptor /** * {@inheritdoc} */ - protected function describeInputOption(InputOption $option, array $options = array()) + protected function describeInputOption(InputOption $option, array $options = []) { $this->writeData($this->getInputOptionData($option), $options); } @@ -45,7 +45,7 @@ class JsonDescriptor extends Descriptor /** * {@inheritdoc} */ - protected function describeInputDefinition(InputDefinition $definition, array $options = array()) + protected function describeInputDefinition(InputDefinition $definition, array $options = []) { $this->writeData($this->getInputDefinitionData($definition), $options); } @@ -53,7 +53,7 @@ class JsonDescriptor extends Descriptor /** * {@inheritdoc} */ - protected function describeCommand(Command $command, array $options = array()) + protected function describeCommand(Command $command, array $options = []) { $this->writeData($this->getCommandData($command), $options); } @@ -61,17 +61,17 @@ class JsonDescriptor extends Descriptor /** * {@inheritdoc} */ - protected function describeApplication(Application $application, array $options = array()) + protected function describeApplication(Application $application, array $options = []) { $describedNamespace = isset($options['namespace']) ? $options['namespace'] : null; $description = new ApplicationDescription($application, $describedNamespace, true); - $commands = array(); + $commands = []; foreach ($description->getCommands() as $command) { $commands[] = $this->getCommandData($command); } - $data = array(); + $data = []; if ('UNKNOWN' !== $application->getName()) { $data['application']['name'] = $application->getName(); if ('UNKNOWN' !== $application->getVersion()) { @@ -97,7 +97,9 @@ class JsonDescriptor extends Descriptor */ private function writeData(array $data, array $options) { - $this->write(json_encode($data, isset($options['json_encoding']) ? $options['json_encoding'] : 0)); + $flags = isset($options['json_encoding']) ? $options['json_encoding'] : 0; + + $this->write(json_encode($data, $flags)); } /** @@ -105,13 +107,13 @@ class JsonDescriptor extends Descriptor */ private function getInputArgumentData(InputArgument $argument) { - return array( + return [ 'name' => $argument->getName(), 'is_required' => $argument->isRequired(), 'is_array' => $argument->isArray(), 'description' => preg_replace('/\s*[\r\n]\s*/', ' ', $argument->getDescription()), 'default' => INF === $argument->getDefault() ? 'INF' : $argument->getDefault(), - ); + ]; } /** @@ -119,7 +121,7 @@ class JsonDescriptor extends Descriptor */ private function getInputOptionData(InputOption $option) { - return array( + return [ 'name' => '--'.$option->getName(), 'shortcut' => $option->getShortcut() ? '-'.str_replace('|', '|-', $option->getShortcut()) : '', 'accept_value' => $option->acceptValue(), @@ -127,7 +129,7 @@ class JsonDescriptor extends Descriptor 'is_multiple' => $option->isArray(), 'description' => preg_replace('/\s*[\r\n]\s*/', ' ', $option->getDescription()), 'default' => INF === $option->getDefault() ? 'INF' : $option->getDefault(), - ); + ]; } /** @@ -135,17 +137,17 @@ class JsonDescriptor extends Descriptor */ private function getInputDefinitionData(InputDefinition $definition) { - $inputArguments = array(); + $inputArguments = []; foreach ($definition->getArguments() as $name => $argument) { $inputArguments[$name] = $this->getInputArgumentData($argument); } - $inputOptions = array(); + $inputOptions = []; foreach ($definition->getOptions() as $name => $option) { $inputOptions[$name] = $this->getInputOptionData($option); } - return array('arguments' => $inputArguments, 'options' => $inputOptions); + return ['arguments' => $inputArguments, 'options' => $inputOptions]; } /** @@ -156,13 +158,13 @@ class JsonDescriptor extends Descriptor $command->getSynopsis(); $command->mergeApplicationDefinition(false); - return array( + return [ 'name' => $command->getName(), - 'usage' => array_merge(array($command->getSynopsis()), $command->getUsages(), $command->getAliases()), + 'usage' => array_merge([$command->getSynopsis()], $command->getUsages(), $command->getAliases()), 'description' => $command->getDescription(), 'help' => $command->getProcessedHelp(), 'definition' => $this->getInputDefinitionData($command->getNativeDefinition()), 'hidden' => $command->isHidden(), - ); + ]; } } diff --git a/vendor/symfony/console/Descriptor/MarkdownDescriptor.php b/vendor/symfony/console/Descriptor/MarkdownDescriptor.php index 6d8399f9..e6245778 100644 --- a/vendor/symfony/console/Descriptor/MarkdownDescriptor.php +++ b/vendor/symfony/console/Descriptor/MarkdownDescriptor.php @@ -31,7 +31,7 @@ class MarkdownDescriptor extends Descriptor /** * {@inheritdoc} */ - public function describe(OutputInterface $output, $object, array $options = array()) + public function describe(OutputInterface $output, $object, array $options = []) { $decorated = $output->isDecorated(); $output->setDecorated(false); @@ -52,7 +52,7 @@ class MarkdownDescriptor extends Descriptor /** * {@inheritdoc} */ - protected function describeInputArgument(InputArgument $argument, array $options = array()) + protected function describeInputArgument(InputArgument $argument, array $options = []) { $this->write( '#### `'.($argument->getName() ?: '')."`\n\n" @@ -66,7 +66,7 @@ class MarkdownDescriptor extends Descriptor /** * {@inheritdoc} */ - protected function describeInputOption(InputOption $option, array $options = array()) + protected function describeInputOption(InputOption $option, array $options = []) { $name = '--'.$option->getName(); if ($option->getShortcut()) { @@ -86,7 +86,7 @@ class MarkdownDescriptor extends Descriptor /** * {@inheritdoc} */ - protected function describeInputDefinition(InputDefinition $definition, array $options = array()) + protected function describeInputDefinition(InputDefinition $definition, array $options = []) { if ($showArguments = \count($definition->getArguments()) > 0) { $this->write('### Arguments'); @@ -112,7 +112,7 @@ class MarkdownDescriptor extends Descriptor /** * {@inheritdoc} */ - protected function describeCommand(Command $command, array $options = array()) + protected function describeCommand(Command $command, array $options = []) { $command->getSynopsis(); $command->mergeApplicationDefinition(false); @@ -122,7 +122,7 @@ class MarkdownDescriptor extends Descriptor .str_repeat('-', Helper::strlen($command->getName()) + 2)."\n\n" .($command->getDescription() ? $command->getDescription()."\n\n" : '') .'### Usage'."\n\n" - .array_reduce(array_merge(array($command->getSynopsis()), $command->getAliases(), $command->getUsages()), function ($carry, $usage) { + .array_reduce(array_merge([$command->getSynopsis()], $command->getAliases(), $command->getUsages()), function ($carry, $usage) { return $carry.'* `'.$usage.'`'."\n"; }) ); @@ -141,7 +141,7 @@ class MarkdownDescriptor extends Descriptor /** * {@inheritdoc} */ - protected function describeApplication(Application $application, array $options = array()) + protected function describeApplication(Application $application, array $options = []) { $describedNamespace = isset($options['namespace']) ? $options['namespace'] : null; $description = new ApplicationDescription($application, $describedNamespace); diff --git a/vendor/symfony/console/Descriptor/TextDescriptor.php b/vendor/symfony/console/Descriptor/TextDescriptor.php index 9361b109..24fcf00a 100644 --- a/vendor/symfony/console/Descriptor/TextDescriptor.php +++ b/vendor/symfony/console/Descriptor/TextDescriptor.php @@ -31,7 +31,7 @@ class TextDescriptor extends Descriptor /** * {@inheritdoc} */ - protected function describeInputArgument(InputArgument $argument, array $options = array()) + protected function describeInputArgument(InputArgument $argument, array $options = []) { if (null !== $argument->getDefault() && (!\is_array($argument->getDefault()) || \count($argument->getDefault()))) { $default = sprintf(' [default: %s]', $this->formatDefaultValue($argument->getDefault())); @@ -54,7 +54,7 @@ class TextDescriptor extends Descriptor /** * {@inheritdoc} */ - protected function describeInputOption(InputOption $option, array $options = array()) + protected function describeInputOption(InputOption $option, array $options = []) { if ($option->acceptValue() && null !== $option->getDefault() && (!\is_array($option->getDefault()) || \count($option->getDefault()))) { $default = sprintf(' [default: %s]', $this->formatDefaultValue($option->getDefault())); @@ -71,7 +71,7 @@ class TextDescriptor extends Descriptor } } - $totalWidth = isset($options['total_width']) ? $options['total_width'] : $this->calculateTotalWidthForOptions(array($option)); + $totalWidth = isset($options['total_width']) ? $options['total_width'] : $this->calculateTotalWidthForOptions([$option]); $synopsis = sprintf('%s%s', $option->getShortcut() ? sprintf('-%s, ', $option->getShortcut()) : ' ', sprintf('--%s%s', $option->getName(), $value) @@ -92,7 +92,7 @@ class TextDescriptor extends Descriptor /** * {@inheritdoc} */ - protected function describeInputDefinition(InputDefinition $definition, array $options = array()) + protected function describeInputDefinition(InputDefinition $definition, array $options = []) { $totalWidth = $this->calculateTotalWidthForOptions($definition->getOptions()); foreach ($definition->getArguments() as $argument) { @@ -103,7 +103,7 @@ class TextDescriptor extends Descriptor $this->writeText('Arguments:', $options); $this->writeText("\n"); foreach ($definition->getArguments() as $argument) { - $this->describeInputArgument($argument, array_merge($options, array('total_width' => $totalWidth))); + $this->describeInputArgument($argument, array_merge($options, ['total_width' => $totalWidth])); $this->writeText("\n"); } } @@ -113,7 +113,7 @@ class TextDescriptor extends Descriptor } if ($definition->getOptions()) { - $laterOptions = array(); + $laterOptions = []; $this->writeText('Options:', $options); foreach ($definition->getOptions() as $option) { @@ -122,11 +122,11 @@ class TextDescriptor extends Descriptor continue; } $this->writeText("\n"); - $this->describeInputOption($option, array_merge($options, array('total_width' => $totalWidth))); + $this->describeInputOption($option, array_merge($options, ['total_width' => $totalWidth])); } foreach ($laterOptions as $option) { $this->writeText("\n"); - $this->describeInputOption($option, array_merge($options, array('total_width' => $totalWidth))); + $this->describeInputOption($option, array_merge($options, ['total_width' => $totalWidth])); } } } @@ -134,7 +134,7 @@ class TextDescriptor extends Descriptor /** * {@inheritdoc} */ - protected function describeCommand(Command $command, array $options = array()) + protected function describeCommand(Command $command, array $options = []) { $command->getSynopsis(true); $command->getSynopsis(false); @@ -148,7 +148,7 @@ class TextDescriptor extends Descriptor } $this->writeText('Usage:', $options); - foreach (array_merge(array($command->getSynopsis(true)), $command->getAliases(), $command->getUsages()) as $usage) { + foreach (array_merge([$command->getSynopsis(true)], $command->getAliases(), $command->getUsages()) as $usage) { $this->writeText("\n"); $this->writeText(' '.OutputFormatter::escape($usage), $options); } @@ -174,7 +174,7 @@ class TextDescriptor extends Descriptor /** * {@inheritdoc} */ - protected function describeApplication(Application $application, array $options = array()) + protected function describeApplication(Application $application, array $options = []) { $describedNamespace = isset($options['namespace']) ? $options['namespace'] : null; $description = new ApplicationDescription($application, $describedNamespace); @@ -250,7 +250,7 @@ class TextDescriptor extends Descriptor /** * {@inheritdoc} */ - private function writeText($content, array $options = array()) + private function writeText($content, array $options = []) { $this->write( isset($options['raw_text']) && $options['raw_text'] ? strip_tags($content) : $content, @@ -302,7 +302,7 @@ class TextDescriptor extends Descriptor */ private function getColumnWidth(array $commands): int { - $widths = array(); + $widths = []; foreach ($commands as $command) { if ($command instanceof Command) { diff --git a/vendor/symfony/console/Descriptor/XmlDescriptor.php b/vendor/symfony/console/Descriptor/XmlDescriptor.php index d0c6abdd..f5202a33 100644 --- a/vendor/symfony/console/Descriptor/XmlDescriptor.php +++ b/vendor/symfony/console/Descriptor/XmlDescriptor.php @@ -64,7 +64,7 @@ class XmlDescriptor extends Descriptor $commandXML->appendChild($usagesXML = $dom->createElement('usages')); - foreach (array_merge(array($command->getSynopsis()), $command->getAliases(), $command->getUsages()) as $usage) { + foreach (array_merge([$command->getSynopsis()], $command->getAliases(), $command->getUsages()) as $usage) { $usagesXML->appendChild($dom->createElement('usage', $usage)); } @@ -130,7 +130,7 @@ class XmlDescriptor extends Descriptor /** * {@inheritdoc} */ - protected function describeInputArgument(InputArgument $argument, array $options = array()) + protected function describeInputArgument(InputArgument $argument, array $options = []) { $this->writeDocument($this->getInputArgumentDocument($argument)); } @@ -138,7 +138,7 @@ class XmlDescriptor extends Descriptor /** * {@inheritdoc} */ - protected function describeInputOption(InputOption $option, array $options = array()) + protected function describeInputOption(InputOption $option, array $options = []) { $this->writeDocument($this->getInputOptionDocument($option)); } @@ -146,7 +146,7 @@ class XmlDescriptor extends Descriptor /** * {@inheritdoc} */ - protected function describeInputDefinition(InputDefinition $definition, array $options = array()) + protected function describeInputDefinition(InputDefinition $definition, array $options = []) { $this->writeDocument($this->getInputDefinitionDocument($definition)); } @@ -154,7 +154,7 @@ class XmlDescriptor extends Descriptor /** * {@inheritdoc} */ - protected function describeCommand(Command $command, array $options = array()) + protected function describeCommand(Command $command, array $options = []) { $this->writeDocument($this->getCommandDocument($command)); } @@ -162,7 +162,7 @@ class XmlDescriptor extends Descriptor /** * {@inheritdoc} */ - protected function describeApplication(Application $application, array $options = array()) + protected function describeApplication(Application $application, array $options = []) { $this->writeDocument($this->getApplicationDocument($application, isset($options['namespace']) ? $options['namespace'] : null)); } @@ -200,7 +200,7 @@ class XmlDescriptor extends Descriptor $descriptionXML->appendChild($dom->createTextNode($argument->getDescription())); $objectXML->appendChild($defaultsXML = $dom->createElement('defaults')); - $defaults = \is_array($argument->getDefault()) ? $argument->getDefault() : (\is_bool($argument->getDefault()) ? array(var_export($argument->getDefault(), true)) : ($argument->getDefault() ? array($argument->getDefault()) : array())); + $defaults = \is_array($argument->getDefault()) ? $argument->getDefault() : (\is_bool($argument->getDefault()) ? [var_export($argument->getDefault(), true)] : ($argument->getDefault() ? [$argument->getDefault()] : [])); foreach ($defaults as $default) { $defaultsXML->appendChild($defaultXML = $dom->createElement('default')); $defaultXML->appendChild($dom->createTextNode($default)); @@ -229,7 +229,7 @@ class XmlDescriptor extends Descriptor $descriptionXML->appendChild($dom->createTextNode($option->getDescription())); if ($option->acceptValue()) { - $defaults = \is_array($option->getDefault()) ? $option->getDefault() : (\is_bool($option->getDefault()) ? array(var_export($option->getDefault(), true)) : ($option->getDefault() ? array($option->getDefault()) : array())); + $defaults = \is_array($option->getDefault()) ? $option->getDefault() : (\is_bool($option->getDefault()) ? [var_export($option->getDefault(), true)] : ($option->getDefault() ? [$option->getDefault()] : [])); $objectXML->appendChild($defaultsXML = $dom->createElement('defaults')); if (!empty($defaults)) { diff --git a/vendor/symfony/console/EventListener/ErrorListener.php b/vendor/symfony/console/EventListener/ErrorListener.php index 909d6ea3..212ad1d9 100644 --- a/vendor/symfony/console/EventListener/ErrorListener.php +++ b/vendor/symfony/console/EventListener/ErrorListener.php @@ -40,10 +40,10 @@ class ErrorListener implements EventSubscriberInterface $error = $event->getError(); if (!$inputString = $this->getInputString($event)) { - return $this->logger->error('An error occurred while using the console. Message: "{message}"', array('exception' => $error, 'message' => $error->getMessage())); + return $this->logger->error('An error occurred while using the console. Message: "{message}"', ['exception' => $error, 'message' => $error->getMessage()]); } - $this->logger->error('Error thrown while running command "{command}". Message: "{message}"', array('exception' => $error, 'command' => $inputString, 'message' => $error->getMessage())); + $this->logger->error('Error thrown while running command "{command}". Message: "{message}"', ['exception' => $error, 'command' => $inputString, 'message' => $error->getMessage()]); } public function onConsoleTerminate(ConsoleTerminateEvent $event) @@ -59,18 +59,18 @@ class ErrorListener implements EventSubscriberInterface } if (!$inputString = $this->getInputString($event)) { - return $this->logger->debug('The console exited with code "{code}"', array('code' => $exitCode)); + return $this->logger->debug('The console exited with code "{code}"', ['code' => $exitCode]); } - $this->logger->debug('Command "{command}" exited with code "{code}"', array('command' => $inputString, 'code' => $exitCode)); + $this->logger->debug('Command "{command}" exited with code "{code}"', ['command' => $inputString, 'code' => $exitCode]); } public static function getSubscribedEvents() { - return array( - ConsoleEvents::ERROR => array('onConsoleError', -128), - ConsoleEvents::TERMINATE => array('onConsoleTerminate', -128), - ); + return [ + ConsoleEvents::ERROR => ['onConsoleError', -128], + ConsoleEvents::TERMINATE => ['onConsoleTerminate', -128], + ]; } private static function getInputString(ConsoleEvent $event) @@ -80,7 +80,7 @@ class ErrorListener implements EventSubscriberInterface if (method_exists($input, '__toString')) { if ($commandName) { - return str_replace(array("'$commandName'", "\"$commandName\""), $commandName, (string) $input); + return str_replace(["'$commandName'", "\"$commandName\""], $commandName, (string) $input); } return (string) $input; diff --git a/vendor/symfony/console/Exception/CommandNotFoundException.php b/vendor/symfony/console/Exception/CommandNotFoundException.php index 2f6e644b..69d5cb99 100644 --- a/vendor/symfony/console/Exception/CommandNotFoundException.php +++ b/vendor/symfony/console/Exception/CommandNotFoundException.php @@ -24,9 +24,9 @@ class CommandNotFoundException extends \InvalidArgumentException implements Exce * @param string $message Exception message to throw * @param array $alternatives List of similar defined names * @param int $code Exception code - * @param \Exception $previous Previous exception used for the exception chaining + * @param \Throwable $previous Previous exception used for the exception chaining */ - public function __construct(string $message, array $alternatives = array(), int $code = 0, \Exception $previous = null) + public function __construct(string $message, array $alternatives = [], int $code = 0, \Throwable $previous = null) { parent::__construct($message, $code, $previous); diff --git a/vendor/symfony/console/Formatter/OutputFormatter.php b/vendor/symfony/console/Formatter/OutputFormatter.php index b61ab182..83f16d77 100644 --- a/vendor/symfony/console/Formatter/OutputFormatter.php +++ b/vendor/symfony/console/Formatter/OutputFormatter.php @@ -22,7 +22,7 @@ use Symfony\Component\Console\Exception\InvalidArgumentException; class OutputFormatter implements WrappableOutputFormatterInterface { private $decorated; - private $styles = array(); + private $styles = []; private $styleStack; /** @@ -66,7 +66,7 @@ class OutputFormatter implements WrappableOutputFormatterInterface * @param bool $decorated Whether this formatter should actually decorate strings * @param OutputFormatterStyleInterface[] $styles Array of "name => FormatterStyle" instances */ - public function __construct(bool $decorated = false, array $styles = array()) + public function __construct(bool $decorated = false, array $styles = []) { $this->decorated = $decorated; @@ -141,7 +141,7 @@ class OutputFormatter implements WrappableOutputFormatterInterface { $offset = 0; $output = ''; - $tagRegex = '[a-z][a-z0-9,_=;-]*+'; + $tagRegex = '[a-z][^<>]*+'; $currentLineLength = 0; preg_match_all("#<(($tagRegex) | /($tagRegex)?)>#ix", $message, $matches, PREG_OFFSET_CAPTURE); foreach ($matches[0] as $i => $match) { @@ -178,7 +178,7 @@ class OutputFormatter implements WrappableOutputFormatterInterface $output .= $this->applyCurrentStyle(substr($message, $offset), $output, $width, $currentLineLength); if (false !== strpos($output, "\0")) { - return strtr($output, array("\0" => '\\', '\\<' => '<')); + return strtr($output, ["\0" => '\\', '\\<' => '<']); } return str_replace('\\<', '<', $output); @@ -216,6 +216,8 @@ class OutputFormatter implements WrappableOutputFormatterInterface $style->setForeground(strtolower($match[1])); } elseif ('bg' == $match[0]) { $style->setBackground(strtolower($match[1])); + } elseif ('href' === $match[0]) { + $style->setHref($match[1]); } elseif ('options' === $match[0]) { preg_match_all('([^,;]+)', strtolower($match[1]), $options); $options = array_shift($options); @@ -263,8 +265,12 @@ class OutputFormatter implements WrappableOutputFormatterInterface } $lines = explode("\n", $text); - if ($width === $currentLineLength = \strlen(end($lines))) { - $currentLineLength = 0; + + foreach ($lines as $line) { + $currentLineLength += \strlen($line); + if ($width <= $currentLineLength) { + $currentLineLength = 0; + } } if ($this->isDecorated()) { diff --git a/vendor/symfony/console/Formatter/OutputFormatterStyle.php b/vendor/symfony/console/Formatter/OutputFormatterStyle.php index 906021f6..655bdd08 100644 --- a/vendor/symfony/console/Formatter/OutputFormatterStyle.php +++ b/vendor/symfony/console/Formatter/OutputFormatterStyle.php @@ -20,39 +20,41 @@ use Symfony\Component\Console\Exception\InvalidArgumentException; */ class OutputFormatterStyle implements OutputFormatterStyleInterface { - private static $availableForegroundColors = array( - 'black' => array('set' => 30, 'unset' => 39), - 'red' => array('set' => 31, 'unset' => 39), - 'green' => array('set' => 32, 'unset' => 39), - 'yellow' => array('set' => 33, 'unset' => 39), - 'blue' => array('set' => 34, 'unset' => 39), - 'magenta' => array('set' => 35, 'unset' => 39), - 'cyan' => array('set' => 36, 'unset' => 39), - 'white' => array('set' => 37, 'unset' => 39), - 'default' => array('set' => 39, 'unset' => 39), - ); - private static $availableBackgroundColors = array( - 'black' => array('set' => 40, 'unset' => 49), - 'red' => array('set' => 41, 'unset' => 49), - 'green' => array('set' => 42, 'unset' => 49), - 'yellow' => array('set' => 43, 'unset' => 49), - 'blue' => array('set' => 44, 'unset' => 49), - 'magenta' => array('set' => 45, 'unset' => 49), - 'cyan' => array('set' => 46, 'unset' => 49), - 'white' => array('set' => 47, 'unset' => 49), - 'default' => array('set' => 49, 'unset' => 49), - ); - private static $availableOptions = array( - 'bold' => array('set' => 1, 'unset' => 22), - 'underscore' => array('set' => 4, 'unset' => 24), - 'blink' => array('set' => 5, 'unset' => 25), - 'reverse' => array('set' => 7, 'unset' => 27), - 'conceal' => array('set' => 8, 'unset' => 28), - ); + private static $availableForegroundColors = [ + 'black' => ['set' => 30, 'unset' => 39], + 'red' => ['set' => 31, 'unset' => 39], + 'green' => ['set' => 32, 'unset' => 39], + 'yellow' => ['set' => 33, 'unset' => 39], + 'blue' => ['set' => 34, 'unset' => 39], + 'magenta' => ['set' => 35, 'unset' => 39], + 'cyan' => ['set' => 36, 'unset' => 39], + 'white' => ['set' => 37, 'unset' => 39], + 'default' => ['set' => 39, 'unset' => 39], + ]; + private static $availableBackgroundColors = [ + 'black' => ['set' => 40, 'unset' => 49], + 'red' => ['set' => 41, 'unset' => 49], + 'green' => ['set' => 42, 'unset' => 49], + 'yellow' => ['set' => 43, 'unset' => 49], + 'blue' => ['set' => 44, 'unset' => 49], + 'magenta' => ['set' => 45, 'unset' => 49], + 'cyan' => ['set' => 46, 'unset' => 49], + 'white' => ['set' => 47, 'unset' => 49], + 'default' => ['set' => 49, 'unset' => 49], + ]; + private static $availableOptions = [ + 'bold' => ['set' => 1, 'unset' => 22], + 'underscore' => ['set' => 4, 'unset' => 24], + 'blink' => ['set' => 5, 'unset' => 25], + 'reverse' => ['set' => 7, 'unset' => 27], + 'conceal' => ['set' => 8, 'unset' => 28], + ]; private $foreground; private $background; - private $options = array(); + private $href; + private $options = []; + private $handlesHrefGracefully; /** * Initializes output formatter style. @@ -61,7 +63,7 @@ class OutputFormatterStyle implements OutputFormatterStyleInterface * @param string|null $background The style background color name * @param array $options The style options */ - public function __construct(string $foreground = null, string $background = null, array $options = array()) + public function __construct(string $foreground = null, string $background = null, array $options = []) { if (null !== $foreground) { $this->setForeground($foreground); @@ -118,6 +120,11 @@ class OutputFormatterStyle implements OutputFormatterStyleInterface $this->background = static::$availableBackgroundColors[$color]; } + public function setHref(string $url): void + { + $this->href = $url; + } + /** * Sets some specific style option. * @@ -160,7 +167,7 @@ class OutputFormatterStyle implements OutputFormatterStyleInterface */ public function setOptions(array $options) { - $this->options = array(); + $this->options = []; foreach ($options as $option) { $this->setOption($option); @@ -176,8 +183,12 @@ class OutputFormatterStyle implements OutputFormatterStyleInterface */ public function apply($text) { - $setCodes = array(); - $unsetCodes = array(); + $setCodes = []; + $unsetCodes = []; + + if (null === $this->handlesHrefGracefully) { + $this->handlesHrefGracefully = 'JetBrains-JediTerm' !== getenv('TERMINAL_EMULATOR') && !getenv('KONSOLE_VERSION'); + } if (null !== $this->foreground) { $setCodes[] = $this->foreground['set']; @@ -187,11 +198,14 @@ class OutputFormatterStyle implements OutputFormatterStyleInterface $setCodes[] = $this->background['set']; $unsetCodes[] = $this->background['unset']; } - if (\count($this->options)) { - foreach ($this->options as $option) { - $setCodes[] = $option['set']; - $unsetCodes[] = $option['unset']; - } + + foreach ($this->options as $option) { + $setCodes[] = $option['set']; + $unsetCodes[] = $option['unset']; + } + + if (null !== $this->href && $this->handlesHrefGracefully) { + $text = "\033]8;;$this->href\033\\$text\033]8;;\033\\"; } if (0 === \count($setCodes)) { diff --git a/vendor/symfony/console/Formatter/OutputFormatterStyleStack.php b/vendor/symfony/console/Formatter/OutputFormatterStyleStack.php index 7ca93035..33f7d522 100644 --- a/vendor/symfony/console/Formatter/OutputFormatterStyleStack.php +++ b/vendor/symfony/console/Formatter/OutputFormatterStyleStack.php @@ -37,7 +37,7 @@ class OutputFormatterStyleStack implements ResetInterface */ public function reset() { - $this->styles = array(); + $this->styles = []; } /** diff --git a/vendor/symfony/console/Helper/DebugFormatterHelper.php b/vendor/symfony/console/Helper/DebugFormatterHelper.php index f5393ede..16d11755 100644 --- a/vendor/symfony/console/Helper/DebugFormatterHelper.php +++ b/vendor/symfony/console/Helper/DebugFormatterHelper.php @@ -20,8 +20,8 @@ namespace Symfony\Component\Console\Helper; */ class DebugFormatterHelper extends Helper { - private $colors = array('black', 'red', 'green', 'yellow', 'blue', 'magenta', 'cyan', 'white', 'default'); - private $started = array(); + private $colors = ['black', 'red', 'green', 'yellow', 'blue', 'magenta', 'cyan', 'white', 'default']; + private $started = []; private $count = -1; /** @@ -35,7 +35,7 @@ class DebugFormatterHelper extends Helper */ public function start($id, $message, $prefix = 'RUN') { - $this->started[$id] = array('border' => ++$this->count % \count($this->colors)); + $this->started[$id] = ['border' => ++$this->count % \count($this->colors)]; return sprintf("%s %s %s\n", $this->getBorder($id), $prefix, $message); } diff --git a/vendor/symfony/console/Helper/DescriptorHelper.php b/vendor/symfony/console/Helper/DescriptorHelper.php index 54d3b1af..f8a3847b 100644 --- a/vendor/symfony/console/Helper/DescriptorHelper.php +++ b/vendor/symfony/console/Helper/DescriptorHelper.php @@ -29,7 +29,7 @@ class DescriptorHelper extends Helper /** * @var DescriptorInterface[] */ - private $descriptors = array(); + private $descriptors = []; public function __construct() { @@ -54,12 +54,12 @@ class DescriptorHelper extends Helper * * @throws InvalidArgumentException when the given format is not supported */ - public function describe(OutputInterface $output, $object, array $options = array()) + public function describe(OutputInterface $output, $object, array $options = []) { - $options = array_merge(array( + $options = array_merge([ 'raw_text' => false, 'format' => 'txt', - ), $options); + ], $options); if (!isset($this->descriptors[$options['format']])) { throw new InvalidArgumentException(sprintf('Unsupported format "%s".', $options['format'])); diff --git a/vendor/symfony/console/Helper/Dumper.php b/vendor/symfony/console/Helper/Dumper.php new file mode 100644 index 00000000..b013b6c5 --- /dev/null +++ b/vendor/symfony/console/Helper/Dumper.php @@ -0,0 +1,64 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Helper; + +use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\VarDumper\Cloner\ClonerInterface; +use Symfony\Component\VarDumper\Cloner\VarCloner; +use Symfony\Component\VarDumper\Dumper\CliDumper; + +/** + * @author Roland Franssen + */ +final class Dumper +{ + private $output; + private $dumper; + private $cloner; + private $handler; + + public function __construct(OutputInterface $output, CliDumper $dumper = null, ClonerInterface $cloner = null) + { + $this->output = $output; + $this->dumper = $dumper; + $this->cloner = $cloner; + + if (class_exists(CliDumper::class)) { + $this->handler = function ($var): string { + $dumper = $this->dumper ?? $this->dumper = new CliDumper(null, null, CliDumper::DUMP_LIGHT_ARRAY | CliDumper::DUMP_COMMA_SEPARATOR); + $dumper->setColors($this->output->isDecorated()); + + return rtrim($dumper->dump(($this->cloner ?? $this->cloner = new VarCloner())->cloneVar($var)->withRefHandles(false), true)); + }; + } else { + $this->handler = function ($var): string { + switch (true) { + case null === $var: + return 'null'; + case true === $var: + return 'true'; + case false === $var: + return 'false'; + case \is_string($var): + return '"'.$var.'"'; + default: + return rtrim(print_r($var, true)); + } + }; + } + } + + public function __invoke($var): string + { + return ($this->handler)($var); + } +} diff --git a/vendor/symfony/console/Helper/FormatterHelper.php b/vendor/symfony/console/Helper/FormatterHelper.php index 79ab2849..4ad63856 100644 --- a/vendor/symfony/console/Helper/FormatterHelper.php +++ b/vendor/symfony/console/Helper/FormatterHelper.php @@ -46,18 +46,18 @@ class FormatterHelper extends Helper public function formatBlock($messages, $style, $large = false) { if (!\is_array($messages)) { - $messages = array($messages); + $messages = [$messages]; } $len = 0; - $lines = array(); + $lines = []; foreach ($messages as $message) { $message = OutputFormatter::escape($message); $lines[] = sprintf($large ? ' %s ' : ' %s ', $message); $len = max($this->strlen($message) + ($large ? 4 : 2), $len); } - $messages = $large ? array(str_repeat(' ', $len)) : array(); + $messages = $large ? [str_repeat(' ', $len)] : []; for ($i = 0; isset($lines[$i]); ++$i) { $messages[] = $lines[$i].str_repeat(' ', $len - $this->strlen($lines[$i])); } diff --git a/vendor/symfony/console/Helper/Helper.php b/vendor/symfony/console/Helper/Helper.php index 50901855..0ddddf6b 100644 --- a/vendor/symfony/console/Helper/Helper.php +++ b/vendor/symfony/console/Helper/Helper.php @@ -74,17 +74,17 @@ abstract class Helper implements HelperInterface public static function formatTime($secs) { - static $timeFormats = array( - array(0, '< 1 sec'), - array(1, '1 sec'), - array(2, 'secs', 1), - array(60, '1 min'), - array(120, 'mins', 60), - array(3600, '1 hr'), - array(7200, 'hrs', 3600), - array(86400, '1 day'), - array(172800, 'days', 86400), - ); + static $timeFormats = [ + [0, '< 1 sec'], + [1, '1 sec'], + [2, 'secs', 1], + [60, '1 min'], + [120, 'mins', 60], + [3600, '1 hr'], + [7200, 'hrs', 3600], + [86400, '1 day'], + [172800, 'days', 86400], + ]; foreach ($timeFormats as $index => $format) { if ($secs >= $format[0]) { diff --git a/vendor/symfony/console/Helper/HelperSet.php b/vendor/symfony/console/Helper/HelperSet.php index 4c44b05f..c73fecd4 100644 --- a/vendor/symfony/console/Helper/HelperSet.php +++ b/vendor/symfony/console/Helper/HelperSet.php @@ -24,13 +24,13 @@ class HelperSet implements \IteratorAggregate /** * @var Helper[] */ - private $helpers = array(); + private $helpers = []; private $command; /** * @param Helper[] $helpers An array of helper */ - public function __construct(array $helpers = array()) + public function __construct(array $helpers = []) { foreach ($helpers as $alias => $helper) { $this->set($helper, \is_int($alias) ? null : $alias); diff --git a/vendor/symfony/console/Helper/ProcessHelper.php b/vendor/symfony/console/Helper/ProcessHelper.php index f03774d3..e3a7c77b 100644 --- a/vendor/symfony/console/Helper/ProcessHelper.php +++ b/vendor/symfony/console/Helper/ProcessHelper.php @@ -46,17 +46,17 @@ class ProcessHelper extends Helper $formatter = $this->getHelperSet()->get('debug_formatter'); if ($cmd instanceof Process) { - $cmd = array($cmd); + $cmd = [$cmd]; } if (!\is_array($cmd)) { @trigger_error(sprintf('Passing a command as a string to "%s()" is deprecated since Symfony 4.2, pass it the command as an array of arguments instead.', __METHOD__), E_USER_DEPRECATED); - $cmd = array(\method_exists(Process::class, 'fromShellCommandline') ? Process::fromShellCommandline($cmd) : new Process($cmd)); + $cmd = [\method_exists(Process::class, 'fromShellCommandline') ? Process::fromShellCommandline($cmd) : new Process($cmd)]; } if (\is_string($cmd[0] ?? null)) { $process = new Process($cmd); - $cmd = array(); + $cmd = []; } elseif (($cmd[0] ?? null) instanceof Process) { $process = $cmd[0]; unset($cmd[0]); diff --git a/vendor/symfony/console/Helper/ProgressBar.php b/vendor/symfony/console/Helper/ProgressBar.php index bef87d2b..34e6aa5d 100644 --- a/vendor/symfony/console/Helper/ProgressBar.php +++ b/vendor/symfony/console/Helper/ProgressBar.php @@ -39,7 +39,7 @@ final class ProgressBar private $stepWidth; private $percent = 0.0; private $formatLineCount; - private $messages = array(); + private $messages = []; private $overwrite = true; private $terminal; private $firstRun = true; @@ -243,6 +243,24 @@ final class ProgressBar $this->redrawFreq = max($freq, 1); } + /** + * Returns an iterator that will automatically update the progress bar when iterated. + * + * @param int|null $max Number of steps to complete the bar (0 if indeterminate), if null it will be inferred from $iterable + */ + public function iterate(iterable $iterable, ?int $max = null): iterable + { + $this->start($max ?? (\is_countable($iterable) ? \count($iterable) : 0)); + + foreach ($iterable as $key => $value) { + yield $key => $value; + + $this->advance(); + } + + $this->finish(); + } + /** * Starts the progress output. * @@ -381,20 +399,17 @@ final class ProgressBar $lines = floor(Helper::strlen($message) / $this->terminal->getWidth()) + $this->formatLineCount + 1; $this->output->clear($lines); } else { - // Move the cursor to the beginning of the line - $this->output->write("\x0D"); - - // Erase the line - $this->output->write("\x1B[2K"); - // Erase previous lines if ($this->formatLineCount > 0) { - $this->output->write(str_repeat("\x1B[1A\x1B[2K", $this->formatLineCount)); + $message = str_repeat("\x1B[1A\x1B[2K", $this->formatLineCount).$message; } + + // Move the cursor to the beginning of the line and erase the line + $message = "\x0D\x1B[2K$message"; } } } elseif ($this->step > 0) { - $this->output->writeln(''); + $message = PHP_EOL.$message; } $this->firstRun = false; @@ -419,8 +434,8 @@ final class ProgressBar private static function initPlaceholderFormatters(): array { - return array( - 'bar' => function (ProgressBar $bar, OutputInterface $output) { + return [ + 'bar' => function (self $bar, OutputInterface $output) { $completeBars = floor($bar->getMaxSteps() > 0 ? $bar->getProgressPercent() * $bar->getBarWidth() : $bar->getProgress() % $bar->getBarWidth()); $display = str_repeat($bar->getBarCharacter(), $completeBars); if ($completeBars < $bar->getBarWidth()) { @@ -430,10 +445,10 @@ final class ProgressBar return $display; }, - 'elapsed' => function (ProgressBar $bar) { + 'elapsed' => function (self $bar) { return Helper::formatTime(time() - $bar->getStartTime()); }, - 'remaining' => function (ProgressBar $bar) { + 'remaining' => function (self $bar) { if (!$bar->getMaxSteps()) { throw new LogicException('Unable to display the remaining time if the maximum number of steps is not set.'); } @@ -446,7 +461,7 @@ final class ProgressBar return Helper::formatTime($remaining); }, - 'estimated' => function (ProgressBar $bar) { + 'estimated' => function (self $bar) { if (!$bar->getMaxSteps()) { throw new LogicException('Unable to display the estimated time if the maximum number of steps is not set.'); } @@ -459,24 +474,24 @@ final class ProgressBar return Helper::formatTime($estimated); }, - 'memory' => function (ProgressBar $bar) { + 'memory' => function (self $bar) { return Helper::formatMemory(memory_get_usage(true)); }, - 'current' => function (ProgressBar $bar) { + 'current' => function (self $bar) { return str_pad($bar->getProgress(), $bar->getStepWidth(), ' ', STR_PAD_LEFT); }, - 'max' => function (ProgressBar $bar) { + 'max' => function (self $bar) { return $bar->getMaxSteps(); }, - 'percent' => function (ProgressBar $bar) { + 'percent' => function (self $bar) { return floor($bar->getProgressPercent() * 100); }, - ); + ]; } private static function initFormats(): array { - return array( + return [ 'normal' => ' %current%/%max% [%bar%] %percent:3s%%', 'normal_nomax' => ' %current% [%bar%]', @@ -488,7 +503,7 @@ final class ProgressBar 'debug' => ' %current%/%max% [%bar%] %percent:3s%% %elapsed:6s%/%estimated:-6s% %memory:6s%', 'debug_nomax' => ' %current% [%bar%] %elapsed:6s% %memory:6s%', - ); + ]; } private function buildLine(): string diff --git a/vendor/symfony/console/Helper/ProgressIndicator.php b/vendor/symfony/console/Helper/ProgressIndicator.php index 4c12c326..301be27e 100644 --- a/vendor/symfony/console/Helper/ProgressIndicator.php +++ b/vendor/symfony/console/Helper/ProgressIndicator.php @@ -48,7 +48,7 @@ class ProgressIndicator } if (null === $indicatorValues) { - $indicatorValues = array('-', '\\', '|', '/'); + $indicatorValues = ['-', '\\', '|', '/']; } $indicatorValues = array_values($indicatorValues); @@ -237,25 +237,25 @@ class ProgressIndicator private static function initPlaceholderFormatters() { - return array( - 'indicator' => function (ProgressIndicator $indicator) { + return [ + 'indicator' => function (self $indicator) { return $indicator->indicatorValues[$indicator->indicatorCurrent % \count($indicator->indicatorValues)]; }, - 'message' => function (ProgressIndicator $indicator) { + 'message' => function (self $indicator) { return $indicator->message; }, - 'elapsed' => function (ProgressIndicator $indicator) { + 'elapsed' => function (self $indicator) { return Helper::formatTime(time() - $indicator->startTime); }, 'memory' => function () { return Helper::formatMemory(memory_get_usage(true)); }, - ); + ]; } private static function initFormats() { - return array( + return [ 'normal' => ' %indicator% %message%', 'normal_no_ansi' => ' %message%', @@ -264,6 +264,6 @@ class ProgressIndicator 'very_verbose' => ' %indicator% %message% (%elapsed:6s%, %memory:6s%)', 'very_verbose_no_ansi' => ' %message% (%elapsed:6s%, %memory:6s%)', - ); + ]; } } diff --git a/vendor/symfony/console/Helper/QuestionHelper.php b/vendor/symfony/console/Helper/QuestionHelper.php index 59d3dab5..e6a700aa 100644 --- a/vendor/symfony/console/Helper/QuestionHelper.php +++ b/vendor/symfony/console/Helper/QuestionHelper.php @@ -49,7 +49,13 @@ class QuestionHelper extends Helper if (!$input->isInteractive()) { $default = $question->getDefault(); - if (null !== $default && $question instanceof ChoiceQuestion) { + if (null === $default) { + return $default; + } + + if ($validator = $question->getValidator()) { + return \call_user_func($question->getValidator(), $default); + } elseif ($question instanceof ChoiceQuestion) { $choices = $question->getChoices(); if (!$question->isMultiselect()) { @@ -109,7 +115,7 @@ class QuestionHelper extends Helper $this->writePrompt($output, $question); $inputStream = $this->inputStream ?: STDIN; - $autocomplete = $question->getAutocompleterValues(); + $autocomplete = $question->getAutocompleterCallback(); if (null === $autocomplete || !$this->hasSttyAvailable()) { $ret = false; @@ -126,12 +132,12 @@ class QuestionHelper extends Helper if (false === $ret) { $ret = fgets($inputStream, 4096); if (false === $ret) { - throw new RuntimeException('Aborted'); + throw new RuntimeException('Aborted.'); } $ret = trim($ret); } } else { - $ret = trim($this->autocomplete($output, $question, $inputStream, \is_array($autocomplete) ? $autocomplete : iterator_to_array($autocomplete, false))); + $ret = trim($this->autocomplete($output, $question, $inputStream, $autocomplete)); } if ($output instanceof ConsoleSectionOutput) { @@ -155,7 +161,7 @@ class QuestionHelper extends Helper $message = $question->getQuestion(); if ($question instanceof ChoiceQuestion) { - $maxWidth = max(array_map(array($this, 'strlen'), array_keys($question->getChoices()))); + $maxWidth = max(array_map([$this, 'strlen'], array_keys($question->getChoices()))); $messages = (array) $question->getQuestion(); foreach ($question->getChoices() as $key => $value) { @@ -188,17 +194,16 @@ class QuestionHelper extends Helper /** * Autocompletes a question. * - * @param OutputInterface $output - * @param Question $question - * @param resource $inputStream + * @param resource $inputStream */ - private function autocomplete(OutputInterface $output, Question $question, $inputStream, array $autocomplete): string + private function autocomplete(OutputInterface $output, Question $question, $inputStream, callable $autocomplete): string { + $fullChoice = ''; $ret = ''; $i = 0; $ofs = -1; - $matches = $autocomplete; + $matches = $autocomplete($ret); $numMatches = \count($matches); $sttyMode = shell_exec('stty -g'); @@ -213,17 +218,21 @@ class QuestionHelper extends Helper while (!feof($inputStream)) { $c = fread($inputStream, 1); - // Backspace Character - if ("\177" === $c) { + // as opposed to fgets(), fread() returns an empty string when the stream content is empty, not false. + if (false === $c || ('' === $ret && '' === $c && null === $question->getDefault())) { + shell_exec(sprintf('stty %s', $sttyMode)); + throw new RuntimeException('Aborted.'); + } elseif ("\177" === $c) { // Backspace Character if (0 === $numMatches && 0 !== $i) { --$i; + $fullChoice = substr($fullChoice, 0, -1); // Move cursor backwards $output->write("\033[1D"); } if (0 === $i) { $ofs = -1; - $matches = $autocomplete; + $matches = $autocomplete($ret); $numMatches = \count($matches); } else { $numMatches = 0; @@ -251,32 +260,52 @@ class QuestionHelper extends Helper } elseif (\ord($c) < 32) { if ("\t" === $c || "\n" === $c) { if ($numMatches > 0 && -1 !== $ofs) { - $ret = $matches[$ofs]; + $ret = (string) $matches[$ofs]; // Echo out remaining chars for current match - $output->write(substr($ret, $i)); - $i = \strlen($ret); + $remainingCharacters = substr($ret, \strlen(trim($this->mostRecentlyEnteredValue($fullChoice)))); + $output->write($remainingCharacters); + $fullChoice .= $remainingCharacters; + $i = \strlen($fullChoice); + + $matches = array_filter( + $autocomplete($ret), + function ($match) use ($ret) { + return '' === $ret || 0 === strpos($match, $ret); + } + ); + $numMatches = \count($matches); + $ofs = -1; } if ("\n" === $c) { $output->write($c); break; } - - $numMatches = 0; } continue; } else { + if ("\x80" <= $c) { + $c .= fread($inputStream, ["\xC0" => 1, "\xD0" => 1, "\xE0" => 2, "\xF0" => 3][$c & "\xF0"]); + } + $output->write($c); $ret .= $c; + $fullChoice .= $c; ++$i; + $tempRet = $ret; + + if ($question instanceof ChoiceQuestion && $question->isMultiselect()) { + $tempRet = $this->mostRecentlyEnteredValue($fullChoice); + } + $numMatches = 0; $ofs = 0; - foreach ($autocomplete as $value) { + foreach ($autocomplete($ret) as $value) { // If typed characters match the beginning chunk of value (e.g. [AcmeDe]moBundle) - if (0 === strpos($value, $ret)) { + if (0 === strpos($value, $tempRet)) { $matches[$numMatches++] = $value; } } @@ -288,8 +317,9 @@ class QuestionHelper extends Helper if ($numMatches > 0 && -1 !== $ofs) { // Save cursor position $output->write("\0337"); - // Write highlighted text - $output->write(''.OutputFormatter::escapeTrailingBackslash(substr($matches[$ofs], $i)).''); + // Write highlighted text, complete the partially entered response + $charactersEntered = \strlen(trim($this->mostRecentlyEnteredValue($fullChoice))); + $output->write(''.OutputFormatter::escapeTrailingBackslash(substr($matches[$ofs], $charactersEntered)).''); // Restore cursor position $output->write("\0338"); } @@ -298,7 +328,22 @@ class QuestionHelper extends Helper // Reset stty so it behaves normally again shell_exec(sprintf('stty %s', $sttyMode)); - return $ret; + return $fullChoice; + } + + private function mostRecentlyEnteredValue($entered) + { + // Determine the most recent value that the user entered + if (false === strpos($entered, ',')) { + return $entered; + } + + $choices = explode(',', $entered); + if (\strlen($lastChoice = trim($choices[\count($choices) - 1])) > 0) { + return $lastChoice; + } + + return $entered; } /** @@ -339,7 +384,7 @@ class QuestionHelper extends Helper shell_exec(sprintf('stty %s', $sttyMode)); if (false === $value) { - throw new RuntimeException('Aborted'); + throw new RuntimeException('Aborted.'); } $value = trim($value); @@ -407,7 +452,7 @@ class QuestionHelper extends Helper if (file_exists('/usr/bin/env')) { // handle other OSs with bash/zsh/ksh/csh if available to hide the answer $test = "/usr/bin/env %s -c 'echo OK' 2> /dev/null"; - foreach (array('bash', 'zsh', 'ksh', 'csh') as $sh) { + foreach (['bash', 'zsh', 'ksh', 'csh'] as $sh) { if ('OK' === rtrim(shell_exec(sprintf($test, $sh)))) { self::$shell = $sh; break; diff --git a/vendor/symfony/console/Helper/Table.php b/vendor/symfony/console/Helper/Table.php index 14974529..ce759953 100644 --- a/vendor/symfony/console/Helper/Table.php +++ b/vendor/symfony/console/Helper/Table.php @@ -13,6 +13,7 @@ namespace Symfony\Component\Console\Helper; use Symfony\Component\Console\Exception\InvalidArgumentException; use Symfony\Component\Console\Exception\RuntimeException; +use Symfony\Component\Console\Formatter\OutputFormatter; use Symfony\Component\Console\Formatter\WrappableOutputFormatterInterface; use Symfony\Component\Console\Output\ConsoleSectionOutput; use Symfony\Component\Console\Output\OutputInterface; @@ -41,17 +42,17 @@ class Table /** * Table headers. */ - private $headers = array(); + private $headers = []; /** * Table rows. */ - private $rows = array(); + private $rows = []; /** * Column widths cache. */ - private $effectiveColumnWidths = array(); + private $effectiveColumnWidths = []; /** * Number of columns cache. @@ -73,15 +74,15 @@ class Table /** * @var array */ - private $columnStyles = array(); + private $columnStyles = []; /** * User set column widths. * * @var array */ - private $columnWidths = array(); - private $columnMaxWidths = array(); + private $columnWidths = []; + private $columnMaxWidths = []; private static $styles; @@ -212,7 +213,7 @@ class Table */ public function setColumnWidths(array $widths) { - $this->columnWidths = array(); + $this->columnWidths = []; foreach ($widths as $index => $width) { $this->setColumnWidth($index, $width); } @@ -243,7 +244,7 @@ class Table { $headers = array_values($headers); if (!empty($headers) && !\is_array($headers[0])) { - $headers = array($headers); + $headers = [$headers]; } $this->headers = $headers; @@ -253,7 +254,7 @@ class Table public function setRows(array $rows) { - $this->rows = array(); + $this->rows = []; return $this->addRows($rows); } @@ -339,7 +340,7 @@ class Table */ public function render() { - $rows = array_merge($this->headers, array($divider = new TableSeparator()), $this->rows); + $rows = array_merge($this->headers, [$divider = new TableSeparator()], $this->rows); $this->calculateNumberOfColumns($rows); $rows = $this->buildTableRows($rows); @@ -400,13 +401,13 @@ class Table $crossings = $this->style->getCrossingChars(); if (self::SEPARATOR_MID === $type) { - list($horizontal, $leftChar, $midChar, $rightChar) = array($borders[2], $crossings[8], $crossings[0], $crossings[4]); + list($horizontal, $leftChar, $midChar, $rightChar) = [$borders[2], $crossings[8], $crossings[0], $crossings[4]]; } elseif (self::SEPARATOR_TOP === $type) { - list($horizontal, $leftChar, $midChar, $rightChar) = array($borders[0], $crossings[1], $crossings[2], $crossings[3]); + list($horizontal, $leftChar, $midChar, $rightChar) = [$borders[0], $crossings[1], $crossings[2], $crossings[3]]; } elseif (self::SEPARATOR_TOP_BOTTOM === $type) { - list($horizontal, $leftChar, $midChar, $rightChar) = array($borders[0], $crossings[9], $crossings[10], $crossings[11]); + list($horizontal, $leftChar, $midChar, $rightChar) = [$borders[0], $crossings[9], $crossings[10], $crossings[11]]; } else { - list($horizontal, $leftChar, $midChar, $rightChar) = array($borders[0], $crossings[7], $crossings[6], $crossings[5]); + list($horizontal, $leftChar, $midChar, $rightChar) = [$borders[0], $crossings[7], $crossings[6], $crossings[5]]; } $markup = $leftChar; @@ -500,7 +501,7 @@ class Table */ private function calculateNumberOfColumns($rows) { - $columns = array(0); + $columns = [0]; foreach ($rows as $row) { if ($row instanceof TableSeparator) { continue; @@ -516,22 +517,26 @@ class Table { /** @var WrappableOutputFormatterInterface $formatter */ $formatter = $this->output->getFormatter(); - $unmergedRows = array(); + $unmergedRows = []; for ($rowKey = 0; $rowKey < \count($rows); ++$rowKey) { $rows = $this->fillNextRows($rows, $rowKey); // Remove any new line breaks and replace it with a new line foreach ($rows[$rowKey] as $column => $cell) { + $colspan = $cell instanceof TableCell ? $cell->getColspan() : 1; + if (isset($this->columnMaxWidths[$column]) && Helper::strlenWithoutDecoration($formatter, $cell) > $this->columnMaxWidths[$column]) { - $cell = $formatter->formatAndWrap($cell, $this->columnMaxWidths[$column]); + $cell = $formatter->formatAndWrap($cell, $this->columnMaxWidths[$column] * $colspan); } if (!strstr($cell, "\n")) { continue; } + $escaped = implode("\n", array_map([OutputFormatter::class, 'escapeTrailingBackslash'], explode("\n", $cell))); + $cell = $cell instanceof TableCell ? new TableCell($escaped, ['colspan' => $cell->getColspan()]) : $escaped; $lines = explode("\n", str_replace("\n", "\n", $cell)); foreach ($lines as $lineKey => $line) { - if ($cell instanceof TableCell) { - $line = new TableCell($line, array('colspan' => $cell->getColspan())); + if ($colspan > 1) { + $line = new TableCell($line, ['colspan' => $colspan]); } if (0 === $lineKey) { $rows[$rowKey][$column] = $line; @@ -557,7 +562,7 @@ class Table private function calculateRowCount(): int { - $numberOfRows = \count(iterator_to_array($this->buildTableRows(array_merge($this->headers, array(new TableSeparator()), $this->rows)))); + $numberOfRows = \count(iterator_to_array($this->buildTableRows(array_merge($this->headers, [new TableSeparator()], $this->rows)))); if ($this->headers) { ++$numberOfRows; // Add row for header separator @@ -575,27 +580,27 @@ class Table */ private function fillNextRows(array $rows, int $line): array { - $unmergedRows = array(); + $unmergedRows = []; foreach ($rows[$line] as $column => $cell) { if (null !== $cell && !$cell instanceof TableCell && !is_scalar($cell) && !(\is_object($cell) && method_exists($cell, '__toString'))) { throw new InvalidArgumentException(sprintf('A cell must be a TableCell, a scalar or an object implementing __toString, %s given.', \gettype($cell))); } if ($cell instanceof TableCell && $cell->getRowspan() > 1) { $nbLines = $cell->getRowspan() - 1; - $lines = array($cell); + $lines = [$cell]; if (strstr($cell, "\n")) { $lines = explode("\n", str_replace("\n", "\n", $cell)); $nbLines = \count($lines) > $nbLines ? substr_count($cell, "\n") : $nbLines; - $rows[$line][$column] = new TableCell($lines[0], array('colspan' => $cell->getColspan())); + $rows[$line][$column] = new TableCell($lines[0], ['colspan' => $cell->getColspan()]); unset($lines[0]); } // create a two dimensional array (rowspan x colspan) - $unmergedRows = array_replace_recursive(array_fill($line + 1, $nbLines, array()), $unmergedRows); + $unmergedRows = array_replace_recursive(array_fill($line + 1, $nbLines, []), $unmergedRows); foreach ($unmergedRows as $unmergedRowKey => $unmergedRow) { $value = isset($lines[$unmergedRowKey - $line]) ? $lines[$unmergedRowKey - $line] : ''; - $unmergedRows[$unmergedRowKey][$column] = new TableCell($value, array('colspan' => $cell->getColspan())); + $unmergedRows[$unmergedRowKey][$column] = new TableCell($value, ['colspan' => $cell->getColspan()]); if ($nbLines === $unmergedRowKey - $line) { break; } @@ -608,7 +613,7 @@ class Table if (isset($rows[$unmergedRowKey]) && \is_array($rows[$unmergedRowKey]) && ($this->getNumberOfColumns($rows[$unmergedRowKey]) + $this->getNumberOfColumns($unmergedRows[$unmergedRowKey]) <= $this->numberOfColumns)) { foreach ($unmergedRow as $cellKey => $cell) { // insert cell into row at cellKey position - array_splice($rows[$unmergedRowKey], $cellKey, 0, array($cell)); + array_splice($rows[$unmergedRowKey], $cellKey, 0, [$cell]); } } else { $row = $this->copyRow($rows, $unmergedRowKey - 1); @@ -617,7 +622,7 @@ class Table $row[$column] = $unmergedRow[$column]; } } - array_splice($rows, $unmergedRowKey, 0, array($row)); + array_splice($rows, $unmergedRowKey, 0, [$row]); } } @@ -629,7 +634,7 @@ class Table */ private function fillCells($row) { - $newRow = array(); + $newRow = []; foreach ($row as $column => $cell) { $newRow[] = $cell; if ($cell instanceof TableCell && $cell->getColspan() > 1) { @@ -649,7 +654,7 @@ class Table foreach ($row as $cellKey => $cellValue) { $row[$cellKey] = ''; if ($cellValue instanceof TableCell) { - $row[$cellKey] = new TableCell('', array('colspan' => $cellValue->getColspan())); + $row[$cellKey] = new TableCell('', ['colspan' => $cellValue->getColspan()]); } } @@ -691,7 +696,7 @@ class Table private function calculateColumnsWidth(iterable $rows) { for ($column = 0; $column < $this->numberOfColumns; ++$column) { - $lengths = array(); + $lengths = []; foreach ($rows as $row) { if ($row instanceof TableSeparator) { continue; @@ -742,7 +747,7 @@ class Table */ private function cleanup() { - $this->effectiveColumnWidths = array(); + $this->effectiveColumnWidths = []; $this->numberOfColumns = null; } @@ -783,14 +788,14 @@ class Table ->setCrossingChars('┼', 'â•”', '╤', 'â•—', 'â•¢', 'â•', '╧', 'â•š', 'â•Ÿ', 'â• ', '╪', 'â•£') ; - return array( + return [ 'default' => new TableStyle(), 'borderless' => $borderless, 'compact' => $compact, 'symfony-style-guide' => $styleGuide, 'box' => $box, 'box-double' => $boxDouble, - ); + ]; } private function resolveStyle($name) diff --git a/vendor/symfony/console/Helper/TableCell.php b/vendor/symfony/console/Helper/TableCell.php index f800fb44..5b6af4a9 100644 --- a/vendor/symfony/console/Helper/TableCell.php +++ b/vendor/symfony/console/Helper/TableCell.php @@ -19,12 +19,12 @@ use Symfony\Component\Console\Exception\InvalidArgumentException; class TableCell { private $value; - private $options = array( + private $options = [ 'rowspan' => 1, 'colspan' => 1, - ); + ]; - public function __construct(string $value = '', array $options = array()) + public function __construct(string $value = '', array $options = []) { $this->value = $value; diff --git a/vendor/symfony/console/Helper/TableSeparator.php b/vendor/symfony/console/Helper/TableSeparator.php index c7b8dc9c..e541c531 100644 --- a/vendor/symfony/console/Helper/TableSeparator.php +++ b/vendor/symfony/console/Helper/TableSeparator.php @@ -18,7 +18,7 @@ namespace Symfony\Component\Console\Helper; */ class TableSeparator extends TableCell { - public function __construct(array $options = array()) + public function __construct(array $options = []) { parent::__construct('', $options); } diff --git a/vendor/symfony/console/Helper/TableStyle.php b/vendor/symfony/console/Helper/TableStyle.php index f8ecc2d9..02dd693c 100644 --- a/vendor/symfony/console/Helper/TableStyle.php +++ b/vendor/symfony/console/Helper/TableStyle.php @@ -194,12 +194,12 @@ class TableStyle */ public function getBorderChars() { - return array( + return [ $this->horizontalOutsideBorderChar, $this->verticalOutsideBorderChar, $this->horizontalInsideBorderChar, $this->verticalInsideBorderChar, - ); + ]; } /** @@ -292,7 +292,7 @@ class TableStyle */ public function getCrossingChars(): array { - return array( + return [ $this->crossingChar, $this->crossingTopLeftChar, $this->crossingTopMidChar, @@ -305,7 +305,7 @@ class TableStyle $this->crossingTopLeftBottomChar, $this->crossingTopMidBottomChar, $this->crossingTopRightBottomChar, - ); + ]; } /** @@ -413,7 +413,7 @@ class TableStyle */ public function setPadType($padType) { - if (!\in_array($padType, array(STR_PAD_LEFT, STR_PAD_RIGHT, STR_PAD_BOTH), true)) { + if (!\in_array($padType, [STR_PAD_LEFT, STR_PAD_RIGHT, STR_PAD_BOTH], true)) { throw new InvalidArgumentException('Invalid padding type. Expected one of (STR_PAD_LEFT, STR_PAD_RIGHT, STR_PAD_BOTH).'); } diff --git a/vendor/symfony/console/Input/ArgvInput.php b/vendor/symfony/console/Input/ArgvInput.php index b459ae47..c56c20c6 100644 --- a/vendor/symfony/console/Input/ArgvInput.php +++ b/vendor/symfony/console/Input/ArgvInput.php @@ -169,7 +169,7 @@ class ArgvInput extends Input // if input is expecting another argument, add it if ($this->definition->hasArgument($c)) { $arg = $this->definition->getArgument($c); - $this->arguments[$arg->getName()] = $arg->isArray() ? array($token) : $token; + $this->arguments[$arg->getName()] = $arg->isArray() ? [$token] : $token; // if last argument isArray(), append token to last argument } elseif ($this->definition->hasArgument($c - 1) && $this->definition->getArgument($c - 1)->isArray()) { @@ -224,11 +224,11 @@ class ArgvInput extends Input throw new RuntimeException(sprintf('The "--%s" option does not accept a value.', $name)); } - if (\in_array($value, array('', null), true) && $option->acceptValue() && \count($this->parsed)) { + if (\in_array($value, ['', null], true) && $option->acceptValue() && \count($this->parsed)) { // if option accepts an optional or mandatory argument // let's see if there is one provided $next = array_shift($this->parsed); - if ((isset($next[0]) && '-' !== $next[0]) || \in_array($next, array('', null), true)) { + if ((isset($next[0]) && '-' !== $next[0]) || \in_array($next, ['', null], true)) { $value = $next; } else { array_unshift($this->parsed, $next); @@ -257,8 +257,27 @@ class ArgvInput extends Input */ public function getFirstArgument() { - foreach ($this->tokens as $token) { + $isOption = false; + foreach ($this->tokens as $i => $token) { if ($token && '-' === $token[0]) { + if (false !== strpos($token, '=') || !isset($this->tokens[$i + 1])) { + continue; + } + + // If it's a long option, consider that everything after "--" is the option name. + // Otherwise, use the last char (if it's a short option set, only the last one can take a value with space separator) + $name = '-' === $token[1] ? substr($token, 2) : substr($token, -1); + if (!isset($this->options[$name]) && !$this->definition->hasShortcut($name)) { + // noop + } elseif ((isset($this->options[$name]) || isset($this->options[$name = $this->definition->shortcutToName($name)])) && $this->tokens[$i + 1] === $this->options[$name]) { + $isOption = true; + } + + continue; + } + + if ($isOption) { + $isOption = false; continue; } diff --git a/vendor/symfony/console/Input/ArrayInput.php b/vendor/symfony/console/Input/ArrayInput.php index 8b6917fc..44c2f0d5 100644 --- a/vendor/symfony/console/Input/ArrayInput.php +++ b/vendor/symfony/console/Input/ArrayInput.php @@ -19,7 +19,7 @@ use Symfony\Component\Console\Exception\InvalidOptionException; * * Usage: * - * $input = new ArrayInput(array('name' => 'foo', '--bar' => 'foobar')); + * $input = new ArrayInput(['command' => 'foo:bar', 'foo' => 'bar', '--bar' => 'foobar']); * * @author Fabien Potencier */ @@ -103,7 +103,7 @@ class ArrayInput extends Input */ public function __toString() { - $params = array(); + $params = []; foreach ($this->parameters as $param => $val) { if ($param && '-' === $param[0]) { if (\is_array($val)) { @@ -114,7 +114,7 @@ class ArrayInput extends Input $params[] = $param.('' != $val ? '='.$this->escapeToken($val) : ''); } } else { - $params[] = \is_array($val) ? implode(' ', array_map(array($this, 'escapeToken'), $val)) : $this->escapeToken($val); + $params[] = \is_array($val) ? implode(' ', array_map([$this, 'escapeToken'], $val)) : $this->escapeToken($val); } } diff --git a/vendor/symfony/console/Input/Input.php b/vendor/symfony/console/Input/Input.php index fa5644d1..c1220316 100644 --- a/vendor/symfony/console/Input/Input.php +++ b/vendor/symfony/console/Input/Input.php @@ -29,8 +29,8 @@ abstract class Input implements InputInterface, StreamableInputInterface { protected $definition; protected $stream; - protected $options = array(); - protected $arguments = array(); + protected $options = []; + protected $arguments = []; protected $interactive = true; public function __construct(InputDefinition $definition = null) @@ -48,8 +48,8 @@ abstract class Input implements InputInterface, StreamableInputInterface */ public function bind(InputDefinition $definition) { - $this->arguments = array(); - $this->options = array(); + $this->arguments = []; + $this->options = []; $this->definition = $definition; $this->parse(); @@ -69,7 +69,7 @@ abstract class Input implements InputInterface, StreamableInputInterface $givenArguments = $this->arguments; $missingArguments = array_filter(array_keys($definition->getArguments()), function ($argument) use ($definition, $givenArguments) { - return !array_key_exists($argument, $givenArguments) && $definition->getArgument($argument)->isRequired(); + return !\array_key_exists($argument, $givenArguments) && $definition->getArgument($argument)->isRequired(); }); if (\count($missingArguments) > 0) { @@ -150,7 +150,7 @@ abstract class Input implements InputInterface, StreamableInputInterface throw new InvalidArgumentException(sprintf('The "%s" option does not exist.', $name)); } - return array_key_exists($name, $this->options) ? $this->options[$name] : $this->definition->getOption($name)->getDefault(); + return \array_key_exists($name, $this->options) ? $this->options[$name] : $this->definition->getOption($name)->getDefault(); } /** diff --git a/vendor/symfony/console/Input/InputArgument.php b/vendor/symfony/console/Input/InputArgument.php index 94e82f0b..b6aa6452 100644 --- a/vendor/symfony/console/Input/InputArgument.php +++ b/vendor/symfony/console/Input/InputArgument.php @@ -98,7 +98,7 @@ class InputArgument if ($this->isArray()) { if (null === $default) { - $default = array(); + $default = []; } elseif (!\is_array($default)) { throw new LogicException('A default value for an array argument must be an array.'); } diff --git a/vendor/symfony/console/Input/InputDefinition.php b/vendor/symfony/console/Input/InputDefinition.php index 21fc67df..2189c462 100644 --- a/vendor/symfony/console/Input/InputDefinition.php +++ b/vendor/symfony/console/Input/InputDefinition.php @@ -19,10 +19,10 @@ use Symfony\Component\Console\Exception\LogicException; * * Usage: * - * $definition = new InputDefinition(array( + * $definition = new InputDefinition([ * new InputArgument('name', InputArgument::REQUIRED), * new InputOption('foo', 'f', InputOption::VALUE_REQUIRED), - * )); + * ]); * * @author Fabien Potencier */ @@ -38,7 +38,7 @@ class InputDefinition /** * @param array $definition An array of InputArgument and InputOption instance */ - public function __construct(array $definition = array()) + public function __construct(array $definition = []) { $this->setDefinition($definition); } @@ -48,8 +48,8 @@ class InputDefinition */ public function setDefinition(array $definition) { - $arguments = array(); - $options = array(); + $arguments = []; + $options = []; foreach ($definition as $item) { if ($item instanceof InputOption) { $options[] = $item; @@ -67,9 +67,9 @@ class InputDefinition * * @param InputArgument[] $arguments An array of InputArgument objects */ - public function setArguments($arguments = array()) + public function setArguments($arguments = []) { - $this->arguments = array(); + $this->arguments = []; $this->requiredCount = 0; $this->hasOptional = false; $this->hasAnArrayArgument = false; @@ -81,7 +81,7 @@ class InputDefinition * * @param InputArgument[] $arguments An array of InputArgument objects */ - public function addArguments($arguments = array()) + public function addArguments($arguments = []) { if (null !== $arguments) { foreach ($arguments as $argument) { @@ -191,7 +191,7 @@ class InputDefinition */ public function getArgumentDefaults() { - $values = array(); + $values = []; foreach ($this->arguments as $argument) { $values[$argument->getName()] = $argument->getDefault(); } @@ -204,10 +204,10 @@ class InputDefinition * * @param InputOption[] $options An array of InputOption objects */ - public function setOptions($options = array()) + public function setOptions($options = []) { - $this->options = array(); - $this->shortcuts = array(); + $this->options = []; + $this->shortcuts = []; $this->addOptions($options); } @@ -216,7 +216,7 @@ class InputDefinition * * @param InputOption[] $options An array of InputOption objects */ - public function addOptions($options = array()) + public function addOptions($options = []) { foreach ($options as $option) { $this->addOption($option); @@ -322,7 +322,7 @@ class InputDefinition */ public function getOptionDefaults() { - $values = array(); + $values = []; foreach ($this->options as $option) { $values[$option->getName()] = $option->getDefault(); } @@ -338,8 +338,10 @@ class InputDefinition * @return string The InputOption name * * @throws InvalidArgumentException When option given does not exist + * + * @internal */ - private function shortcutToName($shortcut) + public function shortcutToName($shortcut) { if (!isset($this->shortcuts[$shortcut])) { throw new InvalidArgumentException(sprintf('The "-%s" option does not exist.', $shortcut)); @@ -357,7 +359,7 @@ class InputDefinition */ public function getSynopsis($short = false) { - $elements = array(); + $elements = []; if ($short && $this->getOptions()) { $elements[] = '[options]'; diff --git a/vendor/symfony/console/Input/InputOption.php b/vendor/symfony/console/Input/InputOption.php index 3ba84cd7..d62e0aea 100644 --- a/vendor/symfony/console/Input/InputOption.php +++ b/vendor/symfony/console/Input/InputOption.php @@ -34,7 +34,7 @@ class InputOption /** * @param string $name The option name - * @param string|array $shortcut The shortcuts, can be null, a string of shortcuts delimited by | or an array of shortcuts + * @param string|array|null $shortcut The shortcuts, can be null, a string of shortcuts delimited by | or an array of shortcuts * @param int|null $mode The option mode: One of the VALUE_* constants * @param string $description A description text * @param string|string[]|int|bool|null $default The default value (must be null for self::VALUE_NONE) @@ -89,7 +89,7 @@ class InputOption /** * Returns the option shortcut. * - * @return string The shortcut + * @return string|null The shortcut */ public function getShortcut() { @@ -161,7 +161,7 @@ class InputOption if ($this->isArray()) { if (null === $default) { - $default = array(); + $default = []; } elseif (!\is_array($default)) { throw new LogicException('A default value for an array option must be an array.'); } diff --git a/vendor/symfony/console/Input/StringInput.php b/vendor/symfony/console/Input/StringInput.php index 61e29481..0c63ed0e 100644 --- a/vendor/symfony/console/Input/StringInput.php +++ b/vendor/symfony/console/Input/StringInput.php @@ -32,7 +32,7 @@ class StringInput extends ArgvInput */ public function __construct(string $input) { - parent::__construct(array()); + parent::__construct([]); $this->setTokens($this->tokenize($input)); } @@ -48,13 +48,13 @@ class StringInput extends ArgvInput */ private function tokenize($input) { - $tokens = array(); + $tokens = []; $length = \strlen($input); $cursor = 0; while ($cursor < $length) { if (preg_match('/\s+/A', $input, $match, null, $cursor)) { } elseif (preg_match('/([^="\'\s]+?)(=?)('.self::REGEX_QUOTED_STRING.'+)/A', $input, $match, null, $cursor)) { - $tokens[] = $match[1].$match[2].stripcslashes(str_replace(array('"\'', '\'"', '\'\'', '""'), '', substr($match[3], 1, \strlen($match[3]) - 2))); + $tokens[] = $match[1].$match[2].stripcslashes(str_replace(['"\'', '\'"', '\'\'', '""'], '', substr($match[3], 1, \strlen($match[3]) - 2))); } elseif (preg_match('/'.self::REGEX_QUOTED_STRING.'/A', $input, $match, null, $cursor)) { $tokens[] = stripcslashes(substr($match[0], 1, \strlen($match[0]) - 2)); } elseif (preg_match('/'.self::REGEX_STRING.'/A', $input, $match, null, $cursor)) { diff --git a/vendor/symfony/console/Logger/ConsoleLogger.php b/vendor/symfony/console/Logger/ConsoleLogger.php index 0f7d551a..36f3b99f 100644 --- a/vendor/symfony/console/Logger/ConsoleLogger.php +++ b/vendor/symfony/console/Logger/ConsoleLogger.php @@ -30,7 +30,7 @@ class ConsoleLogger extends AbstractLogger const ERROR = 'error'; private $output; - private $verbosityLevelMap = array( + private $verbosityLevelMap = [ LogLevel::EMERGENCY => OutputInterface::VERBOSITY_NORMAL, LogLevel::ALERT => OutputInterface::VERBOSITY_NORMAL, LogLevel::CRITICAL => OutputInterface::VERBOSITY_NORMAL, @@ -39,8 +39,8 @@ class ConsoleLogger extends AbstractLogger LogLevel::NOTICE => OutputInterface::VERBOSITY_VERBOSE, LogLevel::INFO => OutputInterface::VERBOSITY_VERY_VERBOSE, LogLevel::DEBUG => OutputInterface::VERBOSITY_DEBUG, - ); - private $formatLevelMap = array( + ]; + private $formatLevelMap = [ LogLevel::EMERGENCY => self::ERROR, LogLevel::ALERT => self::ERROR, LogLevel::CRITICAL => self::ERROR, @@ -49,10 +49,10 @@ class ConsoleLogger extends AbstractLogger LogLevel::NOTICE => self::INFO, LogLevel::INFO => self::INFO, LogLevel::DEBUG => self::INFO, - ); + ]; private $errored = false; - public function __construct(OutputInterface $output, array $verbosityLevelMap = array(), array $formatLevelMap = array()) + public function __construct(OutputInterface $output, array $verbosityLevelMap = [], array $formatLevelMap = []) { $this->output = $output; $this->verbosityLevelMap = $verbosityLevelMap + $this->verbosityLevelMap; @@ -62,7 +62,7 @@ class ConsoleLogger extends AbstractLogger /** * {@inheritdoc} */ - public function log($level, $message, array $context = array()) + public function log($level, $message, array $context = []) { if (!isset($this->verbosityLevelMap[$level])) { throw new InvalidArgumentException(sprintf('The log level "%s" does not exist.', $level)); @@ -106,7 +106,7 @@ class ConsoleLogger extends AbstractLogger return $message; } - $replacements = array(); + $replacements = []; foreach ($context as $key => $val) { if (null === $val || is_scalar($val) || (\is_object($val) && method_exists($val, '__toString'))) { $replacements["{{$key}}"] = $val; diff --git a/vendor/symfony/console/Output/ConsoleOutput.php b/vendor/symfony/console/Output/ConsoleOutput.php index e106d4f2..8430c9c8 100644 --- a/vendor/symfony/console/Output/ConsoleOutput.php +++ b/vendor/symfony/console/Output/ConsoleOutput.php @@ -30,7 +30,7 @@ use Symfony\Component\Console\Formatter\OutputFormatterInterface; class ConsoleOutput extends StreamOutput implements ConsoleOutputInterface { private $stderr; - private $consoleSectionOutputs = array(); + private $consoleSectionOutputs = []; /** * @param int $verbosity The verbosity level (one of the VERBOSITY constants in OutputInterface) @@ -130,11 +130,11 @@ class ConsoleOutput extends StreamOutput implements ConsoleOutputInterface */ private function isRunningOS400() { - $checks = array( + $checks = [ \function_exists('php_uname') ? php_uname('s') : '', getenv('OSTYPE'), PHP_OS, - ); + ]; return false !== stripos(implode(';', $checks), 'OS400'); } diff --git a/vendor/symfony/console/Output/ConsoleSectionOutput.php b/vendor/symfony/console/Output/ConsoleSectionOutput.php index d7e1685b..4ada2e86 100644 --- a/vendor/symfony/console/Output/ConsoleSectionOutput.php +++ b/vendor/symfony/console/Output/ConsoleSectionOutput.php @@ -21,7 +21,7 @@ use Symfony\Component\Console\Terminal; */ class ConsoleSectionOutput extends StreamOutput { - private $content = array(); + private $content = []; private $lines = 0; private $sections; private $terminal; @@ -53,7 +53,7 @@ class ConsoleSectionOutput extends StreamOutput \array_splice($this->content, -($lines * 2)); // Multiply lines by 2 to cater for each new line added between content } else { $lines = $this->lines; - $this->content = array(); + $this->content = []; } $this->lines -= $lines; @@ -113,7 +113,7 @@ class ConsoleSectionOutput extends StreamOutput private function popStreamContentUntilCurrentSection(int $numberOfLinesToClearFromCurrentSection = 0): string { $numberOfLinesToClear = $numberOfLinesToClearFromCurrentSection; - $erasedContent = array(); + $erasedContent = []; foreach ($this->sections as $section) { if ($section === $this) { diff --git a/vendor/symfony/console/Output/Output.php b/vendor/symfony/console/Output/Output.php index 00852e28..9dd76511 100644 --- a/vendor/symfony/console/Output/Output.php +++ b/vendor/symfony/console/Output/Output.php @@ -138,7 +138,7 @@ abstract class Output implements OutputInterface public function write($messages, $newline = false, $options = self::OUTPUT_NORMAL) { if (!is_iterable($messages)) { - $messages = array($messages); + $messages = [$messages]; } $types = self::OUTPUT_NORMAL | self::OUTPUT_RAW | self::OUTPUT_PLAIN; diff --git a/vendor/symfony/console/Question/ChoiceQuestion.php b/vendor/symfony/console/Question/ChoiceQuestion.php index 4aa6f672..612e406a 100644 --- a/vendor/symfony/console/Question/ChoiceQuestion.php +++ b/vendor/symfony/console/Question/ChoiceQuestion.php @@ -139,12 +139,12 @@ class ChoiceQuestion extends Question } $selectedChoices = explode(',', $selectedChoices); } else { - $selectedChoices = array($selected); + $selectedChoices = [$selected]; } - $multiselectChoices = array(); + $multiselectChoices = []; foreach ($selectedChoices as $value) { - $results = array(); + $results = []; foreach ($choices as $key => $choice) { if ($choice === $value) { $results[] = $key; diff --git a/vendor/symfony/console/Question/ConfirmationQuestion.php b/vendor/symfony/console/Question/ConfirmationQuestion.php index 26eea6a1..88227dfa 100644 --- a/vendor/symfony/console/Question/ConfirmationQuestion.php +++ b/vendor/symfony/console/Question/ConfirmationQuestion.php @@ -53,7 +53,7 @@ class ConfirmationQuestion extends Question return $answer && $answerIsTrue; } - return !$answer || $answerIsTrue; + return '' === $answer || $answerIsTrue; }; } } diff --git a/vendor/symfony/console/Question/Question.php b/vendor/symfony/console/Question/Question.php index eac82cfa..9201af2f 100644 --- a/vendor/symfony/console/Question/Question.php +++ b/vendor/symfony/console/Question/Question.php @@ -25,7 +25,7 @@ class Question private $attempts; private $hidden = false; private $hiddenFallback = true; - private $autocompleterValues; + private $autocompleterCallback; private $validator; private $default; private $normalizer; @@ -81,7 +81,7 @@ class Question */ public function setHidden($hidden) { - if ($this->autocompleterValues) { + if ($this->autocompleterCallback) { throw new LogicException('A hidden question cannot use the autocompleter.'); } @@ -121,7 +121,9 @@ class Question */ public function getAutocompleterValues() { - return $this->autocompleterValues; + $callback = $this->getAutocompleterCallback(); + + return $callback ? $callback('') : null; } /** @@ -138,17 +140,46 @@ class Question { if (\is_array($values)) { $values = $this->isAssoc($values) ? array_merge(array_keys($values), array_values($values)) : array_values($values); - } - if (null !== $values && !\is_array($values) && !$values instanceof \Traversable) { + $callback = static function () use ($values) { + return $values; + }; + } elseif ($values instanceof \Traversable) { + $valueCache = null; + $callback = static function () use ($values, &$valueCache) { + return $valueCache ?? $valueCache = iterator_to_array($values, false); + }; + } elseif (null === $values) { + $callback = null; + } else { throw new InvalidArgumentException('Autocompleter values can be either an array, "null" or a "Traversable" object.'); } - if ($this->hidden) { + return $this->setAutocompleterCallback($callback); + } + + /** + * Gets the callback function used for the autocompleter. + */ + public function getAutocompleterCallback(): ?callable + { + return $this->autocompleterCallback; + } + + /** + * Sets the callback function used for the autocompleter. + * + * The callback is passed the user input as argument and should return an iterable of corresponding suggestions. + * + * @return $this + */ + public function setAutocompleterCallback(callable $callback = null): self + { + if ($this->hidden && null !== $callback) { throw new LogicException('A hidden question cannot use the autocompleter.'); } - $this->autocompleterValues = $values; + $this->autocompleterCallback = $callback; return $this; } diff --git a/vendor/symfony/console/Style/SymfonyStyle.php b/vendor/symfony/console/Style/SymfonyStyle.php index eb56a1f7..962ba923 100644 --- a/vendor/symfony/console/Style/SymfonyStyle.php +++ b/vendor/symfony/console/Style/SymfonyStyle.php @@ -63,7 +63,7 @@ class SymfonyStyle extends OutputStyle */ public function block($messages, $type = null, $style = null, $prefix = ' ', $padding = false, $escape = true) { - $messages = \is_array($messages) ? array_values($messages) : array($messages); + $messages = \is_array($messages) ? array_values($messages) : [$messages]; $this->autoPrependBlock(); $this->writeln($this->createBlock($messages, $type, $style, $prefix, $padding, $escape)); @@ -76,10 +76,10 @@ class SymfonyStyle extends OutputStyle public function title($message) { $this->autoPrependBlock(); - $this->writeln(array( + $this->writeln([ sprintf('%s', OutputFormatter::escapeTrailingBackslash($message)), sprintf('%s', str_repeat('=', Helper::strlenWithoutDecoration($this->getFormatter(), $message))), - )); + ]); $this->newLine(); } @@ -89,10 +89,10 @@ class SymfonyStyle extends OutputStyle public function section($message) { $this->autoPrependBlock(); - $this->writeln(array( + $this->writeln([ sprintf('%s', OutputFormatter::escapeTrailingBackslash($message)), sprintf('%s', str_repeat('-', Helper::strlenWithoutDecoration($this->getFormatter(), $message))), - )); + ]); $this->newLine(); } @@ -117,7 +117,7 @@ class SymfonyStyle extends OutputStyle { $this->autoPrependText(); - $messages = \is_array($message) ? array_values($message) : array($message); + $messages = \is_array($message) ? array_values($message) : [$message]; foreach ($messages as $message) { $this->writeln(sprintf(' %s', $message)); } @@ -154,7 +154,7 @@ class SymfonyStyle extends OutputStyle */ public function warning($message) { - $this->block($message, 'WARNING', 'fg=white;bg=red', ' ', true); + $this->block($message, 'WARNING', 'fg=black;bg=yellow', ' ', true); } /** @@ -307,7 +307,7 @@ class SymfonyStyle extends OutputStyle public function writeln($messages, $type = self::OUTPUT_NORMAL) { if (!is_iterable($messages)) { - $messages = array($messages); + $messages = [$messages]; } foreach ($messages as $message) { @@ -322,7 +322,7 @@ class SymfonyStyle extends OutputStyle public function write($messages, $newline = false, $type = self::OUTPUT_NORMAL) { if (!is_iterable($messages)) { - $messages = array($messages); + $messages = [$messages]; } foreach ($messages as $message) { @@ -392,7 +392,7 @@ class SymfonyStyle extends OutputStyle { $indentLength = 0; $prefixLength = Helper::strlenWithoutDecoration($this->getFormatter(), $prefix); - $lines = array(); + $lines = []; if (null !== $type) { $type = sprintf('[%s] ', $type); diff --git a/vendor/symfony/console/Terminal.php b/vendor/symfony/console/Terminal.php index 3930ca0c..456cca11 100644 --- a/vendor/symfony/console/Terminal.php +++ b/vendor/symfony/console/Terminal.php @@ -91,11 +91,11 @@ class Terminal return; } - $descriptorspec = array( - 1 => array('pipe', 'w'), - 2 => array('pipe', 'w'), - ); - $process = proc_open('mode CON', $descriptorspec, $pipes, null, null, array('suppress_errors' => true)); + $descriptorspec = [ + 1 => ['pipe', 'w'], + 2 => ['pipe', 'w'], + ]; + $process = proc_open('mode CON', $descriptorspec, $pipes, null, null, ['suppress_errors' => true]); if (\is_resource($process)) { $info = stream_get_contents($pipes[1]); fclose($pipes[1]); @@ -103,7 +103,7 @@ class Terminal proc_close($process); if (preg_match('/--------+\r?\n.+?(\d+)\r?\n.+?(\d+)\r?\n/', $info, $matches)) { - return array((int) $matches[2], (int) $matches[1]); + return [(int) $matches[2], (int) $matches[1]]; } } } @@ -119,12 +119,12 @@ class Terminal return; } - $descriptorspec = array( - 1 => array('pipe', 'w'), - 2 => array('pipe', 'w'), - ); + $descriptorspec = [ + 1 => ['pipe', 'w'], + 2 => ['pipe', 'w'], + ]; - $process = proc_open('stty -a | grep columns', $descriptorspec, $pipes, null, null, array('suppress_errors' => true)); + $process = proc_open('stty -a | grep columns', $descriptorspec, $pipes, null, null, ['suppress_errors' => true]); if (\is_resource($process)) { $info = stream_get_contents($pipes[1]); fclose($pipes[1]); diff --git a/vendor/symfony/console/Tester/ApplicationTester.php b/vendor/symfony/console/Tester/ApplicationTester.php index 24976f08..ced56cff 100644 --- a/vendor/symfony/console/Tester/ApplicationTester.php +++ b/vendor/symfony/console/Tester/ApplicationTester.php @@ -52,7 +52,7 @@ class ApplicationTester * * @return int The command exit code */ - public function run(array $input, $options = array()) + public function run(array $input, $options = []) { $this->input = new ArrayInput($input); if (isset($options['interactive'])) { diff --git a/vendor/symfony/console/Tester/CommandTester.php b/vendor/symfony/console/Tester/CommandTester.php index c5b178f2..57efc9a6 100644 --- a/vendor/symfony/console/Tester/CommandTester.php +++ b/vendor/symfony/console/Tester/CommandTester.php @@ -48,7 +48,7 @@ class CommandTester * * @return int The command exit code */ - public function execute(array $input, array $options = array()) + public function execute(array $input, array $options = []) { // set the command name automatically if the application requires // this argument and no command name was passed @@ -56,13 +56,12 @@ class CommandTester && (null !== $application = $this->command->getApplication()) && $application->getDefinition()->hasArgument('command') ) { - $input = array_merge(array('command' => $this->command->getName()), $input); + $input = array_merge(['command' => $this->command->getName()], $input); } $this->input = new ArrayInput($input); - if ($this->inputs) { - $this->input->setStream(self::createStream($this->inputs)); - } + // Use an in-memory input stream even if no inputs are set so that QuestionHelper::ask() does not rely on the blocking STDIN. + $this->input->setStream(self::createStream($this->inputs)); if (isset($options['interactive'])) { $this->input->setInteractive($options['interactive']); diff --git a/vendor/symfony/console/Tester/TesterTrait.php b/vendor/symfony/console/Tester/TesterTrait.php index b66972ca..5b7e993a 100644 --- a/vendor/symfony/console/Tester/TesterTrait.php +++ b/vendor/symfony/console/Tester/TesterTrait.php @@ -23,7 +23,7 @@ trait TesterTrait { /** @var StreamOutput */ private $output; - private $inputs = array(); + private $inputs = []; private $captureStreamsIndependently = false; /** @@ -35,6 +35,10 @@ trait TesterTrait */ public function getDisplay($normalize = false) { + if (null === $this->output) { + throw new \RuntimeException('Output not initialized, did you execute the command before requesting the display?'); + } + rewind($this->output->getStream()); $display = stream_get_contents($this->output->getStream()); @@ -126,7 +130,7 @@ trait TesterTrait */ private function initOutput(array $options) { - $this->captureStreamsIndependently = array_key_exists('capture_stderr_separately', $options) && $options['capture_stderr_separately']; + $this->captureStreamsIndependently = \array_key_exists('capture_stderr_separately', $options) && $options['capture_stderr_separately']; if (!$this->captureStreamsIndependently) { $this->output = new StreamOutput(fopen('php://memory', 'w', false)); if (isset($options['decorated'])) { diff --git a/vendor/symfony/console/Tests/ApplicationTest.php b/vendor/symfony/console/Tests/ApplicationTest.php index b7b54f85..e153e560 100644 --- a/vendor/symfony/console/Tests/ApplicationTest.php +++ b/vendor/symfony/console/Tests/ApplicationTest.php @@ -41,6 +41,21 @@ class ApplicationTest extends TestCase { protected static $fixturesPath; + private $colSize; + + protected function setUp() + { + $this->colSize = getenv('COLUMNS'); + } + + protected function tearDown() + { + putenv($this->colSize ? 'COLUMNS='.$this->colSize : 'COLUMNS'); + putenv('SHELL_VERBOSITY'); + unset($_ENV['SHELL_VERBOSITY']); + unset($_SERVER['SHELL_VERBOSITY']); + } + public static function setUpBeforeClass() { self::$fixturesPath = realpath(__DIR__.'/Fixtures/'); @@ -58,8 +73,8 @@ class ApplicationTest extends TestCase require_once self::$fixturesPath.'/FooSubnamespaced1Command.php'; require_once self::$fixturesPath.'/FooSubnamespaced2Command.php'; require_once self::$fixturesPath.'/FooWithoutAliasCommand.php'; - require_once self::$fixturesPath.'/TestTiti.php'; - require_once self::$fixturesPath.'/TestToto.php'; + require_once self::$fixturesPath.'/TestAmbiguousCommandRegistering.php'; + require_once self::$fixturesPath.'/TestAmbiguousCommandRegistering2.php'; } protected function normalizeLineBreaks($text) @@ -84,7 +99,7 @@ class ApplicationTest extends TestCase $application = new Application('foo', 'bar'); $this->assertEquals('foo', $application->getName(), '__construct() takes the application name as its first argument'); $this->assertEquals('bar', $application->getVersion(), '__construct() takes the application version as its second argument'); - $this->assertEquals(array('help', 'list'), array_keys($application->all()), '__construct() registered the help and list commands by default'); + $this->assertEquals(['help', 'list'], array_keys($application->all()), '__construct() registered the help and list commands by default'); } public function testSetGetName() @@ -134,9 +149,9 @@ class ApplicationTest extends TestCase $commands = $application->all('foo'); $this->assertCount(1, $commands, '->all() takes a namespace as its first argument'); - $application->setCommandLoader(new FactoryCommandLoader(array( + $application->setCommandLoader(new FactoryCommandLoader([ 'foo:bar1' => function () { return new \Foo1Command(); }, - ))); + ])); $commands = $application->all('foo'); $this->assertCount(2, $commands, '->all() takes a namespace as its first argument'); $this->assertInstanceOf(\FooCommand::class, $commands['foo:bar'], '->all() returns the registered commands'); @@ -150,6 +165,28 @@ class ApplicationTest extends TestCase $this->assertEquals('foo', $command->getName(), '->register() registers a new command'); } + public function testRegisterAmbiguous() + { + $code = function (InputInterface $input, OutputInterface $output) { + $output->writeln('It works!'); + }; + + $application = new Application(); + $application->setAutoExit(false); + $application + ->register('test-foo') + ->setAliases(['test']) + ->setCode($code); + + $application + ->register('test-bar') + ->setCode($code); + + $tester = new ApplicationTester($application); + $tester->run(['test']); + $this->assertContains('It works!', $tester->getDisplay(true)); + } + public function testAdd() { $application = new Application(); @@ -158,9 +195,9 @@ class ApplicationTest extends TestCase $this->assertEquals($foo, $commands['foo:bar'], '->add() registers a command'); $application = new Application(); - $application->addCommands(array($foo = new \FooCommand(), $foo1 = new \Foo1Command())); + $application->addCommands([$foo = new \FooCommand(), $foo1 = new \Foo1Command()]); $commands = $application->all(); - $this->assertEquals(array($foo, $foo1), array($commands['foo:bar'], $commands['foo:bar1']), '->addCommands() registers an array of commands'); + $this->assertEquals([$foo, $foo1], [$commands['foo:bar'], $commands['foo:bar1']], '->addCommands() registers an array of commands'); } /** @@ -206,9 +243,9 @@ class ApplicationTest extends TestCase $this->assertEquals($foo, $application->get('foo:bar'), '->get() returns a command by name'); $this->assertEquals($foo, $application->get('afoobar'), '->get() returns a command by alias'); - $application->setCommandLoader(new FactoryCommandLoader(array( + $application->setCommandLoader(new FactoryCommandLoader([ 'foo:bar1' => function () { return new \Foo1Command(); }, - ))); + ])); $this->assertTrue($application->has('afoobar'), '->has() returns true if an instance is registered for an alias even with command loader'); $this->assertEquals($foo, $application->get('foo:bar'), '->get() returns an instance by name even with command loader'); @@ -226,7 +263,7 @@ class ApplicationTest extends TestCase $application->setCatchExceptions(false); $tester = new ApplicationTester($application); - $tester->run(array('-h' => true, '-q' => true), array('decorated' => false)); + $tester->run(['-h' => true, '-q' => true], ['decorated' => false]); $this->assertEmpty($tester->getDisplay(true)); } @@ -246,7 +283,7 @@ class ApplicationTest extends TestCase $application = new Application(); $application->add(new \FooCommand()); $application->add(new \Foo1Command()); - $this->assertEquals(array('foo'), $application->getNamespaces(), '->getNamespaces() returns an array of unique used namespaces'); + $this->assertEquals(['foo'], $application->getNamespaces(), '->getNamespaces() returns an array of unique used namespaces'); } public function testFindNamespace() @@ -289,9 +326,9 @@ class ApplicationTest extends TestCase public function testFindNonAmbiguous() { $application = new Application(); - $application->add(new \TestTiti()); - $application->add(new \TestToto()); - $this->assertEquals('test-toto', $application->find('test')->getName()); + $application->add(new \TestAmbiguousCommandRegistering()); + $application->add(new \TestAmbiguousCommandRegistering2()); + $this->assertEquals('test-ambiguous', $application->find('test')->getName()); } /** @@ -368,9 +405,9 @@ class ApplicationTest extends TestCase public function testFindWithCommandLoader() { $application = new Application(); - $application->setCommandLoader(new FactoryCommandLoader(array( + $application->setCommandLoader(new FactoryCommandLoader([ 'foo:bar' => $f = function () { return new \FooCommand(); }, - ))); + ])); $this->assertInstanceOf('FooCommand', $application->find('foo:bar'), '->find() returns a command if its name exists'); $this->assertInstanceOf('Symfony\Component\Console\Command\HelpCommand', $application->find('h'), '->find() returns a command if its name exists'); @@ -384,6 +421,7 @@ class ApplicationTest extends TestCase */ public function testFindWithAmbiguousAbbreviations($abbreviation, $expectedExceptionMessage) { + putenv('COLUMNS=120'); if (method_exists($this, 'expectException')) { $this->expectException('Symfony\Component\Console\Exception\CommandNotFoundException'); $this->expectExceptionMessage($expectedExceptionMessage); @@ -401,23 +439,23 @@ class ApplicationTest extends TestCase public function provideAmbiguousAbbreviations() { - return array( - array('f', 'Command "f" is not defined.'), - array( + return [ + ['f', 'Command "f" is not defined.'], + [ 'a', "Command \"a\" is ambiguous.\nDid you mean one of these?\n". " afoobar The foo:bar command\n". " afoobar1 The foo:bar1 command\n". ' afoobar2 The foo1:bar command', - ), - array( + ], + [ 'foo:b', "Command \"foo:b\" is ambiguous.\nDid you mean one of these?\n". " foo:bar The foo:bar command\n". " foo:bar1 The foo:bar1 command\n". ' foo1:bar The foo1:bar command', - ), - ); + ], + ]; } public function testFindCommandEqualNamespace() @@ -465,7 +503,7 @@ class ApplicationTest extends TestCase $application->add(new \Foo1Command()); $application->setAutoExit(false); $tester = new ApplicationTester($application); - $tester->run(array('command' => 'foos:bar1'), array('decorated' => false)); + $tester->run(['command' => 'foos:bar1'], ['decorated' => false]); $this->assertSame(' There are no commands defined in the "foos" namespace. @@ -483,8 +521,8 @@ class ApplicationTest extends TestCase $application->add(new \FooWithoutAliasCommand()); $application->setAutoExit(false); $tester = new ApplicationTester($application); - $tester->setInputs(array('y')); - $tester->run(array('command' => 'foos'), array('decorated' => false)); + $tester->setInputs(['y']); + $tester->run(['command' => 'foos'], ['decorated' => false]); $display = trim($tester->getDisplay(true)); $this->assertContains('Command "foos" is not defined', $display); $this->assertContains('Do you want to run "foo" instead? (yes/no) [no]:', $display); @@ -497,8 +535,8 @@ class ApplicationTest extends TestCase $application->add(new \FooWithoutAliasCommand()); $application->setAutoExit(false); $tester = new ApplicationTester($application); - $tester->setInputs(array('n')); - $exitCode = $tester->run(array('command' => 'foos'), array('decorated' => false)); + $tester->setInputs(['n']); + $exitCode = $tester->run(['command' => 'foos'], ['decorated' => false]); $this->assertSame(1, $exitCode); $display = trim($tester->getDisplay(true)); $this->assertContains('Command "foos" is not defined', $display); @@ -507,14 +545,15 @@ class ApplicationTest extends TestCase public function provideInvalidCommandNamesSingle() { - return array( - array('foo3:barr'), - array('fooo3:bar'), - ); + return [ + ['foo3:barr'], + ['fooo3:bar'], + ]; } public function testFindAlternativeExceptionMessageMultiple() { + putenv('COLUMNS=120'); $application = new Application(); $application->add(new \FooCommand()); $application->add(new \Foo1Command()); @@ -568,7 +607,7 @@ class ApplicationTest extends TestCase $this->fail('->find() throws a CommandNotFoundException if command does not exist'); } catch (\Exception $e) { $this->assertInstanceOf('Symfony\Component\Console\Exception\CommandNotFoundException', $e, '->find() throws a CommandNotFoundException if command does not exist'); - $this->assertSame(array(), $e->getAlternatives()); + $this->assertSame([], $e->getAlternatives()); $this->assertEquals(sprintf('Command "%s" is not defined.', $commandName), $e->getMessage(), '->find() throws a CommandNotFoundException if command does not exist, without alternatives'); } @@ -579,7 +618,7 @@ class ApplicationTest extends TestCase $this->fail('->find() throws a CommandNotFoundException if command does not exist'); } catch (\Exception $e) { $this->assertInstanceOf('Symfony\Component\Console\Exception\CommandNotFoundException', $e, '->find() throws a CommandNotFoundException if command does not exist'); - $this->assertSame(array('afoobar1', 'foo:bar1'), $e->getAlternatives()); + $this->assertSame(['afoobar1', 'foo:bar1'], $e->getAlternatives()); $this->assertRegExp(sprintf('/Command "%s" is not defined./', $commandName), $e->getMessage(), '->find() throws a CommandNotFoundException if command does not exist, with alternatives'); $this->assertRegExp('/afoobar1/', $e->getMessage(), '->find() throws a CommandNotFoundException if command does not exist, with alternative : "afoobar1"'); $this->assertRegExp('/foo:bar1/', $e->getMessage(), '->find() throws a CommandNotFoundException if command does not exist, with alternative : "foo:bar1"'); @@ -590,7 +629,7 @@ class ApplicationTest extends TestCase public function testFindAlternativeCommandsWithAnAlias() { $fooCommand = new \FooCommand(); - $fooCommand->setAliases(array('foo2')); + $fooCommand->setAliases(['foo2']); $application = new Application(); $application->add($fooCommand); @@ -614,7 +653,7 @@ class ApplicationTest extends TestCase $this->fail('->find() throws a CommandNotFoundException if namespace does not exist'); } catch (\Exception $e) { $this->assertInstanceOf('Symfony\Component\Console\Exception\CommandNotFoundException', $e, '->find() throws a CommandNotFoundException if namespace does not exist'); - $this->assertSame(array(), $e->getAlternatives()); + $this->assertSame([], $e->getAlternatives()); $this->assertEquals('There are no commands defined in the "Unknown-namespace" namespace.', $e->getMessage(), '->find() throws a CommandNotFoundException if namespace does not exist, without alternatives'); } @@ -644,7 +683,7 @@ class ApplicationTest extends TestCase $application->add(new \Foo2Command()); $application->add(new \Foo3Command()); - $expectedAlternatives = array( + $expectedAlternatives = [ 'afoobar', 'afoobar1', 'afoobar2', @@ -652,7 +691,7 @@ class ApplicationTest extends TestCase 'foo3:bar', 'foo:bar', 'foo:bar1', - ); + ]; try { $application->find('foo'); @@ -667,10 +706,10 @@ class ApplicationTest extends TestCase public function testFindNamespaceDoesNotFailOnDeepSimilarNamespaces() { - $application = $this->getMockBuilder('Symfony\Component\Console\Application')->setMethods(array('getNamespaces'))->getMock(); + $application = $this->getMockBuilder('Symfony\Component\Console\Application')->setMethods(['getNamespaces'])->getMock(); $application->expects($this->once()) ->method('getNamespaces') - ->will($this->returnValue(array('foo:sublong', 'bar:sub'))); + ->willReturn(['foo:sublong', 'bar:sub']); $this->assertEquals('foo:sublong', $application->findNamespace('f:sub')); } @@ -697,16 +736,16 @@ class ApplicationTest extends TestCase $application->setCatchExceptions(true); $this->assertTrue($application->areExceptionsCaught()); - $tester->run(array('command' => 'foo'), array('decorated' => false)); + $tester->run(['command' => 'foo'], ['decorated' => false]); $this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception1.txt', $tester->getDisplay(true), '->setCatchExceptions() sets the catch exception flag'); - $tester->run(array('command' => 'foo'), array('decorated' => false, 'capture_stderr_separately' => true)); + $tester->run(['command' => 'foo'], ['decorated' => false, 'capture_stderr_separately' => true]); $this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception1.txt', $tester->getErrorOutput(true), '->setCatchExceptions() sets the catch exception flag'); $this->assertSame('', $tester->getDisplay(true)); $application->setCatchExceptions(false); try { - $tester->run(array('command' => 'foo'), array('decorated' => false)); + $tester->run(['command' => 'foo'], ['decorated' => false]); $this->fail('->setCatchExceptions() sets the catch exception flag'); } catch (\Exception $e) { $this->assertInstanceOf('\Exception', $e, '->setCatchExceptions() sets the catch exception flag'); @@ -730,29 +769,29 @@ class ApplicationTest extends TestCase putenv('COLUMNS=120'); $tester = new ApplicationTester($application); - $tester->run(array('command' => 'foo'), array('decorated' => false, 'capture_stderr_separately' => true)); + $tester->run(['command' => 'foo'], ['decorated' => false, 'capture_stderr_separately' => true]); $this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception1.txt', $tester->getErrorOutput(true), '->renderException() renders a pretty exception'); - $tester->run(array('command' => 'foo'), array('decorated' => false, 'verbosity' => Output::VERBOSITY_VERBOSE, 'capture_stderr_separately' => true)); + $tester->run(['command' => 'foo'], ['decorated' => false, 'verbosity' => Output::VERBOSITY_VERBOSE, 'capture_stderr_separately' => true]); $this->assertContains('Exception trace', $tester->getErrorOutput(), '->renderException() renders a pretty exception with a stack trace when verbosity is verbose'); - $tester->run(array('command' => 'list', '--foo' => true), array('decorated' => false, 'capture_stderr_separately' => true)); + $tester->run(['command' => 'list', '--foo' => true], ['decorated' => false, 'capture_stderr_separately' => true]); $this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception2.txt', $tester->getErrorOutput(true), '->renderException() renders the command synopsis when an exception occurs in the context of a command'); $application->add(new \Foo3Command()); $tester = new ApplicationTester($application); - $tester->run(array('command' => 'foo3:bar'), array('decorated' => false, 'capture_stderr_separately' => true)); + $tester->run(['command' => 'foo3:bar'], ['decorated' => false, 'capture_stderr_separately' => true]); $this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception3.txt', $tester->getErrorOutput(true), '->renderException() renders a pretty exceptions with previous exceptions'); - $tester->run(array('command' => 'foo3:bar'), array('decorated' => false, 'verbosity' => Output::VERBOSITY_VERBOSE)); + $tester->run(['command' => 'foo3:bar'], ['decorated' => false, 'verbosity' => Output::VERBOSITY_VERBOSE]); $this->assertRegExp('/\[Exception\]\s*First exception/', $tester->getDisplay(), '->renderException() renders a pretty exception without code exception when code exception is default and verbosity is verbose'); $this->assertRegExp('/\[Exception\]\s*Second exception/', $tester->getDisplay(), '->renderException() renders a pretty exception without code exception when code exception is 0 and verbosity is verbose'); $this->assertRegExp('/\[Exception \(404\)\]\s*Third exception/', $tester->getDisplay(), '->renderException() renders a pretty exception with code exception when code exception is 404 and verbosity is verbose'); - $tester->run(array('command' => 'foo3:bar'), array('decorated' => true)); + $tester->run(['command' => 'foo3:bar'], ['decorated' => true]); $this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception3decorated.txt', $tester->getDisplay(true), '->renderException() renders a pretty exceptions with previous exceptions'); - $tester->run(array('command' => 'foo3:bar'), array('decorated' => true, 'capture_stderr_separately' => true)); + $tester->run(['command' => 'foo3:bar'], ['decorated' => true, 'capture_stderr_separately' => true]); $this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception3decorated.txt', $tester->getErrorOutput(true), '->renderException() renders a pretty exceptions with previous exceptions'); $application = new Application(); @@ -760,7 +799,7 @@ class ApplicationTest extends TestCase putenv('COLUMNS=32'); $tester = new ApplicationTester($application); - $tester->run(array('command' => 'foo'), array('decorated' => false, 'capture_stderr_separately' => true)); + $tester->run(['command' => 'foo'], ['decorated' => false, 'capture_stderr_separately' => true]); $this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception4.txt', $tester->getErrorOutput(true), '->renderException() wraps messages when they are bigger than the terminal'); putenv('COLUMNS=120'); } @@ -775,10 +814,10 @@ class ApplicationTest extends TestCase }); $tester = new ApplicationTester($application); - $tester->run(array('command' => 'foo'), array('decorated' => false, 'capture_stderr_separately' => true)); + $tester->run(['command' => 'foo'], ['decorated' => false, 'capture_stderr_separately' => true]); $this->assertStringMatchesFormatFile(self::$fixturesPath.'/application_renderexception_doublewidth1.txt', $tester->getErrorOutput(true), '->renderException() renders a pretty exceptions with previous exceptions'); - $tester->run(array('command' => 'foo'), array('decorated' => true, 'capture_stderr_separately' => true)); + $tester->run(['command' => 'foo'], ['decorated' => true, 'capture_stderr_separately' => true]); $this->assertStringMatchesFormatFile(self::$fixturesPath.'/application_renderexception_doublewidth1decorated.txt', $tester->getErrorOutput(true), '->renderException() renders a pretty exceptions with previous exceptions'); $application = new Application(); @@ -788,7 +827,7 @@ class ApplicationTest extends TestCase throw new \Exception('コマンドã®å®Ÿè¡Œä¸­ã«ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ã¾ã—ãŸã€‚'); }); $tester = new ApplicationTester($application); - $tester->run(array('command' => 'foo'), array('decorated' => false, 'capture_stderr_separately' => true)); + $tester->run(['command' => 'foo'], ['decorated' => false, 'capture_stderr_separately' => true]); $this->assertStringMatchesFormatFile(self::$fixturesPath.'/application_renderexception_doublewidth2.txt', $tester->getErrorOutput(true), '->renderException() wraps messages when they are bigger than the terminal'); putenv('COLUMNS=120'); } @@ -803,24 +842,24 @@ class ApplicationTest extends TestCase }); $tester = new ApplicationTester($application); - $tester->run(array('command' => 'foo'), array('decorated' => false)); + $tester->run(['command' => 'foo'], ['decorated' => false]); $this->assertStringMatchesFormatFile(self::$fixturesPath.'/application_renderexception_escapeslines.txt', $tester->getDisplay(true), '->renderException() escapes lines containing formatting'); putenv('COLUMNS=120'); } public function testRenderExceptionLineBreaks() { - $application = $this->getMockBuilder('Symfony\Component\Console\Application')->setMethods(array('getTerminalWidth'))->getMock(); + $application = $this->getMockBuilder('Symfony\Component\Console\Application')->setMethods(['getTerminalWidth'])->getMock(); $application->setAutoExit(false); $application->expects($this->any()) ->method('getTerminalWidth') - ->will($this->returnValue(120)); + ->willReturn(120); $application->register('foo')->setCode(function () { throw new \InvalidArgumentException("\n\nline 1 with extra spaces \nline 2\n\nline 4\n"); }); $tester = new ApplicationTester($application); - $tester->run(array('command' => 'foo'), array('decorated' => false)); + $tester->run(['command' => 'foo'], ['decorated' => false]); $this->assertStringMatchesFormatFile(self::$fixturesPath.'/application_renderexception_linebreaks.txt', $tester->getDisplay(true), '->renderException() keep multiple line breaks'); } @@ -834,7 +873,7 @@ class ApplicationTest extends TestCase }); $tester = new ApplicationTester($application); - $tester->run(array('command' => 'foo'), array('decorated' => false)); + $tester->run(['command' => 'foo'], ['decorated' => false]); $this->assertContains('[InvalidArgumentException@anonymous]', $tester->getDisplay(true)); $application = new Application(); @@ -845,7 +884,7 @@ class ApplicationTest extends TestCase }); $tester = new ApplicationTester($application); - $tester->run(array('command' => 'foo'), array('decorated' => false)); + $tester->run(['command' => 'foo'], ['decorated' => false]); $this->assertContains('Dummy type "@anonymous" is invalid.', $tester->getDisplay(true)); } @@ -859,7 +898,7 @@ class ApplicationTest extends TestCase }); $tester = new ApplicationTester($application); - $tester->run(array('command' => 'foo'), array('decorated' => false)); + $tester->run(['command' => 'foo'], ['decorated' => false]); $this->assertContains('[InvalidArgumentException@anonymous]', $tester->getDisplay(true)); $application = new Application(); @@ -870,7 +909,7 @@ class ApplicationTest extends TestCase }); $tester = new ApplicationTester($application); - $tester->run(array('command' => 'foo'), array('decorated' => false)); + $tester->run(['command' => 'foo'], ['decorated' => false]); $this->assertContains('Dummy type "@anonymous" is invalid.', $tester->getDisplay(true)); } @@ -880,7 +919,7 @@ class ApplicationTest extends TestCase $application->setAutoExit(false); $application->setCatchExceptions(false); $application->add($command = new \Foo1Command()); - $_SERVER['argv'] = array('cli.php', 'foo:bar1'); + $_SERVER['argv'] = ['cli.php', 'foo:bar1']; ob_start(); $application->run(); @@ -896,63 +935,63 @@ class ApplicationTest extends TestCase $this->ensureStaticCommandHelp($application); $tester = new ApplicationTester($application); - $tester->run(array(), array('decorated' => false)); + $tester->run([], ['decorated' => false]); $this->assertStringEqualsFile(self::$fixturesPath.'/application_run1.txt', $tester->getDisplay(true), '->run() runs the list command if no argument is passed'); - $tester->run(array('--help' => true), array('decorated' => false)); + $tester->run(['--help' => true], ['decorated' => false]); $this->assertStringEqualsFile(self::$fixturesPath.'/application_run2.txt', $tester->getDisplay(true), '->run() runs the help command if --help is passed'); - $tester->run(array('-h' => true), array('decorated' => false)); + $tester->run(['-h' => true], ['decorated' => false]); $this->assertStringEqualsFile(self::$fixturesPath.'/application_run2.txt', $tester->getDisplay(true), '->run() runs the help command if -h is passed'); - $tester->run(array('command' => 'list', '--help' => true), array('decorated' => false)); + $tester->run(['command' => 'list', '--help' => true], ['decorated' => false]); $this->assertStringEqualsFile(self::$fixturesPath.'/application_run3.txt', $tester->getDisplay(true), '->run() displays the help if --help is passed'); - $tester->run(array('command' => 'list', '-h' => true), array('decorated' => false)); + $tester->run(['command' => 'list', '-h' => true], ['decorated' => false]); $this->assertStringEqualsFile(self::$fixturesPath.'/application_run3.txt', $tester->getDisplay(true), '->run() displays the help if -h is passed'); - $tester->run(array('--ansi' => true)); + $tester->run(['--ansi' => true]); $this->assertTrue($tester->getOutput()->isDecorated(), '->run() forces color output if --ansi is passed'); - $tester->run(array('--no-ansi' => true)); + $tester->run(['--no-ansi' => true]); $this->assertFalse($tester->getOutput()->isDecorated(), '->run() forces color output to be disabled if --no-ansi is passed'); - $tester->run(array('--version' => true), array('decorated' => false)); + $tester->run(['--version' => true], ['decorated' => false]); $this->assertStringEqualsFile(self::$fixturesPath.'/application_run4.txt', $tester->getDisplay(true), '->run() displays the program version if --version is passed'); - $tester->run(array('-V' => true), array('decorated' => false)); + $tester->run(['-V' => true], ['decorated' => false]); $this->assertStringEqualsFile(self::$fixturesPath.'/application_run4.txt', $tester->getDisplay(true), '->run() displays the program version if -v is passed'); - $tester->run(array('command' => 'list', '--quiet' => true)); + $tester->run(['command' => 'list', '--quiet' => true]); $this->assertSame('', $tester->getDisplay(), '->run() removes all output if --quiet is passed'); $this->assertFalse($tester->getInput()->isInteractive(), '->run() sets off the interactive mode if --quiet is passed'); - $tester->run(array('command' => 'list', '-q' => true)); + $tester->run(['command' => 'list', '-q' => true]); $this->assertSame('', $tester->getDisplay(), '->run() removes all output if -q is passed'); $this->assertFalse($tester->getInput()->isInteractive(), '->run() sets off the interactive mode if -q is passed'); - $tester->run(array('command' => 'list', '--verbose' => true)); + $tester->run(['command' => 'list', '--verbose' => true]); $this->assertSame(Output::VERBOSITY_VERBOSE, $tester->getOutput()->getVerbosity(), '->run() sets the output to verbose if --verbose is passed'); - $tester->run(array('command' => 'list', '--verbose' => 1)); + $tester->run(['command' => 'list', '--verbose' => 1]); $this->assertSame(Output::VERBOSITY_VERBOSE, $tester->getOutput()->getVerbosity(), '->run() sets the output to verbose if --verbose=1 is passed'); - $tester->run(array('command' => 'list', '--verbose' => 2)); + $tester->run(['command' => 'list', '--verbose' => 2]); $this->assertSame(Output::VERBOSITY_VERY_VERBOSE, $tester->getOutput()->getVerbosity(), '->run() sets the output to very verbose if --verbose=2 is passed'); - $tester->run(array('command' => 'list', '--verbose' => 3)); + $tester->run(['command' => 'list', '--verbose' => 3]); $this->assertSame(Output::VERBOSITY_DEBUG, $tester->getOutput()->getVerbosity(), '->run() sets the output to debug if --verbose=3 is passed'); - $tester->run(array('command' => 'list', '--verbose' => 4)); + $tester->run(['command' => 'list', '--verbose' => 4]); $this->assertSame(Output::VERBOSITY_VERBOSE, $tester->getOutput()->getVerbosity(), '->run() sets the output to verbose if unknown --verbose level is passed'); - $tester->run(array('command' => 'list', '-v' => true)); + $tester->run(['command' => 'list', '-v' => true]); $this->assertSame(Output::VERBOSITY_VERBOSE, $tester->getOutput()->getVerbosity(), '->run() sets the output to verbose if -v is passed'); - $tester->run(array('command' => 'list', '-vv' => true)); + $tester->run(['command' => 'list', '-vv' => true]); $this->assertSame(Output::VERBOSITY_VERY_VERBOSE, $tester->getOutput()->getVerbosity(), '->run() sets the output to verbose if -v is passed'); - $tester->run(array('command' => 'list', '-vvv' => true)); + $tester->run(['command' => 'list', '-vvv' => true]); $this->assertSame(Output::VERBOSITY_DEBUG, $tester->getOutput()->getVerbosity(), '->run() sets the output to verbose if -v is passed'); $application = new Application(); @@ -961,13 +1000,26 @@ class ApplicationTest extends TestCase $application->add(new \FooCommand()); $tester = new ApplicationTester($application); - $tester->run(array('command' => 'foo:bar', '--no-interaction' => true), array('decorated' => false)); + $tester->run(['command' => 'foo:bar', '--no-interaction' => true], ['decorated' => false]); $this->assertSame('called'.PHP_EOL, $tester->getDisplay(), '->run() does not call interact() if --no-interaction is passed'); - $tester->run(array('command' => 'foo:bar', '-n' => true), array('decorated' => false)); + $tester->run(['command' => 'foo:bar', '-n' => true], ['decorated' => false]); $this->assertSame('called'.PHP_EOL, $tester->getDisplay(), '->run() does not call interact() if -n is passed'); } + public function testRunWithGlobalOptionAndNoCommand() + { + $application = new Application(); + $application->setAutoExit(false); + $application->setCatchExceptions(false); + $application->getDefinition()->addOption(new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL)); + + $output = new StreamOutput(fopen('php://memory', 'w', false)); + $input = new ArgvInput(['cli.php', '--foo', 'bar']); + + $this->assertSame(0, $application->run($input, $output)); + } + /** * Issue #9285. * @@ -984,12 +1036,12 @@ class ApplicationTest extends TestCase $output = new StreamOutput(fopen('php://memory', 'w', false)); - $input = new ArgvInput(array('cli.php', '-v', 'foo:bar')); + $input = new ArgvInput(['cli.php', '-v', 'foo:bar']); $application->run($input, $output); $this->addToAssertionCount(1); - $input = new ArgvInput(array('cli.php', '--verbose', 'foo:bar')); + $input = new ArgvInput(['cli.php', '--verbose', 'foo:bar']); $application->run($input, $output); $this->addToAssertionCount(1); @@ -999,13 +1051,13 @@ class ApplicationTest extends TestCase { $exception = new \Exception('', 4); - $application = $this->getMockBuilder('Symfony\Component\Console\Application')->setMethods(array('doRun'))->getMock(); + $application = $this->getMockBuilder('Symfony\Component\Console\Application')->setMethods(['doRun'])->getMock(); $application->setAutoExit(false); $application->expects($this->once()) ->method('doRun') ->willThrowException($exception); - $exitCode = $application->run(new ArrayInput(array()), new NullOutput()); + $exitCode = $application->run(new ArrayInput([]), new NullOutput()); $this->assertSame(4, $exitCode, '->run() returns integer exit code extracted from raised exception'); } @@ -1029,7 +1081,7 @@ class ApplicationTest extends TestCase }); $tester = new ApplicationTester($application); - $tester->run(array('command' => 'test')); + $tester->run(['command' => 'test']); $this->assertTrue($passedRightValue, '-> exit code 4 was passed in the console.terminate event'); } @@ -1038,13 +1090,13 @@ class ApplicationTest extends TestCase { $exception = new \Exception('', 0); - $application = $this->getMockBuilder('Symfony\Component\Console\Application')->setMethods(array('doRun'))->getMock(); + $application = $this->getMockBuilder('Symfony\Component\Console\Application')->setMethods(['doRun'])->getMock(); $application->setAutoExit(false); $application->expects($this->once()) ->method('doRun') ->willThrowException($exception); - $exitCode = $application->run(new ArrayInput(array()), new NullOutput()); + $exitCode = $application->run(new ArrayInput([]), new NullOutput()); $this->assertSame(1, $exitCode, '->run() returns exit code 1 when exception code is 0'); } @@ -1068,7 +1120,7 @@ class ApplicationTest extends TestCase }); $tester = new ApplicationTester($application); - $tester->run(array('command' => 'test')); + $tester->run(['command' => 'test']); $this->assertTrue($passedRightValue, '-> exit code 1 was passed in the console.terminate event'); } @@ -1089,12 +1141,12 @@ class ApplicationTest extends TestCase $application ->register('foo') - ->setAliases(array('f')) - ->setDefinition(array(new InputOption('survey', 'e', InputOption::VALUE_REQUIRED, 'My option with a shortcut.'))) + ->setAliases(['f']) + ->setDefinition([new InputOption('survey', 'e', InputOption::VALUE_REQUIRED, 'My option with a shortcut.')]) ->setCode(function (InputInterface $input, OutputInterface $output) {}) ; - $input = new ArrayInput(array('command' => 'foo')); + $input = new ArrayInput(['command' => 'foo']); $output = new NullOutput(); $application->run($input, $output); @@ -1111,22 +1163,22 @@ class ApplicationTest extends TestCase $application->setCatchExceptions(false); $application ->register('foo') - ->setDefinition(array($def)) + ->setDefinition([$def]) ->setCode(function (InputInterface $input, OutputInterface $output) {}) ; - $input = new ArrayInput(array('command' => 'foo')); + $input = new ArrayInput(['command' => 'foo']); $output = new NullOutput(); $application->run($input, $output); } public function getAddingAlreadySetDefinitionElementData() { - return array( - array(new InputArgument('command', InputArgument::REQUIRED)), - array(new InputOption('quiet', '', InputOption::VALUE_NONE)), - array(new InputOption('query', 'q', InputOption::VALUE_NONE)), - ); + return [ + [new InputArgument('command', InputArgument::REQUIRED)], + [new InputOption('quiet', '', InputOption::VALUE_NONE)], + [new InputOption('query', 'q', InputOption::VALUE_NONE)], + ]; } public function testGetDefaultHelperSetReturnsDefaultValues() @@ -1146,7 +1198,7 @@ class ApplicationTest extends TestCase $application->setAutoExit(false); $application->setCatchExceptions(false); - $application->setHelperSet(new HelperSet(array(new FormatterHelper()))); + $application->setHelperSet(new HelperSet([new FormatterHelper()])); $helperSet = $application->getHelperSet(); @@ -1163,7 +1215,7 @@ class ApplicationTest extends TestCase $application->setAutoExit(false); $application->setCatchExceptions(false); - $application->setHelperSet(new HelperSet(array(new FormatterHelper()))); + $application->setHelperSet(new HelperSet([new FormatterHelper()])); $helperSet = $application->getHelperSet(); @@ -1221,7 +1273,7 @@ class ApplicationTest extends TestCase $application->setAutoExit(false); $application->setCatchExceptions(false); - $application->setDefinition(new InputDefinition(array(new InputOption('--custom', '-c', InputOption::VALUE_NONE, 'Set the custom input definition.')))); + $application->setDefinition(new InputDefinition([new InputOption('--custom', '-c', InputOption::VALUE_NONE, 'Set the custom input definition.')])); $inputDefinition = $application->getDefinition(); @@ -1250,7 +1302,7 @@ class ApplicationTest extends TestCase }); $tester = new ApplicationTester($application); - $tester->run(array('command' => 'foo')); + $tester->run(['command' => 'foo']); $this->assertEquals('before.foo.after.'.PHP_EOL, $tester->getDisplay()); } @@ -1270,7 +1322,7 @@ class ApplicationTest extends TestCase }); $tester = new ApplicationTester($application); - $tester->run(array('command' => 'foo')); + $tester->run(['command' => 'foo']); } public function testRunDispatchesAllEventsWithException() @@ -1286,7 +1338,7 @@ class ApplicationTest extends TestCase }); $tester = new ApplicationTester($application); - $tester->run(array('command' => 'foo')); + $tester->run(['command' => 'foo']); $this->assertContains('before.foo.error.after.', $tester->getDisplay()); } @@ -1306,7 +1358,7 @@ class ApplicationTest extends TestCase }); $tester = new ApplicationTester($application); - $tester->run(array('command' => 'foo')); + $tester->run(['command' => 'foo']); $this->assertContains('before.error.after.', $tester->getDisplay()); } @@ -1325,7 +1377,7 @@ class ApplicationTest extends TestCase $tester = new ApplicationTester($application); try { - $tester->run(array('command' => 'dym')); + $tester->run(['command' => 'dym']); $this->fail('Error expected.'); } catch (\Error $e) { $this->assertSame('dymerr', $e->getMessage()); @@ -1354,7 +1406,7 @@ class ApplicationTest extends TestCase }); $tester = new ApplicationTester($application); - $tester->run(array('command' => 'foo')); + $tester->run(['command' => 'foo']); $this->assertContains('before.error.silenced.after.', $tester->getDisplay()); $this->assertEquals(ConsoleCommandEvent::RETURN_CODE_DISABLED, $tester->getStatusCode()); } @@ -1373,7 +1425,7 @@ class ApplicationTest extends TestCase $application->setAutoExit(false); $tester = new ApplicationTester($application); - $tester->run(array('command' => 'unknown')); + $tester->run(['command' => 'unknown']); $this->assertContains('silenced command not found', $tester->getDisplay()); $this->assertEquals(1, $tester->getStatusCode()); } @@ -1392,7 +1444,7 @@ class ApplicationTest extends TestCase $tester = new ApplicationTester($application); try { - $tester->run(array('command' => 'dym')); + $tester->run(['command' => 'dym']); $this->fail('->run() should rethrow PHP errors if not handled via ConsoleErrorEvent.'); } catch (\Error $e) { $this->assertSame($e->getMessage(), 'Class \'UnknownClass\' not found'); @@ -1417,7 +1469,7 @@ class ApplicationTest extends TestCase }); $tester = new ApplicationTester($application); - $tester->run(array('command' => 'dym')); + $tester->run(['command' => 'dym']); $this->assertContains('before.dym.error.after.', $tester->getDisplay(), 'The PHP Error did not dispached events'); } @@ -1434,7 +1486,7 @@ class ApplicationTest extends TestCase }); $tester = new ApplicationTester($application); - $tester->run(array('command' => 'dym')); + $tester->run(['command' => 'dym']); $this->assertContains('before.dym.error.after.', $tester->getDisplay(), 'The PHP Error did not dispached events'); } @@ -1451,7 +1503,7 @@ class ApplicationTest extends TestCase }); $tester = new ApplicationTester($application); - $tester->run(array('command' => 'dus')); + $tester->run(['command' => 'dus']); $this->assertSame(1, $tester->getStatusCode(), 'Status code should be 1'); } @@ -1466,7 +1518,7 @@ class ApplicationTest extends TestCase }); $tester = new ApplicationTester($application); - $exitCode = $tester->run(array('command' => 'foo')); + $exitCode = $tester->run(['command' => 'foo']); $this->assertContains('before.after.', $tester->getDisplay()); $this->assertEquals(ConsoleCommandEvent::RETURN_CODE_DISABLED, $exitCode); } @@ -1493,7 +1545,7 @@ class ApplicationTest extends TestCase }); $tester = new ApplicationTester($application); - $tester->run(array('command' => 'foo', '--no-interaction' => true)); + $tester->run(['command' => 'foo', '--no-interaction' => true]); $this->assertTrue($noInteractionValue); $this->assertFalse($quietValue); @@ -1523,7 +1575,7 @@ class ApplicationTest extends TestCase }); $tester = new ApplicationTester($application); - $tester->run(array('command' => 'foo', '--extra' => 'some test value')); + $tester->run(['command' => 'foo', '--extra' => 'some test value']); $this->assertEquals('some test value', $extraValue); } @@ -1538,14 +1590,14 @@ class ApplicationTest extends TestCase $application->setDefaultCommand($command->getName()); $tester = new ApplicationTester($application); - $tester->run(array(), array('interactive' => false)); + $tester->run([], ['interactive' => false]); $this->assertEquals('called'.PHP_EOL, $tester->getDisplay(), 'Application runs the default set command if different from \'list\' command'); $application = new CustomDefaultCommandApplication(); $application->setAutoExit(false); $tester = new ApplicationTester($application); - $tester->run(array(), array('interactive' => false)); + $tester->run([], ['interactive' => false]); $this->assertEquals('called'.PHP_EOL, $tester->getDisplay(), 'Application runs the default set command if different from \'list\' command'); } @@ -1560,7 +1612,7 @@ class ApplicationTest extends TestCase $application->setDefaultCommand($command->getName()); $tester = new ApplicationTester($application); - $tester->run(array('--fooopt' => 'opt'), array('interactive' => false)); + $tester->run(['--fooopt' => 'opt'], ['interactive' => false]); $this->assertEquals('called'.PHP_EOL.'opt'.PHP_EOL, $tester->getDisplay(), 'Application runs the default set command if different from \'list\' command'); } @@ -1576,10 +1628,10 @@ class ApplicationTest extends TestCase $tester = new ApplicationTester($application); - $tester->run(array()); + $tester->run([]); $this->assertContains('called', $tester->getDisplay()); - $tester->run(array('--help' => true)); + $tester->run(['--help' => true]); $this->assertContains('The foo:bar command', $tester->getDisplay()); } @@ -1592,9 +1644,9 @@ class ApplicationTest extends TestCase $application->setAutoExit(false); $tester = new ApplicationTester($application); - $tester->run(array('command' => 'help')); + $tester->run(['command' => 'help']); - $this->assertFalse($tester->getInput()->hasParameterOption(array('--no-interaction', '-n'))); + $this->assertFalse($tester->getInput()->hasParameterOption(['--no-interaction', '-n'])); $inputStream = $tester->getInput()->getStream(); $this->assertEquals($tester->getInput()->isInteractive(), @posix_isatty($inputStream)); @@ -1606,9 +1658,9 @@ class ApplicationTest extends TestCase $container->addCompilerPass(new AddConsoleCommandPass()); $container ->register('lazy-command', LazyCommand::class) - ->addTag('console.command', array('command' => 'lazy:command')) - ->addTag('console.command', array('command' => 'lazy:alias')) - ->addTag('console.command', array('command' => 'lazy:alias2')); + ->addTag('console.command', ['command' => 'lazy:command']) + ->addTag('console.command', ['command' => 'lazy:alias']) + ->addTag('console.command', ['command' => 'lazy:alias2']); $container->compile(); $application = new Application(); @@ -1617,17 +1669,17 @@ class ApplicationTest extends TestCase $tester = new ApplicationTester($application); - $tester->run(array('command' => 'lazy:command')); + $tester->run(['command' => 'lazy:command']); $this->assertSame("lazy-command called\n", $tester->getDisplay(true)); - $tester->run(array('command' => 'lazy:alias')); + $tester->run(['command' => 'lazy:alias']); $this->assertSame("lazy-command called\n", $tester->getDisplay(true)); - $tester->run(array('command' => 'lazy:alias2')); + $tester->run(['command' => 'lazy:alias2']); $this->assertSame("lazy-command called\n", $tester->getDisplay(true)); $command = $application->get('lazy:command'); - $this->assertSame(array('lazy:alias', 'lazy:alias2'), $command->getAliases()); + $this->assertSame(['lazy:alias', 'lazy:alias2'], $command->getAliases()); } /** @@ -1636,21 +1688,21 @@ class ApplicationTest extends TestCase public function testGetDisabledLazyCommand() { $application = new Application(); - $application->setCommandLoader(new FactoryCommandLoader(array('disabled' => function () { return new DisabledCommand(); }))); + $application->setCommandLoader(new FactoryCommandLoader(['disabled' => function () { return new DisabledCommand(); }])); $application->get('disabled'); } public function testHasReturnsFalseForDisabledLazyCommand() { $application = new Application(); - $application->setCommandLoader(new FactoryCommandLoader(array('disabled' => function () { return new DisabledCommand(); }))); + $application->setCommandLoader(new FactoryCommandLoader(['disabled' => function () { return new DisabledCommand(); }])); $this->assertFalse($application->has('disabled')); } public function testAllExcludesDisabledLazyCommand() { $application = new Application(); - $application->setCommandLoader(new FactoryCommandLoader(array('disabled' => function () { return new DisabledCommand(); }))); + $application->setCommandLoader(new FactoryCommandLoader(['disabled' => function () { return new DisabledCommand(); }])); $this->assertArrayNotHasKey('disabled', $application->all()); } @@ -1693,7 +1745,7 @@ class ApplicationTest extends TestCase $tester = new ApplicationTester($application); try { - $tester->run(array('command' => 'dym')); + $tester->run(['command' => 'dym']); $this->fail('->run() should rethrow PHP errors if not handled via ConsoleErrorEvent.'); } catch (\Error $e) { $this->assertSame($e->getMessage(), 'Class \'UnknownClass\' not found'); @@ -1725,14 +1777,7 @@ class ApplicationTest extends TestCase }); $tester = new ApplicationTester($application); - $tester->run(array('command' => 'foo')); - } - - protected function tearDown() - { - putenv('SHELL_VERBOSITY'); - unset($_ENV['SHELL_VERBOSITY']); - unset($_SERVER['SHELL_VERBOSITY']); + $tester->run(['command' => 'foo']); } } @@ -1745,7 +1790,7 @@ class CustomApplication extends Application */ protected function getDefaultInputDefinition() { - return new InputDefinition(array(new InputOption('--custom', '-c', InputOption::VALUE_NONE, 'Set the custom input definition.'))); + return new InputDefinition([new InputOption('--custom', '-c', InputOption::VALUE_NONE, 'Set the custom input definition.')]); } /** @@ -1755,7 +1800,7 @@ class CustomApplication extends Application */ protected function getDefaultHelperSet() { - return new HelperSet(array(new FormatterHelper())); + return new HelperSet([new FormatterHelper()]); } } diff --git a/vendor/symfony/console/Tests/Command/CommandTest.php b/vendor/symfony/console/Tests/Command/CommandTest.php index 41df51b3..be73e5c9 100644 --- a/vendor/symfony/console/Tests/Command/CommandTest.php +++ b/vendor/symfony/console/Tests/Command/CommandTest.php @@ -71,7 +71,7 @@ class CommandTest extends TestCase $ret = $command->setDefinition($definition = new InputDefinition()); $this->assertEquals($command, $ret, '->setDefinition() implements a fluent interface'); $this->assertEquals($definition, $command->getDefinition(), '->setDefinition() sets the current InputDefinition instance'); - $command->setDefinition(array(new InputArgument('foo'), new InputOption('bar'))); + $command->setDefinition([new InputArgument('foo'), new InputOption('bar')]); $this->assertTrue($command->getDefinition()->hasArgument('foo'), '->setDefinition() also takes an array of InputArguments and InputOptions as an argument'); $this->assertTrue($command->getDefinition()->hasOption('bar'), '->setDefinition() also takes an array of InputArguments and InputOptions as an argument'); $command->setDefinition(new InputDefinition()); @@ -130,10 +130,10 @@ class CommandTest extends TestCase public function provideInvalidCommandNames() { - return array( - array(''), - array('foo:'), - ); + return [ + [''], + ['foo:'], + ]; } public function testGetSetDescription() @@ -179,16 +179,16 @@ class CommandTest extends TestCase public function testGetSetAliases() { $command = new \TestCommand(); - $this->assertEquals(array('name'), $command->getAliases(), '->getAliases() returns the aliases'); - $ret = $command->setAliases(array('name1')); + $this->assertEquals(['name'], $command->getAliases(), '->getAliases() returns the aliases'); + $ret = $command->setAliases(['name1']); $this->assertEquals($command, $ret, '->setAliases() implements a fluent interface'); - $this->assertEquals(array('name1'), $command->getAliases(), '->setAliases() sets the aliases'); + $this->assertEquals(['name1'], $command->getAliases(), '->setAliases() sets the aliases'); } public function testSetAliasesNull() { $command = new \TestCommand(); - $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('InvalidArgumentException'); + $this->expectException('InvalidArgumentException'); $command->setAliases(null); } @@ -231,11 +231,11 @@ class CommandTest extends TestCase public function testMergeApplicationDefinition() { $application1 = new Application(); - $application1->getDefinition()->addArguments(array(new InputArgument('foo'))); - $application1->getDefinition()->addOptions(array(new InputOption('bar'))); + $application1->getDefinition()->addArguments([new InputArgument('foo')]); + $application1->getDefinition()->addOptions([new InputOption('bar')]); $command = new \TestCommand(); $command->setApplication($application1); - $command->setDefinition($definition = new InputDefinition(array(new InputArgument('bar'), new InputOption('foo')))); + $command->setDefinition($definition = new InputDefinition([new InputArgument('bar'), new InputOption('foo')])); $r = new \ReflectionObject($command); $m = $r->getMethod('mergeApplicationDefinition'); @@ -253,11 +253,11 @@ class CommandTest extends TestCase public function testMergeApplicationDefinitionWithoutArgsThenWithArgsAddsArgs() { $application1 = new Application(); - $application1->getDefinition()->addArguments(array(new InputArgument('foo'))); - $application1->getDefinition()->addOptions(array(new InputOption('bar'))); + $application1->getDefinition()->addArguments([new InputArgument('foo')]); + $application1->getDefinition()->addOptions([new InputOption('bar')]); $command = new \TestCommand(); $command->setApplication($application1); - $command->setDefinition($definition = new InputDefinition(array())); + $command->setDefinition($definition = new InputDefinition([])); $r = new \ReflectionObject($command); $m = $r->getMethod('mergeApplicationDefinition'); @@ -277,7 +277,7 @@ class CommandTest extends TestCase { $tester = new CommandTester(new \TestCommand()); - $tester->execute(array(), array('interactive' => true)); + $tester->execute([], ['interactive' => true]); $this->assertEquals('interact called'.PHP_EOL.'execute called'.PHP_EOL, $tester->getDisplay(), '->run() calls the interact() method if the input is interactive'); } @@ -286,7 +286,7 @@ class CommandTest extends TestCase { $tester = new CommandTester(new \TestCommand()); - $tester->execute(array(), array('interactive' => false)); + $tester->execute([], ['interactive' => false]); $this->assertEquals('execute called'.PHP_EOL, $tester->getDisplay(), '->run() does not call the interact() method if the input is not interactive'); } @@ -309,7 +309,7 @@ class CommandTest extends TestCase { $command = new \TestCommand(); $tester = new CommandTester($command); - $tester->execute(array('--bar' => true)); + $tester->execute(['--bar' => true]); } public function testRunReturnsIntegerExitCode() @@ -318,10 +318,10 @@ class CommandTest extends TestCase $exitCode = $command->run(new StringInput(''), new NullOutput()); $this->assertSame(0, $exitCode, '->run() returns integer exit code (treats null as 0)'); - $command = $this->getMockBuilder('TestCommand')->setMethods(array('execute'))->getMock(); + $command = $this->getMockBuilder('TestCommand')->setMethods(['execute'])->getMock(); $command->expects($this->once()) ->method('execute') - ->will($this->returnValue('2.3')); + ->willReturn('2.3'); $exitCode = $command->run(new StringInput(''), new NullOutput()); $this->assertSame(2, $exitCode, '->run() returns integer exit code (casts numeric to int)'); } @@ -364,16 +364,16 @@ class CommandTest extends TestCase }); $this->assertEquals($command, $ret, '->setCode() implements a fluent interface'); $tester = new CommandTester($command); - $tester->execute(array()); + $tester->execute([]); $this->assertEquals('interact called'.PHP_EOL.'from the code...'.PHP_EOL, $tester->getDisplay()); } public function getSetCodeBindToClosureTests() { - return array( - array(true, 'not bound to the command'), - array(false, 'bound to the command'), - ); + return [ + [true, 'not bound to the command'], + [false, 'bound to the command'], + ]; } /** @@ -389,7 +389,7 @@ class CommandTest extends TestCase $command = new \TestCommand(); $command->setCode($code); $tester = new CommandTester($command); - $tester->execute(array()); + $tester->execute([]); $this->assertEquals('interact called'.PHP_EOL.$expected.PHP_EOL, $tester->getDisplay()); } @@ -398,7 +398,7 @@ class CommandTest extends TestCase $command = new \TestCommand(); $command->setCode(self::createClosure()); $tester = new CommandTester($command); - $tester->execute(array()); + $tester->execute([]); $this->assertEquals('interact called'.PHP_EOL.'bound'.PHP_EOL, $tester->getDisplay()); } @@ -413,10 +413,10 @@ class CommandTest extends TestCase public function testSetCodeWithNonClosureCallable() { $command = new \TestCommand(); - $ret = $command->setCode(array($this, 'callableMethodCommand')); + $ret = $command->setCode([$this, 'callableMethodCommand']); $this->assertEquals($command, $ret, '->setCode() implements a fluent interface'); $tester = new CommandTester($command); - $tester->execute(array()); + $tester->execute([]); $this->assertEquals('interact called'.PHP_EOL.'from the code...'.PHP_EOL, $tester->getDisplay()); } diff --git a/vendor/symfony/console/Tests/Command/HelpCommandTest.php b/vendor/symfony/console/Tests/Command/HelpCommandTest.php index 30fe2b6e..ce9d8d4f 100644 --- a/vendor/symfony/console/Tests/Command/HelpCommandTest.php +++ b/vendor/symfony/console/Tests/Command/HelpCommandTest.php @@ -24,7 +24,7 @@ class HelpCommandTest extends TestCase $command = new HelpCommand(); $command->setApplication(new Application()); $commandTester = new CommandTester($command); - $commandTester->execute(array('command_name' => 'li'), array('decorated' => false)); + $commandTester->execute(['command_name' => 'li'], ['decorated' => false]); $this->assertContains('list [options] [--] []', $commandTester->getDisplay(), '->execute() returns a text help for the given command alias'); $this->assertContains('format=FORMAT', $commandTester->getDisplay(), '->execute() returns a text help for the given command alias'); $this->assertContains('raw', $commandTester->getDisplay(), '->execute() returns a text help for the given command alias'); @@ -35,7 +35,7 @@ class HelpCommandTest extends TestCase $command = new HelpCommand(); $commandTester = new CommandTester($command); $command->setCommand(new ListCommand()); - $commandTester->execute(array(), array('decorated' => false)); + $commandTester->execute([], ['decorated' => false]); $this->assertContains('list [options] [--] []', $commandTester->getDisplay(), '->execute() returns a text help for the given command'); $this->assertContains('format=FORMAT', $commandTester->getDisplay(), '->execute() returns a text help for the given command'); $this->assertContains('raw', $commandTester->getDisplay(), '->execute() returns a text help for the given command'); @@ -46,7 +46,7 @@ class HelpCommandTest extends TestCase $command = new HelpCommand(); $commandTester = new CommandTester($command); $command->setCommand(new ListCommand()); - $commandTester->execute(array('--format' => 'xml')); + $commandTester->execute(['--format' => 'xml']); $this->assertContains('getDisplay(), '->execute() returns an XML help text if --xml is passed'); } @@ -54,7 +54,7 @@ class HelpCommandTest extends TestCase { $application = new Application(); $commandTester = new CommandTester($application->get('help')); - $commandTester->execute(array('command_name' => 'list')); + $commandTester->execute(['command_name' => 'list']); $this->assertContains('list [options] [--] []', $commandTester->getDisplay(), '->execute() returns a text help for the given command'); $this->assertContains('format=FORMAT', $commandTester->getDisplay(), '->execute() returns a text help for the given command'); $this->assertContains('raw', $commandTester->getDisplay(), '->execute() returns a text help for the given command'); @@ -64,7 +64,7 @@ class HelpCommandTest extends TestCase { $application = new Application(); $commandTester = new CommandTester($application->get('help')); - $commandTester->execute(array('command_name' => 'list', '--format' => 'xml')); + $commandTester->execute(['command_name' => 'list', '--format' => 'xml']); $this->assertContains('list [--raw] [--format FORMAT] [--] [<namespace>]', $commandTester->getDisplay(), '->execute() returns a text help for the given command'); $this->assertContains('getDisplay(), '->execute() returns an XML help text if --format=xml is passed'); } diff --git a/vendor/symfony/console/Tests/Command/ListCommandTest.php b/vendor/symfony/console/Tests/Command/ListCommandTest.php index b39f7ec5..57687d4c 100644 --- a/vendor/symfony/console/Tests/Command/ListCommandTest.php +++ b/vendor/symfony/console/Tests/Command/ListCommandTest.php @@ -21,7 +21,7 @@ class ListCommandTest extends TestCase { $application = new Application(); $commandTester = new CommandTester($command = $application->get('list')); - $commandTester->execute(array('command' => $command->getName()), array('decorated' => false)); + $commandTester->execute(['command' => $command->getName()], ['decorated' => false]); $this->assertRegExp('/help\s{2,}Displays help for a command/', $commandTester->getDisplay(), '->execute() returns a list of available commands'); } @@ -30,7 +30,7 @@ class ListCommandTest extends TestCase { $application = new Application(); $commandTester = new CommandTester($command = $application->get('list')); - $commandTester->execute(array('command' => $command->getName(), '--format' => 'xml')); + $commandTester->execute(['command' => $command->getName(), '--format' => 'xml']); $this->assertRegExp('/\033[39;27m", ''), - array('', "\033[32;1;4mz\033[39;22;24m", 'z'), - array('', "\033[32;1;4;7md\033[39;22;24;27m", 'd'), - ); + return [ + [''], + [''], + ['', "\033[32m[test]\033[39m", '[test]'], + ['', "\033[32;44ma\033[39;49m", 'a'], + ['', "\033[32;1mb\033[39;22m", 'b'], + ['', "\033[32;7m\033[39;27m", ''], + ['', "\033[32;1;4mz\033[39;22;24m", 'z'], + ['', "\033[32;1;4;7md\033[39;22;24;27m", 'd'], + ]; } public function provideInlineStyleTagsWithUnknownOptions() { - return array( - array('', 'abc'), - array('', 'abc'), - array('', 'xyz'), - array('', 'efg'), - ); + return [ + ['', 'abc'], + ['', 'abc'], + ['', 'xyz'], + ['', 'efg'], + ]; } public function testNonStyleTag() @@ -228,7 +228,7 @@ class OutputFormatterTest extends TestCase ); } - public function testNotDecoratedFormatter() + public function testFormatterHasStyles() { $formatter = new OutputFormatter(false); @@ -236,40 +236,35 @@ class OutputFormatterTest extends TestCase $this->assertTrue($formatter->hasStyle('info')); $this->assertTrue($formatter->hasStyle('comment')); $this->assertTrue($formatter->hasStyle('question')); + } - $this->assertEquals( - 'some error', $formatter->format('some error') - ); - $this->assertEquals( - 'some info', $formatter->format('some info') - ); - $this->assertEquals( - 'some comment', $formatter->format('some comment') - ); - $this->assertEquals( - 'some question', $formatter->format('some question') - ); - $this->assertEquals( - 'some text with inline style', $formatter->format('some text with inline style') - ); + /** + * @dataProvider provideDecoratedAndNonDecoratedOutput + */ + public function testNotDecoratedFormatter(string $input, string $expectedNonDecoratedOutput, string $expectedDecoratedOutput, string $terminalEmulator = 'foo') + { + $prevTerminalEmulator = getenv('TERMINAL_EMULATOR'); + putenv('TERMINAL_EMULATOR='.$terminalEmulator); - $formatter->setDecorated(true); + try { + $this->assertEquals($expectedDecoratedOutput, (new OutputFormatter(true))->format($input)); + $this->assertEquals($expectedNonDecoratedOutput, (new OutputFormatter(false))->format($input)); + } finally { + putenv('TERMINAL_EMULATOR'.($prevTerminalEmulator ? "=$prevTerminalEmulator" : '')); + } + } - $this->assertEquals( - "\033[37;41msome error\033[39;49m", $formatter->format('some error') - ); - $this->assertEquals( - "\033[32msome info\033[39m", $formatter->format('some info') - ); - $this->assertEquals( - "\033[33msome comment\033[39m", $formatter->format('some comment') - ); - $this->assertEquals( - "\033[30;46msome question\033[39;49m", $formatter->format('some question') - ); - $this->assertEquals( - "\033[31msome text with inline style\033[39m", $formatter->format('some text with inline style') - ); + public function provideDecoratedAndNonDecoratedOutput() + { + return [ + ['some error', 'some error', "\033[37;41msome error\033[39;49m"], + ['some info', 'some info', "\033[32msome info\033[39m"], + ['some comment', 'some comment', "\033[33msome comment\033[39m"], + ['some question', 'some question', "\033[30;46msome question\033[39;49m"], + ['some text with inline style', 'some text with inline style', "\033[31msome text with inline style\033[39m"], + ['some URL', 'some URL', "\033]8;;idea://open/?file=/path/SomeFile.php&line=12\033\\some URL\033]8;;\033\\"], + ['some URL', 'some URL', 'some URL', 'JetBrains-JediTerm'], + ]; } public function testContentWithLineBreaks() @@ -332,6 +327,9 @@ EOF $this->assertSame("pre\e[37;41m\e[39;49m\n\e[37;41mfoo\e[39;49m\n\e[37;41mbar\e[39;49m\n\e[37;41mbaz\e[39;49m\npos\nt", $formatter->formatAndWrap('pre foo bar baz post', 3)); $this->assertSame("pre \e[37;41m\e[39;49m\n\e[37;41mfoo \e[39;49m\n\e[37;41mbar \e[39;49m\n\e[37;41mbaz\e[39;49m \npost", $formatter->formatAndWrap('pre foo bar baz post', 4)); $this->assertSame("pre \e[37;41mf\e[39;49m\n\e[37;41moo ba\e[39;49m\n\e[37;41mr baz\e[39;49m\npost", $formatter->formatAndWrap('pre foo bar baz post', 5)); + $this->assertSame("Lore\nm \e[37;41mip\e[39;49m\n\e[37;41msum\e[39;49m \ndolo\nr \e[32msi\e[39m\n\e[32mt\e[39m am\net", $formatter->formatAndWrap('Lorem ipsum dolor sit amet', 4)); + $this->assertSame("Lorem \e[37;41mip\e[39;49m\n\e[37;41msum\e[39;49m dolo\nr \e[32msit\e[39m am\net", $formatter->formatAndWrap('Lorem ipsum dolor sit amet', 8)); + $this->assertSame("Lorem \e[37;41mipsum\e[39;49m dolor \e[32m\e[39m\n\e[32msit\e[39m, \e[37;41mamet\e[39;49m et \e[32mlauda\e[39m\n\e[32mntium\e[39m architecto", $formatter->formatAndWrap('Lorem ipsum dolor sit, amet et laudantium architecto', 18)); $formatter = new OutputFormatter(); diff --git a/vendor/symfony/console/Tests/Helper/AbstractQuestionHelperTest.php b/vendor/symfony/console/Tests/Helper/AbstractQuestionHelperTest.php index 56dd65f6..f12566de 100644 --- a/vendor/symfony/console/Tests/Helper/AbstractQuestionHelperTest.php +++ b/vendor/symfony/console/Tests/Helper/AbstractQuestionHelperTest.php @@ -21,7 +21,7 @@ abstract class AbstractQuestionHelperTest extends TestCase $mock = $this->getMockBuilder(StreamableInputInterface::class)->getMock(); $mock->expects($this->any()) ->method('isInteractive') - ->will($this->returnValue($interactive)); + ->willReturn($interactive); if ($stream) { $mock->expects($this->any()) diff --git a/vendor/symfony/console/Tests/Helper/DumperNativeFallbackTest.php b/vendor/symfony/console/Tests/Helper/DumperNativeFallbackTest.php new file mode 100644 index 00000000..b9fa2dc2 --- /dev/null +++ b/vendor/symfony/console/Tests/Helper/DumperNativeFallbackTest.php @@ -0,0 +1,58 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Tests\Helper; + +use PHPUnit\Framework\TestCase; +use Symfony\Bridge\PhpUnit\ClassExistsMock; +use Symfony\Component\Console\Helper\Dumper; +use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\VarDumper\Dumper\CliDumper; + +class DumperNativeFallbackTest extends TestCase +{ + public static function setUpBeforeClass() + { + ClassExistsMock::register(Dumper::class); + ClassExistsMock::withMockedClasses([ + CliDumper::class => false, + ]); + } + + public static function tearDownAfterClass() + { + ClassExistsMock::withMockedClasses([]); + } + + /** + * @dataProvider provideVariables + */ + public function testInvoke($variable, $primitiveString) + { + $dumper = new Dumper($this->getMockBuilder(OutputInterface::class)->getMock()); + + $this->assertSame($primitiveString, $dumper($variable)); + } + + public function provideVariables() + { + return [ + [null, 'null'], + [true, 'true'], + [false, 'false'], + [1, '1'], + [-1.5, '-1.5'], + ['string', '"string"'], + [[1, '2'], "Array\n(\n [0] => 1\n [1] => 2\n)"], + [new \stdClass(), "stdClass Object\n(\n)"], + ]; + } +} diff --git a/vendor/symfony/console/Tests/Helper/DumperTest.php b/vendor/symfony/console/Tests/Helper/DumperTest.php new file mode 100644 index 00000000..00c480a6 --- /dev/null +++ b/vendor/symfony/console/Tests/Helper/DumperTest.php @@ -0,0 +1,58 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Tests\Helper; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Console\Helper\Dumper; +use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\VarDumper\Test\VarDumperTestTrait; + +class DumperTest extends TestCase +{ + use VarDumperTestTrait; + + public static function setUpBeforeClass() + { + putenv('DUMP_LIGHT_ARRAY=1'); + putenv('DUMP_COMMA_SEPARATOR=1'); + } + + public static function tearDownAfterClass() + { + putenv('DUMP_LIGHT_ARRAY'); + putenv('DUMP_COMMA_SEPARATOR'); + } + + /** + * @dataProvider provideVariables + */ + public function testInvoke($variable) + { + $dumper = new Dumper($this->getMockBuilder(OutputInterface::class)->getMock()); + + $this->assertDumpMatchesFormat($dumper($variable), $variable); + } + + public function provideVariables() + { + return [ + [null], + [true], + [false], + [1], + [-1.5], + ['string'], + [[1, '2']], + [new \stdClass()], + ]; + } +} diff --git a/vendor/symfony/console/Tests/Helper/FormatterHelperTest.php b/vendor/symfony/console/Tests/Helper/FormatterHelperTest.php index f5d891a1..934e11ac 100644 --- a/vendor/symfony/console/Tests/Helper/FormatterHelperTest.php +++ b/vendor/symfony/console/Tests/Helper/FormatterHelperTest.php @@ -40,7 +40,7 @@ class FormatterHelperTest extends TestCase $this->assertEquals( ' Some text to display '."\n". ' foo bar ', - $formatter->formatBlock(array('Some text to display', 'foo bar'), 'error'), + $formatter->formatBlock(['Some text to display', 'foo bar'], 'error'), '::formatBlock() formats a message in a block' ); diff --git a/vendor/symfony/console/Tests/Helper/HelperSetTest.php b/vendor/symfony/console/Tests/Helper/HelperSetTest.php index 0fdb2cef..ffb12b34 100644 --- a/vendor/symfony/console/Tests/Helper/HelperSetTest.php +++ b/vendor/symfony/console/Tests/Helper/HelperSetTest.php @@ -20,7 +20,7 @@ class HelperSetTest extends TestCase public function testConstructor() { $mock_helper = $this->getGenericMockHelper('fake_helper'); - $helperset = new HelperSet(array('fake_helper_alias' => $mock_helper)); + $helperset = new HelperSet(['fake_helper_alias' => $mock_helper]); $this->assertEquals($mock_helper, $helperset->get('fake_helper_alias'), '__construct sets given helper to helpers'); $this->assertTrue($helperset->has('fake_helper_alias'), '__construct sets helper alias for given helper'); @@ -46,7 +46,7 @@ class HelperSetTest extends TestCase public function testHas() { - $helperset = new HelperSet(array('fake_helper_alias' => $this->getGenericMockHelper('fake_helper'))); + $helperset = new HelperSet(['fake_helper_alias' => $this->getGenericMockHelper('fake_helper')]); $this->assertTrue($helperset->has('fake_helper'), '->has() finds set helper'); $this->assertTrue($helperset->has('fake_helper_alias'), '->has() finds set helper by alias'); } @@ -55,7 +55,7 @@ class HelperSetTest extends TestCase { $helper_01 = $this->getGenericMockHelper('fake_helper_01'); $helper_02 = $this->getGenericMockHelper('fake_helper_02'); - $helperset = new HelperSet(array('fake_helper_01_alias' => $helper_01, 'fake_helper_02_alias' => $helper_02)); + $helperset = new HelperSet(['fake_helper_01_alias' => $helper_01, 'fake_helper_02_alias' => $helper_02]); $this->assertEquals($helper_01, $helperset->get('fake_helper_01'), '->get() returns correct helper by name'); $this->assertEquals($helper_01, $helperset->get('fake_helper_01_alias'), '->get() returns correct helper by alias'); $this->assertEquals($helper_02, $helperset->get('fake_helper_02'), '->get() returns correct helper by name'); @@ -101,7 +101,7 @@ class HelperSetTest extends TestCase $helperset->set($this->getGenericMockHelper('fake_helper_01', $helperset)); $helperset->set($this->getGenericMockHelper('fake_helper_02', $helperset)); - $helpers = array('fake_helper_01', 'fake_helper_02'); + $helpers = ['fake_helper_01', 'fake_helper_02']; $i = 0; foreach ($helperset as $helper) { @@ -114,7 +114,7 @@ class HelperSetTest extends TestCase $mock_helper = $this->getMockBuilder('\Symfony\Component\Console\Helper\HelperInterface')->getMock(); $mock_helper->expects($this->any()) ->method('getName') - ->will($this->returnValue($name)); + ->willReturn($name); if ($helperset) { $mock_helper->expects($this->any()) diff --git a/vendor/symfony/console/Tests/Helper/HelperTest.php b/vendor/symfony/console/Tests/Helper/HelperTest.php index 18475824..184d86e0 100644 --- a/vendor/symfony/console/Tests/Helper/HelperTest.php +++ b/vendor/symfony/console/Tests/Helper/HelperTest.php @@ -18,28 +18,28 @@ class HelperTest extends TestCase { public function formatTimeProvider() { - return array( - array(0, '< 1 sec'), - array(1, '1 sec'), - array(2, '2 secs'), - array(59, '59 secs'), - array(60, '1 min'), - array(61, '1 min'), - array(119, '1 min'), - array(120, '2 mins'), - array(121, '2 mins'), - array(3599, '59 mins'), - array(3600, '1 hr'), - array(7199, '1 hr'), - array(7200, '2 hrs'), - array(7201, '2 hrs'), - array(86399, '23 hrs'), - array(86400, '1 day'), - array(86401, '1 day'), - array(172799, '1 day'), - array(172800, '2 days'), - array(172801, '2 days'), - ); + return [ + [0, '< 1 sec'], + [1, '1 sec'], + [2, '2 secs'], + [59, '59 secs'], + [60, '1 min'], + [61, '1 min'], + [119, '1 min'], + [120, '2 mins'], + [121, '2 mins'], + [3599, '59 mins'], + [3600, '1 hr'], + [7199, '1 hr'], + [7200, '2 hrs'], + [7201, '2 hrs'], + [86399, '23 hrs'], + [86400, '1 day'], + [86401, '1 day'], + [172799, '1 day'], + [172800, '2 days'], + [172801, '2 days'], + ]; } /** diff --git a/vendor/symfony/console/Tests/Helper/ProcessHelperTest.php b/vendor/symfony/console/Tests/Helper/ProcessHelperTest.php index 829bc433..5387a9e3 100644 --- a/vendor/symfony/console/Tests/Helper/ProcessHelperTest.php +++ b/vendor/symfony/console/Tests/Helper/ProcessHelperTest.php @@ -30,7 +30,7 @@ class ProcessHelperTest extends TestCase } $helper = new ProcessHelper(); - $helper->setHelperSet(new HelperSet(array(new DebugFormatterHelper()))); + $helper->setHelperSet(new HelperSet([new DebugFormatterHelper()])); $output = $this->getOutputStream($verbosity); $helper->run($output, $cmd, $error); $this->assertEquals($expected, $this->getOutput($output)); @@ -39,13 +39,13 @@ class ProcessHelperTest extends TestCase public function testPassedCallbackIsExecuted() { $helper = new ProcessHelper(); - $helper->setHelperSet(new HelperSet(array(new DebugFormatterHelper()))); + $helper->setHelperSet(new HelperSet([new DebugFormatterHelper()])); $output = $this->getOutputStream(StreamOutput::VERBOSITY_NORMAL); $executed = false; $callback = function () use (&$executed) { $executed = true; }; - $helper->run($output, array('php', '-r', 'echo 42;'), null, $callback); + $helper->run($output, ['php', '-r', 'echo 42;'], null, $callback); $this->assertTrue($executed); } @@ -96,27 +96,27 @@ EOT; EOT; $errorMessage = 'An error occurred'; - $args = new Process(array('php', '-r', 'echo 42;')); + $args = new Process(['php', '-r', 'echo 42;']); $args = $args->getCommandLine(); $successOutputProcessDebug = str_replace("'php' '-r' 'echo 42;'", $args, $successOutputProcessDebug); - $fromShellCommandline = \method_exists(Process::class, 'fromShellCommandline') ? array(Process::class, 'fromShellCommandline') : function ($cmd) { return new Process($cmd); }; + $fromShellCommandline = \method_exists(Process::class, 'fromShellCommandline') ? [Process::class, 'fromShellCommandline'] : function ($cmd) { return new Process($cmd); }; - return array( - array('', 'php -r "echo 42;"', StreamOutput::VERBOSITY_VERBOSE, null), - array($successOutputVerbose, 'php -r "echo 42;"', StreamOutput::VERBOSITY_VERY_VERBOSE, null), - array($successOutputDebug, 'php -r "echo 42;"', StreamOutput::VERBOSITY_DEBUG, null), - array($successOutputDebugWithTags, 'php -r "echo \'42\';"', StreamOutput::VERBOSITY_DEBUG, null), - array('', 'php -r "syntax error"', StreamOutput::VERBOSITY_VERBOSE, null), - array($syntaxErrorOutputVerbose, 'php -r "fwrite(STDERR, \'error message\');usleep(50000);fwrite(STDOUT, \'out message\');exit(252);"', StreamOutput::VERBOSITY_VERY_VERBOSE, null), - array($syntaxErrorOutputDebug, 'php -r "fwrite(STDERR, \'error message\');usleep(500000);fwrite(STDOUT, \'out message\');exit(252);"', StreamOutput::VERBOSITY_DEBUG, null), - array($errorMessage.PHP_EOL, 'php -r "fwrite(STDERR, \'error message\');usleep(50000);fwrite(STDOUT, \'out message\');exit(252);"', StreamOutput::VERBOSITY_VERBOSE, $errorMessage), - array($syntaxErrorOutputVerbose.$errorMessage.PHP_EOL, 'php -r "fwrite(STDERR, \'error message\');usleep(50000);fwrite(STDOUT, \'out message\');exit(252);"', StreamOutput::VERBOSITY_VERY_VERBOSE, $errorMessage), - array($syntaxErrorOutputDebug.$errorMessage.PHP_EOL, 'php -r "fwrite(STDERR, \'error message\');usleep(500000);fwrite(STDOUT, \'out message\');exit(252);"', StreamOutput::VERBOSITY_DEBUG, $errorMessage), - array($successOutputProcessDebug, array('php', '-r', 'echo 42;'), StreamOutput::VERBOSITY_DEBUG, null), - array($successOutputDebug, $fromShellCommandline('php -r "echo 42;"'), StreamOutput::VERBOSITY_DEBUG, null), - array($successOutputProcessDebug, array(new Process(array('php', '-r', 'echo 42;'))), StreamOutput::VERBOSITY_DEBUG, null), - array($successOutputPhp, array($fromShellCommandline('php -r '.$PHP), 'PHP' => 'echo 42;'), StreamOutput::VERBOSITY_DEBUG, null), - ); + return [ + ['', 'php -r "echo 42;"', StreamOutput::VERBOSITY_VERBOSE, null], + [$successOutputVerbose, 'php -r "echo 42;"', StreamOutput::VERBOSITY_VERY_VERBOSE, null], + [$successOutputDebug, 'php -r "echo 42;"', StreamOutput::VERBOSITY_DEBUG, null], + [$successOutputDebugWithTags, 'php -r "echo \'42\';"', StreamOutput::VERBOSITY_DEBUG, null], + ['', 'php -r "syntax error"', StreamOutput::VERBOSITY_VERBOSE, null], + [$syntaxErrorOutputVerbose, 'php -r "fwrite(STDERR, \'error message\');usleep(50000);fwrite(STDOUT, \'out message\');exit(252);"', StreamOutput::VERBOSITY_VERY_VERBOSE, null], + [$syntaxErrorOutputDebug, 'php -r "fwrite(STDERR, \'error message\');usleep(500000);fwrite(STDOUT, \'out message\');exit(252);"', StreamOutput::VERBOSITY_DEBUG, null], + [$errorMessage.PHP_EOL, 'php -r "fwrite(STDERR, \'error message\');usleep(50000);fwrite(STDOUT, \'out message\');exit(252);"', StreamOutput::VERBOSITY_VERBOSE, $errorMessage], + [$syntaxErrorOutputVerbose.$errorMessage.PHP_EOL, 'php -r "fwrite(STDERR, \'error message\');usleep(50000);fwrite(STDOUT, \'out message\');exit(252);"', StreamOutput::VERBOSITY_VERY_VERBOSE, $errorMessage], + [$syntaxErrorOutputDebug.$errorMessage.PHP_EOL, 'php -r "fwrite(STDERR, \'error message\');usleep(500000);fwrite(STDOUT, \'out message\');exit(252);"', StreamOutput::VERBOSITY_DEBUG, $errorMessage], + [$successOutputProcessDebug, ['php', '-r', 'echo 42;'], StreamOutput::VERBOSITY_DEBUG, null], + [$successOutputDebug, $fromShellCommandline('php -r "echo 42;"'), StreamOutput::VERBOSITY_DEBUG, null], + [$successOutputProcessDebug, [new Process(['php', '-r', 'echo 42;'])], StreamOutput::VERBOSITY_DEBUG, null], + [$successOutputPhp, [$fromShellCommandline('php -r '.$PHP), 'PHP' => 'echo 42;'], StreamOutput::VERBOSITY_DEBUG, null], + ]; } private function getOutputStream($verbosity) diff --git a/vendor/symfony/console/Tests/Helper/ProgressBarTest.php b/vendor/symfony/console/Tests/Helper/ProgressBarTest.php index d35f336d..8d37d3af 100644 --- a/vendor/symfony/console/Tests/Helper/ProgressBarTest.php +++ b/vendor/symfony/console/Tests/Helper/ProgressBarTest.php @@ -23,6 +23,19 @@ use Symfony\Component\Console\Output\StreamOutput; */ class ProgressBarTest extends TestCase { + private $colSize; + + protected function setUp() + { + $this->colSize = getenv('COLUMNS'); + putenv('COLUMNS=120'); + } + + protected function tearDown() + { + putenv($this->colSize ? 'COLUMNS='.$this->colSize : 'COLUMNS'); + } + public function testMultipleStart() { $bar = new ProgressBar($output = $this->getOutputStream()); @@ -314,7 +327,7 @@ class ProgressBarTest extends TestCase public function testOverwriteWithSectionOutput() { - $sections = array(); + $sections = []; $stream = $this->getOutputStream(true); $output = new ConsoleSectionOutput($stream->getStream(), $sections, $stream->getVerbosity(), $stream->isDecorated(), new OutputFormatter()); @@ -336,7 +349,7 @@ class ProgressBarTest extends TestCase public function testOverwriteMultipleProgressBarsWithSectionOutputs() { - $sections = array(); + $sections = []; $stream = $this->getOutputStream(true); $output1 = new ConsoleSectionOutput($stream->getStream(), $sections, $stream->getVerbosity(), $stream->isDecorated(), new OutputFormatter()); $output2 = new ConsoleSectionOutput($stream->getStream(), $sections, $stream->getVerbosity(), $stream->isDecorated(), new OutputFormatter()); @@ -365,7 +378,7 @@ class ProgressBarTest extends TestCase public function testMultipleSectionsWithCustomFormat() { - $sections = array(); + $sections = []; $stream = $this->getOutputStream(true); $output1 = new ConsoleSectionOutput($stream->getStream(), $sections, $stream->getVerbosity(), $stream->isDecorated(), new OutputFormatter()); $output2 = new ConsoleSectionOutput($stream->getStream(), $sections, $stream->getVerbosity(), $stream->isDecorated(), new OutputFormatter()); @@ -859,11 +872,46 @@ class ProgressBarTest extends TestCase */ public function provideFormat() { - return array( - array('normal'), - array('verbose'), - array('very_verbose'), - array('debug'), + return [ + ['normal'], + ['verbose'], + ['very_verbose'], + ['debug'], + ]; + } + + public function testIterate(): void + { + $bar = new ProgressBar($output = $this->getOutputStream()); + + $this->assertEquals([1, 2], \iterator_to_array($bar->iterate([1, 2]))); + + rewind($output->getStream()); + $this->assertEquals( + ' 0/2 [>---------------------------] 0%'. + $this->generateOutput(' 1/2 [==============>-------------] 50%'). + $this->generateOutput(' 2/2 [============================] 100%'). + $this->generateOutput(' 2/2 [============================] 100%'), + stream_get_contents($output->getStream()) + ); + } + + public function testIterateUncountable(): void + { + $bar = new ProgressBar($output = $this->getOutputStream()); + + $this->assertEquals([1, 2], \iterator_to_array($bar->iterate((function () { + yield 1; + yield 2; + })()))); + + rewind($output->getStream()); + $this->assertEquals( + ' 0 [>---------------------------]'. + $this->generateOutput(' 1 [->--------------------------]'). + $this->generateOutput(' 2 [-->-------------------------]'). + $this->generateOutput(' 2 [============================]'), + stream_get_contents($output->getStream()) ); } diff --git a/vendor/symfony/console/Tests/Helper/ProgressIndicatorTest.php b/vendor/symfony/console/Tests/Helper/ProgressIndicatorTest.php index c85018de..6c6f86f3 100644 --- a/vendor/symfony/console/Tests/Helper/ProgressIndicatorTest.php +++ b/vendor/symfony/console/Tests/Helper/ProgressIndicatorTest.php @@ -79,7 +79,7 @@ class ProgressIndicatorTest extends TestCase public function testCustomIndicatorValues() { - $bar = new ProgressIndicator($output = $this->getOutputStream(), null, 100, array('a', 'b', 'c')); + $bar = new ProgressIndicator($output = $this->getOutputStream(), null, 100, ['a', 'b', 'c']); $bar->start('Starting...'); usleep(101000); @@ -106,7 +106,7 @@ class ProgressIndicatorTest extends TestCase */ public function testCannotSetInvalidIndicatorCharacters() { - $bar = new ProgressIndicator($this->getOutputStream(), null, 100, array('1')); + $bar = new ProgressIndicator($this->getOutputStream(), null, 100, ['1']); } /** @@ -161,12 +161,12 @@ class ProgressIndicatorTest extends TestCase */ public function provideFormat() { - return array( - array('normal'), - array('verbose'), - array('very_verbose'), - array('debug'), - ); + return [ + ['normal'], + ['verbose'], + ['very_verbose'], + ['debug'], + ]; } protected function getOutputStream($decorated = true, $verbosity = StreamOutput::VERBOSITY_NORMAL) diff --git a/vendor/symfony/console/Tests/Helper/QuestionHelperTest.php b/vendor/symfony/console/Tests/Helper/QuestionHelperTest.php index 3cb9a099..eca929fd 100644 --- a/vendor/symfony/console/Tests/Helper/QuestionHelperTest.php +++ b/vendor/symfony/console/Tests/Helper/QuestionHelperTest.php @@ -29,10 +29,10 @@ class QuestionHelperTest extends AbstractQuestionHelperTest { $questionHelper = new QuestionHelper(); - $helperSet = new HelperSet(array(new FormatterHelper())); + $helperSet = new HelperSet([new FormatterHelper()]); $questionHelper->setHelperSet($helperSet); - $heroes = array('Superman', 'Batman', 'Spiderman'); + $heroes = ['Superman', 'Batman', 'Spiderman']; $inputStream = $this->getInputStream("\n1\n 1 \nFabien\n1\nFabien\n1\n0,2\n 0 , 2 \n\n\n"); @@ -68,21 +68,21 @@ class QuestionHelperTest extends AbstractQuestionHelperTest $question->setMaxAttempts(1); $question->setMultiselect(true); - $this->assertEquals(array('Batman'), $questionHelper->ask($this->createStreamableInputInterfaceMock($inputStream), $this->createOutputInterface(), $question)); - $this->assertEquals(array('Superman', 'Spiderman'), $questionHelper->ask($this->createStreamableInputInterfaceMock($inputStream), $this->createOutputInterface(), $question)); - $this->assertEquals(array('Superman', 'Spiderman'), $questionHelper->ask($this->createStreamableInputInterfaceMock($inputStream), $this->createOutputInterface(), $question)); + $this->assertEquals(['Batman'], $questionHelper->ask($this->createStreamableInputInterfaceMock($inputStream), $this->createOutputInterface(), $question)); + $this->assertEquals(['Superman', 'Spiderman'], $questionHelper->ask($this->createStreamableInputInterfaceMock($inputStream), $this->createOutputInterface(), $question)); + $this->assertEquals(['Superman', 'Spiderman'], $questionHelper->ask($this->createStreamableInputInterfaceMock($inputStream), $this->createOutputInterface(), $question)); $question = new ChoiceQuestion('What is your favorite superhero?', $heroes, '0,1'); $question->setMaxAttempts(1); $question->setMultiselect(true); - $this->assertEquals(array('Superman', 'Batman'), $questionHelper->ask($this->createStreamableInputInterfaceMock($inputStream), $this->createOutputInterface(), $question)); + $this->assertEquals(['Superman', 'Batman'], $questionHelper->ask($this->createStreamableInputInterfaceMock($inputStream), $this->createOutputInterface(), $question)); $question = new ChoiceQuestion('What is your favorite superhero?', $heroes, ' 0 , 1 '); $question->setMaxAttempts(1); $question->setMultiselect(true); - $this->assertEquals(array('Superman', 'Batman'), $questionHelper->ask($this->createStreamableInputInterfaceMock($inputStream), $this->createOutputInterface(), $question)); + $this->assertEquals(['Superman', 'Batman'], $questionHelper->ask($this->createStreamableInputInterfaceMock($inputStream), $this->createOutputInterface(), $question)); $question = new ChoiceQuestion('What is your favorite superhero?', $heroes, 0); // We are supposed to get the default value since we are not in interactive mode @@ -93,11 +93,11 @@ class QuestionHelperTest extends AbstractQuestionHelperTest { $questionHelper = new QuestionHelper(); - $helperSet = new HelperSet(array(new FormatterHelper())); + $helperSet = new HelperSet([new FormatterHelper()]); $questionHelper->setHelperSet($helperSet); $inputStream = $this->getInputStream("\n1\n 1 \nFabien\n1\nFabien\n1\n0,2\n 0 , 2 \n\n\n"); - $heroes = array('Superman', 'Batman', 'Spiderman'); + $heroes = ['Superman', 'Batman', 'Spiderman']; $question = new ChoiceQuestion('What is your favorite superhero?', $heroes, '0'); @@ -122,21 +122,24 @@ class QuestionHelperTest extends AbstractQuestionHelperTest $question = new ChoiceQuestion('Who are your favorite superheros?', $heroes, '0, 1'); $question->setMultiselect(true); - $this->assertSame(array('Superman', 'Batman'), $questionHelper->ask($this->createStreamableInputInterfaceMock($inputStream, false), $this->createOutputInterface(), $question)); + $this->assertSame(['Superman', 'Batman'], $questionHelper->ask($this->createStreamableInputInterfaceMock($inputStream, false), $this->createOutputInterface(), $question)); $question = new ChoiceQuestion('Who are your favorite superheros?', $heroes, '0, 1'); $question->setMultiselect(true); $question->setValidator(null); - $this->assertSame(array('Superman', 'Batman'), $questionHelper->ask($this->createStreamableInputInterfaceMock($inputStream, false), $this->createOutputInterface(), $question)); + $this->assertSame(['Superman', 'Batman'], $questionHelper->ask($this->createStreamableInputInterfaceMock($inputStream, false), $this->createOutputInterface(), $question)); $question = new ChoiceQuestion('Who are your favorite superheros?', $heroes, '0, Batman'); $question->setMultiselect(true); - $this->assertSame(array('Superman', 'Batman'), $questionHelper->ask($this->createStreamableInputInterfaceMock($inputStream, false), $this->createOutputInterface(), $question)); + $this->assertSame(['Superman', 'Batman'], $questionHelper->ask($this->createStreamableInputInterfaceMock($inputStream, false), $this->createOutputInterface(), $question)); $question = new ChoiceQuestion('Who are your favorite superheros?', $heroes, null); $question->setMultiselect(true); $this->assertNull($questionHelper->ask($this->createStreamableInputInterfaceMock($inputStream, false), $this->createOutputInterface(), $question)); + $question = new ChoiceQuestion('Who are your favorite superheros?', ['a' => 'Batman', 'b' => 'Superman'], 'a'); + $this->assertSame('a', $questionHelper->ask($this->createStreamableInputInterfaceMock('', false), $this->createOutputInterface(), $question), 'ChoiceQuestion validator returns the key if it\'s a string'); + try { $question = new ChoiceQuestion('Who are your favorite superheros?', $heroes, ''); $question->setMultiselect(true); @@ -179,11 +182,11 @@ class QuestionHelperTest extends AbstractQuestionHelperTest $inputStream = $this->getInputStream("Acm\nAc\177\177s\tTest\n\n\033[A\033[A\n\033[A\033[A\033[A\033[A\033[A\tTest\n\033[B\nS\177\177\033[B\033[B\nF00\177\177oo\t\n"); $dialog = new QuestionHelper(); - $helperSet = new HelperSet(array(new FormatterHelper())); + $helperSet = new HelperSet([new FormatterHelper()]); $dialog->setHelperSet($helperSet); $question = new Question('Please select a bundle', 'FrameworkBundle'); - $question->setAutocompleterValues(array('AcmeDemoBundle', 'AsseticBundle', 'SecurityBundle', 'FooBundle')); + $question->setAutocompleterValues(['AcmeDemoBundle', 'AsseticBundle', 'SecurityBundle', 'FooBundle']); $this->assertEquals('AcmeDemoBundle', $dialog->ask($this->createStreamableInputInterfaceMock($inputStream), $this->createOutputInterface(), $question)); $this->assertEquals('AsseticBundleTest', $dialog->ask($this->createStreamableInputInterfaceMock($inputStream), $this->createOutputInterface(), $question)); @@ -195,6 +198,49 @@ class QuestionHelperTest extends AbstractQuestionHelperTest $this->assertEquals('FooBundle', $dialog->ask($this->createStreamableInputInterfaceMock($inputStream), $this->createOutputInterface(), $question)); } + public function testAskWithAutocompleteCallback() + { + if (!$this->hasSttyAvailable()) { + $this->markTestSkipped('`stty` is required to test autocomplete functionality'); + } + + // PoCrP + $inputStream = $this->getInputStream("Pa\177\177o\tCr\tP\033[A\033[A\n"); + + $dialog = new QuestionHelper(); + $helperSet = new HelperSet([new FormatterHelper()]); + $dialog->setHelperSet($helperSet); + + $question = new Question('What\'s for dinner?'); + + // A simple test callback - return an array containing the words the + // user has already completed, suffixed with all known words. + // + // Eg: If the user inputs "Potato C", the return will be: + // + // ["Potato Carrot ", "Potato Creme ", "Potato Curry ", ...] + // + // No effort is made to avoid irrelevant suggestions, as this is handled + // by the autocomplete function. + $callback = function ($input) { + $knownWords = ['Carrot', 'Creme', 'Curry', 'Parsnip', 'Pie', 'Potato', 'Tart']; + $inputWords = explode(' ', $input); + array_pop($inputWords); + $suggestionBase = $inputWords ? implode(' ', $inputWords).' ' : ''; + + return array_map( + function ($word) use ($suggestionBase) { + return $suggestionBase.$word.' '; + }, + $knownWords + ); + }; + + $question->setAutocompleterCallback($callback); + + $this->assertSame('Potato Creme Pie', $dialog->ask($this->createStreamableInputInterfaceMock($inputStream), $this->createOutputInterface(), $question)); + } + public function testAskWithAutocompleteWithNonSequentialKeys() { if (!$this->hasSttyAvailable()) { @@ -205,9 +251,9 @@ class QuestionHelperTest extends AbstractQuestionHelperTest $inputStream = $this->getInputStream("\033[A\033[A\n\033[B\033[B\n"); $dialog = new QuestionHelper(); - $dialog->setHelperSet(new HelperSet(array(new FormatterHelper()))); + $dialog->setHelperSet(new HelperSet([new FormatterHelper()])); - $question = new ChoiceQuestion('Please select a bundle', array(1 => 'AcmeDemoBundle', 4 => 'AsseticBundle')); + $question = new ChoiceQuestion('Please select a bundle', [1 => 'AcmeDemoBundle', 4 => 'AsseticBundle']); $question->setMaxAttempts(1); $this->assertEquals('AcmeDemoBundle', $dialog->ask($this->createStreamableInputInterfaceMock($inputStream), $this->createOutputInterface(), $question)); @@ -222,14 +268,14 @@ class QuestionHelperTest extends AbstractQuestionHelperTest $inputStream = $this->getInputStream("b\n"); - $possibleChoices = array( + $possibleChoices = [ 'a' => 'berlin', 'b' => 'copenhagen', 'c' => 'amsterdam', - ); + ]; $dialog = new QuestionHelper(); - $dialog->setHelperSet(new HelperSet(array(new FormatterHelper()))); + $dialog->setHelperSet(new HelperSet([new FormatterHelper()])); $question = new ChoiceQuestion('Please select a city', $possibleChoices); $question->setMaxAttempts(1); @@ -237,6 +283,43 @@ class QuestionHelperTest extends AbstractQuestionHelperTest $this->assertSame('b', $dialog->ask($this->createStreamableInputInterfaceMock($inputStream), $this->createOutputInterface(), $question)); } + public function getInputs() + { + return [ + ['$'], // 1 byte character + ['¢'], // 2 bytes character + ['€'], // 3 bytes character + ['ðˆ'], // 4 bytes character + ]; + } + + /** + * @dataProvider getInputs + */ + public function testAskWithAutocompleteWithMultiByteCharacter($character) + { + if (!$this->hasSttyAvailable()) { + $this->markTestSkipped('`stty` is required to test autocomplete functionality'); + } + + $inputStream = $this->getInputStream("$character\n"); + + $possibleChoices = [ + '$' => '1 byte character', + '¢' => '2 bytes character', + '€' => '3 bytes character', + 'ðˆ' => '4 bytes character', + ]; + + $dialog = new QuestionHelper(); + $dialog->setHelperSet(new HelperSet([new FormatterHelper()])); + + $question = new ChoiceQuestion('Please select a character', $possibleChoices); + $question->setMaxAttempts(1); + + $this->assertSame($character, $dialog->ask($this->createStreamableInputInterfaceMock($inputStream), $this->createOutputInterface(), $question)); + } + public function testAutocompleteWithTrailingBackslash() { if (!$this->hasSttyAvailable()) { @@ -246,12 +329,12 @@ class QuestionHelperTest extends AbstractQuestionHelperTest $inputStream = $this->getInputStream('E'); $dialog = new QuestionHelper(); - $helperSet = new HelperSet(array(new FormatterHelper())); + $helperSet = new HelperSet([new FormatterHelper()]); $dialog->setHelperSet($helperSet); $question = new Question(''); $expectedCompletion = 'ExampleNamespace\\'; - $question->setAutocompleterValues(array($expectedCompletion)); + $question->setAutocompleterValues([$expectedCompletion]); $output = $this->createOutputInterface(); $dialog->ask($this->createStreamableInputInterfaceMock($inputStream), $output, $question); @@ -262,11 +345,11 @@ class QuestionHelperTest extends AbstractQuestionHelperTest // Shell control (esc) sequences are not so important: we only care that // tag is interpreted correctly and replaced - $irrelevantEscSequences = array( + $irrelevantEscSequences = [ "\0337" => '', // Save cursor position "\0338" => '', // Restore cursor position "\033[K" => '', // Clear line from cursor till the end - ); + ]; $importantActualOutput = strtr($actualOutput, $irrelevantEscSequences); @@ -304,14 +387,14 @@ class QuestionHelperTest extends AbstractQuestionHelperTest public function getAskConfirmationData() { - return array( - array('', true), - array('', false, false), - array('y', true), - array('yes', true), - array('n', false), - array('no', false), - ); + return [ + ['', true], + ['', false, false], + ['y', true], + ['yes', true], + ['n', false], + ['no', false], + ]; } public function testAskConfirmationWithCustomTrueAnswer() @@ -328,12 +411,12 @@ class QuestionHelperTest extends AbstractQuestionHelperTest public function testAskAndValidate() { $dialog = new QuestionHelper(); - $helperSet = new HelperSet(array(new FormatterHelper())); + $helperSet = new HelperSet([new FormatterHelper()]); $dialog->setHelperSet($helperSet); $error = 'This is not a color!'; $validator = function ($color) use ($error) { - if (!\in_array($color, array('white', 'black'))) { + if (!\in_array($color, ['white', 'black'])) { throw new \InvalidArgumentException($error); } @@ -361,14 +444,14 @@ class QuestionHelperTest extends AbstractQuestionHelperTest */ public function testSelectChoiceFromSimpleChoices($providedAnswer, $expectedValue) { - $possibleChoices = array( + $possibleChoices = [ 'My environment 1', 'My environment 2', 'My environment 3', - ); + ]; $dialog = new QuestionHelper(); - $helperSet = new HelperSet(array(new FormatterHelper())); + $helperSet = new HelperSet([new FormatterHelper()]); $dialog->setHelperSet($helperSet); $question = new ChoiceQuestion('Please select the environment to load', $possibleChoices); @@ -380,14 +463,14 @@ class QuestionHelperTest extends AbstractQuestionHelperTest public function simpleAnswerProvider() { - return array( - array(0, 'My environment 1'), - array(1, 'My environment 2'), - array(2, 'My environment 3'), - array('My environment 1', 'My environment 1'), - array('My environment 2', 'My environment 2'), - array('My environment 3', 'My environment 3'), - ); + return [ + [0, 'My environment 1'], + [1, 'My environment 2'], + [2, 'My environment 3'], + ['My environment 1', 'My environment 1'], + ['My environment 2', 'My environment 2'], + ['My environment 3', 'My environment 3'], + ]; } /** @@ -395,14 +478,14 @@ class QuestionHelperTest extends AbstractQuestionHelperTest */ public function testSpecialCharacterChoiceFromMultipleChoiceList($providedAnswer, $expectedValue) { - $possibleChoices = array( + $possibleChoices = [ '.', 'src', - ); + ]; $dialog = new QuestionHelper(); $inputStream = $this->getInputStream($providedAnswer."\n"); - $helperSet = new HelperSet(array(new FormatterHelper())); + $helperSet = new HelperSet([new FormatterHelper()]); $dialog->setHelperSet($helperSet); $question = new ChoiceQuestion('Please select the directory', $possibleChoices); @@ -415,10 +498,10 @@ class QuestionHelperTest extends AbstractQuestionHelperTest public function specialCharacterInMultipleChoice() { - return array( - array('.', array('.')), - array('., src', array('.', 'src')), - ); + return [ + ['.', ['.']], + ['., src', ['.', 'src']], + ]; } /** @@ -426,15 +509,15 @@ class QuestionHelperTest extends AbstractQuestionHelperTest */ public function testChoiceFromChoicelistWithMixedKeys($providedAnswer, $expectedValue) { - $possibleChoices = array( + $possibleChoices = [ '0' => 'No environment', '1' => 'My environment 1', 'env_2' => 'My environment 2', 3 => 'My environment 3', - ); + ]; $dialog = new QuestionHelper(); - $helperSet = new HelperSet(array(new FormatterHelper())); + $helperSet = new HelperSet([new FormatterHelper()]); $dialog->setHelperSet($helperSet); $question = new ChoiceQuestion('Please select the environment to load', $possibleChoices); @@ -446,14 +529,14 @@ class QuestionHelperTest extends AbstractQuestionHelperTest public function mixedKeysChoiceListAnswerProvider() { - return array( - array('0', '0'), - array('No environment', '0'), - array('1', '1'), - array('env_2', 'env_2'), - array(3, '3'), - array('My environment 1', '1'), - ); + return [ + ['0', '0'], + ['No environment', '0'], + ['1', '1'], + ['env_2', 'env_2'], + [3, '3'], + ['My environment 1', '1'], + ]; } /** @@ -461,14 +544,14 @@ class QuestionHelperTest extends AbstractQuestionHelperTest */ public function testSelectChoiceFromChoiceList($providedAnswer, $expectedValue) { - $possibleChoices = array( + $possibleChoices = [ 'env_1' => 'My environment 1', 'env_2' => 'My environment', 'env_3' => 'My environment', - ); + ]; $dialog = new QuestionHelper(); - $helperSet = new HelperSet(array(new FormatterHelper())); + $helperSet = new HelperSet([new FormatterHelper()]); $dialog->setHelperSet($helperSet); $question = new ChoiceQuestion('Please select the environment to load', $possibleChoices); @@ -484,14 +567,14 @@ class QuestionHelperTest extends AbstractQuestionHelperTest */ public function testAmbiguousChoiceFromChoicelist() { - $possibleChoices = array( + $possibleChoices = [ 'env_1' => 'My first environment', 'env_2' => 'My environment', 'env_3' => 'My environment', - ); + ]; $dialog = new QuestionHelper(); - $helperSet = new HelperSet(array(new FormatterHelper())); + $helperSet = new HelperSet([new FormatterHelper()]); $dialog->setHelperSet($helperSet); $question = new ChoiceQuestion('Please select the environment to load', $possibleChoices); @@ -502,12 +585,12 @@ class QuestionHelperTest extends AbstractQuestionHelperTest public function answerProvider() { - return array( - array('env_1', 'env_1'), - array('env_2', 'env_2'), - array('env_3', 'env_3'), - array('My environment 1', 'env_1'), - ); + return [ + ['env_1', 'env_1'], + ['env_2', 'env_2'], + ['env_3', 'env_3'], + ['My environment 1', 'env_1'], + ]; } public function testNoInteraction() @@ -523,22 +606,22 @@ class QuestionHelperTest extends AbstractQuestionHelperTest public function testChoiceOutputFormattingQuestionForUtf8Keys() { $question = 'Lorem ipsum?'; - $possibleChoices = array( + $possibleChoices = [ 'foo' => 'foo', 'żółw' => 'bar', 'Å‚abÄ…dź' => 'baz', - ); - $outputShown = array( + ]; + $outputShown = [ $question, ' [foo ] foo', ' [żółw ] bar', ' [Å‚abÄ…dź] baz', - ); + ]; $output = $this->getMockBuilder('\Symfony\Component\Console\Output\OutputInterface')->getMock(); $output->method('getFormatter')->willReturn(new OutputFormatter()); $dialog = new QuestionHelper(); - $helperSet = new HelperSet(array(new FormatterHelper())); + $helperSet = new HelperSet([new FormatterHelper()]); $dialog->setHelperSet($helperSet); $output->expects($this->once())->method('writeln')->with($this->equalTo($outputShown)); @@ -549,7 +632,7 @@ class QuestionHelperTest extends AbstractQuestionHelperTest /** * @expectedException \Symfony\Component\Console\Exception\RuntimeException - * @expectedExceptionMessage Aborted + * @expectedExceptionMessage Aborted. */ public function testAskThrowsExceptionOnMissingInput() { @@ -559,7 +642,17 @@ class QuestionHelperTest extends AbstractQuestionHelperTest /** * @expectedException \Symfony\Component\Console\Exception\RuntimeException - * @expectedExceptionMessage Aborted + * @expectedExceptionMessage Aborted. + */ + public function testAskThrowsExceptionOnMissingInputForChoiceQuestion() + { + $dialog = new QuestionHelper(); + $dialog->ask($this->createStreamableInputInterfaceMock($this->getInputStream('')), $this->createOutputInterface(), new ChoiceQuestion('Choice', ['a', 'b'])); + } + + /** + * @expectedException \Symfony\Component\Console\Exception\RuntimeException + * @expectedExceptionMessage Aborted. */ public function testAskThrowsExceptionOnMissingInputWithValidator() { @@ -581,7 +674,7 @@ class QuestionHelperTest extends AbstractQuestionHelperTest */ public function testEmptyChoices() { - new ChoiceQuestion('Question', array(), 'irrelevant'); + new ChoiceQuestion('Question', [], 'irrelevant'); } public function testTraversableAutocomplete() @@ -601,11 +694,11 @@ class QuestionHelperTest extends AbstractQuestionHelperTest $inputStream = $this->getInputStream("Acm\nAc\177\177s\tTest\n\n\033[A\033[A\n\033[A\033[A\033[A\033[A\033[A\tTest\n\033[B\nS\177\177\033[B\033[B\nF00\177\177oo\t\n"); $dialog = new QuestionHelper(); - $helperSet = new HelperSet(array(new FormatterHelper())); + $helperSet = new HelperSet([new FormatterHelper()]); $dialog->setHelperSet($helperSet); $question = new Question('Please select a bundle', 'FrameworkBundle'); - $question->setAutocompleterValues(new AutocompleteValues(array('irrelevant' => 'AcmeDemoBundle', 'AsseticBundle', 'SecurityBundle', 'FooBundle'))); + $question->setAutocompleterValues(new AutocompleteValues(['irrelevant' => 'AcmeDemoBundle', 'AsseticBundle', 'SecurityBundle', 'FooBundle'])); $this->assertEquals('AcmeDemoBundle', $dialog->ask($this->createStreamableInputInterfaceMock($inputStream), $this->createOutputInterface(), $question)); $this->assertEquals('AsseticBundleTest', $dialog->ask($this->createStreamableInputInterfaceMock($inputStream), $this->createOutputInterface(), $question)); @@ -617,6 +710,37 @@ class QuestionHelperTest extends AbstractQuestionHelperTest $this->assertEquals('FooBundle', $dialog->ask($this->createStreamableInputInterfaceMock($inputStream), $this->createOutputInterface(), $question)); } + public function testTraversableMultiselectAutocomplete() + { + // + // F + // A<3x UP ARROW>,F + // F00o,A,SecurityBundle + // Acme,As<29x BACKSPACE>S + // Ac,As<3x BACKSPACE>d + $inputStream = $this->getInputStream("\nF\t\nA\033[A\033[A\033[A\t,F\t\nF00\177\177o\t,A\033[B\t, SecurityBundle\nSecurityBundle\nAcme\t, As\t\177\177\177\177\177\177\177\177\177\177\177\177\177\177\177\177\177\177\177\177\177\177\177\177\177\177\177\177\177S\t\nAc\t,As\t\177\177\177d\t\n"); + + $dialog = new QuestionHelper(); + $helperSet = new HelperSet([new FormatterHelper()]); + $dialog->setHelperSet($helperSet); + + $question = new ChoiceQuestion( + 'Please select a bundle (defaults to AcmeDemoBundle and AsseticBundle)', + ['AcmeDemoBundle', 'AsseticBundle', 'SecurityBundle', 'FooBundle'], + '0,1' + ); + + // This tests that autocomplete works for all multiselect choices entered by the user + $question->setMultiselect(true); + + $this->assertEquals(['AcmeDemoBundle', 'AsseticBundle'], $dialog->ask($this->createStreamableInputInterfaceMock($inputStream), $this->createOutputInterface(), $question)); + $this->assertEquals(['FooBundle'], $dialog->ask($this->createStreamableInputInterfaceMock($inputStream), $this->createOutputInterface(), $question)); + $this->assertEquals(['AsseticBundle', 'FooBundle'], $dialog->ask($this->createStreamableInputInterfaceMock($inputStream), $this->createOutputInterface(), $question)); + $this->assertEquals(['FooBundle', 'AsseticBundle', 'SecurityBundle'], $dialog->ask($this->createStreamableInputInterfaceMock($inputStream), $this->createOutputInterface(), $question)); + $this->assertEquals(['SecurityBundle'], $dialog->ask($this->createStreamableInputInterfaceMock($inputStream), $this->createOutputInterface(), $question)); + $this->assertEquals(['AcmeDemoBundle', 'AsseticBundle'], $dialog->ask($this->createStreamableInputInterfaceMock($inputStream), $this->createOutputInterface(), $question)); + } + protected function getInputStream($input) { $stream = fopen('php://memory', 'r+', false); @@ -636,7 +760,7 @@ class QuestionHelperTest extends AbstractQuestionHelperTest $mock = $this->getMockBuilder('Symfony\Component\Console\Input\InputInterface')->getMock(); $mock->expects($this->any()) ->method('isInteractive') - ->will($this->returnValue($interactive)); + ->willReturn($interactive); return $mock; } diff --git a/vendor/symfony/console/Tests/Helper/SymfonyQuestionHelperTest.php b/vendor/symfony/console/Tests/Helper/SymfonyQuestionHelperTest.php index 9406e5b8..6f621db9 100644 --- a/vendor/symfony/console/Tests/Helper/SymfonyQuestionHelperTest.php +++ b/vendor/symfony/console/Tests/Helper/SymfonyQuestionHelperTest.php @@ -18,10 +18,10 @@ class SymfonyQuestionHelperTest extends AbstractQuestionHelperTest { $questionHelper = new SymfonyQuestionHelper(); - $helperSet = new HelperSet(array(new FormatterHelper())); + $helperSet = new HelperSet([new FormatterHelper()]); $questionHelper->setHelperSet($helperSet); - $heroes = array('Superman', 'Batman', 'Spiderman'); + $heroes = ['Superman', 'Batman', 'Spiderman']; $inputStream = $this->getInputStream("\n1\n 1 \nFabien\n1\nFabien\n1\n0,2\n 0 , 2 \n\n\n"); @@ -55,31 +55,31 @@ class SymfonyQuestionHelperTest extends AbstractQuestionHelperTest $question->setMaxAttempts(1); $question->setMultiselect(true); - $this->assertEquals(array('Batman'), $questionHelper->ask($this->createStreamableInputInterfaceMock($inputStream), $this->createOutputInterface(), $question)); - $this->assertEquals(array('Superman', 'Spiderman'), $questionHelper->ask($this->createStreamableInputInterfaceMock($inputStream), $this->createOutputInterface(), $question)); - $this->assertEquals(array('Superman', 'Spiderman'), $questionHelper->ask($this->createStreamableInputInterfaceMock($inputStream), $this->createOutputInterface(), $question)); + $this->assertEquals(['Batman'], $questionHelper->ask($this->createStreamableInputInterfaceMock($inputStream), $this->createOutputInterface(), $question)); + $this->assertEquals(['Superman', 'Spiderman'], $questionHelper->ask($this->createStreamableInputInterfaceMock($inputStream), $this->createOutputInterface(), $question)); + $this->assertEquals(['Superman', 'Spiderman'], $questionHelper->ask($this->createStreamableInputInterfaceMock($inputStream), $this->createOutputInterface(), $question)); $question = new ChoiceQuestion('What is your favorite superhero?', $heroes, '0,1'); $question->setMaxAttempts(1); $question->setMultiselect(true); - $this->assertEquals(array('Superman', 'Batman'), $questionHelper->ask($this->createStreamableInputInterfaceMock($inputStream), $output = $this->createOutputInterface(), $question)); + $this->assertEquals(['Superman', 'Batman'], $questionHelper->ask($this->createStreamableInputInterfaceMock($inputStream), $output = $this->createOutputInterface(), $question)); $this->assertOutputContains('What is your favorite superhero? [Superman, Batman]', $output); $question = new ChoiceQuestion('What is your favorite superhero?', $heroes, ' 0 , 1 '); $question->setMaxAttempts(1); $question->setMultiselect(true); - $this->assertEquals(array('Superman', 'Batman'), $questionHelper->ask($this->createStreamableInputInterfaceMock($inputStream), $output = $this->createOutputInterface(), $question)); + $this->assertEquals(['Superman', 'Batman'], $questionHelper->ask($this->createStreamableInputInterfaceMock($inputStream), $output = $this->createOutputInterface(), $question)); $this->assertOutputContains('What is your favorite superhero? [Superman, Batman]', $output); } public function testAskChoiceWithChoiceValueAsDefault() { $questionHelper = new SymfonyQuestionHelper(); - $helperSet = new HelperSet(array(new FormatterHelper())); + $helperSet = new HelperSet([new FormatterHelper()]); $questionHelper->setHelperSet($helperSet); - $question = new ChoiceQuestion('What is your favorite superhero?', array('Superman', 'Batman', 'Spiderman'), 'Batman'); + $question = new ChoiceQuestion('What is your favorite superhero?', ['Superman', 'Batman', 'Spiderman'], 'Batman'); $question->setMaxAttempts(1); $this->assertSame('Batman', $questionHelper->ask($this->createStreamableInputInterfaceMock($this->getInputStream("Batman\n")), $output = $this->createOutputInterface(), $question)); @@ -124,7 +124,7 @@ class SymfonyQuestionHelperTest extends AbstractQuestionHelperTest /** * @expectedException \Symfony\Component\Console\Exception\RuntimeException - * @expectedExceptionMessage Aborted + * @expectedExceptionMessage Aborted. */ public function testAskThrowsExceptionOnMissingInput() { @@ -154,7 +154,7 @@ class SymfonyQuestionHelperTest extends AbstractQuestionHelperTest $mock = $this->getMockBuilder('Symfony\Component\Console\Input\InputInterface')->getMock(); $mock->expects($this->any()) ->method('isInteractive') - ->will($this->returnValue($interactive)); + ->willReturn($interactive); return $mock; } diff --git a/vendor/symfony/console/Tests/Helper/TableTest.php b/vendor/symfony/console/Tests/Helper/TableTest.php index eb67eedf..5eef8d60 100644 --- a/vendor/symfony/console/Tests/Helper/TableTest.php +++ b/vendor/symfony/console/Tests/Helper/TableTest.php @@ -87,16 +87,16 @@ class TableTest extends TestCase public function renderProvider() { - $books = array( - array('99921-58-10-7', 'Divine Comedy', 'Dante Alighieri'), - array('9971-5-0210-0', 'A Tale of Two Cities', 'Charles Dickens'), - array('960-425-059-0', 'The Lord of the Rings', 'J. R. R. Tolkien'), - array('80-902734-1-6', 'And Then There Were None', 'Agatha Christie'), - ); + $books = [ + ['99921-58-10-7', 'Divine Comedy', 'Dante Alighieri'], + ['9971-5-0210-0', 'A Tale of Two Cities', 'Charles Dickens'], + ['960-425-059-0', 'The Lord of the Rings', 'J. R. R. Tolkien'], + ['80-902734-1-6', 'And Then There Were None', 'Agatha Christie'], + ]; - return array( - array( - array('ISBN', 'Title', 'Author'), + return [ + [ + ['ISBN', 'Title', 'Author'], $books, 'default', <<<'TABLE' @@ -110,9 +110,9 @@ class TableTest extends TestCase +---------------+--------------------------+------------------+ TABLE - ), - array( - array('ISBN', 'Title', 'Author'), + ], + [ + ['ISBN', 'Title', 'Author'], $books, 'compact', <<<'TABLE' @@ -123,9 +123,9 @@ TABLE 80-902734-1-6 And Then There Were None Agatha Christie TABLE - ), - array( - array('ISBN', 'Title', 'Author'), + ], + [ + ['ISBN', 'Title', 'Author'], $books, 'borderless', <<<'TABLE' @@ -139,9 +139,9 @@ TABLE =============== ========================== ================== TABLE - ), - array( - array('ISBN', 'Title', 'Author'), + ], + [ + ['ISBN', 'Title', 'Author'], $books, 'box', <<<'TABLE' @@ -155,16 +155,16 @@ TABLE └───────────────┴──────────────────────────┴──────────────────┘ TABLE - ), - array( - array('ISBN', 'Title', 'Author'), - array( - array('99921-58-10-7', 'Divine Comedy', 'Dante Alighieri'), - array('9971-5-0210-0', 'A Tale of Two Cities', 'Charles Dickens'), + ], + [ + ['ISBN', 'Title', 'Author'], + [ + ['99921-58-10-7', 'Divine Comedy', 'Dante Alighieri'], + ['9971-5-0210-0', 'A Tale of Two Cities', 'Charles Dickens'], new TableSeparator(), - array('960-425-059-0', 'The Lord of the Rings', 'J. R. R. Tolkien'), - array('80-902734-1-6', 'And Then There Were None', 'Agatha Christie'), - ), + ['960-425-059-0', 'The Lord of the Rings', 'J. R. R. Tolkien'], + ['80-902734-1-6', 'And Then There Were None', 'Agatha Christie'], + ], 'box-double', <<<'TABLE' â•”â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•¤â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•¤â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•— @@ -178,15 +178,15 @@ TABLE â•šâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•§â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•§â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• TABLE - ), - array( - array('ISBN', 'Title'), - array( - array('99921-58-10-7', 'Divine Comedy', 'Dante Alighieri'), - array('9971-5-0210-0'), - array('960-425-059-0', 'The Lord of the Rings', 'J. R. R. Tolkien'), - array('80-902734-1-6', 'And Then There Were None', 'Agatha Christie'), - ), + ], + [ + ['ISBN', 'Title'], + [ + ['99921-58-10-7', 'Divine Comedy', 'Dante Alighieri'], + ['9971-5-0210-0'], + ['960-425-059-0', 'The Lord of the Rings', 'J. R. R. Tolkien'], + ['80-902734-1-6', 'And Then There Were None', 'Agatha Christie'], + ], 'default', <<<'TABLE' +---------------+--------------------------+------------------+ @@ -199,15 +199,15 @@ TABLE +---------------+--------------------------+------------------+ TABLE - ), - array( - array(), - array( - array('99921-58-10-7', 'Divine Comedy', 'Dante Alighieri'), - array('9971-5-0210-0'), - array('960-425-059-0', 'The Lord of the Rings', 'J. R. R. Tolkien'), - array('80-902734-1-6', 'And Then There Were None', 'Agatha Christie'), - ), + ], + [ + [], + [ + ['99921-58-10-7', 'Divine Comedy', 'Dante Alighieri'], + ['9971-5-0210-0'], + ['960-425-059-0', 'The Lord of the Rings', 'J. R. R. Tolkien'], + ['80-902734-1-6', 'And Then There Were None', 'Agatha Christie'], + ], 'default', <<<'TABLE' +---------------+--------------------------+------------------+ @@ -218,15 +218,15 @@ TABLE +---------------+--------------------------+------------------+ TABLE - ), - array( - array('ISBN', 'Title', 'Author'), - array( - array('99921-58-10-7', "Divine\nComedy", 'Dante Alighieri'), - array('9971-5-0210-2', "Harry Potter\nand the Chamber of Secrets", "Rowling\nJoanne K."), - array('9971-5-0210-2', "Harry Potter\nand the Chamber of Secrets", "Rowling\nJoanne K."), - array('960-425-059-0', 'The Lord of the Rings', "J. R. R.\nTolkien"), - ), + ], + [ + ['ISBN', 'Title', 'Author'], + [ + ['99921-58-10-7', "Divine\nComedy", 'Dante Alighieri'], + ['9971-5-0210-2', "Harry Potter\nand the Chamber of Secrets", "Rowling\nJoanne K."], + ['9971-5-0210-2', "Harry Potter\nand the Chamber of Secrets", "Rowling\nJoanne K."], + ['960-425-059-0', 'The Lord of the Rings', "J. R. R.\nTolkien"], + ], 'default', <<<'TABLE' +---------------+----------------------------+-----------------+ @@ -243,10 +243,10 @@ TABLE +---------------+----------------------------+-----------------+ TABLE - ), - array( - array('ISBN', 'Title'), - array(), + ], + [ + ['ISBN', 'Title'], + [], 'default', <<<'TABLE' +------+-------+ @@ -254,19 +254,19 @@ TABLE +------+-------+ TABLE - ), - array( - array(), - array(), + ], + [ + [], + [], 'default', '', - ), - 'Cell text with tags used for Output styling' => array( - array('ISBN', 'Title', 'Author'), - array( - array('99921-58-10-7', 'Divine Comedy', 'Dante Alighieri'), - array('9971-5-0210-0', 'A Tale of Two Cities', 'Charles Dickens'), - ), + ], + 'Cell text with tags used for Output styling' => [ + ['ISBN', 'Title', 'Author'], + [ + ['99921-58-10-7', 'Divine Comedy', 'Dante Alighieri'], + ['9971-5-0210-0', 'A Tale of Two Cities', 'Charles Dickens'], + ], 'default', <<<'TABLE' +---------------+----------------------+-----------------+ @@ -277,13 +277,13 @@ TABLE +---------------+----------------------+-----------------+ TABLE - ), - 'Cell text with tags not used for Output styling' => array( - array('ISBN', 'Title', 'Author'), - array( - array('99921-58-10-700', 'Divine Com', 'Dante Alighieri'), - array('9971-5-0210-0', 'A Tale of Two Cities', 'Charles Dickens'), - ), + ], + 'Cell text with tags not used for Output styling' => [ + ['ISBN', 'Title', 'Author'], + [ + ['99921-58-10-700', 'Divine Com', 'Dante Alighieri'], + ['9971-5-0210-0', 'A Tale of Two Cities', 'Charles Dickens'], + ], 'default', <<<'TABLE' +----------------------------------+----------------------+-----------------+ @@ -294,28 +294,28 @@ TABLE +----------------------------------+----------------------+-----------------+ TABLE - ), - 'Cell with colspan' => array( - array('ISBN', 'Title', 'Author'), - array( - array('99921-58-10-7', 'Divine Comedy', 'Dante Alighieri'), + ], + 'Cell with colspan' => [ + ['ISBN', 'Title', 'Author'], + [ + ['99921-58-10-7', 'Divine Comedy', 'Dante Alighieri'], new TableSeparator(), - array(new TableCell('Divine Comedy(Dante Alighieri)', array('colspan' => 3))), + [new TableCell('Divine Comedy(Dante Alighieri)', ['colspan' => 3])], new TableSeparator(), - array( - new TableCell('Arduino: A Quick-Start Guide', array('colspan' => 2)), + [ + new TableCell('Arduino: A Quick-Start Guide', ['colspan' => 2]), 'Mark Schmidt', - ), + ], new TableSeparator(), - array( + [ '9971-5-0210-0', - new TableCell("A Tale of \nTwo Cities", array('colspan' => 2)), - ), + new TableCell("A Tale of \nTwo Cities", ['colspan' => 2]), + ], new TableSeparator(), - array( - new TableCell('Cupiditate dicta atque porro, tempora exercitationem modi animi nulla nemo vel nihil!', array('colspan' => 3)), - ), - ), + [ + new TableCell('Cupiditate dicta atque porro, tempora exercitationem modi animi nulla nemo vel nihil!', ['colspan' => 3]), + ], + ], 'default', <<<'TABLE' +-------------------------------+-------------------------------+-----------------------------+ @@ -334,21 +334,21 @@ TABLE +-------------------------------+-------------------------------+-----------------------------+ TABLE - ), - 'Cell with rowspan' => array( - array('ISBN', 'Title', 'Author'), - array( - array( - new TableCell('9971-5-0210-0', array('rowspan' => 3)), - new TableCell('Divine Comedy', array('rowspan' => 2)), + ], + 'Cell with rowspan' => [ + ['ISBN', 'Title', 'Author'], + [ + [ + new TableCell('9971-5-0210-0', ['rowspan' => 3]), + new TableCell('Divine Comedy', ['rowspan' => 2]), 'Dante Alighieri', - ), - array(), - array("The Lord of \nthe Rings", "J. R. \nR. Tolkien"), + ], + [], + ["The Lord of \nthe Rings", "J. R. \nR. Tolkien"], new TableSeparator(), - array('80-902734-1-6', new TableCell("And Then \nThere \nWere None", array('rowspan' => 3)), 'Agatha Christie'), - array('80-902734-1-7', 'Test'), - ), + ['80-902734-1-6', new TableCell("And Then \nThere \nWere None", ['rowspan' => 3]), 'Agatha Christie'], + ['80-902734-1-7', 'Test'], + ], 'default', <<<'TABLE' +---------------+---------------+-----------------+ @@ -365,23 +365,23 @@ TABLE +---------------+---------------+-----------------+ TABLE - ), - 'Cell with rowspan and colspan' => array( - array('ISBN', 'Title', 'Author'), - array( - array( - new TableCell('9971-5-0210-0', array('rowspan' => 2, 'colspan' => 2)), + ], + 'Cell with rowspan and colspan' => [ + ['ISBN', 'Title', 'Author'], + [ + [ + new TableCell('9971-5-0210-0', ['rowspan' => 2, 'colspan' => 2]), 'Dante Alighieri', - ), - array('Charles Dickens'), + ], + ['Charles Dickens'], new TableSeparator(), - array( + [ 'Dante Alighieri', - new TableCell('9971-5-0210-0', array('rowspan' => 3, 'colspan' => 2)), - ), - array('J. R. R. Tolkien'), - array('J. R. R'), - ), + new TableCell('9971-5-0210-0', ['rowspan' => 3, 'colspan' => 2]), + ], + ['J. R. R. Tolkien'], + ['J. R. R'], + ], 'default', <<<'TABLE' +------------------+---------+-----------------+ @@ -396,27 +396,27 @@ TABLE +------------------+---------+-----------------+ TABLE - ), - 'Cell with rowspan and colspan contains new line break' => array( - array('ISBN', 'Title', 'Author'), - array( - array( - new TableCell("9971\n-5-\n021\n0-0", array('rowspan' => 2, 'colspan' => 2)), + ], + 'Cell with rowspan and colspan contains new line break' => [ + ['ISBN', 'Title', 'Author'], + [ + [ + new TableCell("9971\n-5-\n021\n0-0", ['rowspan' => 2, 'colspan' => 2]), 'Dante Alighieri', - ), - array('Charles Dickens'), + ], + ['Charles Dickens'], new TableSeparator(), - array( + [ 'Dante Alighieri', - new TableCell("9971\n-5-\n021\n0-0", array('rowspan' => 2, 'colspan' => 2)), - ), - array('Charles Dickens'), + new TableCell("9971\n-5-\n021\n0-0", ['rowspan' => 2, 'colspan' => 2]), + ], + ['Charles Dickens'], new TableSeparator(), - array( - new TableCell("9971\n-5-\n021\n0-0", array('rowspan' => 2, 'colspan' => 2)), - new TableCell("Dante \nAlighieri", array('rowspan' => 2, 'colspan' => 1)), - ), - ), + [ + new TableCell("9971\n-5-\n021\n0-0", ['rowspan' => 2, 'colspan' => 2]), + new TableCell("Dante \nAlighieri", ['rowspan' => 2, 'colspan' => 1]), + ], + ], 'default', <<<'TABLE' +-----------------+-------+-----------------+ @@ -439,21 +439,21 @@ TABLE +-----------------+-------+-----------------+ TABLE - ), - 'Cell with rowspan and colspan without using TableSeparator' => array( - array('ISBN', 'Title', 'Author'), - array( - array( - new TableCell("9971\n-5-\n021\n0-0", array('rowspan' => 2, 'colspan' => 2)), + ], + 'Cell with rowspan and colspan without using TableSeparator' => [ + ['ISBN', 'Title', 'Author'], + [ + [ + new TableCell("9971\n-5-\n021\n0-0", ['rowspan' => 2, 'colspan' => 2]), 'Dante Alighieri', - ), - array('Charles Dickens'), - array( + ], + ['Charles Dickens'], + [ 'Dante Alighieri', - new TableCell("9971\n-5-\n021\n0-0", array('rowspan' => 2, 'colspan' => 2)), - ), - array('Charles Dickens'), - ), + new TableCell("9971\n-5-\n021\n0-0", ['rowspan' => 2, 'colspan' => 2]), + ], + ['Charles Dickens'], + ], 'default', <<<'TABLE' +-----------------+-------+-----------------+ @@ -470,17 +470,17 @@ TABLE +-----------------+-------+-----------------+ TABLE - ), - 'Cell with rowspan and colspan with separator inside a rowspan' => array( - array('ISBN', 'Author'), - array( - array( - new TableCell('9971-5-0210-0', array('rowspan' => 3, 'colspan' => 1)), + ], + 'Cell with rowspan and colspan with separator inside a rowspan' => [ + ['ISBN', 'Author'], + [ + [ + new TableCell('9971-5-0210-0', ['rowspan' => 3, 'colspan' => 1]), 'Dante Alighieri', - ), - array(new TableSeparator()), - array('Charles Dickens'), - ), + ], + [new TableSeparator()], + ['Charles Dickens'], + ], 'default', <<<'TABLE' +---------------+-----------------+ @@ -492,13 +492,13 @@ TABLE +---------------+-----------------+ TABLE - ), - 'Multiple header lines' => array( - array( - array(new TableCell('Main title', array('colspan' => 3))), - array('ISBN', 'Title', 'Author'), - ), - array(), + ], + 'Multiple header lines' => [ + [ + [new TableCell('Main title', ['colspan' => 3])], + ['ISBN', 'Title', 'Author'], + ], + [], 'default', <<<'TABLE' +------+-------+--------+ @@ -508,17 +508,17 @@ TABLE +------+-------+--------+ 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)), - ), - ), + ], + 'Row with multiple cells' => [ + [], + [ + [ + new TableCell('1', ['colspan' => 3]), + new TableCell('2', ['colspan' => 2]), + new TableCell('3', ['colspan' => 2]), + new TableCell('4', ['colspan' => 2]), + ], + ], 'default', <<<'TABLE' +---+--+--+---+--+---+--+---+--+ @@ -526,22 +526,22 @@ TABLE +---+--+--+---+--+---+--+---+--+ TABLE - ), - 'Coslpan and table cells with comment style' => array( - array( - new TableCell('Long Title', array('colspan' => 3)), - ), - array( - array( - new TableCell('9971-5-0210-0', array('colspan' => 3)), - ), + ], + 'Coslpan and table cells with comment style' => [ + [ + new TableCell('Long Title', ['colspan' => 3]), + ], + [ + [ + new TableCell('9971-5-0210-0', ['colspan' => 3]), + ], new TableSeparator(), - array( + [ 'Dante Alighieri', 'J. R. R. Tolkien', 'J. R. R', - ), - ), + ], + ], 'default', << array( - array(), - array( - array( - new TableCell('Dont break'."\n".'here', array('colspan' => 2)), - ), + ], + 'Row with formatted cells containing a newline' => [ + [], + [ + [ + new TableCell('Dont break'."\n".'here', ['colspan' => 2]), + ], new TableSeparator(), - array( + [ 'foo', - new TableCell('Dont break'."\n".'here', array('rowspan' => 2)), - ), - array( + new TableCell('Dont break'."\n".'here', ['rowspan' => 2]), + ], + [ 'bar', - ), - ), + ], + ], 'default', <<<'TABLE' +-------+------------+ @@ -584,16 +584,16 @@ TABLE TABLE , true, - ), - ); + ], + ]; } public function testRenderMultiByte() { $table = new Table($output = $this->getOutputStream()); $table - ->setHeaders(array('â– â– ')) - ->setRows(array(array(1234))) + ->setHeaders(['â– â– ']) + ->setRows([[1234]]) ->setStyle('default') ; $table->render(); @@ -615,7 +615,7 @@ TABLE; { $table = new Table($output = $this->getOutputStream()); - $table->setRows(array(array(new TableCell(12345)))); + $table->setRows([[new TableCell(12345)]]); $table->render(); $expected = @@ -633,7 +633,7 @@ TABLE; { $table = new Table($output = $this->getOutputStream()); - $table->setRows(array(array(new TableCell(12345.01)))); + $table->setRows([[new TableCell(12345.01)]]); $table->render(); $expected = @@ -659,8 +659,8 @@ TABLE; Table::setStyleDefinition('dotfull', $style); $table = new Table($output = $this->getOutputStream()); $table - ->setHeaders(array('Foo')) - ->setRows(array(array('Bar'))) + ->setHeaders(['Foo']) + ->setRows([['Bar']]) ->setStyle('dotfull'); $table->render(); @@ -681,14 +681,14 @@ TABLE; { $table = new Table($output = $this->getOutputStream()); $table - ->setHeaders(array('Foo')) - ->setRows(array( - array('Bar1'), + ->setHeaders(['Foo']) + ->setRows([ + ['Bar1'], new TableSeparator(), - array('Bar2'), + ['Bar2'], new TableSeparator(), - array('Bar3'), - )); + ['Bar3'], + ]); $table->render(); $expected = @@ -713,9 +713,9 @@ TABLE; public function testRenderMultiCalls() { $table = new Table($output = $this->getOutputStream()); - $table->setRows(array( - array(new TableCell('foo', array('colspan' => 2))), - )); + $table->setRows([ + [new TableCell('foo', ['colspan' => 2])], + ]); $table->render(); $table->render(); $table->render(); @@ -741,11 +741,11 @@ TABLE; { $table = new Table($output = $this->getOutputStream()); $table - ->setHeaders(array('ISBN', 'Title', 'Author', 'Price')) - ->setRows(array( - array('99921-58-10-7', 'Divine Comedy', 'Dante Alighieri', '9.95'), - array('9971-5-0210-0', 'A Tale of Two Cities', 'Charles Dickens', '139.25'), - )); + ->setHeaders(['ISBN', 'Title', 'Author', 'Price']) + ->setRows([ + ['99921-58-10-7', 'Divine Comedy', 'Dante Alighieri', '9.95'], + ['9971-5-0210-0', 'A Tale of Two Cities', 'Charles Dickens', '139.25'], + ]); $style = new TableStyle(); $style->setPadType(STR_PAD_LEFT); @@ -775,10 +775,10 @@ TABLE; { $table = new Table($output = $this->getOutputStream()); $table - ->setHeaders(array('ISBN', 'Title', 'Author', 'Price')) - ->setRows(array( - array('99921-58-10-7', array(), 'Dante Alighieri', '9.95'), - )); + ->setHeaders(['ISBN', 'Title', 'Author', 'Price']) + ->setRows([ + ['99921-58-10-7', [], 'Dante Alighieri', '9.95'], + ]); $table->render(); } @@ -787,11 +787,11 @@ TABLE; { $table = new Table($output = $this->getOutputStream()); $table - ->setHeaders(array('ISBN', 'Title', 'Author', 'Price')) - ->setRows(array( - array('99921-58-10-7', 'Divine Comedy', 'Dante Alighieri', '9.95'), - array('9971-5-0210-0', 'A Tale of Two Cities', 'Charles Dickens', '139.25'), - )) + ->setHeaders(['ISBN', 'Title', 'Author', 'Price']) + ->setRows([ + ['99921-58-10-7', 'Divine Comedy', 'Dante Alighieri', '9.95'], + ['9971-5-0210-0', 'A Tale of Two Cities', 'Charles Dickens', '139.25'], + ]) ->setColumnWidth(0, 15) ->setColumnWidth(3, 10); @@ -819,12 +819,12 @@ TABLE; { $table = new Table($output = $this->getOutputStream()); $table - ->setHeaders(array('ISBN', 'Title', 'Author', 'Price')) - ->setRows(array( - array('99921-58-10-7', 'Divine Comedy', 'Dante Alighieri', '9.95'), - array('9971-5-0210-0', 'A Tale of Two Cities', 'Charles Dickens', '139.25'), - )) - ->setColumnWidths(array(15, 0, -1, 10)); + ->setHeaders(['ISBN', 'Title', 'Author', 'Price']) + ->setRows([ + ['99921-58-10-7', 'Divine Comedy', 'Dante Alighieri', '9.95'], + ['9971-5-0210-0', 'A Tale of Two Cities', 'Charles Dickens', '139.25'], + ]) + ->setColumnWidths([15, 0, -1, 10]); $style = new TableStyle(); $style->setPadType(STR_PAD_LEFT); @@ -848,19 +848,19 @@ TABLE; public function testSectionOutput() { - $sections = array(); + $sections = []; $stream = $this->getOutputStream(true); $output = new ConsoleSectionOutput($stream->getStream(), $sections, $stream->getVerbosity(), $stream->isDecorated(), new OutputFormatter()); $table = new Table($output); $table - ->setHeaders(array('ISBN', 'Title', 'Author', 'Price')) - ->setRows(array( - array('99921-58-10-7', 'Divine Comedy', 'Dante Alighieri', '9.95'), - )); + ->setHeaders(['ISBN', 'Title', 'Author', 'Price']) + ->setRows([ + ['99921-58-10-7', 'Divine Comedy', 'Dante Alighieri', '9.95'], + ]); $table->render(); - $table->appendRow(array('9971-5-0210-0', 'A Tale of Two Cities', 'Charles Dickens', '139.25')); + $table->appendRow(['9971-5-0210-0', 'A Tale of Two Cities', 'Charles Dickens', '139.25']); $expected = <<
getOutputStream(true); $output = new ConsoleSectionOutput($stream->getStream(), $sections, $stream->getVerbosity(), $stream->isDecorated(), new OutputFormatter()); $table = new Table($output); $table - ->setHeaders(array('ISBN', 'Title', 'Author', 'Price')) - ->setRows(array( - array('99921-58-10-7', 'Divine Comedy', 'Dante Alighieri', '9.95'), - )); + ->setHeaders(['ISBN', 'Title', 'Author', 'Price']) + ->setRows([ + ['99921-58-10-7', 'Divine Comedy', 'Dante Alighieri', '9.95'], + ]); - $table->appendRow(array('9971-5-0210-0', 'A Tale of Two Cities', 'Charles Dickens', '139.25')); + $table->appendRow(['9971-5-0210-0', 'A Tale of Two Cities', 'Charles Dickens', '139.25']); $expected = <<
getOutputStream(); $output = new ConsoleSectionOutput($stream->getStream(), $sections, $stream->getVerbosity(), $stream->isDecorated(), new OutputFormatter()); $table = new Table($output); $table - ->setHeaders(array('ISBN', 'Title', 'Author', 'Price')) - ->setRows(array( - array('99921-58-10-7', 'Divine Comedy', 'Dante Alighieri', '9.95'), - )); + ->setHeaders(['ISBN', 'Title', 'Author', 'Price']) + ->setRows([ + ['99921-58-10-7', 'Divine Comedy', 'Dante Alighieri', '9.95'], + ]); $table->render(); - $table->appendRow(array('9971-5-0210-0', 'A Tale of Two Cities', 'Charles Dickens', '139.25')); + $table->appendRow(['9971-5-0210-0', 'A Tale of Two Cities', 'Charles Dickens', '139.25']); $expected = <<
getOutputStream()); - $table->appendRow(array('9971-5-0210-0', 'A Tale of Two Cities', 'Charles Dickens', '139.25')); + $table->appendRow(['9971-5-0210-0', 'A Tale of Two Cities', 'Charles Dickens', '139.25']); } /** @@ -982,13 +982,13 @@ TABLE; (new Table($output = $this->getOutputStream())) ->setHeaderTitle($headerTitle) ->setFooterTitle($footerTitle) - ->setHeaders(array('ISBN', 'Title', 'Author')) - ->setRows(array( - array('99921-58-10-7', 'Divine Comedy', 'Dante Alighieri'), - array('9971-5-0210-0', 'A Tale of Two Cities', 'Charles Dickens'), - array('960-425-059-0', 'The Lord of the Rings', 'J. R. R. Tolkien'), - array('80-902734-1-6', 'And Then There Were None', 'Agatha Christie'), - )) + ->setHeaders(['ISBN', 'Title', 'Author']) + ->setRows([ + ['99921-58-10-7', 'Divine Comedy', 'Dante Alighieri'], + ['9971-5-0210-0', 'A Tale of Two Cities', 'Charles Dickens'], + ['960-425-059-0', 'The Lord of the Rings', 'J. R. R. Tolkien'], + ['80-902734-1-6', 'And Then There Were None', 'Agatha Christie'], + ]) ->setStyle($style) ->render() ; @@ -998,8 +998,8 @@ TABLE; public function renderSetTitle() { - return array( - array( + return [ + [ 'Books', 'Page 1/2', 'default', @@ -1014,8 +1014,8 @@ TABLE; +---------------+--------- Page 1/2 -------+------------------+ TABLE - ), - array( + ], + [ 'Books', 'Page 1/2', 'box', @@ -1030,8 +1030,8 @@ TABLE └───────────────┴───────── Page 1/2 ───────┴──────────────────┘ TABLE - ), - array( + ], + [ 'Boooooooooooooooooooooooooooooooooooooooooooooooooooooooks', 'Page 1/999999999999999999999999999999999999999999999999999', 'default', @@ -1046,17 +1046,17 @@ TABLE +- Page 1/99999999999999999999999999999999999999999999999... -+ TABLE - ), - ); + ], + ]; } public function testColumnMaxWidths() { $table = new Table($output = $this->getOutputStream()); $table - ->setRows(array( - array('Divine Comedy', 'A Tale of Two Cities', 'The Lord of the Rings', 'And Then There Were None'), - )) + ->setRows([ + ['Divine Comedy', 'A Tale of Two Cities', 'The Lord of the Rings', 'And Then There Were None'], + ]) ->setColumnMaxWidth(1, 5) ->setColumnMaxWidth(2, 10) ->setColumnMaxWidth(3, 15); @@ -1072,6 +1072,26 @@ TABLE | | ities | | | +---------------+-------+------------+-----------------+ +TABLE; + + $this->assertEquals($expected, $this->getOutputContent($output)); + } + + public function testColumnMaxWidthsWithTrailingBackslash() + { + (new Table($output = $this->getOutputStream())) + ->setColumnMaxWidth(0, 5) + ->setRows([['1234\6']]) + ->render() + ; + + $expected = + <<<'TABLE' ++-------+ +| 1234\ | +| 6 | ++-------+ + TABLE; $this->assertEquals($expected, $this->getOutputContent($output)); @@ -1089,12 +1109,12 @@ TABLE; $table = new Table($output = $this->getOutputStream()); $table->setStyle($boxed); $table - ->setHeaders(array('ISBN', 'Title', 'Author')) - ->setRows(array( - array('99921-58-10-7', 'Divine Comedy', 'Dante Alighieri'), + ->setHeaders(['ISBN', 'Title', 'Author']) + ->setRows([ + ['99921-58-10-7', 'Divine Comedy', 'Dante Alighieri'], new TableSeparator(), - array(new TableCell('This value spans 3 columns.', array('colspan' => 3))), - )) + [new TableCell('This value spans 3 columns.', ['colspan' => 3])], + ]) ; $table->render(); @@ -1124,4 +1144,56 @@ TABLE; return str_replace(PHP_EOL, "\n", stream_get_contents($output->getStream())); } + + public function testWithColspanAndMaxWith(): void + { + $table = new Table($output = $this->getOutputStream()); + + $table->setColumnMaxWidth(0, 15); + $table->setColumnMaxWidth(1, 15); + $table->setColumnMaxWidth(2, 15); + $table->setRows([ + [new TableCell('Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor', ['colspan' => 3])], + new TableSeparator(), + [new TableCell('Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor', ['colspan' => 3])], + new TableSeparator(), + [new TableCell('Lorem ipsum dolor sit amet, consectetur ', ['colspan' => 2]), 'hello world'], + new TableSeparator(), + ['hello world', new TableCell('Lorem ipsum dolor sit amet, consectetur adipiscing elit', ['colspan' => 2])], + new TableSeparator(), + ['hello ', new TableCell('world', ['colspan' => 1]), 'Lorem ipsum dolor sit amet, consectetur'], + new TableSeparator(), + ['Symfony ', new TableCell('Test', ['colspan' => 1]), 'Lorem ipsum dolor sit amet, consectetur'], + ]) + ; + $table->render(); + + $expected = + <<
assertSame($expected, $this->getOutputContent($output)); + } } diff --git a/vendor/symfony/console/Tests/Input/ArgvInputTest.php b/vendor/symfony/console/Tests/Input/ArgvInputTest.php index b91b6d71..e20bcdd2 100644 --- a/vendor/symfony/console/Tests/Input/ArgvInputTest.php +++ b/vendor/symfony/console/Tests/Input/ArgvInputTest.php @@ -21,23 +21,23 @@ class ArgvInputTest extends TestCase { public function testConstructor() { - $_SERVER['argv'] = array('cli.php', 'foo'); + $_SERVER['argv'] = ['cli.php', 'foo']; $input = new ArgvInput(); $r = new \ReflectionObject($input); $p = $r->getProperty('tokens'); $p->setAccessible(true); - $this->assertEquals(array('foo'), $p->getValue($input), '__construct() automatically get its input from the argv server variable'); + $this->assertEquals(['foo'], $p->getValue($input), '__construct() automatically get its input from the argv server variable'); } public function testParseArguments() { - $input = new ArgvInput(array('cli.php', 'foo')); - $input->bind(new InputDefinition(array(new InputArgument('name')))); - $this->assertEquals(array('name' => 'foo'), $input->getArguments(), '->parse() parses required arguments'); + $input = new ArgvInput(['cli.php', 'foo']); + $input->bind(new InputDefinition([new InputArgument('name')])); + $this->assertEquals(['name' => 'foo'], $input->getArguments(), '->parse() parses required arguments'); - $input->bind(new InputDefinition(array(new InputArgument('name')))); - $this->assertEquals(array('name' => 'foo'), $input->getArguments(), '->parse() is stateless'); + $input->bind(new InputDefinition([new InputArgument('name')])); + $this->assertEquals(['name' => 'foo'], $input->getArguments(), '->parse() is stateless'); } /** @@ -53,128 +53,128 @@ class ArgvInputTest extends TestCase public function provideOptions() { - return array( - array( - array('cli.php', '--foo'), - array(new InputOption('foo')), - array('foo' => true), + return [ + [ + ['cli.php', '--foo'], + [new InputOption('foo')], + ['foo' => true], '->parse() parses long options without a value', - ), - array( - array('cli.php', '--foo=bar'), - array(new InputOption('foo', 'f', InputOption::VALUE_REQUIRED)), - array('foo' => 'bar'), + ], + [ + ['cli.php', '--foo=bar'], + [new InputOption('foo', 'f', InputOption::VALUE_REQUIRED)], + ['foo' => 'bar'], '->parse() parses long options with a required value (with a = separator)', - ), - array( - array('cli.php', '--foo', 'bar'), - array(new InputOption('foo', 'f', InputOption::VALUE_REQUIRED)), - array('foo' => 'bar'), + ], + [ + ['cli.php', '--foo', 'bar'], + [new InputOption('foo', 'f', InputOption::VALUE_REQUIRED)], + ['foo' => 'bar'], '->parse() parses long options with a required value (with a space separator)', - ), - array( - array('cli.php', '--foo='), - array(new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL)), - array('foo' => ''), + ], + [ + ['cli.php', '--foo='], + [new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL)], + ['foo' => ''], '->parse() parses long options with optional value which is empty (with a = separator) as empty string', - ), - array( - array('cli.php', '--foo=', 'bar'), - array(new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL), new InputArgument('name', InputArgument::REQUIRED)), - array('foo' => ''), + ], + [ + ['cli.php', '--foo=', 'bar'], + [new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL), new InputArgument('name', InputArgument::REQUIRED)], + ['foo' => ''], '->parse() parses long options with optional value without value specified or an empty string (with a = separator) followed by an argument as empty string', - ), - array( - array('cli.php', 'bar', '--foo'), - array(new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL), new InputArgument('name', InputArgument::REQUIRED)), - array('foo' => null), + ], + [ + ['cli.php', 'bar', '--foo'], + [new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL), new InputArgument('name', InputArgument::REQUIRED)], + ['foo' => null], '->parse() parses long options with optional value which is empty (with a = separator) preceded by an argument', - ), - array( - array('cli.php', '--foo', '', 'bar'), - array(new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL), new InputArgument('name', InputArgument::REQUIRED)), - array('foo' => ''), + ], + [ + ['cli.php', '--foo', '', 'bar'], + [new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL), new InputArgument('name', InputArgument::REQUIRED)], + ['foo' => ''], '->parse() parses long options with optional value which is empty as empty string even followed by an argument', - ), - array( - array('cli.php', '--foo'), - array(new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL)), - array('foo' => null), + ], + [ + ['cli.php', '--foo'], + [new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL)], + ['foo' => null], '->parse() parses long options with optional value specified with no separator and no value as null', - ), - array( - array('cli.php', '-f'), - array(new InputOption('foo', 'f')), - array('foo' => true), + ], + [ + ['cli.php', '-f'], + [new InputOption('foo', 'f')], + ['foo' => true], '->parse() parses short options without a value', - ), - array( - array('cli.php', '-fbar'), - array(new InputOption('foo', 'f', InputOption::VALUE_REQUIRED)), - array('foo' => 'bar'), + ], + [ + ['cli.php', '-fbar'], + [new InputOption('foo', 'f', InputOption::VALUE_REQUIRED)], + ['foo' => 'bar'], '->parse() parses short options with a required value (with no separator)', - ), - array( - array('cli.php', '-f', 'bar'), - array(new InputOption('foo', 'f', InputOption::VALUE_REQUIRED)), - array('foo' => 'bar'), + ], + [ + ['cli.php', '-f', 'bar'], + [new InputOption('foo', 'f', InputOption::VALUE_REQUIRED)], + ['foo' => 'bar'], '->parse() parses short options with a required value (with a space separator)', - ), - array( - array('cli.php', '-f', ''), - array(new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL)), - array('foo' => ''), + ], + [ + ['cli.php', '-f', ''], + [new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL)], + ['foo' => ''], '->parse() parses short options with an optional empty value', - ), - array( - array('cli.php', '-f', '', 'foo'), - array(new InputArgument('name'), new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL)), - array('foo' => ''), + ], + [ + ['cli.php', '-f', '', 'foo'], + [new InputArgument('name'), new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL)], + ['foo' => ''], '->parse() parses short options with an optional empty value followed by an argument', - ), - array( - array('cli.php', '-f', '', '-b'), - array(new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL), new InputOption('bar', 'b')), - array('foo' => '', 'bar' => true), + ], + [ + ['cli.php', '-f', '', '-b'], + [new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL), new InputOption('bar', 'b')], + ['foo' => '', 'bar' => true], '->parse() parses short options with an optional empty value followed by an option', - ), - array( - array('cli.php', '-f', '-b', 'foo'), - array(new InputArgument('name'), new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL), new InputOption('bar', 'b')), - array('foo' => null, 'bar' => true), + ], + [ + ['cli.php', '-f', '-b', 'foo'], + [new InputArgument('name'), new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL), new InputOption('bar', 'b')], + ['foo' => null, 'bar' => true], '->parse() parses short options with an optional value which is not present', - ), - array( - array('cli.php', '-fb'), - array(new InputOption('foo', 'f'), new InputOption('bar', 'b')), - array('foo' => true, 'bar' => true), + ], + [ + ['cli.php', '-fb'], + [new InputOption('foo', 'f'), new InputOption('bar', 'b')], + ['foo' => true, 'bar' => true], '->parse() parses short options when they are aggregated as a single one', - ), - array( - array('cli.php', '-fb', 'bar'), - array(new InputOption('foo', 'f'), new InputOption('bar', 'b', InputOption::VALUE_REQUIRED)), - array('foo' => true, 'bar' => 'bar'), + ], + [ + ['cli.php', '-fb', 'bar'], + [new InputOption('foo', 'f'), new InputOption('bar', 'b', InputOption::VALUE_REQUIRED)], + ['foo' => true, 'bar' => 'bar'], '->parse() parses short options when they are aggregated as a single one and the last one has a required value', - ), - array( - array('cli.php', '-fb', 'bar'), - array(new InputOption('foo', 'f'), new InputOption('bar', 'b', InputOption::VALUE_OPTIONAL)), - array('foo' => true, 'bar' => 'bar'), + ], + [ + ['cli.php', '-fb', 'bar'], + [new InputOption('foo', 'f'), new InputOption('bar', 'b', InputOption::VALUE_OPTIONAL)], + ['foo' => true, 'bar' => 'bar'], '->parse() parses short options when they are aggregated as a single one and the last one has an optional value', - ), - array( - array('cli.php', '-fbbar'), - array(new InputOption('foo', 'f'), new InputOption('bar', 'b', InputOption::VALUE_OPTIONAL)), - array('foo' => true, 'bar' => 'bar'), + ], + [ + ['cli.php', '-fbbar'], + [new InputOption('foo', 'f'), new InputOption('bar', 'b', InputOption::VALUE_OPTIONAL)], + ['foo' => true, 'bar' => 'bar'], '->parse() parses short options when they are aggregated as a single one and the last one has an optional value with no separator', - ), - array( - array('cli.php', '-fbbar'), - array(new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL), new InputOption('bar', 'b', InputOption::VALUE_OPTIONAL)), - array('foo' => 'bbar', 'bar' => null), + ], + [ + ['cli.php', '-fbbar'], + [new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL), new InputOption('bar', 'b', InputOption::VALUE_OPTIONAL)], + ['foo' => 'bbar', 'bar' => null], '->parse() parses short options when they are aggregated as a single one and one of them takes a value', - ), - ); + ], + ]; } /** @@ -195,162 +195,170 @@ class ArgvInputTest extends TestCase public function provideInvalidInput() { - return array( - array( - array('cli.php', '--foo'), - new InputDefinition(array(new InputOption('foo', 'f', InputOption::VALUE_REQUIRED))), + return [ + [ + ['cli.php', '--foo'], + new InputDefinition([new InputOption('foo', 'f', InputOption::VALUE_REQUIRED)]), 'The "--foo" option requires a value.', - ), - array( - array('cli.php', '-f'), - new InputDefinition(array(new InputOption('foo', 'f', InputOption::VALUE_REQUIRED))), + ], + [ + ['cli.php', '-f'], + new InputDefinition([new InputOption('foo', 'f', InputOption::VALUE_REQUIRED)]), 'The "--foo" option requires a value.', - ), - array( - array('cli.php', '-ffoo'), - new InputDefinition(array(new InputOption('foo', 'f', InputOption::VALUE_NONE))), + ], + [ + ['cli.php', '-ffoo'], + new InputDefinition([new InputOption('foo', 'f', InputOption::VALUE_NONE)]), 'The "-o" option does not exist.', - ), - array( - array('cli.php', '--foo=bar'), - new InputDefinition(array(new InputOption('foo', 'f', InputOption::VALUE_NONE))), + ], + [ + ['cli.php', '--foo=bar'], + new InputDefinition([new InputOption('foo', 'f', InputOption::VALUE_NONE)]), 'The "--foo" option does not accept a value.', - ), - array( - array('cli.php', 'foo', 'bar'), + ], + [ + ['cli.php', 'foo', 'bar'], new InputDefinition(), 'No arguments expected, got "foo".', - ), - array( - array('cli.php', 'foo', 'bar'), - new InputDefinition(array(new InputArgument('number'))), + ], + [ + ['cli.php', 'foo', 'bar'], + new InputDefinition([new InputArgument('number')]), 'Too many arguments, expected arguments "number".', - ), - array( - array('cli.php', 'foo', 'bar', 'zzz'), - new InputDefinition(array(new InputArgument('number'), new InputArgument('county'))), + ], + [ + ['cli.php', 'foo', 'bar', 'zzz'], + new InputDefinition([new InputArgument('number'), new InputArgument('county')]), 'Too many arguments, expected arguments "number" "county".', - ), - array( - array('cli.php', '--foo'), + ], + [ + ['cli.php', '--foo'], new InputDefinition(), 'The "--foo" option does not exist.', - ), - array( - array('cli.php', '-f'), + ], + [ + ['cli.php', '-f'], new InputDefinition(), 'The "-f" option does not exist.', - ), - array( - array('cli.php', '-1'), - new InputDefinition(array(new InputArgument('number'))), + ], + [ + ['cli.php', '-1'], + new InputDefinition([new InputArgument('number')]), 'The "-1" option does not exist.', - ), - array( - array('cli.php', '-fЩ'), - new InputDefinition(array(new InputOption('foo', 'f', InputOption::VALUE_NONE))), + ], + [ + ['cli.php', '-fЩ'], + new InputDefinition([new InputOption('foo', 'f', InputOption::VALUE_NONE)]), 'The "-Щ" option does not exist.', - ), - ); + ], + ]; } public function testParseArrayArgument() { - $input = new ArgvInput(array('cli.php', 'foo', 'bar', 'baz', 'bat')); - $input->bind(new InputDefinition(array(new InputArgument('name', InputArgument::IS_ARRAY)))); + $input = new ArgvInput(['cli.php', 'foo', 'bar', 'baz', 'bat']); + $input->bind(new InputDefinition([new InputArgument('name', InputArgument::IS_ARRAY)])); - $this->assertEquals(array('name' => array('foo', 'bar', 'baz', 'bat')), $input->getArguments(), '->parse() parses array arguments'); + $this->assertEquals(['name' => ['foo', 'bar', 'baz', 'bat']], $input->getArguments(), '->parse() parses array arguments'); } public function testParseArrayOption() { - $input = new ArgvInput(array('cli.php', '--name=foo', '--name=bar', '--name=baz')); - $input->bind(new InputDefinition(array(new InputOption('name', null, InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY)))); + $input = new ArgvInput(['cli.php', '--name=foo', '--name=bar', '--name=baz']); + $input->bind(new InputDefinition([new InputOption('name', null, InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY)])); - $this->assertEquals(array('name' => array('foo', 'bar', 'baz')), $input->getOptions(), '->parse() parses array options ("--option=value" syntax)'); + $this->assertEquals(['name' => ['foo', 'bar', 'baz']], $input->getOptions(), '->parse() parses array options ("--option=value" syntax)'); - $input = new ArgvInput(array('cli.php', '--name', 'foo', '--name', 'bar', '--name', 'baz')); - $input->bind(new InputDefinition(array(new InputOption('name', null, InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY)))); - $this->assertEquals(array('name' => array('foo', 'bar', 'baz')), $input->getOptions(), '->parse() parses array options ("--option value" syntax)'); + $input = new ArgvInput(['cli.php', '--name', 'foo', '--name', 'bar', '--name', 'baz']); + $input->bind(new InputDefinition([new InputOption('name', null, InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY)])); + $this->assertEquals(['name' => ['foo', 'bar', 'baz']], $input->getOptions(), '->parse() parses array options ("--option value" syntax)'); - $input = new ArgvInput(array('cli.php', '--name=foo', '--name=bar', '--name=')); - $input->bind(new InputDefinition(array(new InputOption('name', null, InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY)))); - $this->assertSame(array('name' => array('foo', 'bar', '')), $input->getOptions(), '->parse() parses empty array options as null ("--option=value" syntax)'); + $input = new ArgvInput(['cli.php', '--name=foo', '--name=bar', '--name=']); + $input->bind(new InputDefinition([new InputOption('name', null, InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY)])); + $this->assertSame(['name' => ['foo', 'bar', '']], $input->getOptions(), '->parse() parses empty array options as null ("--option=value" syntax)'); - $input = new ArgvInput(array('cli.php', '--name', 'foo', '--name', 'bar', '--name', '--anotherOption')); - $input->bind(new InputDefinition(array( + $input = new ArgvInput(['cli.php', '--name', 'foo', '--name', 'bar', '--name', '--anotherOption']); + $input->bind(new InputDefinition([ new InputOption('name', null, InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY), new InputOption('anotherOption', null, InputOption::VALUE_NONE), - ))); - $this->assertSame(array('name' => array('foo', 'bar', null), 'anotherOption' => true), $input->getOptions(), '->parse() parses empty array options ("--option value" syntax)'); + ])); + $this->assertSame(['name' => ['foo', 'bar', null], 'anotherOption' => true], $input->getOptions(), '->parse() parses empty array options ("--option value" syntax)'); } public function testParseNegativeNumberAfterDoubleDash() { - $input = new ArgvInput(array('cli.php', '--', '-1')); - $input->bind(new InputDefinition(array(new InputArgument('number')))); - $this->assertEquals(array('number' => '-1'), $input->getArguments(), '->parse() parses arguments with leading dashes as arguments after having encountered a double-dash sequence'); + $input = new ArgvInput(['cli.php', '--', '-1']); + $input->bind(new InputDefinition([new InputArgument('number')])); + $this->assertEquals(['number' => '-1'], $input->getArguments(), '->parse() parses arguments with leading dashes as arguments after having encountered a double-dash sequence'); - $input = new ArgvInput(array('cli.php', '-f', 'bar', '--', '-1')); - $input->bind(new InputDefinition(array(new InputArgument('number'), new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL)))); - $this->assertEquals(array('foo' => 'bar'), $input->getOptions(), '->parse() parses arguments with leading dashes as options before having encountered a double-dash sequence'); - $this->assertEquals(array('number' => '-1'), $input->getArguments(), '->parse() parses arguments with leading dashes as arguments after having encountered a double-dash sequence'); + $input = new ArgvInput(['cli.php', '-f', 'bar', '--', '-1']); + $input->bind(new InputDefinition([new InputArgument('number'), new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL)])); + $this->assertEquals(['foo' => 'bar'], $input->getOptions(), '->parse() parses arguments with leading dashes as options before having encountered a double-dash sequence'); + $this->assertEquals(['number' => '-1'], $input->getArguments(), '->parse() parses arguments with leading dashes as arguments after having encountered a double-dash sequence'); } public function testParseEmptyStringArgument() { - $input = new ArgvInput(array('cli.php', '-f', 'bar', '')); - $input->bind(new InputDefinition(array(new InputArgument('empty'), new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL)))); + $input = new ArgvInput(['cli.php', '-f', 'bar', '']); + $input->bind(new InputDefinition([new InputArgument('empty'), new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL)])); - $this->assertEquals(array('empty' => ''), $input->getArguments(), '->parse() parses empty string arguments'); + $this->assertEquals(['empty' => ''], $input->getArguments(), '->parse() parses empty string arguments'); } public function testGetFirstArgument() { - $input = new ArgvInput(array('cli.php', '-fbbar')); + $input = new ArgvInput(['cli.php', '-fbbar']); $this->assertNull($input->getFirstArgument(), '->getFirstArgument() returns null when there is no arguments'); - $input = new ArgvInput(array('cli.php', '-fbbar', 'foo')); + $input = new ArgvInput(['cli.php', '-fbbar', 'foo']); $this->assertEquals('foo', $input->getFirstArgument(), '->getFirstArgument() returns the first argument from the raw input'); + + $input = new ArgvInput(['cli.php', '--foo', 'fooval', 'bar']); + $input->bind(new InputDefinition([new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL), new InputArgument('arg')])); + $this->assertSame('bar', $input->getFirstArgument()); + + $input = new ArgvInput(['cli.php', '-bf', 'fooval', 'argval']); + $input->bind(new InputDefinition([new InputOption('bar', 'b', InputOption::VALUE_NONE), new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL), new InputArgument('arg')])); + $this->assertSame('argval', $input->getFirstArgument()); } public function testHasParameterOption() { - $input = new ArgvInput(array('cli.php', '-f', 'foo')); + $input = new ArgvInput(['cli.php', '-f', 'foo']); $this->assertTrue($input->hasParameterOption('-f'), '->hasParameterOption() returns true if the given short option is in the raw input'); - $input = new ArgvInput(array('cli.php', '-etest')); + $input = new ArgvInput(['cli.php', '-etest']); $this->assertTrue($input->hasParameterOption('-e'), '->hasParameterOption() returns true if the given short option is in the raw input'); $this->assertFalse($input->hasParameterOption('-s'), '->hasParameterOption() returns true if the given short option is in the raw input'); - $input = new ArgvInput(array('cli.php', '--foo', 'foo')); + $input = new ArgvInput(['cli.php', '--foo', 'foo']); $this->assertTrue($input->hasParameterOption('--foo'), '->hasParameterOption() returns true if the given short option is in the raw input'); - $input = new ArgvInput(array('cli.php', 'foo')); + $input = new ArgvInput(['cli.php', 'foo']); $this->assertFalse($input->hasParameterOption('--foo'), '->hasParameterOption() returns false if the given short option is not in the raw input'); - $input = new ArgvInput(array('cli.php', '--foo=bar')); + $input = new ArgvInput(['cli.php', '--foo=bar']); $this->assertTrue($input->hasParameterOption('--foo'), '->hasParameterOption() returns true if the given option with provided value is in the raw input'); } public function testHasParameterOptionOnlyOptions() { - $input = new ArgvInput(array('cli.php', '-f', 'foo')); + $input = new ArgvInput(['cli.php', '-f', 'foo']); $this->assertTrue($input->hasParameterOption('-f', true), '->hasParameterOption() returns true if the given short option is in the raw input'); - $input = new ArgvInput(array('cli.php', '--foo', '--', 'foo')); + $input = new ArgvInput(['cli.php', '--foo', '--', 'foo']); $this->assertTrue($input->hasParameterOption('--foo', true), '->hasParameterOption() returns true if the given long option is in the raw input'); - $input = new ArgvInput(array('cli.php', '--foo=bar', 'foo')); + $input = new ArgvInput(['cli.php', '--foo=bar', 'foo']); $this->assertTrue($input->hasParameterOption('--foo', true), '->hasParameterOption() returns true if the given long option with provided value is in the raw input'); - $input = new ArgvInput(array('cli.php', '--', '--foo')); + $input = new ArgvInput(['cli.php', '--', '--foo']); $this->assertFalse($input->hasParameterOption('--foo', true), '->hasParameterOption() returns false if the given option is in the raw input but after an end of options signal'); } public function testHasParameterOptionEdgeCasesAndLimitations() { - $input = new ArgvInput(array('cli.php', '-fh')); + $input = new ArgvInput(['cli.php', '-fh']); // hasParameterOption does not know if the previous short option, -f, // takes a value or not. If -f takes a value, then -fh does NOT include // -h; Otherwise it does. Since we do not know which short options take @@ -368,7 +376,7 @@ class ArgvInputTest extends TestCase // However, this is not supported. $this->assertFalse($input->hasParameterOption('-hf'), '->hasParameterOption() returns true if the given short option is in the raw input'); - $input = new ArgvInput(array('cli.php', '-f', '-h')); + $input = new ArgvInput(['cli.php', '-f', '-h']); // If hasParameterOption('-fh') is supported for 'cli.php -fh', then // one might also expect that it should also be supported for // 'cli.php -f -h'. However, this is not supported. @@ -377,23 +385,23 @@ class ArgvInputTest extends TestCase public function testNoWarningOnInvalidParameterOption() { - $input = new ArgvInput(array('cli.php', '-edev')); + $input = new ArgvInput(['cli.php', '-edev']); - $this->assertTrue($input->hasParameterOption(array('-e', ''))); + $this->assertTrue($input->hasParameterOption(['-e', ''])); // No warning thrown - $this->assertFalse($input->hasParameterOption(array('-m', ''))); + $this->assertFalse($input->hasParameterOption(['-m', ''])); - $this->assertEquals('dev', $input->getParameterOption(array('-e', ''))); + $this->assertEquals('dev', $input->getParameterOption(['-e', ''])); // No warning thrown - $this->assertFalse($input->getParameterOption(array('-m', ''))); + $this->assertFalse($input->getParameterOption(['-m', ''])); } public function testToString() { - $input = new ArgvInput(array('cli.php', '-f', 'foo')); + $input = new ArgvInput(['cli.php', '-f', 'foo']); $this->assertEquals('-f foo', (string) $input); - $input = new ArgvInput(array('cli.php', '-f', '--bar=foo', 'a b c d', "A\nB'C")); + $input = new ArgvInput(['cli.php', '-f', '--bar=foo', 'a b c d', "A\nB'C"]); $this->assertEquals('-f --bar=foo '.escapeshellarg('a b c d').' '.escapeshellarg("A\nB'C"), (string) $input); } @@ -408,51 +416,51 @@ class ArgvInputTest extends TestCase public function provideGetParameterOptionValues() { - return array( - array(array('app/console', 'foo:bar'), '-e', 'default', false, 'default'), - array(array('app/console', 'foo:bar', '-e', 'dev'), '-e', 'default', false, 'dev'), - array(array('app/console', 'foo:bar', '--env=dev'), '--env', 'default', false, 'dev'), - array(array('app/console', 'foo:bar', '-e', 'dev'), array('-e', '--env'), 'default', false, 'dev'), - array(array('app/console', 'foo:bar', '--env=dev'), array('-e', '--env'), 'default', false, 'dev'), - array(array('app/console', 'foo:bar', '--env=dev', '--en=1'), array('--en'), 'default', false, '1'), - array(array('app/console', 'foo:bar', '--env=dev', '', '--en=1'), array('--en'), 'default', false, '1'), - array(array('app/console', 'foo:bar', '--env', 'val'), '--env', 'default', false, 'val'), - array(array('app/console', 'foo:bar', '--env', 'val', '--dummy'), '--env', 'default', false, 'val'), - array(array('app/console', 'foo:bar', '--', '--env=dev'), '--env', 'default', false, 'dev'), - array(array('app/console', 'foo:bar', '--', '--env=dev'), '--env', 'default', true, 'default'), - ); + return [ + [['app/console', 'foo:bar'], '-e', 'default', false, 'default'], + [['app/console', 'foo:bar', '-e', 'dev'], '-e', 'default', false, 'dev'], + [['app/console', 'foo:bar', '--env=dev'], '--env', 'default', false, 'dev'], + [['app/console', 'foo:bar', '-e', 'dev'], ['-e', '--env'], 'default', false, 'dev'], + [['app/console', 'foo:bar', '--env=dev'], ['-e', '--env'], 'default', false, 'dev'], + [['app/console', 'foo:bar', '--env=dev', '--en=1'], ['--en'], 'default', false, '1'], + [['app/console', 'foo:bar', '--env=dev', '', '--en=1'], ['--en'], 'default', false, '1'], + [['app/console', 'foo:bar', '--env', 'val'], '--env', 'default', false, 'val'], + [['app/console', 'foo:bar', '--env', 'val', '--dummy'], '--env', 'default', false, 'val'], + [['app/console', 'foo:bar', '--', '--env=dev'], '--env', 'default', false, 'dev'], + [['app/console', 'foo:bar', '--', '--env=dev'], '--env', 'default', true, 'default'], + ]; } public function testParseSingleDashAsArgument() { - $input = new ArgvInput(array('cli.php', '-')); - $input->bind(new InputDefinition(array(new InputArgument('file')))); - $this->assertEquals(array('file' => '-'), $input->getArguments(), '->parse() parses single dash as an argument'); + $input = new ArgvInput(['cli.php', '-']); + $input->bind(new InputDefinition([new InputArgument('file')])); + $this->assertEquals(['file' => '-'], $input->getArguments(), '->parse() parses single dash as an argument'); } public function testParseOptionWithValueOptionalGivenEmptyAndRequiredArgument() { - $input = new ArgvInput(array('cli.php', '--foo=', 'bar')); - $input->bind(new InputDefinition(array(new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL), new InputArgument('name', InputArgument::REQUIRED)))); - $this->assertEquals(array('foo' => null), $input->getOptions(), '->parse() parses optional options with empty value as null'); - $this->assertEquals(array('name' => 'bar'), $input->getArguments(), '->parse() parses required arguments'); + $input = new ArgvInput(['cli.php', '--foo=', 'bar']); + $input->bind(new InputDefinition([new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL), new InputArgument('name', InputArgument::REQUIRED)])); + $this->assertEquals(['foo' => null], $input->getOptions(), '->parse() parses optional options with empty value as null'); + $this->assertEquals(['name' => 'bar'], $input->getArguments(), '->parse() parses required arguments'); - $input = new ArgvInput(array('cli.php', '--foo=0', 'bar')); - $input->bind(new InputDefinition(array(new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL), new InputArgument('name', InputArgument::REQUIRED)))); - $this->assertEquals(array('foo' => '0'), $input->getOptions(), '->parse() parses optional options with empty value as null'); - $this->assertEquals(array('name' => 'bar'), $input->getArguments(), '->parse() parses required arguments'); + $input = new ArgvInput(['cli.php', '--foo=0', 'bar']); + $input->bind(new InputDefinition([new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL), new InputArgument('name', InputArgument::REQUIRED)])); + $this->assertEquals(['foo' => '0'], $input->getOptions(), '->parse() parses optional options with empty value as null'); + $this->assertEquals(['name' => 'bar'], $input->getArguments(), '->parse() parses required arguments'); } public function testParseOptionWithValueOptionalGivenEmptyAndOptionalArgument() { - $input = new ArgvInput(array('cli.php', '--foo=', 'bar')); - $input->bind(new InputDefinition(array(new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL), new InputArgument('name', InputArgument::OPTIONAL)))); - $this->assertEquals(array('foo' => null), $input->getOptions(), '->parse() parses optional options with empty value as null'); - $this->assertEquals(array('name' => 'bar'), $input->getArguments(), '->parse() parses optional arguments'); + $input = new ArgvInput(['cli.php', '--foo=', 'bar']); + $input->bind(new InputDefinition([new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL), new InputArgument('name', InputArgument::OPTIONAL)])); + $this->assertEquals(['foo' => null], $input->getOptions(), '->parse() parses optional options with empty value as null'); + $this->assertEquals(['name' => 'bar'], $input->getArguments(), '->parse() parses optional arguments'); - $input = new ArgvInput(array('cli.php', '--foo=0', 'bar')); - $input->bind(new InputDefinition(array(new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL), new InputArgument('name', InputArgument::OPTIONAL)))); - $this->assertEquals(array('foo' => '0'), $input->getOptions(), '->parse() parses optional options with empty value as null'); - $this->assertEquals(array('name' => 'bar'), $input->getArguments(), '->parse() parses optional arguments'); + $input = new ArgvInput(['cli.php', '--foo=0', 'bar']); + $input->bind(new InputDefinition([new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL), new InputArgument('name', InputArgument::OPTIONAL)])); + $this->assertEquals(['foo' => '0'], $input->getOptions(), '->parse() parses optional options with empty value as null'); + $this->assertEquals(['name' => 'bar'], $input->getArguments(), '->parse() parses optional arguments'); } } diff --git a/vendor/symfony/console/Tests/Input/ArrayInputTest.php b/vendor/symfony/console/Tests/Input/ArrayInputTest.php index 4bc83b3c..afe74831 100644 --- a/vendor/symfony/console/Tests/Input/ArrayInputTest.php +++ b/vendor/symfony/console/Tests/Input/ArrayInputTest.php @@ -21,47 +21,47 @@ class ArrayInputTest extends TestCase { public function testGetFirstArgument() { - $input = new ArrayInput(array()); + $input = new ArrayInput([]); $this->assertNull($input->getFirstArgument(), '->getFirstArgument() returns null if no argument were passed'); - $input = new ArrayInput(array('name' => 'Fabien')); + $input = new ArrayInput(['name' => 'Fabien']); $this->assertEquals('Fabien', $input->getFirstArgument(), '->getFirstArgument() returns the first passed argument'); - $input = new ArrayInput(array('--foo' => 'bar', 'name' => 'Fabien')); + $input = new ArrayInput(['--foo' => 'bar', 'name' => 'Fabien']); $this->assertEquals('Fabien', $input->getFirstArgument(), '->getFirstArgument() returns the first passed argument'); } public function testHasParameterOption() { - $input = new ArrayInput(array('name' => 'Fabien', '--foo' => 'bar')); + $input = new ArrayInput(['name' => 'Fabien', '--foo' => 'bar']); $this->assertTrue($input->hasParameterOption('--foo'), '->hasParameterOption() returns true if an option is present in the passed parameters'); $this->assertFalse($input->hasParameterOption('--bar'), '->hasParameterOption() returns false if an option is not present in the passed parameters'); - $input = new ArrayInput(array('--foo')); + $input = new ArrayInput(['--foo']); $this->assertTrue($input->hasParameterOption('--foo'), '->hasParameterOption() returns true if an option is present in the passed parameters'); - $input = new ArrayInput(array('--foo', '--', '--bar')); + $input = new ArrayInput(['--foo', '--', '--bar']); $this->assertTrue($input->hasParameterOption('--bar'), '->hasParameterOption() returns true if an option is present in the passed parameters'); $this->assertFalse($input->hasParameterOption('--bar', true), '->hasParameterOption() returns false if an option is present in the passed parameters after an end of options signal'); } public function testGetParameterOption() { - $input = new ArrayInput(array('name' => 'Fabien', '--foo' => 'bar')); + $input = new ArrayInput(['name' => 'Fabien', '--foo' => 'bar']); $this->assertEquals('bar', $input->getParameterOption('--foo'), '->getParameterOption() returns the option of specified name'); $this->assertEquals('default', $input->getParameterOption('--bar', 'default'), '->getParameterOption() returns the default value if an option is not present in the passed parameters'); - $input = new ArrayInput(array('Fabien', '--foo' => 'bar')); + $input = new ArrayInput(['Fabien', '--foo' => 'bar']); $this->assertEquals('bar', $input->getParameterOption('--foo'), '->getParameterOption() returns the option of specified name'); - $input = new ArrayInput(array('--foo', '--', '--bar' => 'woop')); + $input = new ArrayInput(['--foo', '--', '--bar' => 'woop']); $this->assertEquals('woop', $input->getParameterOption('--bar'), '->getParameterOption() returns the correct value if an option is present in the passed parameters'); $this->assertEquals('default', $input->getParameterOption('--bar', 'default', true), '->getParameterOption() returns the default value if an option is present in the passed parameters after an end of options signal'); } public function testParseArguments() { - $input = new ArrayInput(array('name' => 'foo'), new InputDefinition(array(new InputArgument('name')))); + $input = new ArrayInput(['name' => 'foo'], new InputDefinition([new InputArgument('name')])); - $this->assertEquals(array('name' => 'foo'), $input->getArguments(), '->parse() parses required arguments'); + $this->assertEquals(['name' => 'foo'], $input->getArguments(), '->parse() parses required arguments'); } /** @@ -76,50 +76,50 @@ class ArrayInputTest extends TestCase public function provideOptions() { - return array( - array( - array('--foo' => 'bar'), - array(new InputOption('foo')), - array('foo' => 'bar'), + return [ + [ + ['--foo' => 'bar'], + [new InputOption('foo')], + ['foo' => 'bar'], '->parse() parses long options', - ), - array( - array('--foo' => 'bar'), - array(new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL, '', 'default')), - array('foo' => 'bar'), + ], + [ + ['--foo' => 'bar'], + [new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL, '', 'default')], + ['foo' => 'bar'], '->parse() parses long options with a default value', - ), - array( - array(), - array(new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL, '', 'default')), - array('foo' => 'default'), + ], + [ + [], + [new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL, '', 'default')], + ['foo' => 'default'], '->parse() uses the default value for long options with value optional which are not passed', - ), - array( - array('--foo' => null), - array(new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL, '', 'default')), - array('foo' => null), + ], + [ + ['--foo' => null], + [new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL, '', 'default')], + ['foo' => null], '->parse() parses long options with a default value', - ), - array( - array('-f' => 'bar'), - array(new InputOption('foo', 'f')), - array('foo' => 'bar'), + ], + [ + ['-f' => 'bar'], + [new InputOption('foo', 'f')], + ['foo' => 'bar'], '->parse() parses short options', - ), - array( - array('--' => null, '-f' => 'bar'), - array(new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL, '', 'default')), - array('foo' => 'default'), + ], + [ + ['--' => null, '-f' => 'bar'], + [new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL, '', 'default')], + ['foo' => 'default'], '->parse() does not parse opts after an end of options signal', - ), - array( - array('--' => null), - array(), - array(), + ], + [ + ['--' => null], + [], + [], '->parse() does not choke on end of options signal', - ), - ); + ], + ]; } /** @@ -139,39 +139,39 @@ class ArrayInputTest extends TestCase public function provideInvalidInput() { - return array( - array( - array('foo' => 'foo'), - new InputDefinition(array(new InputArgument('name'))), + return [ + [ + ['foo' => 'foo'], + new InputDefinition([new InputArgument('name')]), 'The "foo" argument does not exist.', - ), - array( - array('--foo' => null), - new InputDefinition(array(new InputOption('foo', 'f', InputOption::VALUE_REQUIRED))), + ], + [ + ['--foo' => null], + new InputDefinition([new InputOption('foo', 'f', InputOption::VALUE_REQUIRED)]), 'The "--foo" option requires a value.', - ), - array( - array('--foo' => 'foo'), + ], + [ + ['--foo' => 'foo'], new InputDefinition(), 'The "--foo" option does not exist.', - ), - array( - array('-o' => 'foo'), + ], + [ + ['-o' => 'foo'], new InputDefinition(), 'The "-o" option does not exist.', - ), - ); + ], + ]; } public function testToString() { - $input = new ArrayInput(array('-f' => null, '-b' => 'bar', '--foo' => 'b a z', '--lala' => null, 'test' => 'Foo', 'test2' => "A\nB'C")); + $input = new ArrayInput(['-f' => null, '-b' => 'bar', '--foo' => 'b a z', '--lala' => null, 'test' => 'Foo', 'test2' => "A\nB'C"]); $this->assertEquals('-f -b=bar --foo='.escapeshellarg('b a z').' --lala Foo '.escapeshellarg("A\nB'C"), (string) $input); - $input = new ArrayInput(array('-b' => array('bval_1', 'bval_2'), '--f' => array('fval_1', 'fval_2'))); + $input = new ArrayInput(['-b' => ['bval_1', 'bval_2'], '--f' => ['fval_1', 'fval_2']]); $this->assertSame('-b=bval_1 -b=bval_2 --f=fval_1 --f=fval_2', (string) $input); - $input = new ArrayInput(array('array_arg' => array('val_1', 'val_2'))); + $input = new ArrayInput(['array_arg' => ['val_1', 'val_2']]); $this->assertSame('val_1 val_2', (string) $input); } } diff --git a/vendor/symfony/console/Tests/Input/InputArgumentTest.php b/vendor/symfony/console/Tests/Input/InputArgumentTest.php index 881300c2..8b809d6f 100644 --- a/vendor/symfony/console/Tests/Input/InputArgumentTest.php +++ b/vendor/symfony/console/Tests/Input/InputArgumentTest.php @@ -77,8 +77,8 @@ class InputArgumentTest extends TestCase $this->assertEquals('another', $argument->getDefault(), '->setDefault() changes the default value'); $argument = new InputArgument('foo', InputArgument::OPTIONAL | InputArgument::IS_ARRAY); - $argument->setDefault(array(1, 2)); - $this->assertEquals(array(1, 2), $argument->getDefault(), '->setDefault() changes the default value'); + $argument->setDefault([1, 2]); + $this->assertEquals([1, 2], $argument->getDefault(), '->setDefault() changes the default value'); } /** diff --git a/vendor/symfony/console/Tests/Input/InputDefinitionTest.php b/vendor/symfony/console/Tests/Input/InputDefinitionTest.php index 0fd43421..aca004d5 100644 --- a/vendor/symfony/console/Tests/Input/InputDefinitionTest.php +++ b/vendor/symfony/console/Tests/Input/InputDefinitionTest.php @@ -35,10 +35,10 @@ class InputDefinitionTest extends TestCase $this->initializeArguments(); $definition = new InputDefinition(); - $this->assertEquals(array(), $definition->getArguments(), '__construct() creates a new InputDefinition object'); + $this->assertEquals([], $definition->getArguments(), '__construct() creates a new InputDefinition object'); - $definition = new InputDefinition(array($this->foo, $this->bar)); - $this->assertEquals(array('foo' => $this->foo, 'bar' => $this->bar), $definition->getArguments(), '__construct() takes an array of InputArgument objects as its first argument'); + $definition = new InputDefinition([$this->foo, $this->bar]); + $this->assertEquals(['foo' => $this->foo, 'bar' => $this->bar], $definition->getArguments(), '__construct() takes an array of InputArgument objects as its first argument'); } public function testConstructorOptions() @@ -46,10 +46,10 @@ class InputDefinitionTest extends TestCase $this->initializeOptions(); $definition = new InputDefinition(); - $this->assertEquals(array(), $definition->getOptions(), '__construct() creates a new InputDefinition object'); + $this->assertEquals([], $definition->getOptions(), '__construct() creates a new InputDefinition object'); - $definition = new InputDefinition(array($this->foo, $this->bar)); - $this->assertEquals(array('foo' => $this->foo, 'bar' => $this->bar), $definition->getOptions(), '__construct() takes an array of InputOption objects as its first argument'); + $definition = new InputDefinition([$this->foo, $this->bar]); + $this->assertEquals(['foo' => $this->foo, 'bar' => $this->bar], $definition->getOptions(), '__construct() takes an array of InputOption objects as its first argument'); } public function testSetArguments() @@ -57,11 +57,11 @@ class InputDefinitionTest extends TestCase $this->initializeArguments(); $definition = new InputDefinition(); - $definition->setArguments(array($this->foo)); - $this->assertEquals(array('foo' => $this->foo), $definition->getArguments(), '->setArguments() sets the array of InputArgument objects'); - $definition->setArguments(array($this->bar)); + $definition->setArguments([$this->foo]); + $this->assertEquals(['foo' => $this->foo], $definition->getArguments(), '->setArguments() sets the array of InputArgument objects'); + $definition->setArguments([$this->bar]); - $this->assertEquals(array('bar' => $this->bar), $definition->getArguments(), '->setArguments() clears all InputArgument objects'); + $this->assertEquals(['bar' => $this->bar], $definition->getArguments(), '->setArguments() clears all InputArgument objects'); } public function testAddArguments() @@ -69,10 +69,10 @@ class InputDefinitionTest extends TestCase $this->initializeArguments(); $definition = new InputDefinition(); - $definition->addArguments(array($this->foo)); - $this->assertEquals(array('foo' => $this->foo), $definition->getArguments(), '->addArguments() adds an array of InputArgument objects'); - $definition->addArguments(array($this->bar)); - $this->assertEquals(array('foo' => $this->foo, 'bar' => $this->bar), $definition->getArguments(), '->addArguments() does not clear existing InputArgument objects'); + $definition->addArguments([$this->foo]); + $this->assertEquals(['foo' => $this->foo], $definition->getArguments(), '->addArguments() adds an array of InputArgument objects'); + $definition->addArguments([$this->bar]); + $this->assertEquals(['foo' => $this->foo, 'bar' => $this->bar], $definition->getArguments(), '->addArguments() does not clear existing InputArgument objects'); } public function testAddArgument() @@ -81,9 +81,9 @@ class InputDefinitionTest extends TestCase $definition = new InputDefinition(); $definition->addArgument($this->foo); - $this->assertEquals(array('foo' => $this->foo), $definition->getArguments(), '->addArgument() adds a InputArgument object'); + $this->assertEquals(['foo' => $this->foo], $definition->getArguments(), '->addArgument() adds a InputArgument object'); $definition->addArgument($this->bar); - $this->assertEquals(array('foo' => $this->foo, 'bar' => $this->bar), $definition->getArguments(), '->addArgument() adds a InputArgument object'); + $this->assertEquals(['foo' => $this->foo, 'bar' => $this->bar], $definition->getArguments(), '->addArgument() adds a InputArgument object'); } /** @@ -130,7 +130,7 @@ class InputDefinitionTest extends TestCase $this->initializeArguments(); $definition = new InputDefinition(); - $definition->addArguments(array($this->foo)); + $definition->addArguments([$this->foo]); $this->assertEquals($this->foo, $definition->getArgument('foo'), '->getArgument() returns a InputArgument by its name'); } @@ -143,7 +143,7 @@ class InputDefinitionTest extends TestCase $this->initializeArguments(); $definition = new InputDefinition(); - $definition->addArguments(array($this->foo)); + $definition->addArguments([$this->foo]); $definition->getArgument('bar'); } @@ -152,7 +152,7 @@ class InputDefinitionTest extends TestCase $this->initializeArguments(); $definition = new InputDefinition(); - $definition->addArguments(array($this->foo)); + $definition->addArguments([$this->foo]); $this->assertTrue($definition->hasArgument('foo'), '->hasArgument() returns true if a InputArgument exists for the given name'); $this->assertFalse($definition->hasArgument('bar'), '->hasArgument() returns false if a InputArgument exists for the given name'); @@ -182,28 +182,28 @@ class InputDefinitionTest extends TestCase public function testGetArgumentDefaults() { - $definition = new InputDefinition(array( + $definition = new InputDefinition([ new InputArgument('foo1', InputArgument::OPTIONAL), new InputArgument('foo2', InputArgument::OPTIONAL, '', 'default'), new InputArgument('foo3', InputArgument::OPTIONAL | InputArgument::IS_ARRAY), - // new InputArgument('foo4', InputArgument::OPTIONAL | InputArgument::IS_ARRAY, '', array(1, 2)), - )); - $this->assertEquals(array('foo1' => null, 'foo2' => 'default', 'foo3' => array()), $definition->getArgumentDefaults(), '->getArgumentDefaults() return the default values for each argument'); + // new InputArgument('foo4', InputArgument::OPTIONAL | InputArgument::IS_ARRAY, '', [1, 2]), + ]); + $this->assertEquals(['foo1' => null, 'foo2' => 'default', 'foo3' => []], $definition->getArgumentDefaults(), '->getArgumentDefaults() return the default values for each argument'); - $definition = new InputDefinition(array( - new InputArgument('foo4', InputArgument::OPTIONAL | InputArgument::IS_ARRAY, '', array(1, 2)), - )); - $this->assertEquals(array('foo4' => array(1, 2)), $definition->getArgumentDefaults(), '->getArgumentDefaults() return the default values for each argument'); + $definition = new InputDefinition([ + new InputArgument('foo4', InputArgument::OPTIONAL | InputArgument::IS_ARRAY, '', [1, 2]), + ]); + $this->assertEquals(['foo4' => [1, 2]], $definition->getArgumentDefaults(), '->getArgumentDefaults() return the default values for each argument'); } public function testSetOptions() { $this->initializeOptions(); - $definition = new InputDefinition(array($this->foo)); - $this->assertEquals(array('foo' => $this->foo), $definition->getOptions(), '->setOptions() sets the array of InputOption objects'); - $definition->setOptions(array($this->bar)); - $this->assertEquals(array('bar' => $this->bar), $definition->getOptions(), '->setOptions() clears all InputOption objects'); + $definition = new InputDefinition([$this->foo]); + $this->assertEquals(['foo' => $this->foo], $definition->getOptions(), '->setOptions() sets the array of InputOption objects'); + $definition->setOptions([$this->bar]); + $this->assertEquals(['bar' => $this->bar], $definition->getOptions(), '->setOptions() clears all InputOption objects'); } /** @@ -214,8 +214,8 @@ class InputDefinitionTest extends TestCase { $this->initializeOptions(); - $definition = new InputDefinition(array($this->foo)); - $definition->setOptions(array($this->bar)); + $definition = new InputDefinition([$this->foo]); + $definition->setOptions([$this->bar]); $definition->getOptionForShortcut('f'); } @@ -223,10 +223,10 @@ class InputDefinitionTest extends TestCase { $this->initializeOptions(); - $definition = new InputDefinition(array($this->foo)); - $this->assertEquals(array('foo' => $this->foo), $definition->getOptions(), '->addOptions() adds an array of InputOption objects'); - $definition->addOptions(array($this->bar)); - $this->assertEquals(array('foo' => $this->foo, 'bar' => $this->bar), $definition->getOptions(), '->addOptions() does not clear existing InputOption objects'); + $definition = new InputDefinition([$this->foo]); + $this->assertEquals(['foo' => $this->foo], $definition->getOptions(), '->addOptions() adds an array of InputOption objects'); + $definition->addOptions([$this->bar]); + $this->assertEquals(['foo' => $this->foo, 'bar' => $this->bar], $definition->getOptions(), '->addOptions() does not clear existing InputOption objects'); } public function testAddOption() @@ -235,9 +235,9 @@ class InputDefinitionTest extends TestCase $definition = new InputDefinition(); $definition->addOption($this->foo); - $this->assertEquals(array('foo' => $this->foo), $definition->getOptions(), '->addOption() adds a InputOption object'); + $this->assertEquals(['foo' => $this->foo], $definition->getOptions(), '->addOption() adds a InputOption object'); $definition->addOption($this->bar); - $this->assertEquals(array('foo' => $this->foo, 'bar' => $this->bar), $definition->getOptions(), '->addOption() adds a InputOption object'); + $this->assertEquals(['foo' => $this->foo, 'bar' => $this->bar], $definition->getOptions(), '->addOption() adds a InputOption object'); } /** @@ -270,7 +270,7 @@ class InputDefinitionTest extends TestCase { $this->initializeOptions(); - $definition = new InputDefinition(array($this->foo)); + $definition = new InputDefinition([$this->foo]); $this->assertEquals($this->foo, $definition->getOption('foo'), '->getOption() returns a InputOption by its name'); } @@ -282,7 +282,7 @@ class InputDefinitionTest extends TestCase { $this->initializeOptions(); - $definition = new InputDefinition(array($this->foo)); + $definition = new InputDefinition([$this->foo]); $definition->getOption('bar'); } @@ -290,7 +290,7 @@ class InputDefinitionTest extends TestCase { $this->initializeOptions(); - $definition = new InputDefinition(array($this->foo)); + $definition = new InputDefinition([$this->foo]); $this->assertTrue($definition->hasOption('foo'), '->hasOption() returns true if a InputOption exists for the given name'); $this->assertFalse($definition->hasOption('bar'), '->hasOption() returns false if a InputOption exists for the given name'); } @@ -299,7 +299,7 @@ class InputDefinitionTest extends TestCase { $this->initializeOptions(); - $definition = new InputDefinition(array($this->foo)); + $definition = new InputDefinition([$this->foo]); $this->assertTrue($definition->hasShortcut('f'), '->hasShortcut() returns true if a InputOption exists for the given shortcut'); $this->assertFalse($definition->hasShortcut('b'), '->hasShortcut() returns false if a InputOption exists for the given shortcut'); } @@ -308,7 +308,7 @@ class InputDefinitionTest extends TestCase { $this->initializeOptions(); - $definition = new InputDefinition(array($this->foo)); + $definition = new InputDefinition([$this->foo]); $this->assertEquals($this->foo, $definition->getOptionForShortcut('f'), '->getOptionForShortcut() returns a InputOption by its shortcut'); } @@ -316,7 +316,7 @@ class InputDefinitionTest extends TestCase { $this->initializeOptions(); - $definition = new InputDefinition(array($this->multi)); + $definition = new InputDefinition([$this->multi]); $this->assertEquals($this->multi, $definition->getOptionForShortcut('m'), '->getOptionForShortcut() returns a InputOption by its shortcut'); $this->assertEquals($this->multi, $definition->getOptionForShortcut('mmm'), '->getOptionForShortcut() returns a InputOption by its shortcut'); } @@ -329,30 +329,30 @@ class InputDefinitionTest extends TestCase { $this->initializeOptions(); - $definition = new InputDefinition(array($this->foo)); + $definition = new InputDefinition([$this->foo]); $definition->getOptionForShortcut('l'); } public function testGetOptionDefaults() { - $definition = new InputDefinition(array( + $definition = new InputDefinition([ new InputOption('foo1', null, InputOption::VALUE_NONE), new InputOption('foo2', null, InputOption::VALUE_REQUIRED), new InputOption('foo3', null, InputOption::VALUE_REQUIRED, '', 'default'), new InputOption('foo4', null, InputOption::VALUE_OPTIONAL), new InputOption('foo5', null, InputOption::VALUE_OPTIONAL, '', 'default'), new InputOption('foo6', null, InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY), - new InputOption('foo7', null, InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY, '', array(1, 2)), - )); - $defaults = array( + new InputOption('foo7', null, InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY, '', [1, 2]), + ]); + $defaults = [ 'foo1' => false, 'foo2' => null, 'foo3' => 'default', 'foo4' => null, 'foo5' => 'default', - 'foo6' => array(), - 'foo7' => array(1, 2), - ); + 'foo6' => [], + 'foo7' => [1, 2], + ]; $this->assertSame($defaults, $definition->getOptionDefaults(), '->getOptionDefaults() returns the default values for all options'); } @@ -366,25 +366,25 @@ class InputDefinitionTest extends TestCase public function getGetSynopsisData() { - return array( - array(new InputDefinition(array(new InputOption('foo'))), '[--foo]', 'puts optional options in square brackets'), - array(new InputDefinition(array(new InputOption('foo', 'f'))), '[-f|--foo]', 'separates shortcut with a pipe'), - array(new InputDefinition(array(new InputOption('foo', 'f', InputOption::VALUE_REQUIRED))), '[-f|--foo FOO]', 'uses shortcut as value placeholder'), - array(new InputDefinition(array(new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL))), '[-f|--foo [FOO]]', 'puts optional values in square brackets'), + return [ + [new InputDefinition([new InputOption('foo')]), '[--foo]', 'puts optional options in square brackets'], + [new InputDefinition([new InputOption('foo', 'f')]), '[-f|--foo]', 'separates shortcut with a pipe'], + [new InputDefinition([new InputOption('foo', 'f', InputOption::VALUE_REQUIRED)]), '[-f|--foo FOO]', 'uses shortcut as value placeholder'], + [new InputDefinition([new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL)]), '[-f|--foo [FOO]]', 'puts optional values in square brackets'], - array(new InputDefinition(array(new InputArgument('foo', InputArgument::REQUIRED))), '', 'puts arguments in angle brackets'), - array(new InputDefinition(array(new InputArgument('foo'))), '[]', 'puts optional arguments in square brackets'), - array(new InputDefinition(array(new InputArgument('foo'), new InputArgument('bar'))), '[ []]', 'chains optional arguments inside brackets'), - array(new InputDefinition(array(new InputArgument('foo', InputArgument::IS_ARRAY))), '[...]', 'uses an ellipsis for array arguments'), - array(new InputDefinition(array(new InputArgument('foo', InputArgument::REQUIRED | InputArgument::IS_ARRAY))), '...', 'uses an ellipsis for required array arguments'), + [new InputDefinition([new InputArgument('foo', InputArgument::REQUIRED)]), '', 'puts arguments in angle brackets'], + [new InputDefinition([new InputArgument('foo')]), '[]', 'puts optional arguments in square brackets'], + [new InputDefinition([new InputArgument('foo'), new InputArgument('bar')]), '[ []]', 'chains optional arguments inside brackets'], + [new InputDefinition([new InputArgument('foo', InputArgument::IS_ARRAY)]), '[...]', 'uses an ellipsis for array arguments'], + [new InputDefinition([new InputArgument('foo', InputArgument::REQUIRED | InputArgument::IS_ARRAY)]), '...', 'uses an ellipsis for required array arguments'], - array(new InputDefinition(array(new InputOption('foo'), new InputArgument('foo', InputArgument::REQUIRED))), '[--foo] [--] ', 'puts [--] between options and arguments'), - ); + [new InputDefinition([new InputOption('foo'), new InputArgument('foo', InputArgument::REQUIRED)]), '[--foo] [--] ', 'puts [--] between options and arguments'], + ]; } public function testGetShortSynopsis() { - $definition = new InputDefinition(array(new InputOption('foo'), new InputOption('bar'), new InputArgument('cat'))); + $definition = new InputDefinition([new InputOption('foo'), new InputOption('bar'), new InputArgument('cat')]); $this->assertEquals('[options] [--] []', $definition->getSynopsis(true), '->getSynopsis(true) groups options in [options]'); } diff --git a/vendor/symfony/console/Tests/Input/InputOptionTest.php b/vendor/symfony/console/Tests/Input/InputOptionTest.php index 66a6dd5a..ad1c043e 100644 --- a/vendor/symfony/console/Tests/Input/InputOptionTest.php +++ b/vendor/symfony/console/Tests/Input/InputOptionTest.php @@ -39,7 +39,7 @@ class InputOptionTest extends TestCase $this->assertEquals('f', $option->getShortcut(), '__construct() can take a shortcut as its second argument'); $option = new InputOption('foo', '-f|-ff|fff'); $this->assertEquals('f|ff|fff', $option->getShortcut(), '__construct() removes the leading - of the shortcuts'); - $option = new InputOption('foo', array('f', 'ff', '-fff')); + $option = new InputOption('foo', ['f', 'ff', '-fff']); $this->assertEquals('f|ff|fff', $option->getShortcut(), '__construct() removes the leading - of the shortcuts'); $option = new InputOption('foo'); $this->assertNull($option->getShortcut(), '__construct() makes the shortcut null by default'); @@ -132,7 +132,7 @@ class InputOptionTest extends TestCase $this->assertNull($option->getDefault(), '->getDefault() returns null if no default value is configured'); $option = new InputOption('foo', null, InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY); - $this->assertEquals(array(), $option->getDefault(), '->getDefault() returns an empty array if option is an array'); + $this->assertEquals([], $option->getDefault(), '->getDefault() returns an empty array if option is an array'); $option = new InputOption('foo', null, InputOption::VALUE_NONE); $this->assertFalse($option->getDefault(), '->getDefault() returns false if the option does not take a value'); @@ -147,8 +147,8 @@ class InputOptionTest extends TestCase $this->assertEquals('another', $option->getDefault(), '->setDefault() changes the default value'); $option = new InputOption('foo', null, InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY); - $option->setDefault(array(1, 2)); - $this->assertEquals(array(1, 2), $option->getDefault(), '->setDefault() changes the default value'); + $option->setDefault([1, 2]); + $this->assertEquals([1, 2], $option->getDefault(), '->setDefault() changes the default value'); } /** diff --git a/vendor/symfony/console/Tests/Input/InputTest.php b/vendor/symfony/console/Tests/Input/InputTest.php index 7cf1d244..61608bf2 100644 --- a/vendor/symfony/console/Tests/Input/InputTest.php +++ b/vendor/symfony/console/Tests/Input/InputTest.php @@ -21,30 +21,30 @@ class InputTest extends TestCase { public function testConstructor() { - $input = new ArrayInput(array('name' => 'foo'), new InputDefinition(array(new InputArgument('name')))); + $input = new ArrayInput(['name' => 'foo'], new InputDefinition([new InputArgument('name')])); $this->assertEquals('foo', $input->getArgument('name'), '->__construct() takes a InputDefinition as an argument'); } public function testOptions() { - $input = new ArrayInput(array('--name' => 'foo'), new InputDefinition(array(new InputOption('name')))); + $input = new ArrayInput(['--name' => 'foo'], new InputDefinition([new InputOption('name')])); $this->assertEquals('foo', $input->getOption('name'), '->getOption() returns the value for the given option'); $input->setOption('name', 'bar'); $this->assertEquals('bar', $input->getOption('name'), '->setOption() sets the value for a given option'); - $this->assertEquals(array('name' => 'bar'), $input->getOptions(), '->getOptions() returns all option values'); + $this->assertEquals(['name' => 'bar'], $input->getOptions(), '->getOptions() returns all option values'); - $input = new ArrayInput(array('--name' => 'foo'), new InputDefinition(array(new InputOption('name'), new InputOption('bar', '', InputOption::VALUE_OPTIONAL, '', 'default')))); + $input = new ArrayInput(['--name' => 'foo'], new InputDefinition([new InputOption('name'), new InputOption('bar', '', InputOption::VALUE_OPTIONAL, '', 'default')])); $this->assertEquals('default', $input->getOption('bar'), '->getOption() returns the default value for optional options'); - $this->assertEquals(array('name' => 'foo', 'bar' => 'default'), $input->getOptions(), '->getOptions() returns all option values, even optional ones'); + $this->assertEquals(['name' => 'foo', 'bar' => 'default'], $input->getOptions(), '->getOptions() returns all option values, even optional ones'); - $input = new ArrayInput(array('--name' => 'foo', '--bar' => ''), new InputDefinition(array(new InputOption('name'), new InputOption('bar', '', InputOption::VALUE_OPTIONAL, '', 'default')))); + $input = new ArrayInput(['--name' => 'foo', '--bar' => ''], new InputDefinition([new InputOption('name'), new InputOption('bar', '', InputOption::VALUE_OPTIONAL, '', 'default')])); $this->assertEquals('', $input->getOption('bar'), '->getOption() returns null for options explicitly passed without value (or an empty value)'); - $this->assertEquals(array('name' => 'foo', 'bar' => ''), $input->getOptions(), '->getOptions() returns all option values.'); + $this->assertEquals(['name' => 'foo', 'bar' => ''], $input->getOptions(), '->getOptions() returns all option values.'); - $input = new ArrayInput(array('--name' => 'foo', '--bar' => null), new InputDefinition(array(new InputOption('name'), new InputOption('bar', '', InputOption::VALUE_OPTIONAL, '', 'default')))); + $input = new ArrayInput(['--name' => 'foo', '--bar' => null], new InputDefinition([new InputOption('name'), new InputOption('bar', '', InputOption::VALUE_OPTIONAL, '', 'default')])); $this->assertNull($input->getOption('bar'), '->getOption() returns null for options explicitly passed without value (or an empty value)'); - $this->assertEquals(array('name' => 'foo', 'bar' => null), $input->getOptions(), '->getOptions() returns all option values'); + $this->assertEquals(['name' => 'foo', 'bar' => null], $input->getOptions(), '->getOptions() returns all option values'); } /** @@ -53,7 +53,7 @@ class InputTest extends TestCase */ public function testSetInvalidOption() { - $input = new ArrayInput(array('--name' => 'foo'), new InputDefinition(array(new InputOption('name'), new InputOption('bar', '', InputOption::VALUE_OPTIONAL, '', 'default')))); + $input = new ArrayInput(['--name' => 'foo'], new InputDefinition([new InputOption('name'), new InputOption('bar', '', InputOption::VALUE_OPTIONAL, '', 'default')])); $input->setOption('foo', 'bar'); } @@ -63,22 +63,22 @@ class InputTest extends TestCase */ public function testGetInvalidOption() { - $input = new ArrayInput(array('--name' => 'foo'), new InputDefinition(array(new InputOption('name'), new InputOption('bar', '', InputOption::VALUE_OPTIONAL, '', 'default')))); + $input = new ArrayInput(['--name' => 'foo'], new InputDefinition([new InputOption('name'), new InputOption('bar', '', InputOption::VALUE_OPTIONAL, '', 'default')])); $input->getOption('foo'); } public function testArguments() { - $input = new ArrayInput(array('name' => 'foo'), new InputDefinition(array(new InputArgument('name')))); + $input = new ArrayInput(['name' => 'foo'], new InputDefinition([new InputArgument('name')])); $this->assertEquals('foo', $input->getArgument('name'), '->getArgument() returns the value for the given argument'); $input->setArgument('name', 'bar'); $this->assertEquals('bar', $input->getArgument('name'), '->setArgument() sets the value for a given argument'); - $this->assertEquals(array('name' => 'bar'), $input->getArguments(), '->getArguments() returns all argument values'); + $this->assertEquals(['name' => 'bar'], $input->getArguments(), '->getArguments() returns all argument values'); - $input = new ArrayInput(array('name' => 'foo'), new InputDefinition(array(new InputArgument('name'), new InputArgument('bar', InputArgument::OPTIONAL, '', 'default')))); + $input = new ArrayInput(['name' => 'foo'], new InputDefinition([new InputArgument('name'), new InputArgument('bar', InputArgument::OPTIONAL, '', 'default')])); $this->assertEquals('default', $input->getArgument('bar'), '->getArgument() returns the default value for optional arguments'); - $this->assertEquals(array('name' => 'foo', 'bar' => 'default'), $input->getArguments(), '->getArguments() returns all argument values, even optional ones'); + $this->assertEquals(['name' => 'foo', 'bar' => 'default'], $input->getArguments(), '->getArguments() returns all argument values, even optional ones'); } /** @@ -87,7 +87,7 @@ class InputTest extends TestCase */ public function testSetInvalidArgument() { - $input = new ArrayInput(array('name' => 'foo'), new InputDefinition(array(new InputArgument('name'), new InputArgument('bar', InputArgument::OPTIONAL, '', 'default')))); + $input = new ArrayInput(['name' => 'foo'], new InputDefinition([new InputArgument('name'), new InputArgument('bar', InputArgument::OPTIONAL, '', 'default')])); $input->setArgument('foo', 'bar'); } @@ -97,7 +97,7 @@ class InputTest extends TestCase */ public function testGetInvalidArgument() { - $input = new ArrayInput(array('name' => 'foo'), new InputDefinition(array(new InputArgument('name'), new InputArgument('bar', InputArgument::OPTIONAL, '', 'default')))); + $input = new ArrayInput(['name' => 'foo'], new InputDefinition([new InputArgument('name'), new InputArgument('bar', InputArgument::OPTIONAL, '', 'default')])); $input->getArgument('foo'); } @@ -107,8 +107,8 @@ class InputTest extends TestCase */ public function testValidateWithMissingArguments() { - $input = new ArrayInput(array()); - $input->bind(new InputDefinition(array(new InputArgument('name', InputArgument::REQUIRED)))); + $input = new ArrayInput([]); + $input->bind(new InputDefinition([new InputArgument('name', InputArgument::REQUIRED)])); $input->validate(); } @@ -118,22 +118,22 @@ class InputTest extends TestCase */ public function testValidateWithMissingRequiredArguments() { - $input = new ArrayInput(array('bar' => 'baz')); - $input->bind(new InputDefinition(array(new InputArgument('name', InputArgument::REQUIRED), new InputArgument('bar', InputArgument::OPTIONAL)))); + $input = new ArrayInput(['bar' => 'baz']); + $input->bind(new InputDefinition([new InputArgument('name', InputArgument::REQUIRED), new InputArgument('bar', InputArgument::OPTIONAL)])); $input->validate(); } public function testValidate() { - $input = new ArrayInput(array('name' => 'foo')); - $input->bind(new InputDefinition(array(new InputArgument('name', InputArgument::REQUIRED)))); + $input = new ArrayInput(['name' => 'foo']); + $input->bind(new InputDefinition([new InputArgument('name', InputArgument::REQUIRED)])); $this->assertNull($input->validate()); } public function testSetGetInteractive() { - $input = new ArrayInput(array()); + $input = new ArrayInput([]); $this->assertTrue($input->isInteractive(), '->isInteractive() returns whether the input should be interactive or not'); $input->setInteractive(false); $this->assertFalse($input->isInteractive(), '->setInteractive() changes the interactive flag'); @@ -141,7 +141,7 @@ class InputTest extends TestCase public function testSetGetStream() { - $input = new ArrayInput(array()); + $input = new ArrayInput([]); $stream = fopen('php://memory', 'r+', false); $input->setStream($stream); $this->assertSame($stream, $input->getStream()); diff --git a/vendor/symfony/console/Tests/Input/StringInputTest.php b/vendor/symfony/console/Tests/Input/StringInputTest.php index f2e3467e..7f218945 100644 --- a/vendor/symfony/console/Tests/Input/StringInputTest.php +++ b/vendor/symfony/console/Tests/Input/StringInputTest.php @@ -33,7 +33,7 @@ class StringInputTest extends TestCase public function testInputOptionWithGivenString() { $definition = new InputDefinition( - array(new InputOption('foo', null, InputOption::VALUE_REQUIRED)) + [new InputOption('foo', null, InputOption::VALUE_REQUIRED)] ); // call to bind @@ -44,33 +44,33 @@ class StringInputTest extends TestCase public function getTokenizeData() { - return array( - array('', array(), '->tokenize() parses an empty string'), - array('foo', array('foo'), '->tokenize() parses arguments'), - array(' foo bar ', array('foo', 'bar'), '->tokenize() ignores whitespaces between arguments'), - array('"quoted"', array('quoted'), '->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('\"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'), - array('-azc', array('-azc'), '->tokenize() parses aggregated short options'), - array('-awithavalue', array('-awithavalue'), '->tokenize() parses short options with a value'), - array('-a"foo bar"', array('-afoo bar'), '->tokenize() parses short options with a value'), - array('-a"foo bar""foo bar"', array('-afoo barfoo bar'), '->tokenize() parses short options with a value'), - array('-a\'foo bar\'', array('-afoo bar'), '->tokenize() parses short options with a value'), - array('-a\'foo bar\'\'foo bar\'', array('-afoo barfoo bar'), '->tokenize() parses short options with a value'), - array('-a\'foo bar\'"foo bar"', array('-afoo barfoo bar'), '->tokenize() parses short options with a value'), - array('--long-option', array('--long-option'), '->tokenize() parses long options'), - array('--long-option=foo', array('--long-option=foo'), '->tokenize() parses long options with a value'), - array('--long-option="foo bar"', array('--long-option=foo bar'), '->tokenize() parses long options with a value'), - array('--long-option="foo bar""another"', array('--long-option=foo baranother'), '->tokenize() parses long options with a value'), - array('--long-option=\'foo bar\'', array('--long-option=foo bar'), '->tokenize() parses long options with a value'), - array("--long-option='foo bar''another'", array('--long-option=foo baranother'), '->tokenize() parses long options with a value'), - array("--long-option='foo bar'\"another\"", array('--long-option=foo baranother'), '->tokenize() parses long options with a value'), - array('foo -a -ffoo --long bar', array('foo', '-a', '-ffoo', '--long', 'bar'), '->tokenize() parses when several arguments and options'), - ); + return [ + ['', [], '->tokenize() parses an empty string'], + ['foo', ['foo'], '->tokenize() parses arguments'], + [' foo bar ', ['foo', 'bar'], '->tokenize() ignores whitespaces between arguments'], + ['"quoted"', ['quoted'], '->tokenize() parses quoted arguments'], + ["'quoted'", ['quoted'], '->tokenize() parses quoted arguments'], + ["'a\rb\nc\td'", ["a\rb\nc\td"], '->tokenize() parses whitespace chars in strings'], + ["'a'\r'b'\n'c'\t'd'", ['a', 'b', 'c', 'd'], '->tokenize() parses whitespace chars between args as spaces'], + ['\"quoted\"', ['"quoted"'], '->tokenize() parses escaped-quoted arguments'], + ["\'quoted\'", ['\'quoted\''], '->tokenize() parses escaped-quoted arguments'], + ['-a', ['-a'], '->tokenize() parses short options'], + ['-azc', ['-azc'], '->tokenize() parses aggregated short options'], + ['-awithavalue', ['-awithavalue'], '->tokenize() parses short options with a value'], + ['-a"foo bar"', ['-afoo bar'], '->tokenize() parses short options with a value'], + ['-a"foo bar""foo bar"', ['-afoo barfoo bar'], '->tokenize() parses short options with a value'], + ['-a\'foo bar\'', ['-afoo bar'], '->tokenize() parses short options with a value'], + ['-a\'foo bar\'\'foo bar\'', ['-afoo barfoo bar'], '->tokenize() parses short options with a value'], + ['-a\'foo bar\'"foo bar"', ['-afoo barfoo bar'], '->tokenize() parses short options with a value'], + ['--long-option', ['--long-option'], '->tokenize() parses long options'], + ['--long-option=foo', ['--long-option=foo'], '->tokenize() parses long options with a value'], + ['--long-option="foo bar"', ['--long-option=foo bar'], '->tokenize() parses long options with a value'], + ['--long-option="foo bar""another"', ['--long-option=foo baranother'], '->tokenize() parses long options with a value'], + ['--long-option=\'foo bar\'', ['--long-option=foo bar'], '->tokenize() parses long options with a value'], + ["--long-option='foo bar''another'", ['--long-option=foo baranother'], '->tokenize() parses long options with a value'], + ["--long-option='foo bar'\"another\"", ['--long-option=foo baranother'], '->tokenize() parses long options with a value'], + ['foo -a -ffoo --long bar', ['foo', '-a', '-ffoo', '--long', 'bar'], '->tokenize() parses when several arguments and options'], + ]; } public function testToString() diff --git a/vendor/symfony/console/Tests/Logger/ConsoleLoggerTest.php b/vendor/symfony/console/Tests/Logger/ConsoleLoggerTest.php index 95e78fc2..c99eb839 100644 --- a/vendor/symfony/console/Tests/Logger/ConsoleLoggerTest.php +++ b/vendor/symfony/console/Tests/Logger/ConsoleLoggerTest.php @@ -39,7 +39,7 @@ class ConsoleLoggerTest extends TestCase { $this->output = new DummyOutput(OutputInterface::VERBOSITY_VERBOSE); - return new ConsoleLogger($this->output, array( + return new ConsoleLogger($this->output, [ LogLevel::EMERGENCY => OutputInterface::VERBOSITY_NORMAL, LogLevel::ALERT => OutputInterface::VERBOSITY_NORMAL, LogLevel::CRITICAL => OutputInterface::VERBOSITY_NORMAL, @@ -48,7 +48,7 @@ class ConsoleLoggerTest extends TestCase LogLevel::NOTICE => OutputInterface::VERBOSITY_NORMAL, LogLevel::INFO => OutputInterface::VERBOSITY_NORMAL, LogLevel::DEBUG => OutputInterface::VERBOSITY_NORMAL, - )); + ]); } /** @@ -64,7 +64,7 @@ class ConsoleLoggerTest extends TestCase /** * @dataProvider provideOutputMappingParams */ - public function testOutputMapping($logLevel, $outputVerbosity, $isOutput, $addVerbosityLevelMap = array()) + public function testOutputMapping($logLevel, $outputVerbosity, $isOutput, $addVerbosityLevelMap = []) { $out = new BufferedOutput($outputVerbosity); $logger = new ConsoleLogger($out, $addVerbosityLevelMap); @@ -75,22 +75,22 @@ class ConsoleLoggerTest extends TestCase public function provideOutputMappingParams() { - $quietMap = array(LogLevel::EMERGENCY => OutputInterface::VERBOSITY_QUIET); + $quietMap = [LogLevel::EMERGENCY => OutputInterface::VERBOSITY_QUIET]; - return array( - array(LogLevel::EMERGENCY, OutputInterface::VERBOSITY_NORMAL, true), - array(LogLevel::WARNING, OutputInterface::VERBOSITY_NORMAL, true), - array(LogLevel::INFO, OutputInterface::VERBOSITY_NORMAL, false), - array(LogLevel::DEBUG, OutputInterface::VERBOSITY_NORMAL, false), - array(LogLevel::INFO, OutputInterface::VERBOSITY_VERBOSE, false), - array(LogLevel::INFO, OutputInterface::VERBOSITY_VERY_VERBOSE, true), - array(LogLevel::DEBUG, OutputInterface::VERBOSITY_VERY_VERBOSE, false), - array(LogLevel::DEBUG, OutputInterface::VERBOSITY_DEBUG, true), - array(LogLevel::ALERT, OutputInterface::VERBOSITY_QUIET, false), - array(LogLevel::EMERGENCY, OutputInterface::VERBOSITY_QUIET, false), - array(LogLevel::ALERT, OutputInterface::VERBOSITY_QUIET, false, $quietMap), - array(LogLevel::EMERGENCY, OutputInterface::VERBOSITY_QUIET, true, $quietMap), - ); + return [ + [LogLevel::EMERGENCY, OutputInterface::VERBOSITY_NORMAL, true], + [LogLevel::WARNING, OutputInterface::VERBOSITY_NORMAL, true], + [LogLevel::INFO, OutputInterface::VERBOSITY_NORMAL, false], + [LogLevel::DEBUG, OutputInterface::VERBOSITY_NORMAL, false], + [LogLevel::INFO, OutputInterface::VERBOSITY_VERBOSE, false], + [LogLevel::INFO, OutputInterface::VERBOSITY_VERY_VERBOSE, true], + [LogLevel::DEBUG, OutputInterface::VERBOSITY_VERY_VERBOSE, false], + [LogLevel::DEBUG, OutputInterface::VERBOSITY_DEBUG, true], + [LogLevel::ALERT, OutputInterface::VERBOSITY_QUIET, false], + [LogLevel::EMERGENCY, OutputInterface::VERBOSITY_QUIET, false], + [LogLevel::ALERT, OutputInterface::VERBOSITY_QUIET, false, $quietMap], + [LogLevel::EMERGENCY, OutputInterface::VERBOSITY_QUIET, true, $quietMap], + ]; } public function testHasErrored() @@ -117,28 +117,28 @@ class ConsoleLoggerTest extends TestCase public function testLogsAtAllLevels($level, $message) { $logger = $this->getLogger(); - $logger->{$level}($message, array('user' => 'Bob')); - $logger->log($level, $message, array('user' => 'Bob')); + $logger->{$level}($message, ['user' => 'Bob']); + $logger->log($level, $message, ['user' => 'Bob']); - $expected = array( + $expected = [ $level.' message of level '.$level.' with context: Bob', $level.' message of level '.$level.' with context: Bob', - ); + ]; $this->assertEquals($expected, $this->getLogs()); } public function provideLevelsAndMessages() { - return array( - LogLevel::EMERGENCY => array(LogLevel::EMERGENCY, 'message of level emergency with context: {user}'), - LogLevel::ALERT => array(LogLevel::ALERT, 'message of level alert with context: {user}'), - LogLevel::CRITICAL => array(LogLevel::CRITICAL, 'message of level critical with context: {user}'), - LogLevel::ERROR => array(LogLevel::ERROR, 'message of level error with context: {user}'), - LogLevel::WARNING => array(LogLevel::WARNING, 'message of level warning with context: {user}'), - LogLevel::NOTICE => array(LogLevel::NOTICE, 'message of level notice with context: {user}'), - LogLevel::INFO => array(LogLevel::INFO, 'message of level info with context: {user}'), - LogLevel::DEBUG => array(LogLevel::DEBUG, 'message of level debug with context: {user}'), - ); + return [ + LogLevel::EMERGENCY => [LogLevel::EMERGENCY, 'message of level emergency with context: {user}'], + LogLevel::ALERT => [LogLevel::ALERT, 'message of level alert with context: {user}'], + LogLevel::CRITICAL => [LogLevel::CRITICAL, 'message of level critical with context: {user}'], + LogLevel::ERROR => [LogLevel::ERROR, 'message of level error with context: {user}'], + LogLevel::WARNING => [LogLevel::WARNING, 'message of level warning with context: {user}'], + LogLevel::NOTICE => [LogLevel::NOTICE, 'message of level notice with context: {user}'], + LogLevel::INFO => [LogLevel::INFO, 'message of level info with context: {user}'], + LogLevel::DEBUG => [LogLevel::DEBUG, 'message of level debug with context: {user}'], + ]; } /** @@ -153,56 +153,56 @@ class ConsoleLoggerTest extends TestCase public function testContextReplacement() { $logger = $this->getLogger(); - $logger->info('{Message {nothing} {user} {foo.bar} a}', array('user' => 'Bob', 'foo.bar' => 'Bar')); + $logger->info('{Message {nothing} {user} {foo.bar} a}', ['user' => 'Bob', 'foo.bar' => 'Bar']); - $expected = array('info {Message {nothing} Bob Bar a}'); + $expected = ['info {Message {nothing} Bob Bar a}']; $this->assertEquals($expected, $this->getLogs()); } public function testObjectCastToString() { if (method_exists($this, 'createPartialMock')) { - $dummy = $this->createPartialMock('Symfony\Component\Console\Tests\Logger\DummyTest', array('__toString')); + $dummy = $this->createPartialMock('Symfony\Component\Console\Tests\Logger\DummyTest', ['__toString']); } else { - $dummy = $this->getMock('Symfony\Component\Console\Tests\Logger\DummyTest', array('__toString')); + $dummy = $this->getMock('Symfony\Component\Console\Tests\Logger\DummyTest', ['__toString']); } - $dummy->method('__toString')->will($this->returnValue('DUMMY')); + $dummy->method('__toString')->willReturn('DUMMY'); $this->getLogger()->warning($dummy); - $expected = array('warning DUMMY'); + $expected = ['warning DUMMY']; $this->assertEquals($expected, $this->getLogs()); } public function testContextCanContainAnything() { - $context = array( + $context = [ 'bool' => true, 'null' => null, 'string' => 'Foo', 'int' => 0, 'float' => 0.5, - 'nested' => array('with object' => new DummyTest()), + 'nested' => ['with object' => new DummyTest()], 'object' => new \DateTime(), 'resource' => fopen('php://memory', 'r'), - ); + ]; $this->getLogger()->warning('Crazy context data', $context); - $expected = array('warning Crazy context data'); + $expected = ['warning Crazy context data']; $this->assertEquals($expected, $this->getLogs()); } public function testContextExceptionKeyCanBeExceptionOrOtherValues() { $logger = $this->getLogger(); - $logger->warning('Random message', array('exception' => 'oops')); - $logger->critical('Uncaught Exception!', array('exception' => new \LogicException('Fail'))); + $logger->warning('Random message', ['exception' => 'oops']); + $logger->critical('Uncaught Exception!', ['exception' => new \LogicException('Fail')]); - $expected = array( + $expected = [ 'warning Random message', 'critical Uncaught Exception!', - ); + ]; $this->assertEquals($expected, $this->getLogs()); } } diff --git a/vendor/symfony/console/Tests/Output/ConsoleSectionOutputTest.php b/vendor/symfony/console/Tests/Output/ConsoleSectionOutputTest.php index e5cd0597..4c292c2c 100644 --- a/vendor/symfony/console/Tests/Output/ConsoleSectionOutputTest.php +++ b/vendor/symfony/console/Tests/Output/ConsoleSectionOutputTest.php @@ -36,7 +36,7 @@ class ConsoleSectionOutputTest extends TestCase public function testClearAll() { - $sections = array(); + $sections = []; $output = new ConsoleSectionOutput($this->stream, $sections, OutputInterface::VERBOSITY_NORMAL, true, new OutputFormatter()); $output->writeln('Foo'.PHP_EOL.'Bar'); @@ -48,7 +48,7 @@ class ConsoleSectionOutputTest extends TestCase public function testClearNumberOfLines() { - $sections = array(); + $sections = []; $output = new ConsoleSectionOutput($this->stream, $sections, OutputInterface::VERBOSITY_NORMAL, true, new OutputFormatter()); $output->writeln("Foo\nBar\nBaz\nFooBar"); @@ -61,7 +61,7 @@ class ConsoleSectionOutputTest extends TestCase public function testClearNumberOfLinesWithMultipleSections() { $output = new StreamOutput($this->stream); - $sections = array(); + $sections = []; $output1 = new ConsoleSectionOutput($output->getStream(), $sections, OutputInterface::VERBOSITY_NORMAL, true, new OutputFormatter()); $output2 = new ConsoleSectionOutput($output->getStream(), $sections, OutputInterface::VERBOSITY_NORMAL, true, new OutputFormatter()); @@ -78,7 +78,7 @@ class ConsoleSectionOutputTest extends TestCase public function testClearPreservingEmptyLines() { $output = new StreamOutput($this->stream); - $sections = array(); + $sections = []; $output1 = new ConsoleSectionOutput($output->getStream(), $sections, OutputInterface::VERBOSITY_NORMAL, true, new OutputFormatter()); $output2 = new ConsoleSectionOutput($output->getStream(), $sections, OutputInterface::VERBOSITY_NORMAL, true, new OutputFormatter()); @@ -93,7 +93,7 @@ class ConsoleSectionOutputTest extends TestCase public function testOverwrite() { - $sections = array(); + $sections = []; $output = new ConsoleSectionOutput($this->stream, $sections, OutputInterface::VERBOSITY_NORMAL, true, new OutputFormatter()); $output->writeln('Foo'); @@ -105,7 +105,7 @@ class ConsoleSectionOutputTest extends TestCase public function testOverwriteMultipleLines() { - $sections = array(); + $sections = []; $output = new ConsoleSectionOutput($this->stream, $sections, OutputInterface::VERBOSITY_NORMAL, true, new OutputFormatter()); $output->writeln('Foo'.PHP_EOL.'Bar'.PHP_EOL.'Baz'); @@ -117,7 +117,7 @@ class ConsoleSectionOutputTest extends TestCase public function testAddingMultipleSections() { - $sections = array(); + $sections = []; $output1 = new ConsoleSectionOutput($this->stream, $sections, OutputInterface::VERBOSITY_NORMAL, true, new OutputFormatter()); $output2 = new ConsoleSectionOutput($this->stream, $sections, OutputInterface::VERBOSITY_NORMAL, true, new OutputFormatter()); @@ -127,7 +127,7 @@ class ConsoleSectionOutputTest extends TestCase public function testMultipleSectionsOutput() { $output = new StreamOutput($this->stream); - $sections = array(); + $sections = []; $output1 = new ConsoleSectionOutput($output->getStream(), $sections, OutputInterface::VERBOSITY_NORMAL, true, new OutputFormatter()); $output2 = new ConsoleSectionOutput($output->getStream(), $sections, OutputInterface::VERBOSITY_NORMAL, true, new OutputFormatter()); @@ -151,7 +151,7 @@ class ConsoleSectionOutputTest extends TestCase $input->expects($this->once())->method('isInteractive')->willReturn(true); $input->expects($this->once())->method('getStream')->willReturn($inputStream); - $sections = array(); + $sections = []; $output = new ConsoleSectionOutput($this->stream, $sections, OutputInterface::VERBOSITY_NORMAL, true, new OutputFormatter()); (new QuestionHelper())->ask($input, $output, new Question('What\'s your favorite super hero?')); diff --git a/vendor/symfony/console/Tests/Output/OutputTest.php b/vendor/symfony/console/Tests/Output/OutputTest.php index 24347f62..7cfa6cdc 100644 --- a/vendor/symfony/console/Tests/Output/OutputTest.php +++ b/vendor/symfony/console/Tests/Output/OutputTest.php @@ -77,7 +77,7 @@ class OutputTest extends TestCase public function testWriteAnArrayOfMessages() { $output = new TestOutput(); - $output->writeln(array('foo', 'bar')); + $output->writeln(['foo', 'bar']); $this->assertEquals("foo\nbar\n", $output->output, '->writeln() can take an array of messages to output'); } @@ -106,10 +106,10 @@ class OutputTest extends TestCase public function provideWriteArguments() { - return array( - array('foo', Output::OUTPUT_RAW, "foo\n"), - array('foo', Output::OUTPUT_PLAIN, "foo\n"), - ); + return [ + ['foo', Output::OUTPUT_RAW, "foo\n"], + ['foo', Output::OUTPUT_PLAIN, "foo\n"], + ]; } public function testWriteWithDecorationTurnedOff() @@ -122,7 +122,7 @@ class OutputTest extends TestCase public function testWriteDecoratedMessage() { - $fooStyle = new OutputFormatterStyle('yellow', 'red', array('blink')); + $fooStyle = new OutputFormatterStyle('yellow', 'red', ['blink']); $output = new TestOutput(); $output->getFormatter()->setStyle('FOO', $fooStyle); $output->setDecorated(true); @@ -163,13 +163,13 @@ class OutputTest extends TestCase public function verbosityProvider() { - return array( - array(Output::VERBOSITY_QUIET, '2', '->write() in QUIET mode only outputs when an explicit QUIET verbosity is passed'), - array(Output::VERBOSITY_NORMAL, '123', '->write() in NORMAL mode outputs anything below an explicit VERBOSE verbosity'), - array(Output::VERBOSITY_VERBOSE, '1234', '->write() in VERBOSE mode outputs anything below an explicit VERY_VERBOSE verbosity'), - array(Output::VERBOSITY_VERY_VERBOSE, '12345', '->write() in VERY_VERBOSE mode outputs anything below an explicit DEBUG verbosity'), - array(Output::VERBOSITY_DEBUG, '123456', '->write() in DEBUG mode outputs everything'), - ); + return [ + [Output::VERBOSITY_QUIET, '2', '->write() in QUIET mode only outputs when an explicit QUIET verbosity is passed'], + [Output::VERBOSITY_NORMAL, '123', '->write() in NORMAL mode outputs anything below an explicit VERBOSE verbosity'], + [Output::VERBOSITY_VERBOSE, '1234', '->write() in VERBOSE mode outputs anything below an explicit VERY_VERBOSE verbosity'], + [Output::VERBOSITY_VERY_VERBOSE, '12345', '->write() in VERY_VERBOSE mode outputs anything below an explicit DEBUG verbosity'], + [Output::VERBOSITY_DEBUG, '123456', '->write() in DEBUG mode outputs everything'], + ]; } } diff --git a/vendor/symfony/console/Tests/Question/ConfirmationQuestionTest.php b/vendor/symfony/console/Tests/Question/ConfirmationQuestionTest.php new file mode 100644 index 00000000..83899772 --- /dev/null +++ b/vendor/symfony/console/Tests/Question/ConfirmationQuestionTest.php @@ -0,0 +1,62 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Tests\Question; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Console\Question\ConfirmationQuestion; + +class ConfirmationQuestionTest extends TestCase +{ + /** + * @dataProvider normalizerUsecases + */ + public function testDefaultRegexUsecases($default, $answers, $expected, $message) + { + $sut = new ConfirmationQuestion('A question', $default); + + foreach ($answers as $answer) { + $normalizer = $sut->getNormalizer(); + $actual = $normalizer($answer); + $this->assertEquals($expected, $actual, sprintf($message, $answer)); + } + } + + public function normalizerUsecases() + { + return [ + [ + true, + ['y', 'Y', 'yes', 'YES', 'yEs', ''], + true, + 'When default is true, the normalizer must return true for "%s"', + ], + [ + true, + ['n', 'N', 'no', 'NO', 'nO', 'foo', '1', '0'], + false, + 'When default is true, the normalizer must return false for "%s"', + ], + [ + false, + ['y', 'Y', 'yes', 'YES', 'yEs'], + true, + 'When default is false, the normalizer must return true for "%s"', + ], + [ + false, + ['n', 'N', 'no', 'NO', 'nO', 'foo', '1', '0', ''], + false, + 'When default is false, the normalizer must return false for "%s"', + ], + ]; + } +} diff --git a/vendor/symfony/console/Tests/Question/QuestionTest.php b/vendor/symfony/console/Tests/Question/QuestionTest.php new file mode 100644 index 00000000..13c8e362 --- /dev/null +++ b/vendor/symfony/console/Tests/Question/QuestionTest.php @@ -0,0 +1,304 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Tests\Question; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Console\Exception\InvalidArgumentException; +use Symfony\Component\Console\Question\Question; + +class QuestionTest extends TestCase +{ + private $question; + + protected function setUp() + { + parent::setUp(); + $this->question = new Question('Test question'); + } + + public function providerTrueFalse() + { + return [[true], [false]]; + } + + public function testGetQuestion() + { + self::assertSame('Test question', $this->question->getQuestion()); + } + + public function testGetDefault() + { + $question = new Question('Test question', 'Default value'); + self::assertSame('Default value', $question->getDefault()); + } + + public function testGetDefaultDefault() + { + self::assertNull($this->question->getDefault()); + } + + /** + * @dataProvider providerTrueFalse + */ + public function testIsSetHidden(bool $hidden) + { + $this->question->setHidden($hidden); + self::assertSame($hidden, $this->question->isHidden()); + } + + public function testIsHiddenDefault() + { + self::assertFalse($this->question->isHidden()); + } + + public function testSetHiddenWithAutocompleterCallback() + { + $this->question->setAutocompleterCallback( + function (string $input): array { return []; } + ); + + $this->expectException(\LogicException::class); + $this->expectExceptionMessage( + 'A hidden question cannot use the autocompleter.' + ); + + $this->question->setHidden(true); + } + + public function testSetHiddenWithNoAutocompleterCallback() + { + $this->question->setAutocompleterCallback( + function (string $input): array { return []; } + ); + $this->question->setAutocompleterCallback(null); + + $exception = null; + try { + $this->question->setHidden(true); + } catch (\Exception $exception) { + // Do nothing + } + + $this->assertNull($exception); + } + + /** + * @dataProvider providerTrueFalse + */ + public function testIsSetHiddenFallback(bool $hidden) + { + $this->question->setHiddenFallback($hidden); + self::assertSame($hidden, $this->question->isHiddenFallback()); + } + + public function testIsHiddenFallbackDefault() + { + self::assertTrue($this->question->isHiddenFallback()); + } + + public function providerGetSetAutocompleterValues() + { + return [ + 'array' => [ + ['a', 'b', 'c', 'd'], + ['a', 'b', 'c', 'd'], + ], + 'associative array' => [ + ['a' => 'c', 'b' => 'd'], + ['a', 'b', 'c', 'd'], + ], + 'iterator' => [ + new \ArrayIterator(['a', 'b', 'c', 'd']), + ['a', 'b', 'c', 'd'], + ], + 'null' => [null, null], + ]; + } + + /** + * @dataProvider providerGetSetAutocompleterValues + */ + public function testGetSetAutocompleterValues($values, $expectValues) + { + $this->question->setAutocompleterValues($values); + self::assertSame( + $expectValues, + $this->question->getAutocompleterValues() + ); + } + + public function providerSetAutocompleterValuesInvalid() + { + return [ + ['Potato'], + [new \stdclass()], + [false], + ]; + } + + /** + * @dataProvider providerSetAutocompleterValuesInvalid + */ + public function testSetAutocompleterValuesInvalid($values) + { + self::expectException(InvalidArgumentException::class); + self::expectExceptionMessage( + 'Autocompleter values can be either an array, "null" or a "Traversable" object.' + ); + + $this->question->setAutocompleterValues($values); + } + + public function testSetAutocompleterValuesWithTraversable() + { + $question1 = new Question('Test question 1'); + $iterator1 = $this->getMockForAbstractClass(\IteratorAggregate::class); + $iterator1 + ->expects($this->once()) + ->method('getIterator') + ->willReturn(new \ArrayIterator(['Potato'])); + $question1->setAutocompleterValues($iterator1); + + $question2 = new Question('Test question 2'); + $iterator2 = $this->getMockForAbstractClass(\IteratorAggregate::class); + $iterator2 + ->expects($this->once()) + ->method('getIterator') + ->willReturn(new \ArrayIterator(['Carrot'])); + $question2->setAutocompleterValues($iterator2); + + // Call multiple times to verify that Traversable result is cached, and + // that there is no crosstalk between cached copies. + self::assertSame(['Potato'], $question1->getAutocompleterValues()); + self::assertSame(['Carrot'], $question2->getAutocompleterValues()); + self::assertSame(['Potato'], $question1->getAutocompleterValues()); + self::assertSame(['Carrot'], $question2->getAutocompleterValues()); + } + + public function testGetAutocompleterValuesDefault() + { + self::assertNull($this->question->getAutocompleterValues()); + } + + public function testGetSetAutocompleterCallback() + { + $callback = function (string $input): array { return []; }; + + $this->question->setAutocompleterCallback($callback); + self::assertSame($callback, $this->question->getAutocompleterCallback()); + } + + public function testGetAutocompleterCallbackDefault() + { + self::assertNull($this->question->getAutocompleterCallback()); + } + + public function testSetAutocompleterCallbackWhenHidden() + { + $this->question->setHidden(true); + + $this->expectException(\LogicException::class); + $this->expectExceptionMessage( + 'A hidden question cannot use the autocompleter.' + ); + + $this->question->setAutocompleterCallback( + function (string $input): array { return []; } + ); + } + + public function testSetAutocompleterCallbackWhenNotHidden() + { + $this->question->setHidden(true); + $this->question->setHidden(false); + + $exception = null; + try { + $this->question->setAutocompleterCallback( + function (string $input): array { return []; } + ); + } catch (\Exception $exception) { + // Do nothing + } + + $this->assertNull($exception); + } + + public function providerGetSetValidator() + { + return [ + [function ($input) { return $input; }], + [null], + ]; + } + + /** + * @dataProvider providerGetSetValidator + */ + public function testGetSetValidator($callback) + { + $this->question->setValidator($callback); + self::assertSame($callback, $this->question->getValidator()); + } + + public function testGetValidatorDefault() + { + self::assertNull($this->question->getValidator()); + } + + public function providerGetSetMaxAttempts() + { + return [[1], [5], [null]]; + } + + /** + * @dataProvider providerGetSetMaxAttempts + */ + public function testGetSetMaxAttempts($attempts) + { + $this->question->setMaxAttempts($attempts); + self::assertSame($attempts, $this->question->getMaxAttempts()); + } + + public function providerSetMaxAttemptsInvalid() + { + return [['Potato'], [0], [-1]]; + } + + /** + * @dataProvider providerSetMaxAttemptsInvalid + */ + public function testSetMaxAttemptsInvalid($attempts) + { + self::expectException(\InvalidArgumentException::class); + self::expectExceptionMessage('Maximum number of attempts must be a positive value.'); + + $this->question->setMaxAttempts($attempts); + } + + public function testGetMaxAttemptsDefault() + { + self::assertNull($this->question->getMaxAttempts()); + } + + public function testGetSetNormalizer() + { + $normalizer = function ($input) { return $input; }; + $this->question->setNormalizer($normalizer); + self::assertSame($normalizer, $this->question->getNormalizer()); + } + + public function testGetNormalizerDefault() + { + self::assertNull($this->question->getNormalizer()); + } +} diff --git a/vendor/symfony/console/Tests/Style/SymfonyStyleTest.php b/vendor/symfony/console/Tests/Style/SymfonyStyleTest.php index 308030bb..88d00c8a 100644 --- a/vendor/symfony/console/Tests/Style/SymfonyStyleTest.php +++ b/vendor/symfony/console/Tests/Style/SymfonyStyleTest.php @@ -26,9 +26,11 @@ class SymfonyStyleTest extends TestCase protected $command; /** @var CommandTester */ protected $tester; + private $colSize; protected function setUp() { + $this->colSize = getenv('COLUMNS'); putenv('COLUMNS=121'); $this->command = new Command('sfstyle'); $this->tester = new CommandTester($this->command); @@ -36,7 +38,7 @@ class SymfonyStyleTest extends TestCase protected function tearDown() { - putenv('COLUMNS'); + putenv($this->colSize ? 'COLUMNS='.$this->colSize : 'COLUMNS'); $this->command = null; $this->tester = null; } @@ -48,7 +50,7 @@ class SymfonyStyleTest extends TestCase { $code = require $inputCommandFilepath; $this->command->setCode($code); - $this->tester->execute(array(), array('interactive' => false, 'decorated' => false)); + $this->tester->execute([], ['interactive' => false, 'decorated' => false]); $this->assertStringEqualsFile($outputFilepath, $this->tester->getDisplay(true)); } @@ -59,7 +61,7 @@ class SymfonyStyleTest extends TestCase { $code = require $inputCommandFilepath; $this->command->setCode($code); - $this->tester->execute(array(), array('interactive' => true, 'decorated' => false)); + $this->tester->execute([], ['interactive' => true, 'decorated' => false]); $this->assertStringEqualsFile($outputFilepath, $this->tester->getDisplay(true)); } diff --git a/vendor/symfony/console/Tests/TerminalTest.php b/vendor/symfony/console/Tests/TerminalTest.php index 91af1d0a..93b8c44a 100644 --- a/vendor/symfony/console/Tests/TerminalTest.php +++ b/vendor/symfony/console/Tests/TerminalTest.php @@ -16,6 +16,21 @@ use Symfony\Component\Console\Terminal; class TerminalTest extends TestCase { + private $colSize; + private $lineSize; + + protected function setUp() + { + $this->colSize = getenv('COLUMNS'); + $this->lineSize = getenv('LINES'); + } + + protected function tearDown() + { + putenv($this->colSize ? 'COLUMNS='.$this->colSize : 'COLUMNS'); + putenv($this->lineSize ? 'LINES' : 'LINES='.$this->lineSize); + } + public function test() { putenv('COLUMNS=100'); diff --git a/vendor/symfony/console/Tests/Tester/ApplicationTesterTest.php b/vendor/symfony/console/Tests/Tester/ApplicationTesterTest.php index 49ef8029..75227315 100644 --- a/vendor/symfony/console/Tests/Tester/ApplicationTesterTest.php +++ b/vendor/symfony/console/Tests/Tester/ApplicationTesterTest.php @@ -35,7 +35,7 @@ class ApplicationTesterTest extends TestCase ; $this->tester = new ApplicationTester($this->application); - $this->tester->run(array('command' => 'foo', 'foo' => 'bar'), array('interactive' => false, 'decorated' => false, 'verbosity' => Output::VERBOSITY_VERBOSE)); + $this->tester->run(['command' => 'foo', 'foo' => 'bar'], ['interactive' => false, 'decorated' => false, 'verbosity' => Output::VERBOSITY_VERBOSE]); } protected function tearDown() @@ -79,8 +79,8 @@ class ApplicationTesterTest extends TestCase }); $tester = new ApplicationTester($application); - $tester->setInputs(array('I1', 'I2', 'I3')); - $tester->run(array('command' => 'foo')); + $tester->setInputs(['I1', 'I2', 'I3']); + $tester->run(['command' => 'foo']); $this->assertSame(0, $tester->getStatusCode()); $this->assertEquals('Q1Q2Q3', $tester->getDisplay(true)); @@ -104,8 +104,8 @@ class ApplicationTesterTest extends TestCase $tester = new ApplicationTester($application); $tester->run( - array('command' => 'foo', 'foo' => 'bar'), - array('capture_stderr_separately' => true) + ['command' => 'foo', 'foo' => 'bar'], + ['capture_stderr_separately' => true] ); $this->assertSame('foo', $tester->getErrorOutput()); diff --git a/vendor/symfony/console/Tests/Tester/CommandTesterTest.php b/vendor/symfony/console/Tests/Tester/CommandTesterTest.php index f4fe32a5..70662967 100644 --- a/vendor/symfony/console/Tests/Tester/CommandTesterTest.php +++ b/vendor/symfony/console/Tests/Tester/CommandTesterTest.php @@ -17,6 +17,7 @@ use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Helper\HelperSet; use Symfony\Component\Console\Helper\QuestionHelper; use Symfony\Component\Console\Output\Output; +use Symfony\Component\Console\Question\ChoiceQuestion; use Symfony\Component\Console\Question\Question; use Symfony\Component\Console\Style\SymfonyStyle; use Symfony\Component\Console\Tester\CommandTester; @@ -34,7 +35,7 @@ class CommandTesterTest extends TestCase $this->command->setCode(function ($input, $output) { $output->writeln('foo'); }); $this->tester = new CommandTester($this->command); - $this->tester->execute(array('foo' => 'bar'), array('interactive' => false, 'decorated' => false, 'verbosity' => Output::VERBOSITY_VERBOSE)); + $this->tester->execute(['foo' => 'bar'], ['interactive' => false, 'decorated' => false, 'verbosity' => Output::VERBOSITY_VERBOSE]); } protected function tearDown() @@ -84,19 +85,19 @@ class CommandTesterTest extends TestCase $tester = new CommandTester($application->find('foo')); // check that there is no need to pass the command name here - $this->assertEquals(0, $tester->execute(array())); + $this->assertEquals(0, $tester->execute([])); } public function testCommandWithInputs() { - $questions = array( + $questions = [ 'What\'s your name?', 'How are you?', 'Where do you come from?', - ); + ]; $command = new Command('foo'); - $command->setHelperSet(new HelperSet(array(new QuestionHelper()))); + $command->setHelperSet(new HelperSet([new QuestionHelper()])); $command->setCode(function ($input, $output) use ($questions, $command) { $helper = $command->getHelper('question'); $helper->ask($input, $output, new Question($questions[0])); @@ -105,8 +106,8 @@ class CommandTesterTest extends TestCase }); $tester = new CommandTester($command); - $tester->setInputs(array('Bobby', 'Fine', 'France')); - $tester->execute(array()); + $tester->setInputs(['Bobby', 'Fine', 'France']); + $tester->execute([]); $this->assertEquals(0, $tester->getStatusCode()); $this->assertEquals(implode('', $questions), $tester->getDisplay(true)); @@ -114,14 +115,14 @@ class CommandTesterTest extends TestCase public function testCommandWithDefaultInputs() { - $questions = array( + $questions = [ 'What\'s your name?', 'How are you?', 'Where do you come from?', - ); + ]; $command = new Command('foo'); - $command->setHelperSet(new HelperSet(array(new QuestionHelper()))); + $command->setHelperSet(new HelperSet([new QuestionHelper()])); $command->setCode(function ($input, $output) use ($questions, $command) { $helper = $command->getHelper('question'); $helper->ask($input, $output, new Question($questions[0], 'Bobby')); @@ -130,8 +131,8 @@ class CommandTesterTest extends TestCase }); $tester = new CommandTester($command); - $tester->setInputs(array('', '', '')); - $tester->execute(array()); + $tester->setInputs(['', '', '']); + $tester->execute([]); $this->assertEquals(0, $tester->getStatusCode()); $this->assertEquals(implode('', $questions), $tester->getDisplay(true)); @@ -139,37 +140,64 @@ class CommandTesterTest extends TestCase /** * @expectedException \RuntimeException - * @expectedMessage Aborted + * @expectedExceptionMessage Aborted. */ public function testCommandWithWrongInputsNumber() { - $questions = array( + $questions = [ 'What\'s your name?', 'How are you?', 'Where do you come from?', - ); + ]; $command = new Command('foo'); - $command->setHelperSet(new HelperSet(array(new QuestionHelper()))); + $command->setHelperSet(new HelperSet([new QuestionHelper()])); $command->setCode(function ($input, $output) use ($questions, $command) { $helper = $command->getHelper('question'); + $helper->ask($input, $output, new ChoiceQuestion('choice', ['a', 'b'])); $helper->ask($input, $output, new Question($questions[0])); $helper->ask($input, $output, new Question($questions[1])); $helper->ask($input, $output, new Question($questions[2])); }); $tester = new CommandTester($command); - $tester->setInputs(array('Bobby', 'Fine')); - $tester->execute(array()); + $tester->setInputs(['a', 'Bobby', 'Fine']); + $tester->execute([]); + } + + /** + * @expectedException \RuntimeException + * @expectedExceptionMessage Aborted. + */ + public function testCommandWithQuestionsButNoInputs() + { + $questions = [ + 'What\'s your name?', + 'How are you?', + 'Where do you come from?', + ]; + + $command = new Command('foo'); + $command->setHelperSet(new HelperSet([new QuestionHelper()])); + $command->setCode(function ($input, $output) use ($questions, $command) { + $helper = $command->getHelper('question'); + $helper->ask($input, $output, new ChoiceQuestion('choice', ['a', 'b'])); + $helper->ask($input, $output, new Question($questions[0])); + $helper->ask($input, $output, new Question($questions[1])); + $helper->ask($input, $output, new Question($questions[2])); + }); + + $tester = new CommandTester($command); + $tester->execute([]); } public function testSymfonyStyleCommandWithInputs() { - $questions = array( + $questions = [ 'What\'s your name?', 'How are you?', 'Where do you come from?', - ); + ]; $command = new Command('foo'); $command->setCode(function ($input, $output) use ($questions, $command) { @@ -180,8 +208,8 @@ class CommandTesterTest extends TestCase }); $tester = new CommandTester($command); - $tester->setInputs(array('Bobby', 'Fine', 'France')); - $tester->execute(array()); + $tester->setInputs(['Bobby', 'Fine', 'France']); + $tester->execute([]); $this->assertEquals(0, $tester->getStatusCode()); } @@ -198,8 +226,8 @@ class CommandTesterTest extends TestCase $tester = new CommandTester($command); $tester->execute( - array('foo' => 'bar'), - array('capture_stderr_separately' => true) + ['foo' => 'bar'], + ['capture_stderr_separately' => true] ); $this->assertSame('foo', $tester->getErrorOutput()); diff --git a/vendor/symfony/console/composer.json b/vendor/symfony/console/composer.json index ca1a9269..5613467f 100644 --- a/vendor/symfony/console/composer.json +++ b/vendor/symfony/console/composer.json @@ -17,25 +17,31 @@ ], "require": { "php": "^7.1.3", - "symfony/contracts": "^1.0", - "symfony/polyfill-mbstring": "~1.0" + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php73": "^1.8", + "symfony/service-contracts": "^1.1" }, "require-dev": { "symfony/config": "~3.4|~4.0", - "symfony/event-dispatcher": "~3.4|~4.0", + "symfony/event-dispatcher": "^4.3", "symfony/dependency-injection": "~3.4|~4.0", "symfony/lock": "~3.4|~4.0", "symfony/process": "~3.4|~4.0", + "symfony/var-dumper": "^4.3", "psr/log": "~1.0" }, + "provide": { + "psr/log-implementation": "1.0" + }, "suggest": { "symfony/event-dispatcher": "", "symfony/lock": "", "symfony/process": "", - "psr/log-implementation": "For using the console logger" + "psr/log": "For using the console logger" }, "conflict": { "symfony/dependency-injection": "<3.4", + "symfony/event-dispatcher": "<4.3", "symfony/process": "<3.3" }, "autoload": { @@ -47,7 +53,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "4.2-dev" + "dev-master": "4.3-dev" } } } diff --git a/vendor/symfony/contracts/CHANGELOG.md b/vendor/symfony/contracts/CHANGELOG.md deleted file mode 100644 index fba42d59..00000000 --- a/vendor/symfony/contracts/CHANGELOG.md +++ /dev/null @@ -1,12 +0,0 @@ -CHANGELOG -========= - -1.0.0 ------ - - * added `Service\ResetInterface` to provide a way to reset an object to its initial state - * added `Translation\TranslatorInterface` and `Translation\TranslatorTrait` - * added `Cache` contract to extend PSR-6 with tag invalidation, callback-based computation and stampede protection - * added `Service\ServiceSubscriberInterface` to declare the dependencies of a class that consumes a service locator - * added `Service\ServiceSubscriberTrait` to implement `Service\ServiceSubscriberInterface` using methods' return types - * added `Service\ServiceLocatorTrait` to help implement PSR-11 service locators diff --git a/vendor/symfony/contracts/Cache/CacheInterface.php b/vendor/symfony/contracts/Cache/CacheInterface.php deleted file mode 100644 index 4b1686b8..00000000 --- a/vendor/symfony/contracts/Cache/CacheInterface.php +++ /dev/null @@ -1,57 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\Cache; - -use Psr\Cache\CacheItemInterface; -use Psr\Cache\InvalidArgumentException; - -/** - * Covers most simple to advanced caching needs. - * - * @author Nicolas Grekas - */ -interface CacheInterface -{ - /** - * Fetches a value from the pool or computes it if not found. - * - * On cache misses, a callback is called that should return the missing value. - * This callback is given a PSR-6 CacheItemInterface instance corresponding to the - * requested key, that could be used e.g. for expiration control. It could also - * be an ItemInterface instance when its additional features are needed. - * - * @param string $key The key of the item to retrieve from the cache - * @param callable|CallbackInterface $callback Should return the computed value for the given key/item - * @param float|null $beta A float that, as it grows, controls the likeliness of triggering - * early expiration. 0 disables it, INF forces immediate expiration. - * The default (or providing null) is implementation dependent but should - * typically be 1.0, which should provide optimal stampede protection. - * See https://en.wikipedia.org/wiki/Cache_stampede#Probabilistic_early_expiration - * @param array &$metadata The metadata of the cached item {@see ItemInterface::getMetadata()} - * - * @return mixed The value corresponding to the provided key - * - * @throws InvalidArgumentException When $key is not valid or when $beta is negative - */ - public function get(string $key, callable $callback, float $beta = null, array &$metadata = null); - - /** - * Removes an item from the pool. - * - * @param string $key The key to delete - * - * @throws InvalidArgumentException When $key is not valid - * - * @return bool True if the item was successfully removed, false if there was any error - */ - public function delete(string $key): bool; -} diff --git a/vendor/symfony/contracts/Cache/CacheTrait.php b/vendor/symfony/contracts/Cache/CacheTrait.php deleted file mode 100644 index d82d9653..00000000 --- a/vendor/symfony/contracts/Cache/CacheTrait.php +++ /dev/null @@ -1,71 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\Cache; - -use Psr\Cache\CacheItemPoolInterface; -use Psr\Cache\InvalidArgumentException; - -/** - * An implementation of CacheInterface for PSR-6 CacheItemPoolInterface classes. - * - * @author Nicolas Grekas - */ -trait CacheTrait -{ - /** - * {@inheritdoc} - */ - public function get(string $key, callable $callback, float $beta = null, array &$metadata = null) - { - return $this->doGet($this, $key, $callback, $beta, $metadata); - } - - /** - * {@inheritdoc} - */ - public function delete(string $key): bool - { - return $this->deleteItem($key); - } - - private function doGet(CacheItemPoolInterface $pool, string $key, callable $callback, ?float $beta, array &$metadata = null) - { - if (0 > $beta = $beta ?? 1.0) { - throw new class(sprintf('Argument "$beta" provided to "%s::get()" must be a positive number, %f given.', \get_class($this), $beta)) extends \InvalidArgumentException implements InvalidArgumentException { - }; - } - - $item = $pool->getItem($key); - $recompute = !$item->isHit() || INF === $beta; - $metadata = $item instanceof ItemInterface ? $item->getMetadata() : array(); - - if (!$recompute && $metadata) { - $expiry = $metadata[ItemInterface::METADATA_EXPIRY] ?? false; - $ctime = $metadata[ItemInterface::METADATA_CTIME] ?? false; - - if ($recompute = $ctime && $expiry && $expiry <= microtime(true) - $ctime / 1000 * $beta * log(random_int(1, PHP_INT_MAX) / PHP_INT_MAX)) { - // force applying defaultLifetime to expiry - $item->expiresAt(null); - } - } - - if ($recompute) { - $save = true; - $item->set($callback($item, $save)); - if ($save) { - $pool->save($item); - } - } - - return $item->get(); - } -} diff --git a/vendor/symfony/contracts/Cache/CallbackInterface.php b/vendor/symfony/contracts/Cache/CallbackInterface.php deleted file mode 100644 index 7dae2aac..00000000 --- a/vendor/symfony/contracts/Cache/CallbackInterface.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\Cache; - -use Psr\Cache\CacheItemInterface; - -/** - * Computes and returns the cached value of an item. - * - * @author Nicolas Grekas - */ -interface CallbackInterface -{ - /** - * @param CacheItemInterface|ItemInterface $item The item to compute the value for - * @param bool &$save Should be set to false when the value should not be saved in the pool - * - * @return mixed The computed value for the passed item - */ - public function __invoke(CacheItemInterface $item, bool &$save); -} diff --git a/vendor/symfony/contracts/Cache/ItemInterface.php b/vendor/symfony/contracts/Cache/ItemInterface.php deleted file mode 100644 index 4884a2ff..00000000 --- a/vendor/symfony/contracts/Cache/ItemInterface.php +++ /dev/null @@ -1,60 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\Cache; - -use Psr\Cache\CacheException; -use Psr\Cache\CacheItemInterface; -use Psr\Cache\InvalidArgumentException; - -/** - * Augments PSR-6's CacheItemInterface with support for tags and metadata. - * - * @author Nicolas Grekas - */ -interface ItemInterface extends CacheItemInterface -{ - /** - * References the Unix timestamp stating when the item will expire. - */ - const METADATA_EXPIRY = 'expiry'; - - /** - * References the time the item took to be created, in milliseconds. - */ - const METADATA_CTIME = 'ctime'; - - /** - * References the list of tags that were assigned to the item, as string[]. - */ - const METADATA_TAGS = 'tags'; - - /** - * Adds a tag to a cache item. - * - * Tags are strings that follow the same validation rules as keys. - * - * @param string|string[] $tags A tag or array of tags - * - * @return $this - * - * @throws InvalidArgumentException When $tag is not valid - * @throws CacheException When the item comes from a pool that is not tag-aware - */ - public function tag($tags): self; - - /** - * Returns a list of metadata info that were saved alongside with the cached value. - * - * See ItemInterface::METADATA_* consts for keys potentially found in the returned array. - */ - public function getMetadata(): array; -} diff --git a/vendor/symfony/contracts/Cache/TagAwareCacheInterface.php b/vendor/symfony/contracts/Cache/TagAwareCacheInterface.php deleted file mode 100644 index 7c4cf111..00000000 --- a/vendor/symfony/contracts/Cache/TagAwareCacheInterface.php +++ /dev/null @@ -1,38 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\Cache; - -use Psr\Cache\InvalidArgumentException; - -/** - * Allows invalidating cached items using tags. - * - * @author Nicolas Grekas - */ -interface TagAwareCacheInterface extends CacheInterface -{ - /** - * Invalidates cached items using tags. - * - * When implemented on a PSR-6 pool, invalidation should not apply - * to deferred items. Instead, they should be committed as usual. - * This allows replacing old tagged values by new ones without - * race conditions. - * - * @param string[] $tags An array of tags to invalidate - * - * @return bool True on success - * - * @throws InvalidArgumentException When $tags is not valid - */ - public function invalidateTags(array $tags); -} diff --git a/vendor/symfony/contracts/README.md b/vendor/symfony/contracts/README.md deleted file mode 100644 index 9cb73af2..00000000 --- a/vendor/symfony/contracts/README.md +++ /dev/null @@ -1,70 +0,0 @@ -Symfony Contracts -================= - -A set of abstractions extracted out of the Symfony components. - -Can be used to build on semantics that the Symfony components proved useful - and -that already have battle tested implementations. - -Design Principles ------------------ - - * contracts are split by domain, each into their own sub-namespaces; - * contracts are small and consistent sets of PHP interfaces, traits, normative - docblocks and reference test suites when applicable, etc.; - * all contracts must have a proven implementation to enter this repository; - * they must be backward compatible with existing Symfony components. - -Packages that implement specific contracts should list them in the "provide" -section of their "composer.json" file, using the `symfony/*-contracts-implementation` -convention (e.g. `"provide": { "symfony/cache-contracts-implementation": "1.0" }`). - -FAQ ---- - -### How to use this package? - -The abstractions in this package are useful to achieve loose coupling and -interoperability. By using the provided interfaces as type hints, you are able -to reuse any implementations that match their contracts. It could be a Symfony -component, or another one provided by the PHP community at large. - -Depending on their semantics, some interfaces can be combined with autowiring to -seamlessly inject a service in your classes. - -Others might be useful as labeling interfaces, to hint about a specific behavior -that could be enabled when using autoconfiguration or manual service tagging (or -any other means provided by your framework.) - -### How is this different from PHP-FIG's PSRs? - -When applicable, the provided contracts are built on top of PHP-FIG's PSRs. But -the group has different goals and different processes. Here, we're focusing on -providing abstractions that are useful on their own while still compatible with -implementations provided by Symfony. Although not the main target, we hope that -the declared contracts will directly or indirectly contribute to the PHP-FIG. - -### Why isn't this package split into several packages? - -Putting all interfaces in one package eases discoverability and dependency -management. Instead of dealing with a myriad of small packages and the -corresponding matrix of versions, you just need to deal with one package and one -version. Also when using IDE autocompletion or just reading the source code, it -makes it easier to figure out which contracts are provided. - -There are two downsides to this approach: you may have unused files in your -`vendor/` directory, and in the future, it will be impossible to use two -different sub-namespaces in different major versions of the package. For the -"unused files" downside, it has no practical consequences: their file sizes are -very small, and there is no performance overhead at all since they are never -loaded. For major versions, this package follows the Symfony BC + deprecation -policies, with an additional restriction to never remove deprecated interfaces. - -Resources ---------- - - * [Documentation](https://symfony.com/doc/current/components/contracts.html) - * [Contributing](https://symfony.com/doc/current/contributing/index.html) - * [Report issues](https://github.com/symfony/symfony/issues) and - [send Pull Requests](https://github.com/symfony/symfony/pulls) - in the [main Symfony repository](https://github.com/symfony/symfony) diff --git a/vendor/symfony/contracts/Tests/Cache/CacheTraitTest.php b/vendor/symfony/contracts/Tests/Cache/CacheTraitTest.php deleted file mode 100644 index 5134a933..00000000 --- a/vendor/symfony/contracts/Tests/Cache/CacheTraitTest.php +++ /dev/null @@ -1,165 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\Tests\Cache; - -use PHPUnit\Framework\TestCase; -use Psr\Cache\CacheItemInterface; -use Psr\Cache\CacheItemPoolInterface; -use Symfony\Contracts\Cache\CacheTrait; - -/** - * @author Tobias Nyholm - */ -class CacheTraitTest extends TestCase -{ - public function testSave() - { - $item = $this->getMockBuilder(CacheItemInterface::class)->getMock(); - $item->method('set') - ->willReturn($item); - $item->method('isHit') - ->willReturn(false); - - $item->expects($this->once()) - ->method('set') - ->with('computed data'); - - $cache = $this->getMockBuilder(TestPool::class) - ->setMethods(array('getItem', 'save')) - ->getMock(); - $cache->expects($this->once()) - ->method('getItem') - ->with('key') - ->willReturn($item); - $cache->expects($this->once()) - ->method('save'); - - $callback = function (CacheItemInterface $item) { - return 'computed data'; - }; - - $cache->get('key', $callback); - } - - public function testNoCallbackCallOnHit() - { - $item = $this->getMockBuilder(CacheItemInterface::class)->getMock(); - $item->method('isHit') - ->willReturn(true); - - $item->expects($this->never()) - ->method('set'); - - $cache = $this->getMockBuilder(TestPool::class) - ->setMethods(array('getItem', 'save')) - ->getMock(); - - $cache->expects($this->once()) - ->method('getItem') - ->with('key') - ->willReturn($item); - $cache->expects($this->never()) - ->method('save'); - - $callback = function (CacheItemInterface $item) { - $this->assertTrue(false, 'This code should never be reached'); - }; - - $cache->get('key', $callback); - } - - public function testRecomputeOnBetaInf() - { - $item = $this->getMockBuilder(CacheItemInterface::class)->getMock(); - $item->method('set') - ->willReturn($item); - $item->method('isHit') - // We want to recompute even if it is a hit - ->willReturn(true); - - $item->expects($this->once()) - ->method('set') - ->with('computed data'); - - $cache = $this->getMockBuilder(TestPool::class) - ->setMethods(array('getItem', 'save')) - ->getMock(); - - $cache->expects($this->once()) - ->method('getItem') - ->with('key') - ->willReturn($item); - $cache->expects($this->once()) - ->method('save'); - - $callback = function (CacheItemInterface $item) { - return 'computed data'; - }; - - $cache->get('key', $callback, INF); - } - - public function testExceptionOnNegativeBeta() - { - $cache = $this->getMockBuilder(TestPool::class) - ->setMethods(array('getItem', 'save')) - ->getMock(); - - $callback = function (CacheItemInterface $item) { - return 'computed data'; - }; - - $this->expectException(\InvalidArgumentException::class); - $cache->get('key', $callback, -2); - } -} - -class TestPool implements CacheItemPoolInterface -{ - use CacheTrait; - - public function hasItem($key) - { - } - - public function deleteItem($key) - { - } - - public function deleteItems(array $keys = array()) - { - } - - public function getItem($key) - { - } - - public function getItems(array $key = array()) - { - } - - public function saveDeferred(CacheItemInterface $item) - { - } - - public function save(CacheItemInterface $item) - { - } - - public function commit() - { - } - - public function clear() - { - } -} diff --git a/vendor/symfony/contracts/Tests/Service/ServiceSubscriberTraitTest.php b/vendor/symfony/contracts/Tests/Service/ServiceSubscriberTraitTest.php deleted file mode 100644 index c7742c65..00000000 --- a/vendor/symfony/contracts/Tests/Service/ServiceSubscriberTraitTest.php +++ /dev/null @@ -1,65 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\Tests\Service; - -use PHPUnit\Framework\TestCase; -use Psr\Container\ContainerInterface; -use Symfony\Contracts\Service\ServiceLocatorTrait; -use Symfony\Contracts\Service\ServiceSubscriberInterface; -use Symfony\Contracts\Service\ServiceSubscriberTrait; - -class ServiceSubscriberTraitTest extends TestCase -{ - public function testMethodsOnParentsAndChildrenAreIgnoredInGetSubscribedServices() - { - $expected = array(TestService::class.'::aService' => '?Symfony\Contracts\Tests\Service\Service2'); - - $this->assertEquals($expected, ChildTestService::getSubscribedServices()); - } - - public function testSetContainerIsCalledOnParent() - { - $container = new class(array()) implements ContainerInterface { - use ServiceLocatorTrait; - }; - - $this->assertSame($container, (new TestService())->setContainer($container)); - } -} - -class ParentTestService -{ - public function aParentService(): Service1 - { - } - - public function setContainer(ContainerInterface $container) - { - return $container; - } -} - -class TestService extends ParentTestService implements ServiceSubscriberInterface -{ - use ServiceSubscriberTrait; - - public function aService(): Service2 - { - } -} - -class ChildTestService extends TestService -{ - public function aChildService(): Service3 - { - } -} diff --git a/vendor/symfony/contracts/composer.json b/vendor/symfony/contracts/composer.json deleted file mode 100644 index 2f198a0c..00000000 --- a/vendor/symfony/contracts/composer.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "name": "symfony/contracts", - "type": "library", - "description": "A set of abstractions extracted out of the Symfony components", - "keywords": ["abstractions", "contracts", "decoupling", "interfaces", "interoperability", "standards"], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": "^7.1.3" - }, - "require-dev": { - "psr/cache": "^1.0", - "psr/container": "^1.0" - }, - "suggest": { - "psr/cache": "When using the Cache contracts", - "psr/container": "When using the Service contracts", - "symfony/cache-contracts-implementation": "", - "symfony/service-contracts-implementation": "", - "symfony/translation-contracts-implementation": "" - }, - "autoload": { - "psr-4": { "Symfony\\Contracts\\": "" }, - "exclude-from-classmap": [ - "**/Tests/" - ] - }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - } -} diff --git a/vendor/symfony/css-selector/Node/FunctionNode.php b/vendor/symfony/css-selector/Node/FunctionNode.php index 89b64378..063f8a27 100644 --- a/vendor/symfony/css-selector/Node/FunctionNode.php +++ b/vendor/symfony/css-selector/Node/FunctionNode.php @@ -34,7 +34,7 @@ class FunctionNode extends AbstractNode * @param string $name * @param Token[] $arguments */ - public function __construct(NodeInterface $selector, string $name, array $arguments = array()) + public function __construct(NodeInterface $selector, string $name, array $arguments = []) { $this->selector = $selector; $this->name = strtolower($name); diff --git a/vendor/symfony/css-selector/Parser/Handler/StringHandler.php b/vendor/symfony/css-selector/Parser/Handler/StringHandler.php index eea1aa9b..38c8dc15 100644 --- a/vendor/symfony/css-selector/Parser/Handler/StringHandler.php +++ b/vendor/symfony/css-selector/Parser/Handler/StringHandler.php @@ -47,7 +47,7 @@ class StringHandler implements HandlerInterface { $quote = $reader->getSubstring(1); - if (!\in_array($quote, array("'", '"'))) { + if (!\in_array($quote, ["'", '"'])) { return false; } diff --git a/vendor/symfony/css-selector/Parser/Parser.php b/vendor/symfony/css-selector/Parser/Parser.php index d42bdca6..e8a46c06 100644 --- a/vendor/symfony/css-selector/Parser/Parser.php +++ b/vendor/symfony/css-selector/Parser/Parser.php @@ -74,33 +74,33 @@ class Parser implements ParserInterface switch (true) { case 'odd' === $joined: - return array(2, 1); + return [2, 1]; case 'even' === $joined: - return array(2, 0); + return [2, 0]; case 'n' === $joined: - return array(1, 0); + return [1, 0]; case false === strpos($joined, 'n'): - return array(0, $int($joined)); + return [0, $int($joined)]; } $split = explode('n', $joined); $first = isset($split[0]) ? $split[0] : null; - return array( + return [ $first ? ('-' === $first || '+' === $first ? $int($first.'1') : $int($first)) : 1, isset($split[1]) && $split[1] ? $int($split[1]) : 0, - ); + ]; } private function parseSelectorList(TokenStream $stream): array { $stream->skipWhitespace(); - $selectors = array(); + $selectors = []; while (true) { $selectors[] = $this->parserSelectorNode($stream); - if ($stream->getPeek()->isDelimiter(array(','))) { + if ($stream->getPeek()->isDelimiter([','])) { $stream->getNext(); $stream->skipWhitespace(); } else { @@ -119,7 +119,7 @@ class Parser implements ParserInterface $stream->skipWhitespace(); $peek = $stream->getPeek(); - if ($peek->isFileEnd() || $peek->isDelimiter(array(','))) { + if ($peek->isFileEnd() || $peek->isDelimiter([','])) { break; } @@ -127,7 +127,7 @@ class Parser implements ParserInterface throw SyntaxErrorException::pseudoElementFound($pseudoElement, 'not at the end of a selector'); } - if ($peek->isDelimiter(array('+', '>', '~'))) { + if ($peek->isDelimiter(['+', '>', '~'])) { $combinator = $stream->getNext()->getValue(); $stream->skipWhitespace(); } else { @@ -158,8 +158,8 @@ class Parser implements ParserInterface $peek = $stream->getPeek(); if ($peek->isWhitespace() || $peek->isFileEnd() - || $peek->isDelimiter(array(',', '+', '>', '~')) - || ($insideNegation && $peek->isDelimiter(array(')'))) + || $peek->isDelimiter([',', '+', '>', '~']) + || ($insideNegation && $peek->isDelimiter([')'])) ) { break; } @@ -170,16 +170,16 @@ class Parser implements ParserInterface if ($peek->isHash()) { $result = new Node\HashNode($result, $stream->getNext()->getValue()); - } elseif ($peek->isDelimiter(array('.'))) { + } elseif ($peek->isDelimiter(['.'])) { $stream->getNext(); $result = new Node\ClassNode($result, $stream->getNextIdentifier()); - } elseif ($peek->isDelimiter(array('['))) { + } elseif ($peek->isDelimiter(['['])) { $stream->getNext(); $result = $this->parseAttributeNode($result, $stream); - } elseif ($peek->isDelimiter(array(':'))) { + } elseif ($peek->isDelimiter([':'])) { $stream->getNext(); - if ($stream->getPeek()->isDelimiter(array(':'))) { + if ($stream->getPeek()->isDelimiter([':'])) { $stream->getNext(); $pseudoElement = $stream->getNextIdentifier(); @@ -187,7 +187,7 @@ class Parser implements ParserInterface } $identifier = $stream->getNextIdentifier(); - if (\in_array(strtolower($identifier), array('first-line', 'first-letter', 'before', 'after'))) { + if (\in_array(strtolower($identifier), ['first-line', 'first-letter', 'before', 'after'])) { // Special case: CSS 2.1 pseudo-elements can have a single ':'. // Any new pseudo-element must have two. $pseudoElement = $identifier; @@ -195,7 +195,7 @@ class Parser implements ParserInterface continue; } - if (!$stream->getPeek()->isDelimiter(array('('))) { + if (!$stream->getPeek()->isDelimiter(['('])) { $result = new Node\PseudoNode($result, $identifier); continue; @@ -216,13 +216,13 @@ class Parser implements ParserInterface throw SyntaxErrorException::pseudoElementFound($argumentPseudoElement, 'inside ::not()'); } - if (!$next->isDelimiter(array(')'))) { + if (!$next->isDelimiter([')'])) { throw SyntaxErrorException::unexpectedToken('")"', $next); } $result = new Node\NegationNode($result, $argument); } else { - $arguments = array(); + $arguments = []; $next = null; while (true) { @@ -232,10 +232,10 @@ class Parser implements ParserInterface if ($next->isIdentifier() || $next->isString() || $next->isNumber() - || $next->isDelimiter(array('+', '-')) + || $next->isDelimiter(['+', '-']) ) { $arguments[] = $next; - } elseif ($next->isDelimiter(array(')'))) { + } elseif ($next->isDelimiter([')'])) { break; } else { throw SyntaxErrorException::unexpectedToken('an argument', $next); @@ -257,14 +257,14 @@ class Parser implements ParserInterface throw SyntaxErrorException::unexpectedToken('selector', $stream->getPeek()); } - return array($result, $pseudoElement); + return [$result, $pseudoElement]; } private function parseElementNode(TokenStream $stream): Node\ElementNode { $peek = $stream->getPeek(); - if ($peek->isIdentifier() || $peek->isDelimiter(array('*'))) { + if ($peek->isIdentifier() || $peek->isDelimiter(['*'])) { if ($peek->isIdentifier()) { $namespace = $stream->getNext()->getValue(); } else { @@ -272,7 +272,7 @@ class Parser implements ParserInterface $namespace = null; } - if ($stream->getPeek()->isDelimiter(array('|'))) { + if ($stream->getPeek()->isDelimiter(['|'])) { $stream->getNext(); $element = $stream->getNextIdentifierOrStar(); } else { @@ -291,14 +291,14 @@ class Parser implements ParserInterface $stream->skipWhitespace(); $attribute = $stream->getNextIdentifierOrStar(); - if (null === $attribute && !$stream->getPeek()->isDelimiter(array('|'))) { + if (null === $attribute && !$stream->getPeek()->isDelimiter(['|'])) { throw SyntaxErrorException::unexpectedToken('"|"', $stream->getPeek()); } - if ($stream->getPeek()->isDelimiter(array('|'))) { + if ($stream->getPeek()->isDelimiter(['|'])) { $stream->getNext(); - if ($stream->getPeek()->isDelimiter(array('='))) { + if ($stream->getPeek()->isDelimiter(['='])) { $namespace = null; $stream->getNext(); $operator = '|='; @@ -315,12 +315,12 @@ class Parser implements ParserInterface $stream->skipWhitespace(); $next = $stream->getNext(); - if ($next->isDelimiter(array(']'))) { + if ($next->isDelimiter([']'])) { return new Node\AttributeNode($selector, $namespace, $attribute, 'exists', null); - } elseif ($next->isDelimiter(array('='))) { + } elseif ($next->isDelimiter(['='])) { $operator = '='; - } elseif ($next->isDelimiter(array('^', '$', '*', '~', '|', '!')) - && $stream->getPeek()->isDelimiter(array('=')) + } elseif ($next->isDelimiter(['^', '$', '*', '~', '|', '!']) + && $stream->getPeek()->isDelimiter(['=']) ) { $operator = $next->getValue().'='; $stream->getNext(); @@ -344,7 +344,7 @@ class Parser implements ParserInterface $stream->skipWhitespace(); $next = $stream->getNext(); - if (!$next->isDelimiter(array(']'))) { + if (!$next->isDelimiter([']'])) { throw SyntaxErrorException::unexpectedToken('"]"', $next); } diff --git a/vendor/symfony/css-selector/Parser/Shortcut/ClassParser.php b/vendor/symfony/css-selector/Parser/Shortcut/ClassParser.php index ce7b20ef..17fa8c27 100644 --- a/vendor/symfony/css-selector/Parser/Shortcut/ClassParser.php +++ b/vendor/symfony/css-selector/Parser/Shortcut/ClassParser.php @@ -41,11 +41,11 @@ class ClassParser implements ParserInterface // 2 => string 'input' (length=5) // 3 => string 'ab6bd_field' (length=11) if (preg_match('/^(?:([a-z]++)\|)?+([\w-]++|\*)?+\.([\w-]++)$/i', trim($source), $matches)) { - return array( + return [ new SelectorNode(new ClassNode(new ElementNode($matches[1] ?: null, $matches[2] ?: null), $matches[3])), - ); + ]; } - return array(); + return []; } } diff --git a/vendor/symfony/css-selector/Parser/Shortcut/ElementParser.php b/vendor/symfony/css-selector/Parser/Shortcut/ElementParser.php index 3b93f006..8b9a8638 100644 --- a/vendor/symfony/css-selector/Parser/Shortcut/ElementParser.php +++ b/vendor/symfony/css-selector/Parser/Shortcut/ElementParser.php @@ -39,9 +39,9 @@ class ElementParser implements ParserInterface // 1 => string 'testns' (length=6) // 2 => string 'testel' (length=6) if (preg_match('/^(?:([a-z]++)\|)?([\w-]++|\*)$/i', trim($source), $matches)) { - return array(new SelectorNode(new ElementNode($matches[1] ?: null, $matches[2]))); + return [new SelectorNode(new ElementNode($matches[1] ?: null, $matches[2]))]; } - return array(); + return []; } } diff --git a/vendor/symfony/css-selector/Parser/Shortcut/EmptyStringParser.php b/vendor/symfony/css-selector/Parser/Shortcut/EmptyStringParser.php index e8a89cc4..222df5cd 100644 --- a/vendor/symfony/css-selector/Parser/Shortcut/EmptyStringParser.php +++ b/vendor/symfony/css-selector/Parser/Shortcut/EmptyStringParser.php @@ -38,9 +38,9 @@ class EmptyStringParser implements ParserInterface { // Matches an empty string if ('' == $source) { - return array(new SelectorNode(new ElementNode(null, '*'))); + return [new SelectorNode(new ElementNode(null, '*'))]; } - return array(); + return []; } } diff --git a/vendor/symfony/css-selector/Parser/Shortcut/HashParser.php b/vendor/symfony/css-selector/Parser/Shortcut/HashParser.php index e94ce0a4..fb07ee6c 100644 --- a/vendor/symfony/css-selector/Parser/Shortcut/HashParser.php +++ b/vendor/symfony/css-selector/Parser/Shortcut/HashParser.php @@ -41,11 +41,11 @@ class HashParser implements ParserInterface // 2 => string 'input' (length=5) // 3 => string 'ab6bd_field' (length=11) if (preg_match('/^(?:([a-z]++)\|)?+([\w-]++|\*)?+#([\w-]++)$/i', trim($source), $matches)) { - return array( + return [ new SelectorNode(new HashNode(new ElementNode($matches[1] ?: null, $matches[2] ?: null), $matches[3])), - ); + ]; } - return array(); + return []; } } diff --git a/vendor/symfony/css-selector/Parser/Token.php b/vendor/symfony/css-selector/Parser/Token.php index 91a98f71..9a324854 100644 --- a/vendor/symfony/css-selector/Parser/Token.php +++ b/vendor/symfony/css-selector/Parser/Token.php @@ -62,7 +62,7 @@ class Token return self::TYPE_FILE_END === $this->type; } - public function isDelimiter(array $values = array()): bool + public function isDelimiter(array $values = []): bool { if (self::TYPE_DELIMITER !== $this->type) { return false; diff --git a/vendor/symfony/css-selector/Parser/TokenStream.php b/vendor/symfony/css-selector/Parser/TokenStream.php index d2aee541..843e330b 100644 --- a/vendor/symfony/css-selector/Parser/TokenStream.php +++ b/vendor/symfony/css-selector/Parser/TokenStream.php @@ -29,12 +29,12 @@ class TokenStream /** * @var Token[] */ - private $tokens = array(); + private $tokens = []; /** * @var Token[] */ - private $used = array(); + private $used = []; /** * @var int @@ -154,7 +154,7 @@ class TokenStream return $next->getValue(); } - if ($next->isDelimiter(array('*'))) { + if ($next->isDelimiter(['*'])) { return; } diff --git a/vendor/symfony/css-selector/Parser/Tokenizer/Tokenizer.php b/vendor/symfony/css-selector/Parser/Tokenizer/Tokenizer.php index e32b4d20..fc65bc68 100644 --- a/vendor/symfony/css-selector/Parser/Tokenizer/Tokenizer.php +++ b/vendor/symfony/css-selector/Parser/Tokenizer/Tokenizer.php @@ -38,14 +38,14 @@ class Tokenizer $patterns = new TokenizerPatterns(); $escaping = new TokenizerEscaping($patterns); - $this->handlers = array( + $this->handlers = [ new Handler\WhitespaceHandler(), new Handler\IdentifierHandler($patterns, $escaping), new Handler\HashHandler($patterns, $escaping), new Handler\StringHandler($patterns, $escaping), new Handler\NumberHandler($patterns), new Handler\CommentHandler(), - ); + ]; } /** diff --git a/vendor/symfony/css-selector/Tests/CssSelectorConverterTest.php b/vendor/symfony/css-selector/Tests/CssSelectorConverterTest.php index a3eea7ad..cd0fd785 100644 --- a/vendor/symfony/css-selector/Tests/CssSelectorConverterTest.php +++ b/vendor/symfony/css-selector/Tests/CssSelectorConverterTest.php @@ -55,22 +55,22 @@ class CssSelectorConverterTest extends TestCase public function getCssToXPathWithoutPrefixTestData() { - return array( - array('h1', 'h1'), - array('foo|h1', 'foo:h1'), - array('h1, h2, h3', 'h1 | h2 | h3'), - array('h1:nth-child(3n+1)', "*/*[(name() = 'h1') and (position() - 1 >= 0 and (position() - 1) mod 3 = 0)]"), - array('h1 > p', 'h1/p'), - array('h1#foo', "h1[@id = 'foo']"), - array('h1.foo', "h1[@class and contains(concat(' ', normalize-space(@class), ' '), ' foo ')]"), - array('h1[class*="foo bar"]', "h1[@class and contains(@class, 'foo bar')]"), - array('h1[foo|class*="foo bar"]', "h1[@foo:class and contains(@foo:class, 'foo bar')]"), - array('h1[class]', 'h1[@class]'), - array('h1 .foo', "h1/descendant-or-self::*/*[@class and contains(concat(' ', normalize-space(@class), ' '), ' foo ')]"), - array('h1 #foo', "h1/descendant-or-self::*/*[@id = 'foo']"), - array('h1 [class*=foo]', "h1/descendant-or-self::*/*[@class and contains(@class, 'foo')]"), - array('div>.foo', "div/*[@class and contains(concat(' ', normalize-space(@class), ' '), ' foo ')]"), - array('div > .foo', "div/*[@class and contains(concat(' ', normalize-space(@class), ' '), ' foo ')]"), - ); + return [ + ['h1', 'h1'], + ['foo|h1', 'foo:h1'], + ['h1, h2, h3', 'h1 | h2 | h3'], + ['h1:nth-child(3n+1)', "*/*[(name() = 'h1') and (position() - 1 >= 0 and (position() - 1) mod 3 = 0)]"], + ['h1 > p', 'h1/p'], + ['h1#foo', "h1[@id = 'foo']"], + ['h1.foo', "h1[@class and contains(concat(' ', normalize-space(@class), ' '), ' foo ')]"], + ['h1[class*="foo bar"]', "h1[@class and contains(@class, 'foo bar')]"], + ['h1[foo|class*="foo bar"]', "h1[@foo:class and contains(@foo:class, 'foo bar')]"], + ['h1[class]', 'h1[@class]'], + ['h1 .foo', "h1/descendant-or-self::*/*[@class and contains(concat(' ', normalize-space(@class), ' '), ' foo ')]"], + ['h1 #foo', "h1/descendant-or-self::*/*[@id = 'foo']"], + ['h1 [class*=foo]', "h1/descendant-or-self::*/*[@class and contains(@class, 'foo')]"], + ['div>.foo', "div/*[@class and contains(concat(' ', normalize-space(@class), ' '), ' foo ')]"], + ['div > .foo', "div/*[@class and contains(concat(' ', normalize-space(@class), ' '), ' foo ')]"], + ]; } } diff --git a/vendor/symfony/css-selector/Tests/Node/AttributeNodeTest.php b/vendor/symfony/css-selector/Tests/Node/AttributeNodeTest.php index 1fd090f5..4d600740 100644 --- a/vendor/symfony/css-selector/Tests/Node/AttributeNodeTest.php +++ b/vendor/symfony/css-selector/Tests/Node/AttributeNodeTest.php @@ -18,20 +18,20 @@ class AttributeNodeTest extends AbstractNodeTest { public function getToStringConversionTestData() { - return array( - array(new AttributeNode(new ElementNode(), null, 'attribute', 'exists', null), 'Attribute[Element[*][attribute]]'), - array(new AttributeNode(new ElementNode(), null, 'attribute', '$=', 'value'), "Attribute[Element[*][attribute $= 'value']]"), - array(new AttributeNode(new ElementNode(), 'namespace', 'attribute', '$=', 'value'), "Attribute[Element[*][namespace|attribute $= 'value']]"), - ); + return [ + [new AttributeNode(new ElementNode(), null, 'attribute', 'exists', null), 'Attribute[Element[*][attribute]]'], + [new AttributeNode(new ElementNode(), null, 'attribute', '$=', 'value'), "Attribute[Element[*][attribute $= 'value']]"], + [new AttributeNode(new ElementNode(), 'namespace', 'attribute', '$=', 'value'), "Attribute[Element[*][namespace|attribute $= 'value']]"], + ]; } public function getSpecificityValueTestData() { - return array( - array(new AttributeNode(new ElementNode(), null, 'attribute', 'exists', null), 10), - array(new AttributeNode(new ElementNode(null, 'element'), null, 'attribute', 'exists', null), 11), - array(new AttributeNode(new ElementNode(), null, 'attribute', '$=', 'value'), 10), - array(new AttributeNode(new ElementNode(), 'namespace', 'attribute', '$=', 'value'), 10), - ); + return [ + [new AttributeNode(new ElementNode(), null, 'attribute', 'exists', null), 10], + [new AttributeNode(new ElementNode(null, 'element'), null, 'attribute', 'exists', null), 11], + [new AttributeNode(new ElementNode(), null, 'attribute', '$=', 'value'), 10], + [new AttributeNode(new ElementNode(), 'namespace', 'attribute', '$=', 'value'), 10], + ]; } } diff --git a/vendor/symfony/css-selector/Tests/Node/ClassNodeTest.php b/vendor/symfony/css-selector/Tests/Node/ClassNodeTest.php index e0ab45ac..aa80c927 100644 --- a/vendor/symfony/css-selector/Tests/Node/ClassNodeTest.php +++ b/vendor/symfony/css-selector/Tests/Node/ClassNodeTest.php @@ -18,16 +18,16 @@ class ClassNodeTest extends AbstractNodeTest { public function getToStringConversionTestData() { - return array( - array(new ClassNode(new ElementNode(), 'class'), 'Class[Element[*].class]'), - ); + return [ + [new ClassNode(new ElementNode(), 'class'), 'Class[Element[*].class]'], + ]; } public function getSpecificityValueTestData() { - return array( - array(new ClassNode(new ElementNode(), 'class'), 10), - array(new ClassNode(new ElementNode(null, 'element'), 'class'), 11), - ); + return [ + [new ClassNode(new ElementNode(), 'class'), 10], + [new ClassNode(new ElementNode(null, 'element'), 'class'), 11], + ]; } } diff --git a/vendor/symfony/css-selector/Tests/Node/CombinedSelectorNodeTest.php b/vendor/symfony/css-selector/Tests/Node/CombinedSelectorNodeTest.php index 9547298a..435eaa6a 100644 --- a/vendor/symfony/css-selector/Tests/Node/CombinedSelectorNodeTest.php +++ b/vendor/symfony/css-selector/Tests/Node/CombinedSelectorNodeTest.php @@ -18,18 +18,18 @@ class CombinedSelectorNodeTest extends AbstractNodeTest { public function getToStringConversionTestData() { - return array( - array(new CombinedSelectorNode(new ElementNode(), '>', new ElementNode()), 'CombinedSelector[Element[*] > Element[*]]'), - array(new CombinedSelectorNode(new ElementNode(), ' ', new ElementNode()), 'CombinedSelector[Element[*] Element[*]]'), - ); + return [ + [new CombinedSelectorNode(new ElementNode(), '>', new ElementNode()), 'CombinedSelector[Element[*] > Element[*]]'], + [new CombinedSelectorNode(new ElementNode(), ' ', new ElementNode()), 'CombinedSelector[Element[*] Element[*]]'], + ]; } public function getSpecificityValueTestData() { - return array( - array(new CombinedSelectorNode(new ElementNode(), '>', new ElementNode()), 0), - array(new CombinedSelectorNode(new ElementNode(null, 'element'), '>', new ElementNode()), 1), - array(new CombinedSelectorNode(new ElementNode(null, 'element'), '>', new ElementNode(null, 'element')), 2), - ); + return [ + [new CombinedSelectorNode(new ElementNode(), '>', new ElementNode()), 0], + [new CombinedSelectorNode(new ElementNode(null, 'element'), '>', new ElementNode()), 1], + [new CombinedSelectorNode(new ElementNode(null, 'element'), '>', new ElementNode(null, 'element')), 2], + ]; } } diff --git a/vendor/symfony/css-selector/Tests/Node/ElementNodeTest.php b/vendor/symfony/css-selector/Tests/Node/ElementNodeTest.php index 6d247893..e0797ff0 100644 --- a/vendor/symfony/css-selector/Tests/Node/ElementNodeTest.php +++ b/vendor/symfony/css-selector/Tests/Node/ElementNodeTest.php @@ -17,19 +17,19 @@ class ElementNodeTest extends AbstractNodeTest { public function getToStringConversionTestData() { - return array( - array(new ElementNode(), 'Element[*]'), - array(new ElementNode(null, 'element'), 'Element[element]'), - array(new ElementNode('namespace', 'element'), 'Element[namespace|element]'), - ); + return [ + [new ElementNode(), 'Element[*]'], + [new ElementNode(null, 'element'), 'Element[element]'], + [new ElementNode('namespace', 'element'), 'Element[namespace|element]'], + ]; } public function getSpecificityValueTestData() { - return array( - array(new ElementNode(), 0), - array(new ElementNode(null, 'element'), 1), - array(new ElementNode('namespace', 'element'), 1), - ); + return [ + [new ElementNode(), 0], + [new ElementNode(null, 'element'), 1], + [new ElementNode('namespace', 'element'), 1], + ]; } } diff --git a/vendor/symfony/css-selector/Tests/Node/FunctionNodeTest.php b/vendor/symfony/css-selector/Tests/Node/FunctionNodeTest.php index ee3ce51b..0932393e 100644 --- a/vendor/symfony/css-selector/Tests/Node/FunctionNodeTest.php +++ b/vendor/symfony/css-selector/Tests/Node/FunctionNodeTest.php @@ -19,29 +19,29 @@ class FunctionNodeTest extends AbstractNodeTest { public function getToStringConversionTestData() { - return array( - array(new FunctionNode(new ElementNode(), 'function'), 'Function[Element[*]:function()]'), - array(new FunctionNode(new ElementNode(), 'function', array( + return [ + [new FunctionNode(new ElementNode(), 'function'), 'Function[Element[*]:function()]'], + [new FunctionNode(new ElementNode(), 'function', [ new Token(Token::TYPE_IDENTIFIER, 'value', 0), - )), "Function[Element[*]:function(['value'])]"), - array(new FunctionNode(new ElementNode(), 'function', array( + ]), "Function[Element[*]:function(['value'])]"], + [new FunctionNode(new ElementNode(), 'function', [ new Token(Token::TYPE_STRING, 'value1', 0), new Token(Token::TYPE_NUMBER, 'value2', 0), - )), "Function[Element[*]:function(['value1', 'value2'])]"), - ); + ]), "Function[Element[*]:function(['value1', 'value2'])]"], + ]; } public function getSpecificityValueTestData() { - return array( - array(new FunctionNode(new ElementNode(), 'function'), 10), - array(new FunctionNode(new ElementNode(), 'function', array( + return [ + [new FunctionNode(new ElementNode(), 'function'), 10], + [new FunctionNode(new ElementNode(), 'function', [ new Token(Token::TYPE_IDENTIFIER, 'value', 0), - )), 10), - array(new FunctionNode(new ElementNode(), 'function', array( + ]), 10], + [new FunctionNode(new ElementNode(), 'function', [ new Token(Token::TYPE_STRING, 'value1', 0), new Token(Token::TYPE_NUMBER, 'value2', 0), - )), 10), - ); + ]), 10], + ]; } } diff --git a/vendor/symfony/css-selector/Tests/Node/HashNodeTest.php b/vendor/symfony/css-selector/Tests/Node/HashNodeTest.php index 3bc74da9..ad6765b8 100644 --- a/vendor/symfony/css-selector/Tests/Node/HashNodeTest.php +++ b/vendor/symfony/css-selector/Tests/Node/HashNodeTest.php @@ -18,16 +18,16 @@ class HashNodeTest extends AbstractNodeTest { public function getToStringConversionTestData() { - return array( - array(new HashNode(new ElementNode(), 'id'), 'Hash[Element[*]#id]'), - ); + return [ + [new HashNode(new ElementNode(), 'id'), 'Hash[Element[*]#id]'], + ]; } public function getSpecificityValueTestData() { - return array( - array(new HashNode(new ElementNode(), 'id'), 100), - array(new HashNode(new ElementNode(null, 'id'), 'class'), 101), - ); + return [ + [new HashNode(new ElementNode(), 'id'), 100], + [new HashNode(new ElementNode(null, 'id'), 'class'), 101], + ]; } } diff --git a/vendor/symfony/css-selector/Tests/Node/NegationNodeTest.php b/vendor/symfony/css-selector/Tests/Node/NegationNodeTest.php index ed4d2482..90b684ce 100644 --- a/vendor/symfony/css-selector/Tests/Node/NegationNodeTest.php +++ b/vendor/symfony/css-selector/Tests/Node/NegationNodeTest.php @@ -19,15 +19,15 @@ class NegationNodeTest extends AbstractNodeTest { public function getToStringConversionTestData() { - return array( - array(new NegationNode(new ElementNode(), new ClassNode(new ElementNode(), 'class')), 'Negation[Element[*]:not(Class[Element[*].class])]'), - ); + return [ + [new NegationNode(new ElementNode(), new ClassNode(new ElementNode(), 'class')), 'Negation[Element[*]:not(Class[Element[*].class])]'], + ]; } public function getSpecificityValueTestData() { - return array( - array(new NegationNode(new ElementNode(), new ClassNode(new ElementNode(), 'class')), 10), - ); + return [ + [new NegationNode(new ElementNode(), new ClassNode(new ElementNode(), 'class')), 10], + ]; } } diff --git a/vendor/symfony/css-selector/Tests/Node/PseudoNodeTest.php b/vendor/symfony/css-selector/Tests/Node/PseudoNodeTest.php index bc57813c..4e78776c 100644 --- a/vendor/symfony/css-selector/Tests/Node/PseudoNodeTest.php +++ b/vendor/symfony/css-selector/Tests/Node/PseudoNodeTest.php @@ -18,15 +18,15 @@ class PseudoNodeTest extends AbstractNodeTest { public function getToStringConversionTestData() { - return array( - array(new PseudoNode(new ElementNode(), 'pseudo'), 'Pseudo[Element[*]:pseudo]'), - ); + return [ + [new PseudoNode(new ElementNode(), 'pseudo'), 'Pseudo[Element[*]:pseudo]'], + ]; } public function getSpecificityValueTestData() { - return array( - array(new PseudoNode(new ElementNode(), 'pseudo'), 10), - ); + return [ + [new PseudoNode(new ElementNode(), 'pseudo'), 10], + ]; } } diff --git a/vendor/symfony/css-selector/Tests/Node/SelectorNodeTest.php b/vendor/symfony/css-selector/Tests/Node/SelectorNodeTest.php index 5badf71d..85e3bdac 100644 --- a/vendor/symfony/css-selector/Tests/Node/SelectorNodeTest.php +++ b/vendor/symfony/css-selector/Tests/Node/SelectorNodeTest.php @@ -18,17 +18,17 @@ class SelectorNodeTest extends AbstractNodeTest { public function getToStringConversionTestData() { - return array( - array(new SelectorNode(new ElementNode()), 'Selector[Element[*]]'), - array(new SelectorNode(new ElementNode(), 'pseudo'), 'Selector[Element[*]::pseudo]'), - ); + return [ + [new SelectorNode(new ElementNode()), 'Selector[Element[*]]'], + [new SelectorNode(new ElementNode(), 'pseudo'), 'Selector[Element[*]::pseudo]'], + ]; } public function getSpecificityValueTestData() { - return array( - array(new SelectorNode(new ElementNode()), 0), - array(new SelectorNode(new ElementNode(), 'pseudo'), 1), - ); + return [ + [new SelectorNode(new ElementNode()), 0], + [new SelectorNode(new ElementNode(), 'pseudo'), 1], + ]; } } diff --git a/vendor/symfony/css-selector/Tests/Node/SpecificityTest.php b/vendor/symfony/css-selector/Tests/Node/SpecificityTest.php index b58eb892..bf48d49f 100644 --- a/vendor/symfony/css-selector/Tests/Node/SpecificityTest.php +++ b/vendor/symfony/css-selector/Tests/Node/SpecificityTest.php @@ -30,13 +30,13 @@ class SpecificityTest extends TestCase public function getValueTestData() { - return array( - array(new Specificity(0, 0, 0), 0), - array(new Specificity(0, 0, 2), 2), - array(new Specificity(0, 3, 0), 30), - array(new Specificity(4, 0, 0), 400), - array(new Specificity(4, 3, 2), 432), - ); + return [ + [new Specificity(0, 0, 0), 0], + [new Specificity(0, 0, 2), 2], + [new Specificity(0, 3, 0), 30], + [new Specificity(4, 0, 0), 400], + [new Specificity(4, 3, 2), 432], + ]; } /** @dataProvider getCompareTestData */ @@ -47,17 +47,17 @@ class SpecificityTest extends TestCase public function getCompareTestData() { - return array( - array(new Specificity(0, 0, 0), new Specificity(0, 0, 0), 0), - array(new Specificity(0, 0, 1), new Specificity(0, 0, 1), 0), - array(new Specificity(0, 0, 2), new Specificity(0, 0, 1), 1), - array(new Specificity(0, 0, 2), new Specificity(0, 0, 3), -1), - array(new Specificity(0, 4, 0), new Specificity(0, 4, 0), 0), - array(new Specificity(0, 6, 0), new Specificity(0, 5, 11), 1), - array(new Specificity(0, 7, 0), new Specificity(0, 8, 0), -1), - array(new Specificity(9, 0, 0), new Specificity(9, 0, 0), 0), - array(new Specificity(11, 0, 0), new Specificity(10, 11, 0), 1), - array(new Specificity(12, 11, 0), new Specificity(13, 0, 0), -1), - ); + return [ + [new Specificity(0, 0, 0), new Specificity(0, 0, 0), 0], + [new Specificity(0, 0, 1), new Specificity(0, 0, 1), 0], + [new Specificity(0, 0, 2), new Specificity(0, 0, 1), 1], + [new Specificity(0, 0, 2), new Specificity(0, 0, 3), -1], + [new Specificity(0, 4, 0), new Specificity(0, 4, 0), 0], + [new Specificity(0, 6, 0), new Specificity(0, 5, 11), 1], + [new Specificity(0, 7, 0), new Specificity(0, 8, 0), -1], + [new Specificity(9, 0, 0), new Specificity(9, 0, 0), 0], + [new Specificity(11, 0, 0), new Specificity(10, 11, 0), 1], + [new Specificity(12, 11, 0), new Specificity(13, 0, 0), -1], + ]; } } diff --git a/vendor/symfony/css-selector/Tests/Parser/Handler/AbstractHandlerTest.php b/vendor/symfony/css-selector/Tests/Parser/Handler/AbstractHandlerTest.php index f5c9dc8b..aaed55c2 100644 --- a/vendor/symfony/css-selector/Tests/Parser/Handler/AbstractHandlerTest.php +++ b/vendor/symfony/css-selector/Tests/Parser/Handler/AbstractHandlerTest.php @@ -54,7 +54,7 @@ abstract class AbstractHandlerTest extends TestCase $property = new \ReflectionProperty($stream, 'tokens'); $property->setAccessible(true); - $this->assertEquals(array(), $property->getValue($stream)); + $this->assertEquals([], $property->getValue($stream)); } protected function assertRemainingContent(Reader $reader, $remainingContent) diff --git a/vendor/symfony/css-selector/Tests/Parser/Handler/CommentHandlerTest.php b/vendor/symfony/css-selector/Tests/Parser/Handler/CommentHandlerTest.php index 3961bf7d..de400478 100644 --- a/vendor/symfony/css-selector/Tests/Parser/Handler/CommentHandlerTest.php +++ b/vendor/symfony/css-selector/Tests/Parser/Handler/CommentHandlerTest.php @@ -32,20 +32,20 @@ class CommentHandlerTest extends AbstractHandlerTest public function getHandleValueTestData() { - return array( + return [ // 2nd argument only exists for inherited method compatibility - array('/* comment */', new Token(null, null, null), ''), - array('/* comment */foo', new Token(null, null, null), 'foo'), - ); + ['/* comment */', new Token(null, null, null), ''], + ['/* comment */foo', new Token(null, null, null), 'foo'], + ]; } public function getDontHandleValueTestData() { - return array( - array('>'), - array('+'), - array(' '), - ); + return [ + ['>'], + ['+'], + [' '], + ]; } protected function generateHandler() diff --git a/vendor/symfony/css-selector/Tests/Parser/Handler/HashHandlerTest.php b/vendor/symfony/css-selector/Tests/Parser/Handler/HashHandlerTest.php index 5730120b..9444f510 100644 --- a/vendor/symfony/css-selector/Tests/Parser/Handler/HashHandlerTest.php +++ b/vendor/symfony/css-selector/Tests/Parser/Handler/HashHandlerTest.php @@ -20,24 +20,24 @@ class HashHandlerTest extends AbstractHandlerTest { public function getHandleValueTestData() { - return array( - array('#id', new Token(Token::TYPE_HASH, 'id', 0), ''), - array('#123', new Token(Token::TYPE_HASH, '123', 0), ''), + return [ + ['#id', new Token(Token::TYPE_HASH, 'id', 0), ''], + ['#123', new Token(Token::TYPE_HASH, '123', 0), ''], - array('#id.class', new Token(Token::TYPE_HASH, 'id', 0), '.class'), - array('#id element', new Token(Token::TYPE_HASH, 'id', 0), ' element'), - ); + ['#id.class', new Token(Token::TYPE_HASH, 'id', 0), '.class'], + ['#id element', new Token(Token::TYPE_HASH, 'id', 0), ' element'], + ]; } public function getDontHandleValueTestData() { - return array( - array('id'), - array('123'), - array('<'), - array('<'), - array('#'), - ); + return [ + ['id'], + ['123'], + ['<'], + ['<'], + ['#'], + ]; } protected function generateHandler() diff --git a/vendor/symfony/css-selector/Tests/Parser/Handler/IdentifierHandlerTest.php b/vendor/symfony/css-selector/Tests/Parser/Handler/IdentifierHandlerTest.php index f56430c7..c54ba537 100644 --- a/vendor/symfony/css-selector/Tests/Parser/Handler/IdentifierHandlerTest.php +++ b/vendor/symfony/css-selector/Tests/Parser/Handler/IdentifierHandlerTest.php @@ -20,24 +20,24 @@ class IdentifierHandlerTest extends AbstractHandlerTest { public function getHandleValueTestData() { - return array( - array('foo', new Token(Token::TYPE_IDENTIFIER, 'foo', 0), ''), - array('foo|bar', new Token(Token::TYPE_IDENTIFIER, 'foo', 0), '|bar'), - array('foo.class', new Token(Token::TYPE_IDENTIFIER, 'foo', 0), '.class'), - array('foo[attr]', new Token(Token::TYPE_IDENTIFIER, 'foo', 0), '[attr]'), - array('foo bar', new Token(Token::TYPE_IDENTIFIER, 'foo', 0), ' bar'), - ); + return [ + ['foo', new Token(Token::TYPE_IDENTIFIER, 'foo', 0), ''], + ['foo|bar', new Token(Token::TYPE_IDENTIFIER, 'foo', 0), '|bar'], + ['foo.class', new Token(Token::TYPE_IDENTIFIER, 'foo', 0), '.class'], + ['foo[attr]', new Token(Token::TYPE_IDENTIFIER, 'foo', 0), '[attr]'], + ['foo bar', new Token(Token::TYPE_IDENTIFIER, 'foo', 0), ' bar'], + ]; } public function getDontHandleValueTestData() { - return array( - array('>'), - array('+'), - array(' '), - array('*|foo'), - array('/* comment */'), - ); + return [ + ['>'], + ['+'], + [' '], + ['*|foo'], + ['/* comment */'], + ]; } protected function generateHandler() diff --git a/vendor/symfony/css-selector/Tests/Parser/Handler/NumberHandlerTest.php b/vendor/symfony/css-selector/Tests/Parser/Handler/NumberHandlerTest.php index 675fd05b..b43d3694 100644 --- a/vendor/symfony/css-selector/Tests/Parser/Handler/NumberHandlerTest.php +++ b/vendor/symfony/css-selector/Tests/Parser/Handler/NumberHandlerTest.php @@ -19,26 +19,26 @@ class NumberHandlerTest extends AbstractHandlerTest { public function getHandleValueTestData() { - return array( - array('12', new Token(Token::TYPE_NUMBER, '12', 0), ''), - array('12.34', new Token(Token::TYPE_NUMBER, '12.34', 0), ''), - array('+12.34', new Token(Token::TYPE_NUMBER, '+12.34', 0), ''), - array('-12.34', new Token(Token::TYPE_NUMBER, '-12.34', 0), ''), + return [ + ['12', new Token(Token::TYPE_NUMBER, '12', 0), ''], + ['12.34', new Token(Token::TYPE_NUMBER, '12.34', 0), ''], + ['+12.34', new Token(Token::TYPE_NUMBER, '+12.34', 0), ''], + ['-12.34', new Token(Token::TYPE_NUMBER, '-12.34', 0), ''], - array('12 arg', new Token(Token::TYPE_NUMBER, '12', 0), ' arg'), - array('12]', new Token(Token::TYPE_NUMBER, '12', 0), ']'), - ); + ['12 arg', new Token(Token::TYPE_NUMBER, '12', 0), ' arg'], + ['12]', new Token(Token::TYPE_NUMBER, '12', 0), ']'], + ]; } public function getDontHandleValueTestData() { - return array( - array('hello'), - array('>'), - array('+'), - array(' '), - array('/* comment */'), - ); + return [ + ['hello'], + ['>'], + ['+'], + [' '], + ['/* comment */'], + ]; } protected function generateHandler() diff --git a/vendor/symfony/css-selector/Tests/Parser/Handler/StringHandlerTest.php b/vendor/symfony/css-selector/Tests/Parser/Handler/StringHandlerTest.php index 8ea5d4d5..baa72735 100644 --- a/vendor/symfony/css-selector/Tests/Parser/Handler/StringHandlerTest.php +++ b/vendor/symfony/css-selector/Tests/Parser/Handler/StringHandlerTest.php @@ -20,25 +20,25 @@ class StringHandlerTest extends AbstractHandlerTest { public function getHandleValueTestData() { - return array( - array('"hello"', new Token(Token::TYPE_STRING, 'hello', 1), ''), - array('"1"', new Token(Token::TYPE_STRING, '1', 1), ''), - array('" "', new Token(Token::TYPE_STRING, ' ', 1), ''), - array('""', new Token(Token::TYPE_STRING, '', 1), ''), - array("'hello'", new Token(Token::TYPE_STRING, 'hello', 1), ''), + return [ + ['"hello"', new Token(Token::TYPE_STRING, 'hello', 1), ''], + ['"1"', new Token(Token::TYPE_STRING, '1', 1), ''], + ['" "', new Token(Token::TYPE_STRING, ' ', 1), ''], + ['""', new Token(Token::TYPE_STRING, '', 1), ''], + ["'hello'", new Token(Token::TYPE_STRING, 'hello', 1), ''], - array("'foo'bar", new Token(Token::TYPE_STRING, 'foo', 1), 'bar'), - ); + ["'foo'bar", new Token(Token::TYPE_STRING, 'foo', 1), 'bar'], + ]; } public function getDontHandleValueTestData() { - return array( - array('hello'), - array('>'), - array('1'), - array(' '), - ); + return [ + ['hello'], + ['>'], + ['1'], + [' '], + ]; } protected function generateHandler() diff --git a/vendor/symfony/css-selector/Tests/Parser/Handler/WhitespaceHandlerTest.php b/vendor/symfony/css-selector/Tests/Parser/Handler/WhitespaceHandlerTest.php index f5f9e71d..67509ef1 100644 --- a/vendor/symfony/css-selector/Tests/Parser/Handler/WhitespaceHandlerTest.php +++ b/vendor/symfony/css-selector/Tests/Parser/Handler/WhitespaceHandlerTest.php @@ -18,23 +18,23 @@ class WhitespaceHandlerTest extends AbstractHandlerTest { public function getHandleValueTestData() { - return array( - array(' ', new Token(Token::TYPE_WHITESPACE, ' ', 0), ''), - array("\n", new Token(Token::TYPE_WHITESPACE, "\n", 0), ''), - array("\t", new Token(Token::TYPE_WHITESPACE, "\t", 0), ''), + return [ + [' ', new Token(Token::TYPE_WHITESPACE, ' ', 0), ''], + ["\n", new Token(Token::TYPE_WHITESPACE, "\n", 0), ''], + ["\t", new Token(Token::TYPE_WHITESPACE, "\t", 0), ''], - array(' foo', new Token(Token::TYPE_WHITESPACE, ' ', 0), 'foo'), - array(' .foo', new Token(Token::TYPE_WHITESPACE, ' ', 0), '.foo'), - ); + [' foo', new Token(Token::TYPE_WHITESPACE, ' ', 0), 'foo'], + [' .foo', new Token(Token::TYPE_WHITESPACE, ' ', 0), '.foo'], + ]; } public function getDontHandleValueTestData() { - return array( - array('>'), - array('1'), - array('a'), - ); + return [ + ['>'], + ['1'], + ['a'], + ]; } protected function generateHandler() diff --git a/vendor/symfony/css-selector/Tests/Parser/ParserTest.php b/vendor/symfony/css-selector/Tests/Parser/ParserTest.php index 024be810..f63a15e0 100644 --- a/vendor/symfony/css-selector/Tests/Parser/ParserTest.php +++ b/vendor/symfony/css-selector/Tests/Parser/ParserTest.php @@ -77,7 +77,7 @@ class ParserTest extends TestCase /** @var FunctionNode $function */ $function = $selectors[0]->getTree(); - $this->assertEquals(array($a, $b), Parser::parseSeries($function->getArguments())); + $this->assertEquals([$a, $b], Parser::parseSeries($function->getArguments())); } /** @dataProvider getParseSeriesExceptionTestData */ @@ -89,165 +89,165 @@ class ParserTest extends TestCase /** @var FunctionNode $function */ $function = $selectors[0]->getTree(); - $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('Symfony\Component\CssSelector\Exception\SyntaxErrorException'); + $this->expectException('Symfony\Component\CssSelector\Exception\SyntaxErrorException'); Parser::parseSeries($function->getArguments()); } public function getParserTestData() { - return array( - array('*', array('Element[*]')), - array('*|*', array('Element[*]')), - array('*|foo', array('Element[foo]')), - array('foo|*', array('Element[foo|*]')), - array('foo|bar', array('Element[foo|bar]')), - array('#foo#bar', array('Hash[Hash[Element[*]#foo]#bar]')), - array('div>.foo', array('CombinedSelector[Element[div] > Class[Element[*].foo]]')), - array('div> .foo', array('CombinedSelector[Element[div] > Class[Element[*].foo]]')), - array('div >.foo', array('CombinedSelector[Element[div] > Class[Element[*].foo]]')), - array('div > .foo', array('CombinedSelector[Element[div] > Class[Element[*].foo]]')), - array("div \n> \t \t .foo", array('CombinedSelector[Element[div] > Class[Element[*].foo]]')), - array('td.foo,.bar', array('Class[Element[td].foo]', 'Class[Element[*].bar]')), - array('td.foo, .bar', array('Class[Element[td].foo]', 'Class[Element[*].bar]')), - array("td.foo\t\r\n\f ,\t\r\n\f .bar", array('Class[Element[td].foo]', 'Class[Element[*].bar]')), - array('td.foo,.bar', array('Class[Element[td].foo]', 'Class[Element[*].bar]')), - array('td.foo, .bar', array('Class[Element[td].foo]', 'Class[Element[*].bar]')), - array("td.foo\t\r\n\f ,\t\r\n\f .bar", array('Class[Element[td].foo]', 'Class[Element[*].bar]')), - array('div, td.foo, div.bar span', array('Element[div]', 'Class[Element[td].foo]', 'CombinedSelector[Class[Element[div].bar] Element[span]]')), - array('div > p', array('CombinedSelector[Element[div] > Element[p]]')), - array('td:first', array('Pseudo[Element[td]:first]')), - array('td :first', array('CombinedSelector[Element[td] Pseudo[Element[*]:first]]')), - array('a[name]', array('Attribute[Element[a][name]]')), - array("a[ name\t]", array('Attribute[Element[a][name]]')), - array('a [name]', array('CombinedSelector[Element[a] Attribute[Element[*][name]]]')), - array('[name="foo"]', array("Attribute[Element[*][name = 'foo']]")), - array("[name='foo[1]']", array("Attribute[Element[*][name = 'foo[1]']]")), - array("[name='foo[0][bar]']", array("Attribute[Element[*][name = 'foo[0][bar]']]")), - array('a[rel="include"]', array("Attribute[Element[a][rel = 'include']]")), - array('a[rel = include]', array("Attribute[Element[a][rel = 'include']]")), - array("a[hreflang |= 'en']", array("Attribute[Element[a][hreflang |= 'en']]")), - array('a[hreflang|=en]', array("Attribute[Element[a][hreflang |= 'en']]")), - array('div:nth-child(10)', array("Function[Element[div]:nth-child(['10'])]")), - array(':nth-child(2n+2)', array("Function[Element[*]:nth-child(['2', 'n', '+2'])]")), - array('div:nth-of-type(10)', array("Function[Element[div]:nth-of-type(['10'])]")), - array('div div:nth-of-type(10) .aclass', array("CombinedSelector[CombinedSelector[Element[div] Function[Element[div]:nth-of-type(['10'])]] Class[Element[*].aclass]]")), - array('label:only', array('Pseudo[Element[label]:only]')), - array('a:lang(fr)', array("Function[Element[a]:lang(['fr'])]")), - array('div:contains("foo")', array("Function[Element[div]:contains(['foo'])]")), - array('div#foobar', array('Hash[Element[div]#foobar]')), - array('div:not(div.foo)', array('Negation[Element[div]:not(Class[Element[div].foo])]')), - array('td ~ th', array('CombinedSelector[Element[td] ~ Element[th]]')), - array('.foo[data-bar][data-baz=0]', array("Attribute[Attribute[Class[Element[*].foo][data-bar]][data-baz = '0']]")), - ); + return [ + ['*', ['Element[*]']], + ['*|*', ['Element[*]']], + ['*|foo', ['Element[foo]']], + ['foo|*', ['Element[foo|*]']], + ['foo|bar', ['Element[foo|bar]']], + ['#foo#bar', ['Hash[Hash[Element[*]#foo]#bar]']], + ['div>.foo', ['CombinedSelector[Element[div] > Class[Element[*].foo]]']], + ['div> .foo', ['CombinedSelector[Element[div] > Class[Element[*].foo]]']], + ['div >.foo', ['CombinedSelector[Element[div] > Class[Element[*].foo]]']], + ['div > .foo', ['CombinedSelector[Element[div] > Class[Element[*].foo]]']], + ["div \n> \t \t .foo", ['CombinedSelector[Element[div] > Class[Element[*].foo]]']], + ['td.foo,.bar', ['Class[Element[td].foo]', 'Class[Element[*].bar]']], + ['td.foo, .bar', ['Class[Element[td].foo]', 'Class[Element[*].bar]']], + ["td.foo\t\r\n\f ,\t\r\n\f .bar", ['Class[Element[td].foo]', 'Class[Element[*].bar]']], + ['td.foo,.bar', ['Class[Element[td].foo]', 'Class[Element[*].bar]']], + ['td.foo, .bar', ['Class[Element[td].foo]', 'Class[Element[*].bar]']], + ["td.foo\t\r\n\f ,\t\r\n\f .bar", ['Class[Element[td].foo]', 'Class[Element[*].bar]']], + ['div, td.foo, div.bar span', ['Element[div]', 'Class[Element[td].foo]', 'CombinedSelector[Class[Element[div].bar] Element[span]]']], + ['div > p', ['CombinedSelector[Element[div] > Element[p]]']], + ['td:first', ['Pseudo[Element[td]:first]']], + ['td :first', ['CombinedSelector[Element[td] Pseudo[Element[*]:first]]']], + ['a[name]', ['Attribute[Element[a][name]]']], + ["a[ name\t]", ['Attribute[Element[a][name]]']], + ['a [name]', ['CombinedSelector[Element[a] Attribute[Element[*][name]]]']], + ['[name="foo"]', ["Attribute[Element[*][name = 'foo']]"]], + ["[name='foo[1]']", ["Attribute[Element[*][name = 'foo[1]']]"]], + ["[name='foo[0][bar]']", ["Attribute[Element[*][name = 'foo[0][bar]']]"]], + ['a[rel="include"]', ["Attribute[Element[a][rel = 'include']]"]], + ['a[rel = include]', ["Attribute[Element[a][rel = 'include']]"]], + ["a[hreflang |= 'en']", ["Attribute[Element[a][hreflang |= 'en']]"]], + ['a[hreflang|=en]', ["Attribute[Element[a][hreflang |= 'en']]"]], + ['div:nth-child(10)', ["Function[Element[div]:nth-child(['10'])]"]], + [':nth-child(2n+2)', ["Function[Element[*]:nth-child(['2', 'n', '+2'])]"]], + ['div:nth-of-type(10)', ["Function[Element[div]:nth-of-type(['10'])]"]], + ['div div:nth-of-type(10) .aclass', ["CombinedSelector[CombinedSelector[Element[div] Function[Element[div]:nth-of-type(['10'])]] Class[Element[*].aclass]]"]], + ['label:only', ['Pseudo[Element[label]:only]']], + ['a:lang(fr)', ["Function[Element[a]:lang(['fr'])]"]], + ['div:contains("foo")', ["Function[Element[div]:contains(['foo'])]"]], + ['div#foobar', ['Hash[Element[div]#foobar]']], + ['div:not(div.foo)', ['Negation[Element[div]:not(Class[Element[div].foo])]']], + ['td ~ th', ['CombinedSelector[Element[td] ~ Element[th]]']], + ['.foo[data-bar][data-baz=0]', ["Attribute[Attribute[Class[Element[*].foo][data-bar]][data-baz = '0']]"]], + ]; } public function getParserExceptionTestData() { - return array( - array('attributes(href)/html/body/a', SyntaxErrorException::unexpectedToken('selector', new Token(Token::TYPE_DELIMITER, '(', 10))->getMessage()), - array('attributes(href)', SyntaxErrorException::unexpectedToken('selector', new Token(Token::TYPE_DELIMITER, '(', 10))->getMessage()), - array('html/body/a', SyntaxErrorException::unexpectedToken('selector', new Token(Token::TYPE_DELIMITER, '/', 4))->getMessage()), - array(' ', SyntaxErrorException::unexpectedToken('selector', new Token(Token::TYPE_FILE_END, '', 1))->getMessage()), - array('div, ', SyntaxErrorException::unexpectedToken('selector', new Token(Token::TYPE_FILE_END, '', 5))->getMessage()), - array(' , div', SyntaxErrorException::unexpectedToken('selector', new Token(Token::TYPE_DELIMITER, ',', 1))->getMessage()), - array('p, , div', SyntaxErrorException::unexpectedToken('selector', new Token(Token::TYPE_DELIMITER, ',', 3))->getMessage()), - array('div > ', SyntaxErrorException::unexpectedToken('selector', new Token(Token::TYPE_FILE_END, '', 6))->getMessage()), - array(' > div', SyntaxErrorException::unexpectedToken('selector', new Token(Token::TYPE_DELIMITER, '>', 2))->getMessage()), - array('foo|#bar', SyntaxErrorException::unexpectedToken('identifier or "*"', new Token(Token::TYPE_HASH, 'bar', 4))->getMessage()), - array('#.foo', SyntaxErrorException::unexpectedToken('selector', new Token(Token::TYPE_DELIMITER, '#', 0))->getMessage()), - array('.#foo', SyntaxErrorException::unexpectedToken('identifier', new Token(Token::TYPE_HASH, 'foo', 1))->getMessage()), - array(':#foo', SyntaxErrorException::unexpectedToken('identifier', new Token(Token::TYPE_HASH, 'foo', 1))->getMessage()), - array('[*]', SyntaxErrorException::unexpectedToken('"|"', new Token(Token::TYPE_DELIMITER, ']', 2))->getMessage()), - array('[foo|]', SyntaxErrorException::unexpectedToken('identifier', new Token(Token::TYPE_DELIMITER, ']', 5))->getMessage()), - array('[#]', SyntaxErrorException::unexpectedToken('identifier or "*"', new Token(Token::TYPE_DELIMITER, '#', 1))->getMessage()), - array('[foo=#]', SyntaxErrorException::unexpectedToken('string or identifier', new Token(Token::TYPE_DELIMITER, '#', 5))->getMessage()), - array(':nth-child()', SyntaxErrorException::unexpectedToken('at least one argument', new Token(Token::TYPE_DELIMITER, ')', 11))->getMessage()), - array('[href]a', SyntaxErrorException::unexpectedToken('selector', new Token(Token::TYPE_IDENTIFIER, 'a', 6))->getMessage()), - array('[rel:stylesheet]', SyntaxErrorException::unexpectedToken('operator', new Token(Token::TYPE_DELIMITER, ':', 4))->getMessage()), - array('[rel=stylesheet', SyntaxErrorException::unexpectedToken('"]"', new Token(Token::TYPE_FILE_END, '', 15))->getMessage()), - array(':lang(fr', SyntaxErrorException::unexpectedToken('an argument', new Token(Token::TYPE_FILE_END, '', 8))->getMessage()), - array(':contains("foo', SyntaxErrorException::unclosedString(10)->getMessage()), - array('foo!', SyntaxErrorException::unexpectedToken('selector', new Token(Token::TYPE_DELIMITER, '!', 3))->getMessage()), - ); + return [ + ['attributes(href)/html/body/a', SyntaxErrorException::unexpectedToken('selector', new Token(Token::TYPE_DELIMITER, '(', 10))->getMessage()], + ['attributes(href)', SyntaxErrorException::unexpectedToken('selector', new Token(Token::TYPE_DELIMITER, '(', 10))->getMessage()], + ['html/body/a', SyntaxErrorException::unexpectedToken('selector', new Token(Token::TYPE_DELIMITER, '/', 4))->getMessage()], + [' ', SyntaxErrorException::unexpectedToken('selector', new Token(Token::TYPE_FILE_END, '', 1))->getMessage()], + ['div, ', SyntaxErrorException::unexpectedToken('selector', new Token(Token::TYPE_FILE_END, '', 5))->getMessage()], + [' , div', SyntaxErrorException::unexpectedToken('selector', new Token(Token::TYPE_DELIMITER, ',', 1))->getMessage()], + ['p, , div', SyntaxErrorException::unexpectedToken('selector', new Token(Token::TYPE_DELIMITER, ',', 3))->getMessage()], + ['div > ', SyntaxErrorException::unexpectedToken('selector', new Token(Token::TYPE_FILE_END, '', 6))->getMessage()], + [' > div', SyntaxErrorException::unexpectedToken('selector', new Token(Token::TYPE_DELIMITER, '>', 2))->getMessage()], + ['foo|#bar', SyntaxErrorException::unexpectedToken('identifier or "*"', new Token(Token::TYPE_HASH, 'bar', 4))->getMessage()], + ['#.foo', SyntaxErrorException::unexpectedToken('selector', new Token(Token::TYPE_DELIMITER, '#', 0))->getMessage()], + ['.#foo', SyntaxErrorException::unexpectedToken('identifier', new Token(Token::TYPE_HASH, 'foo', 1))->getMessage()], + [':#foo', SyntaxErrorException::unexpectedToken('identifier', new Token(Token::TYPE_HASH, 'foo', 1))->getMessage()], + ['[*]', SyntaxErrorException::unexpectedToken('"|"', new Token(Token::TYPE_DELIMITER, ']', 2))->getMessage()], + ['[foo|]', SyntaxErrorException::unexpectedToken('identifier', new Token(Token::TYPE_DELIMITER, ']', 5))->getMessage()], + ['[#]', SyntaxErrorException::unexpectedToken('identifier or "*"', new Token(Token::TYPE_DELIMITER, '#', 1))->getMessage()], + ['[foo=#]', SyntaxErrorException::unexpectedToken('string or identifier', new Token(Token::TYPE_DELIMITER, '#', 5))->getMessage()], + [':nth-child()', SyntaxErrorException::unexpectedToken('at least one argument', new Token(Token::TYPE_DELIMITER, ')', 11))->getMessage()], + ['[href]a', SyntaxErrorException::unexpectedToken('selector', new Token(Token::TYPE_IDENTIFIER, 'a', 6))->getMessage()], + ['[rel:stylesheet]', SyntaxErrorException::unexpectedToken('operator', new Token(Token::TYPE_DELIMITER, ':', 4))->getMessage()], + ['[rel=stylesheet', SyntaxErrorException::unexpectedToken('"]"', new Token(Token::TYPE_FILE_END, '', 15))->getMessage()], + [':lang(fr', SyntaxErrorException::unexpectedToken('an argument', new Token(Token::TYPE_FILE_END, '', 8))->getMessage()], + [':contains("foo', SyntaxErrorException::unclosedString(10)->getMessage()], + ['foo!', SyntaxErrorException::unexpectedToken('selector', new Token(Token::TYPE_DELIMITER, '!', 3))->getMessage()], + ]; } public function getPseudoElementsTestData() { - return array( - array('foo', 'Element[foo]', ''), - array('*', 'Element[*]', ''), - array(':empty', 'Pseudo[Element[*]:empty]', ''), - array(':BEfore', 'Element[*]', 'before'), - array(':aftER', 'Element[*]', 'after'), - array(':First-Line', 'Element[*]', 'first-line'), - array(':First-Letter', 'Element[*]', 'first-letter'), - array('::befoRE', 'Element[*]', 'before'), - array('::AFter', 'Element[*]', 'after'), - array('::firsT-linE', 'Element[*]', 'first-line'), - array('::firsT-letteR', 'Element[*]', 'first-letter'), - array('::Selection', 'Element[*]', 'selection'), - array('foo:after', 'Element[foo]', 'after'), - array('foo::selection', 'Element[foo]', 'selection'), - array('lorem#ipsum ~ a#b.c[href]:empty::selection', 'CombinedSelector[Hash[Element[lorem]#ipsum] ~ Pseudo[Attribute[Class[Hash[Element[a]#b].c][href]]:empty]]', 'selection'), - array('video::-webkit-media-controls', 'Element[video]', '-webkit-media-controls'), - ); + return [ + ['foo', 'Element[foo]', ''], + ['*', 'Element[*]', ''], + [':empty', 'Pseudo[Element[*]:empty]', ''], + [':BEfore', 'Element[*]', 'before'], + [':aftER', 'Element[*]', 'after'], + [':First-Line', 'Element[*]', 'first-line'], + [':First-Letter', 'Element[*]', 'first-letter'], + ['::befoRE', 'Element[*]', 'before'], + ['::AFter', 'Element[*]', 'after'], + ['::firsT-linE', 'Element[*]', 'first-line'], + ['::firsT-letteR', 'Element[*]', 'first-letter'], + ['::Selection', 'Element[*]', 'selection'], + ['foo:after', 'Element[foo]', 'after'], + ['foo::selection', 'Element[foo]', 'selection'], + ['lorem#ipsum ~ a#b.c[href]:empty::selection', 'CombinedSelector[Hash[Element[lorem]#ipsum] ~ Pseudo[Attribute[Class[Hash[Element[a]#b].c][href]]:empty]]', 'selection'], + ['video::-webkit-media-controls', 'Element[video]', '-webkit-media-controls'], + ]; } public function getSpecificityTestData() { - return array( - array('*', 0), - array(' foo', 1), - array(':empty ', 10), - array(':before', 1), - array('*:before', 1), - array(':nth-child(2)', 10), - array('.bar', 10), - array('[baz]', 10), - array('[baz="4"]', 10), - array('[baz^="4"]', 10), - array('#lipsum', 100), - array(':not(*)', 0), - array(':not(foo)', 1), - array(':not(.foo)', 10), - array(':not([foo])', 10), - array(':not(:empty)', 10), - array(':not(#foo)', 100), - array('foo:empty', 11), - array('foo:before', 2), - array('foo::before', 2), - array('foo:empty::before', 12), - array('#lorem + foo#ipsum:first-child > bar:first-line', 213), - ); + return [ + ['*', 0], + [' foo', 1], + [':empty ', 10], + [':before', 1], + ['*:before', 1], + [':nth-child(2)', 10], + ['.bar', 10], + ['[baz]', 10], + ['[baz="4"]', 10], + ['[baz^="4"]', 10], + ['#lipsum', 100], + [':not(*)', 0], + [':not(foo)', 1], + [':not(.foo)', 10], + [':not([foo])', 10], + [':not(:empty)', 10], + [':not(#foo)', 100], + ['foo:empty', 11], + ['foo:before', 2], + ['foo::before', 2], + ['foo:empty::before', 12], + ['#lorem + foo#ipsum:first-child > bar:first-line', 213], + ]; } public function getParseSeriesTestData() { - return array( - array('1n+3', 1, 3), - array('1n +3', 1, 3), - array('1n + 3', 1, 3), - array('1n+ 3', 1, 3), - array('1n-3', 1, -3), - array('1n -3', 1, -3), - array('1n - 3', 1, -3), - array('1n- 3', 1, -3), - array('n-5', 1, -5), - array('odd', 2, 1), - array('even', 2, 0), - array('3n', 3, 0), - array('n', 1, 0), - array('+n', 1, 0), - array('-n', -1, 0), - array('5', 0, 5), - ); + return [ + ['1n+3', 1, 3], + ['1n +3', 1, 3], + ['1n + 3', 1, 3], + ['1n+ 3', 1, 3], + ['1n-3', 1, -3], + ['1n -3', 1, -3], + ['1n - 3', 1, -3], + ['1n- 3', 1, -3], + ['n-5', 1, -5], + ['odd', 2, 1], + ['even', 2, 0], + ['3n', 3, 0], + ['n', 1, 0], + ['+n', 1, 0], + ['-n', -1, 0], + ['5', 0, 5], + ]; } public function getParseSeriesExceptionTestData() { - return array( - array('foo'), - array('n+'), - ); + return [ + ['foo'], + ['n+'], + ]; } } diff --git a/vendor/symfony/css-selector/Tests/Parser/ReaderTest.php b/vendor/symfony/css-selector/Tests/Parser/ReaderTest.php index 21eb6084..ff9ea909 100644 --- a/vendor/symfony/css-selector/Tests/Parser/ReaderTest.php +++ b/vendor/symfony/css-selector/Tests/Parser/ReaderTest.php @@ -70,11 +70,11 @@ class ReaderTest extends TestCase $reader = new Reader('hello'); $this->assertFalse($reader->findPattern('/world/')); - $this->assertEquals(array('hello', 'h'), $reader->findPattern('/^([a-z]).*/')); + $this->assertEquals(['hello', 'h'], $reader->findPattern('/^([a-z]).*/')); $this->assignPosition($reader, 2); $this->assertFalse($reader->findPattern('/^h.*/')); - $this->assertEquals(array('llo'), $reader->findPattern('/^llo$/')); + $this->assertEquals(['llo'], $reader->findPattern('/^llo$/')); } public function testMoveForward() diff --git a/vendor/symfony/css-selector/Tests/Parser/Shortcut/ClassParserTest.php b/vendor/symfony/css-selector/Tests/Parser/Shortcut/ClassParserTest.php index 7e92f5ba..29d9d5f1 100644 --- a/vendor/symfony/css-selector/Tests/Parser/Shortcut/ClassParserTest.php +++ b/vendor/symfony/css-selector/Tests/Parser/Shortcut/ClassParserTest.php @@ -34,12 +34,12 @@ class ClassParserTest extends TestCase public function getParseTestData() { - return array( - array('.testclass', 'Class[Element[*].testclass]'), - array('testel.testclass', 'Class[Element[testel].testclass]'), - array('testns|.testclass', 'Class[Element[testns|*].testclass]'), - array('testns|*.testclass', 'Class[Element[testns|*].testclass]'), - array('testns|testel.testclass', 'Class[Element[testns|testel].testclass]'), - ); + return [ + ['.testclass', 'Class[Element[*].testclass]'], + ['testel.testclass', 'Class[Element[testel].testclass]'], + ['testns|.testclass', 'Class[Element[testns|*].testclass]'], + ['testns|*.testclass', 'Class[Element[testns|*].testclass]'], + ['testns|testel.testclass', 'Class[Element[testns|testel].testclass]'], + ]; } } diff --git a/vendor/symfony/css-selector/Tests/Parser/Shortcut/ElementParserTest.php b/vendor/symfony/css-selector/Tests/Parser/Shortcut/ElementParserTest.php index 05a730fd..79cc2270 100644 --- a/vendor/symfony/css-selector/Tests/Parser/Shortcut/ElementParserTest.php +++ b/vendor/symfony/css-selector/Tests/Parser/Shortcut/ElementParserTest.php @@ -34,11 +34,11 @@ class ElementParserTest extends TestCase public function getParseTestData() { - return array( - array('*', 'Element[*]'), - array('testel', 'Element[testel]'), - array('testns|*', 'Element[testns|*]'), - array('testns|testel', 'Element[testns|testel]'), - ); + return [ + ['*', 'Element[*]'], + ['testel', 'Element[testel]'], + ['testns|*', 'Element[testns|*]'], + ['testns|testel', 'Element[testns|testel]'], + ]; } } diff --git a/vendor/symfony/css-selector/Tests/Parser/Shortcut/HashParserTest.php b/vendor/symfony/css-selector/Tests/Parser/Shortcut/HashParserTest.php index 82f555d9..a7c79d69 100644 --- a/vendor/symfony/css-selector/Tests/Parser/Shortcut/HashParserTest.php +++ b/vendor/symfony/css-selector/Tests/Parser/Shortcut/HashParserTest.php @@ -34,12 +34,12 @@ class HashParserTest extends TestCase public function getParseTestData() { - return array( - array('#testid', 'Hash[Element[*]#testid]'), - array('testel#testid', 'Hash[Element[testel]#testid]'), - array('testns|#testid', 'Hash[Element[testns|*]#testid]'), - array('testns|*#testid', 'Hash[Element[testns|*]#testid]'), - array('testns|testel#testid', 'Hash[Element[testns|testel]#testid]'), - ); + return [ + ['#testid', 'Hash[Element[*]#testid]'], + ['testel#testid', 'Hash[Element[testel]#testid]'], + ['testns|#testid', 'Hash[Element[testns|*]#testid]'], + ['testns|*#testid', 'Hash[Element[testns|*]#testid]'], + ['testns|testel#testid', 'Hash[Element[testns|testel]#testid]'], + ]; } } diff --git a/vendor/symfony/css-selector/Tests/Parser/TokenStreamTest.php b/vendor/symfony/css-selector/Tests/Parser/TokenStreamTest.php index 44c751ac..fb47625a 100644 --- a/vendor/symfony/css-selector/Tests/Parser/TokenStreamTest.php +++ b/vendor/symfony/css-selector/Tests/Parser/TokenStreamTest.php @@ -53,7 +53,7 @@ class TokenStreamTest extends TestCase public function testFailToGetNextIdentifier() { - $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('Symfony\Component\CssSelector\Exception\SyntaxErrorException'); + $this->expectException('Symfony\Component\CssSelector\Exception\SyntaxErrorException'); $stream = new TokenStream(); $stream->push(new Token(Token::TYPE_DELIMITER, '.', 2)); @@ -73,7 +73,7 @@ class TokenStreamTest extends TestCase public function testFailToGetNextIdentifierOrStar() { - $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('Symfony\Component\CssSelector\Exception\SyntaxErrorException'); + $this->expectException('Symfony\Component\CssSelector\Exception\SyntaxErrorException'); $stream = new TokenStream(); $stream->push(new Token(Token::TYPE_DELIMITER, '.', 2)); diff --git a/vendor/symfony/css-selector/Tests/XPath/TranslatorTest.php b/vendor/symfony/css-selector/Tests/XPath/TranslatorTest.php index 61045829..a9ab29e2 100644 --- a/vendor/symfony/css-selector/Tests/XPath/TranslatorTest.php +++ b/vendor/symfony/css-selector/Tests/XPath/TranslatorTest.php @@ -12,8 +12,12 @@ namespace Symfony\Component\CssSelector\Tests\XPath; use PHPUnit\Framework\TestCase; +use Symfony\Component\CssSelector\Node\ElementNode; +use Symfony\Component\CssSelector\Node\FunctionNode; +use Symfony\Component\CssSelector\Parser\Parser; use Symfony\Component\CssSelector\XPath\Extension\HtmlExtension; use Symfony\Component\CssSelector\XPath\Translator; +use Symfony\Component\CssSelector\XPath\XPathExpr; class TranslatorTest extends TestCase { @@ -31,6 +35,73 @@ class TranslatorTest extends TestCase $this->assertEquals($xpath, $translator->cssToXPath($css, '')); } + /** + * @expectedException \Symfony\Component\CssSelector\Exception\ExpressionErrorException + */ + public function testCssToXPathPseudoElement() + { + $translator = new Translator(); + $translator->registerExtension(new HtmlExtension($translator)); + $translator->cssToXPath('e::first-line'); + } + + /** + * @expectedException \Symfony\Component\CssSelector\Exception\ExpressionErrorException + */ + public function testGetExtensionNotExistsExtension() + { + $translator = new Translator(); + $translator->registerExtension(new HtmlExtension($translator)); + $translator->getExtension('fake'); + } + + /** + * @expectedException \Symfony\Component\CssSelector\Exception\ExpressionErrorException + */ + public function testAddCombinationNotExistsExtension() + { + $translator = new Translator(); + $translator->registerExtension(new HtmlExtension($translator)); + $parser = new Parser(); + $xpath = $parser->parse('*')[0]; + $combinedXpath = $parser->parse('*')[0]; + $translator->addCombination('fake', $xpath, $combinedXpath); + } + + /** + * @expectedException \Symfony\Component\CssSelector\Exception\ExpressionErrorException + */ + public function testAddFunctionNotExistsFunction() + { + $translator = new Translator(); + $translator->registerExtension(new HtmlExtension($translator)); + $xpath = new XPathExpr(); + $function = new FunctionNode(new ElementNode(), 'fake'); + $translator->addFunction($xpath, $function); + } + + /** + * @expectedException \Symfony\Component\CssSelector\Exception\ExpressionErrorException + */ + public function testAddPseudoClassNotExistsClass() + { + $translator = new Translator(); + $translator->registerExtension(new HtmlExtension($translator)); + $xpath = new XPathExpr(); + $translator->addPseudoClass($xpath, 'fake'); + } + + /** + * @expectedException \Symfony\Component\CssSelector\Exception\ExpressionErrorException + */ + public function testAddAttributeMatchingClassNotExistsClass() + { + $translator = new Translator(); + $translator->registerExtension(new HtmlExtension($translator)); + $xpath = new XPathExpr(); + $translator->addAttributeMatching($xpath, '', '', ''); + } + /** @dataProvider getXmlLangTestData */ public function testXmlLang($css, array $elementsId) { @@ -80,248 +151,248 @@ class TranslatorTest extends TestCase public function getXpathLiteralTestData() { - return array( - array('foo', "'foo'"), - array("foo's bar", '"foo\'s bar"'), - array("foo's \"middle\" bar", 'concat(\'foo\', "\'", \'s "middle" bar\')'), - array("foo's 'middle' \"bar\"", 'concat(\'foo\', "\'", \'s \', "\'", \'middle\', "\'", \' "bar"\')'), - ); + return [ + ['foo', "'foo'"], + ["foo's bar", '"foo\'s bar"'], + ["foo's \"middle\" bar", 'concat(\'foo\', "\'", \'s "middle" bar\')'], + ["foo's 'middle' \"bar\"", 'concat(\'foo\', "\'", \'s \', "\'", \'middle\', "\'", \' "bar"\')'], + ]; } public function getCssToXPathTestData() { - return array( - array('*', '*'), - array('e', 'e'), - array('*|e', 'e'), - array('e|f', 'e:f'), - array('e[foo]', 'e[@foo]'), - array('e[foo|bar]', 'e[@foo:bar]'), - array('e[foo="bar"]', "e[@foo = 'bar']"), - array('e[foo~="bar"]', "e[@foo and contains(concat(' ', normalize-space(@foo), ' '), ' bar ')]"), - array('e[foo^="bar"]', "e[@foo and starts-with(@foo, 'bar')]"), - array('e[foo$="bar"]', "e[@foo and substring(@foo, string-length(@foo)-2) = 'bar']"), - array('e[foo*="bar"]', "e[@foo and contains(@foo, 'bar')]"), - array('e[foo!="bar"]', "e[not(@foo) or @foo != 'bar']"), - array('e[foo!="bar"][foo!="baz"]', "e[(not(@foo) or @foo != 'bar') and (not(@foo) or @foo != 'baz')]"), - array('e[hreflang|="en"]', "e[@hreflang and (@hreflang = 'en' or starts-with(@hreflang, 'en-'))]"), - array('e:nth-child(1)', "*/*[(name() = 'e') and (position() = 1)]"), - array('e:nth-last-child(1)', "*/*[(name() = 'e') and (position() = last() - 0)]"), - array('e:nth-last-child(2n+2)', "*/*[(name() = 'e') and (last() - position() - 1 >= 0 and (last() - position() - 1) mod 2 = 0)]"), - array('e:nth-of-type(1)', '*/e[position() = 1]'), - array('e:nth-last-of-type(1)', '*/e[position() = last() - 0]'), - array('div e:nth-last-of-type(1) .aclass', "div/descendant-or-self::*/e[position() = last() - 0]/descendant-or-self::*/*[@class and contains(concat(' ', normalize-space(@class), ' '), ' aclass ')]"), - array('e:first-child', "*/*[(name() = 'e') and (position() = 1)]"), - array('e:last-child', "*/*[(name() = 'e') and (position() = last())]"), - array('e:first-of-type', '*/e[position() = 1]'), - array('e:last-of-type', '*/e[position() = last()]'), - array('e:only-child', "*/*[(name() = 'e') and (last() = 1)]"), - array('e:only-of-type', 'e[last() = 1]'), - array('e:empty', 'e[not(*) and not(string-length())]'), - array('e:EmPTY', 'e[not(*) and not(string-length())]'), - array('e:root', 'e[not(parent::*)]'), - array('e:hover', 'e[0]'), - array('e:contains("foo")', "e[contains(string(.), 'foo')]"), - array('e:ConTains(foo)', "e[contains(string(.), 'foo')]"), - array('e.warning', "e[@class and contains(concat(' ', normalize-space(@class), ' '), ' warning ')]"), - array('e#myid', "e[@id = 'myid']"), - array('e:not(:nth-child(odd))', 'e[not(position() - 1 >= 0 and (position() - 1) mod 2 = 0)]'), - array('e:nOT(*)', 'e[0]'), - array('e f', 'e/descendant-or-self::*/f'), - array('e > f', 'e/f'), - array('e + f', "e/following-sibling::*[(name() = 'f') and (position() = 1)]"), - array('e ~ f', 'e/following-sibling::f'), - array('div#container p', "div[@id = 'container']/descendant-or-self::*/p"), - ); + return [ + ['*', '*'], + ['e', 'e'], + ['*|e', 'e'], + ['e|f', 'e:f'], + ['e[foo]', 'e[@foo]'], + ['e[foo|bar]', 'e[@foo:bar]'], + ['e[foo="bar"]', "e[@foo = 'bar']"], + ['e[foo~="bar"]', "e[@foo and contains(concat(' ', normalize-space(@foo), ' '), ' bar ')]"], + ['e[foo^="bar"]', "e[@foo and starts-with(@foo, 'bar')]"], + ['e[foo$="bar"]', "e[@foo and substring(@foo, string-length(@foo)-2) = 'bar']"], + ['e[foo*="bar"]', "e[@foo and contains(@foo, 'bar')]"], + ['e[foo!="bar"]', "e[not(@foo) or @foo != 'bar']"], + ['e[foo!="bar"][foo!="baz"]', "e[(not(@foo) or @foo != 'bar') and (not(@foo) or @foo != 'baz')]"], + ['e[hreflang|="en"]', "e[@hreflang and (@hreflang = 'en' or starts-with(@hreflang, 'en-'))]"], + ['e:nth-child(1)', "*/*[(name() = 'e') and (position() = 1)]"], + ['e:nth-last-child(1)', "*/*[(name() = 'e') and (position() = last() - 0)]"], + ['e:nth-last-child(2n+2)', "*/*[(name() = 'e') and (last() - position() - 1 >= 0 and (last() - position() - 1) mod 2 = 0)]"], + ['e:nth-of-type(1)', '*/e[position() = 1]'], + ['e:nth-last-of-type(1)', '*/e[position() = last() - 0]'], + ['div e:nth-last-of-type(1) .aclass', "div/descendant-or-self::*/e[position() = last() - 0]/descendant-or-self::*/*[@class and contains(concat(' ', normalize-space(@class), ' '), ' aclass ')]"], + ['e:first-child', "*/*[(name() = 'e') and (position() = 1)]"], + ['e:last-child', "*/*[(name() = 'e') and (position() = last())]"], + ['e:first-of-type', '*/e[position() = 1]'], + ['e:last-of-type', '*/e[position() = last()]'], + ['e:only-child', "*/*[(name() = 'e') and (last() = 1)]"], + ['e:only-of-type', 'e[last() = 1]'], + ['e:empty', 'e[not(*) and not(string-length())]'], + ['e:EmPTY', 'e[not(*) and not(string-length())]'], + ['e:root', 'e[not(parent::*)]'], + ['e:hover', 'e[0]'], + ['e:contains("foo")', "e[contains(string(.), 'foo')]"], + ['e:ConTains(foo)', "e[contains(string(.), 'foo')]"], + ['e.warning', "e[@class and contains(concat(' ', normalize-space(@class), ' '), ' warning ')]"], + ['e#myid', "e[@id = 'myid']"], + ['e:not(:nth-child(odd))', 'e[not(position() - 1 >= 0 and (position() - 1) mod 2 = 0)]'], + ['e:nOT(*)', 'e[0]'], + ['e f', 'e/descendant-or-self::*/f'], + ['e > f', 'e/f'], + ['e + f', "e/following-sibling::*[(name() = 'f') and (position() = 1)]"], + ['e ~ f', 'e/following-sibling::f'], + ['div#container p', "div[@id = 'container']/descendant-or-self::*/p"], + ]; } public function getXmlLangTestData() { - return array( - array(':lang("EN")', array('first', 'second', 'third', 'fourth')), - array(':lang("en-us")', array('second', 'fourth')), - array(':lang(en-nz)', array('third')), - array(':lang(fr)', array('fifth')), - array(':lang(ru)', array('sixth')), - array(":lang('ZH')", array('eighth')), - array(':lang(de) :lang(zh)', array('eighth')), - array(':lang(en), :lang(zh)', array('first', 'second', 'third', 'fourth', 'eighth')), - array(':lang(es)', array()), - ); + return [ + [':lang("EN")', ['first', 'second', 'third', 'fourth']], + [':lang("en-us")', ['second', 'fourth']], + [':lang(en-nz)', ['third']], + [':lang(fr)', ['fifth']], + [':lang(ru)', ['sixth']], + [":lang('ZH')", ['eighth']], + [':lang(de) :lang(zh)', ['eighth']], + [':lang(en), :lang(zh)', ['first', 'second', 'third', 'fourth', 'eighth']], + [':lang(es)', []], + ]; } public function getHtmlIdsTestData() { - return array( - array('div', array('outer-div', 'li-div', 'foobar-div')), - array('DIV', array('outer-div', 'li-div', 'foobar-div')), // case-insensitive in HTML - array('div div', array('li-div')), - array('div, div div', array('outer-div', 'li-div', 'foobar-div')), - array('a[name]', array('name-anchor')), - array('a[NAme]', array('name-anchor')), // case-insensitive in HTML: - array('a[rel]', array('tag-anchor', 'nofollow-anchor')), - array('a[rel="tag"]', array('tag-anchor')), - array('a[href*="localhost"]', array('tag-anchor')), - array('a[href*=""]', array()), - array('a[href^="http"]', array('tag-anchor', 'nofollow-anchor')), - array('a[href^="http:"]', array('tag-anchor')), - array('a[href^=""]', array()), - array('a[href$="org"]', array('nofollow-anchor')), - array('a[href$=""]', array()), - array('div[foobar~="bc"]', array('foobar-div')), - array('div[foobar~="cde"]', array('foobar-div')), - array('[foobar~="ab bc"]', array('foobar-div')), - array('[foobar~=""]', array()), - array('[foobar~=" \t"]', array()), - array('div[foobar~="cd"]', array()), - array('*[lang|="En"]', array('second-li')), - array('[lang|="En-us"]', array('second-li')), + return [ + ['div', ['outer-div', 'li-div', 'foobar-div']], + ['DIV', ['outer-div', 'li-div', 'foobar-div']], // case-insensitive in HTML + ['div div', ['li-div']], + ['div, div div', ['outer-div', 'li-div', 'foobar-div']], + ['a[name]', ['name-anchor']], + ['a[NAme]', ['name-anchor']], // case-insensitive in HTML: + ['a[rel]', ['tag-anchor', 'nofollow-anchor']], + ['a[rel="tag"]', ['tag-anchor']], + ['a[href*="localhost"]', ['tag-anchor']], + ['a[href*=""]', []], + ['a[href^="http"]', ['tag-anchor', 'nofollow-anchor']], + ['a[href^="http:"]', ['tag-anchor']], + ['a[href^=""]', []], + ['a[href$="org"]', ['nofollow-anchor']], + ['a[href$=""]', []], + ['div[foobar~="bc"]', ['foobar-div']], + ['div[foobar~="cde"]', ['foobar-div']], + ['[foobar~="ab bc"]', ['foobar-div']], + ['[foobar~=""]', []], + ['[foobar~=" \t"]', []], + ['div[foobar~="cd"]', []], + ['*[lang|="En"]', ['second-li']], + ['[lang|="En-us"]', ['second-li']], // Attribute values are case sensitive - array('*[lang|="en"]', array()), - array('[lang|="en-US"]', array()), - array('*[lang|="e"]', array()), + ['*[lang|="en"]', []], + ['[lang|="en-US"]', []], + ['*[lang|="e"]', []], // ... :lang() is not. - array(':lang("EN")', array('second-li', 'li-div')), - array('*:lang(en-US)', array('second-li', 'li-div')), - array(':lang("e")', array()), - array('li:nth-child(3)', array('third-li')), - array('li:nth-child(10)', array()), - array('li:nth-child(2n)', array('second-li', 'fourth-li', 'sixth-li')), - array('li:nth-child(even)', array('second-li', 'fourth-li', 'sixth-li')), - array('li:nth-child(2n+0)', array('second-li', 'fourth-li', 'sixth-li')), - array('li:nth-child(+2n+1)', array('first-li', 'third-li', 'fifth-li', 'seventh-li')), - array('li:nth-child(odd)', array('first-li', 'third-li', 'fifth-li', 'seventh-li')), - array('li:nth-child(2n+4)', array('fourth-li', 'sixth-li')), - array('li:nth-child(3n+1)', array('first-li', 'fourth-li', 'seventh-li')), - array('li:nth-child(n)', array('first-li', 'second-li', 'third-li', 'fourth-li', 'fifth-li', 'sixth-li', 'seventh-li')), - array('li:nth-child(n-1)', array('first-li', 'second-li', 'third-li', 'fourth-li', 'fifth-li', 'sixth-li', 'seventh-li')), - array('li:nth-child(n+1)', array('first-li', 'second-li', 'third-li', 'fourth-li', 'fifth-li', 'sixth-li', 'seventh-li')), - array('li:nth-child(n+3)', array('third-li', 'fourth-li', 'fifth-li', 'sixth-li', 'seventh-li')), - array('li:nth-child(-n)', array()), - array('li:nth-child(-n-1)', array()), - array('li:nth-child(-n+1)', array('first-li')), - array('li:nth-child(-n+3)', array('first-li', 'second-li', 'third-li')), - array('li:nth-last-child(0)', array()), - array('li:nth-last-child(2n)', array('second-li', 'fourth-li', 'sixth-li')), - array('li:nth-last-child(even)', array('second-li', 'fourth-li', 'sixth-li')), - array('li:nth-last-child(2n+2)', array('second-li', 'fourth-li', 'sixth-li')), - array('li:nth-last-child(n)', array('first-li', 'second-li', 'third-li', 'fourth-li', 'fifth-li', 'sixth-li', 'seventh-li')), - array('li:nth-last-child(n-1)', array('first-li', 'second-li', 'third-li', 'fourth-li', 'fifth-li', 'sixth-li', 'seventh-li')), - array('li:nth-last-child(n-3)', array('first-li', 'second-li', 'third-li', 'fourth-li', 'fifth-li', 'sixth-li', 'seventh-li')), - array('li:nth-last-child(n+1)', array('first-li', 'second-li', 'third-li', 'fourth-li', 'fifth-li', 'sixth-li', 'seventh-li')), - array('li:nth-last-child(n+3)', array('first-li', 'second-li', 'third-li', 'fourth-li', 'fifth-li')), - array('li:nth-last-child(-n)', array()), - array('li:nth-last-child(-n-1)', array()), - array('li:nth-last-child(-n+1)', array('seventh-li')), - array('li:nth-last-child(-n+3)', array('fifth-li', 'sixth-li', 'seventh-li')), - array('ol:first-of-type', array('first-ol')), - array('ol:nth-child(1)', array('first-ol')), - array('ol:nth-of-type(2)', array('second-ol')), - array('ol:nth-last-of-type(1)', array('second-ol')), - array('span:only-child', array('foobar-span')), - array('li div:only-child', array('li-div')), - array('div *:only-child', array('li-div', 'foobar-span')), - array('p:only-of-type', array('paragraph')), - array('a:empty', array('name-anchor')), - array('a:EMpty', array('name-anchor')), - array('li:empty', array('third-li', 'fourth-li', 'fifth-li', 'sixth-li')), - array(':root', array('html')), - array('html:root', array('html')), - array('li:root', array()), - array('* :root', array()), - array('*:contains("link")', array('html', 'outer-div', 'tag-anchor', 'nofollow-anchor')), - array(':CONtains("link")', array('html', 'outer-div', 'tag-anchor', 'nofollow-anchor')), - array('*:contains("LInk")', array()), // case sensitive - array('*:contains("e")', array('html', 'nil', 'outer-div', 'first-ol', 'first-li', 'paragraph', 'p-em')), - array('*:contains("E")', array()), // case-sensitive - array('.a', array('first-ol')), - array('.b', array('first-ol')), - array('*.a', array('first-ol')), - array('ol.a', array('first-ol')), - array('.c', array('first-ol', 'third-li', 'fourth-li')), - array('*.c', array('first-ol', 'third-li', 'fourth-li')), - array('ol *.c', array('third-li', 'fourth-li')), - array('ol li.c', array('third-li', 'fourth-li')), - array('li ~ li.c', array('third-li', 'fourth-li')), - array('ol > li.c', array('third-li', 'fourth-li')), - array('#first-li', array('first-li')), - array('li#first-li', array('first-li')), - array('*#first-li', array('first-li')), - array('li div', array('li-div')), - array('li > div', array('li-div')), - array('div div', array('li-div')), - array('div > div', array()), - array('div>.c', array('first-ol')), - array('div > .c', array('first-ol')), - array('div + div', array('foobar-div')), - array('a ~ a', array('tag-anchor', 'nofollow-anchor')), - array('a[rel="tag"] ~ a', array('nofollow-anchor')), - array('ol#first-ol li:last-child', array('seventh-li')), - array('ol#first-ol *:last-child', array('li-div', 'seventh-li')), - array('#outer-div:first-child', array('outer-div')), - array('#outer-div :first-child', array('name-anchor', 'first-li', 'li-div', 'p-b', 'checkbox-fieldset-disabled', 'area-href')), - array('a[href]', array('tag-anchor', 'nofollow-anchor')), - array(':not(*)', array()), - array('a:not([href])', array('name-anchor')), - array('ol :Not(li[class])', array('first-li', 'second-li', 'li-div', 'fifth-li', 'sixth-li', 'seventh-li')), + [':lang("EN")', ['second-li', 'li-div']], + ['*:lang(en-US)', ['second-li', 'li-div']], + [':lang("e")', []], + ['li:nth-child(3)', ['third-li']], + ['li:nth-child(10)', []], + ['li:nth-child(2n)', ['second-li', 'fourth-li', 'sixth-li']], + ['li:nth-child(even)', ['second-li', 'fourth-li', 'sixth-li']], + ['li:nth-child(2n+0)', ['second-li', 'fourth-li', 'sixth-li']], + ['li:nth-child(+2n+1)', ['first-li', 'third-li', 'fifth-li', 'seventh-li']], + ['li:nth-child(odd)', ['first-li', 'third-li', 'fifth-li', 'seventh-li']], + ['li:nth-child(2n+4)', ['fourth-li', 'sixth-li']], + ['li:nth-child(3n+1)', ['first-li', 'fourth-li', 'seventh-li']], + ['li:nth-child(n)', ['first-li', 'second-li', 'third-li', 'fourth-li', 'fifth-li', 'sixth-li', 'seventh-li']], + ['li:nth-child(n-1)', ['first-li', 'second-li', 'third-li', 'fourth-li', 'fifth-li', 'sixth-li', 'seventh-li']], + ['li:nth-child(n+1)', ['first-li', 'second-li', 'third-li', 'fourth-li', 'fifth-li', 'sixth-li', 'seventh-li']], + ['li:nth-child(n+3)', ['third-li', 'fourth-li', 'fifth-li', 'sixth-li', 'seventh-li']], + ['li:nth-child(-n)', []], + ['li:nth-child(-n-1)', []], + ['li:nth-child(-n+1)', ['first-li']], + ['li:nth-child(-n+3)', ['first-li', 'second-li', 'third-li']], + ['li:nth-last-child(0)', []], + ['li:nth-last-child(2n)', ['second-li', 'fourth-li', 'sixth-li']], + ['li:nth-last-child(even)', ['second-li', 'fourth-li', 'sixth-li']], + ['li:nth-last-child(2n+2)', ['second-li', 'fourth-li', 'sixth-li']], + ['li:nth-last-child(n)', ['first-li', 'second-li', 'third-li', 'fourth-li', 'fifth-li', 'sixth-li', 'seventh-li']], + ['li:nth-last-child(n-1)', ['first-li', 'second-li', 'third-li', 'fourth-li', 'fifth-li', 'sixth-li', 'seventh-li']], + ['li:nth-last-child(n-3)', ['first-li', 'second-li', 'third-li', 'fourth-li', 'fifth-li', 'sixth-li', 'seventh-li']], + ['li:nth-last-child(n+1)', ['first-li', 'second-li', 'third-li', 'fourth-li', 'fifth-li', 'sixth-li', 'seventh-li']], + ['li:nth-last-child(n+3)', ['first-li', 'second-li', 'third-li', 'fourth-li', 'fifth-li']], + ['li:nth-last-child(-n)', []], + ['li:nth-last-child(-n-1)', []], + ['li:nth-last-child(-n+1)', ['seventh-li']], + ['li:nth-last-child(-n+3)', ['fifth-li', 'sixth-li', 'seventh-li']], + ['ol:first-of-type', ['first-ol']], + ['ol:nth-child(1)', ['first-ol']], + ['ol:nth-of-type(2)', ['second-ol']], + ['ol:nth-last-of-type(1)', ['second-ol']], + ['span:only-child', ['foobar-span']], + ['li div:only-child', ['li-div']], + ['div *:only-child', ['li-div', 'foobar-span']], + ['p:only-of-type', ['paragraph']], + ['a:empty', ['name-anchor']], + ['a:EMpty', ['name-anchor']], + ['li:empty', ['third-li', 'fourth-li', 'fifth-li', 'sixth-li']], + [':root', ['html']], + ['html:root', ['html']], + ['li:root', []], + ['* :root', []], + ['*:contains("link")', ['html', 'outer-div', 'tag-anchor', 'nofollow-anchor']], + [':CONtains("link")', ['html', 'outer-div', 'tag-anchor', 'nofollow-anchor']], + ['*:contains("LInk")', []], // case sensitive + ['*:contains("e")', ['html', 'nil', 'outer-div', 'first-ol', 'first-li', 'paragraph', 'p-em']], + ['*:contains("E")', []], // case-sensitive + ['.a', ['first-ol']], + ['.b', ['first-ol']], + ['*.a', ['first-ol']], + ['ol.a', ['first-ol']], + ['.c', ['first-ol', 'third-li', 'fourth-li']], + ['*.c', ['first-ol', 'third-li', 'fourth-li']], + ['ol *.c', ['third-li', 'fourth-li']], + ['ol li.c', ['third-li', 'fourth-li']], + ['li ~ li.c', ['third-li', 'fourth-li']], + ['ol > li.c', ['third-li', 'fourth-li']], + ['#first-li', ['first-li']], + ['li#first-li', ['first-li']], + ['*#first-li', ['first-li']], + ['li div', ['li-div']], + ['li > div', ['li-div']], + ['div div', ['li-div']], + ['div > div', []], + ['div>.c', ['first-ol']], + ['div > .c', ['first-ol']], + ['div + div', ['foobar-div']], + ['a ~ a', ['tag-anchor', 'nofollow-anchor']], + ['a[rel="tag"] ~ a', ['nofollow-anchor']], + ['ol#first-ol li:last-child', ['seventh-li']], + ['ol#first-ol *:last-child', ['li-div', 'seventh-li']], + ['#outer-div:first-child', ['outer-div']], + ['#outer-div :first-child', ['name-anchor', 'first-li', 'li-div', 'p-b', 'checkbox-fieldset-disabled', 'area-href']], + ['a[href]', ['tag-anchor', 'nofollow-anchor']], + [':not(*)', []], + ['a:not([href])', ['name-anchor']], + ['ol :Not(li[class])', ['first-li', 'second-li', 'li-div', 'fifth-li', 'sixth-li', 'seventh-li']], // HTML-specific - array(':link', array('link-href', 'tag-anchor', 'nofollow-anchor', 'area-href')), - array(':visited', array()), - array(':enabled', array('link-href', 'tag-anchor', 'nofollow-anchor', 'checkbox-unchecked', 'text-checked', 'checkbox-checked', 'area-href')), - array(':disabled', array('checkbox-disabled', 'checkbox-disabled-checked', 'fieldset', 'checkbox-fieldset-disabled')), - array(':checked', array('checkbox-checked', 'checkbox-disabled-checked')), - ); + [':link', ['link-href', 'tag-anchor', 'nofollow-anchor', 'area-href']], + [':visited', []], + [':enabled', ['link-href', 'tag-anchor', 'nofollow-anchor', 'checkbox-unchecked', 'text-checked', 'checkbox-checked', 'area-href']], + [':disabled', ['checkbox-disabled', 'checkbox-disabled-checked', 'fieldset', 'checkbox-fieldset-disabled']], + [':checked', ['checkbox-checked', 'checkbox-disabled-checked']], + ]; } public function getHtmlShakespearTestData() { - return array( - array('*', 246), - array('div:contains(CELIA)', 26), - array('div:only-child', 22), // ? - array('div:nth-child(even)', 106), - array('div:nth-child(2n)', 106), - array('div:nth-child(odd)', 137), - array('div:nth-child(2n+1)', 137), - array('div:nth-child(n)', 243), - array('div:last-child', 53), - array('div:first-child', 51), - array('div > div', 242), - array('div + div', 190), - array('div ~ div', 190), - array('body', 1), - array('body div', 243), - array('div', 243), - array('div div', 242), - array('div div div', 241), - array('div, div, div', 243), - array('div, a, span', 243), - array('.dialog', 51), - array('div.dialog', 51), - array('div .dialog', 51), - array('div.character, div.dialog', 99), - array('div.direction.dialog', 0), - array('div.dialog.direction', 0), - array('div.dialog.scene', 1), - array('div.scene.scene', 1), - array('div.scene .scene', 0), - array('div.direction .dialog ', 0), - array('div .dialog .direction', 4), - array('div.dialog .dialog .direction', 4), - array('#speech5', 1), - array('div#speech5', 1), - array('div #speech5', 1), - array('div.scene div.dialog', 49), - array('div#scene1 div.dialog div', 142), - array('#scene1 #speech1', 1), - array('div[class]', 103), - array('div[class=dialog]', 50), - array('div[class^=dia]', 51), - array('div[class$=log]', 50), - array('div[class*=sce]', 1), - array('div[class|=dialog]', 50), // ? Seems right - array('div[class!=madeup]', 243), // ? Seems right - array('div[class~=dialog]', 51), // ? Seems right - ); + return [ + ['*', 246], + ['div:contains(CELIA)', 26], + ['div:only-child', 22], // ? + ['div:nth-child(even)', 106], + ['div:nth-child(2n)', 106], + ['div:nth-child(odd)', 137], + ['div:nth-child(2n+1)', 137], + ['div:nth-child(n)', 243], + ['div:last-child', 53], + ['div:first-child', 51], + ['div > div', 242], + ['div + div', 190], + ['div ~ div', 190], + ['body', 1], + ['body div', 243], + ['div', 243], + ['div div', 242], + ['div div div', 241], + ['div, div, div', 243], + ['div, a, span', 243], + ['.dialog', 51], + ['div.dialog', 51], + ['div .dialog', 51], + ['div.character, div.dialog', 99], + ['div.direction.dialog', 0], + ['div.dialog.direction', 0], + ['div.dialog.scene', 1], + ['div.scene.scene', 1], + ['div.scene .scene', 0], + ['div.direction .dialog ', 0], + ['div .dialog .direction', 4], + ['div.dialog .dialog .direction', 4], + ['#speech5', 1], + ['div#speech5', 1], + ['div #speech5', 1], + ['div.scene div.dialog', 49], + ['div#scene1 div.dialog div', 142], + ['#scene1 #speech1', 1], + ['div[class]', 103], + ['div[class=dialog]', 50], + ['div[class^=dia]', 51], + ['div[class$=log]', 50], + ['div[class*=sce]', 1], + ['div[class|=dialog]', 50], // ? Seems right + ['div[class!=madeup]', 243], // ? Seems right + ['div[class~=dialog]', 51], // ? Seems right + ]; } } diff --git a/vendor/symfony/css-selector/XPath/Extension/AbstractExtension.php b/vendor/symfony/css-selector/XPath/Extension/AbstractExtension.php index 026ac06c..1dce1edd 100644 --- a/vendor/symfony/css-selector/XPath/Extension/AbstractExtension.php +++ b/vendor/symfony/css-selector/XPath/Extension/AbstractExtension.php @@ -28,7 +28,7 @@ abstract class AbstractExtension implements ExtensionInterface */ public function getNodeTranslators() { - return array(); + return []; } /** @@ -36,7 +36,7 @@ abstract class AbstractExtension implements ExtensionInterface */ public function getCombinationTranslators() { - return array(); + return []; } /** @@ -44,7 +44,7 @@ abstract class AbstractExtension implements ExtensionInterface */ public function getFunctionTranslators() { - return array(); + return []; } /** @@ -52,7 +52,7 @@ abstract class AbstractExtension implements ExtensionInterface */ public function getPseudoClassTranslators() { - return array(); + return []; } /** @@ -60,6 +60,6 @@ abstract class AbstractExtension implements ExtensionInterface */ public function getAttributeMatchingTranslators() { - return array(); + return []; } } diff --git a/vendor/symfony/css-selector/XPath/Extension/AttributeMatchingExtension.php b/vendor/symfony/css-selector/XPath/Extension/AttributeMatchingExtension.php index 8a4d8842..e636ea3d 100644 --- a/vendor/symfony/css-selector/XPath/Extension/AttributeMatchingExtension.php +++ b/vendor/symfony/css-selector/XPath/Extension/AttributeMatchingExtension.php @@ -31,16 +31,16 @@ class AttributeMatchingExtension extends AbstractExtension */ public function getAttributeMatchingTranslators() { - return array( - 'exists' => array($this, 'translateExists'), - '=' => array($this, 'translateEquals'), - '~=' => array($this, 'translateIncludes'), - '|=' => array($this, 'translateDashMatch'), - '^=' => array($this, 'translatePrefixMatch'), - '$=' => array($this, 'translateSuffixMatch'), - '*=' => array($this, 'translateSubstringMatch'), - '!=' => array($this, 'translateDifferent'), - ); + return [ + 'exists' => [$this, 'translateExists'], + '=' => [$this, 'translateEquals'], + '~=' => [$this, 'translateIncludes'], + '|=' => [$this, 'translateDashMatch'], + '^=' => [$this, 'translatePrefixMatch'], + '$=' => [$this, 'translateSuffixMatch'], + '*=' => [$this, 'translateSubstringMatch'], + '!=' => [$this, 'translateDifferent'], + ]; } public function translateExists(XPathExpr $xpath, string $attribute, ?string $value): XPathExpr diff --git a/vendor/symfony/css-selector/XPath/Extension/CombinationExtension.php b/vendor/symfony/css-selector/XPath/Extension/CombinationExtension.php index 85181fd9..6a0f4165 100644 --- a/vendor/symfony/css-selector/XPath/Extension/CombinationExtension.php +++ b/vendor/symfony/css-selector/XPath/Extension/CombinationExtension.php @@ -30,12 +30,12 @@ class CombinationExtension extends AbstractExtension */ public function getCombinationTranslators(): array { - return array( - ' ' => array($this, 'translateDescendant'), - '>' => array($this, 'translateChild'), - '+' => array($this, 'translateDirectAdjacent'), - '~' => array($this, 'translateIndirectAdjacent'), - ); + return [ + ' ' => [$this, 'translateDescendant'], + '>' => [$this, 'translateChild'], + '+' => [$this, 'translateDirectAdjacent'], + '~' => [$this, 'translateIndirectAdjacent'], + ]; } /** diff --git a/vendor/symfony/css-selector/XPath/Extension/FunctionExtension.php b/vendor/symfony/css-selector/XPath/Extension/FunctionExtension.php index ebe508fe..5d032df1 100644 --- a/vendor/symfony/css-selector/XPath/Extension/FunctionExtension.php +++ b/vendor/symfony/css-selector/XPath/Extension/FunctionExtension.php @@ -35,14 +35,14 @@ class FunctionExtension extends AbstractExtension */ public function getFunctionTranslators() { - return array( - 'nth-child' => array($this, 'translateNthChild'), - 'nth-last-child' => array($this, 'translateNthLastChild'), - 'nth-of-type' => array($this, 'translateNthOfType'), - 'nth-last-of-type' => array($this, 'translateNthLastOfType'), - 'contains' => array($this, 'translateContains'), - 'lang' => array($this, 'translateLang'), - ); + return [ + 'nth-child' => [$this, 'translateNthChild'], + 'nth-last-child' => [$this, 'translateNthLastChild'], + 'nth-of-type' => [$this, 'translateNthOfType'], + 'nth-last-of-type' => [$this, 'translateNthLastOfType'], + 'contains' => [$this, 'translateContains'], + 'lang' => [$this, 'translateLang'], + ]; } /** @@ -86,7 +86,7 @@ class FunctionExtension extends AbstractExtension $expr .= ' - '.$b; } - $conditions = array(sprintf('%s %s 0', $expr, $sign)); + $conditions = [sprintf('%s %s 0', $expr, $sign)]; if (1 !== $a && -1 !== $a) { $conditions[] = sprintf('(%s) mod %d = 0', $expr, $a); diff --git a/vendor/symfony/css-selector/XPath/Extension/HtmlExtension.php b/vendor/symfony/css-selector/XPath/Extension/HtmlExtension.php index cd8e0d5f..99c1166c 100644 --- a/vendor/symfony/css-selector/XPath/Extension/HtmlExtension.php +++ b/vendor/symfony/css-selector/XPath/Extension/HtmlExtension.php @@ -41,16 +41,16 @@ class HtmlExtension extends AbstractExtension */ public function getPseudoClassTranslators() { - return array( - 'checked' => array($this, 'translateChecked'), - 'link' => array($this, 'translateLink'), - 'disabled' => array($this, 'translateDisabled'), - 'enabled' => array($this, 'translateEnabled'), - 'selected' => array($this, 'translateSelected'), - 'invalid' => array($this, 'translateInvalid'), - 'hover' => array($this, 'translateHover'), - 'visited' => array($this, 'translateVisited'), - ); + return [ + 'checked' => [$this, 'translateChecked'], + 'link' => [$this, 'translateLink'], + 'disabled' => [$this, 'translateDisabled'], + 'enabled' => [$this, 'translateEnabled'], + 'selected' => [$this, 'translateSelected'], + 'invalid' => [$this, 'translateInvalid'], + 'hover' => [$this, 'translateHover'], + 'visited' => [$this, 'translateVisited'], + ]; } /** @@ -58,9 +58,9 @@ class HtmlExtension extends AbstractExtension */ public function getFunctionTranslators() { - return array( - 'lang' => array($this, 'translateLang'), - ); + return [ + 'lang' => [$this, 'translateLang'], + ]; } /** diff --git a/vendor/symfony/css-selector/XPath/Extension/NodeExtension.php b/vendor/symfony/css-selector/XPath/Extension/NodeExtension.php index 61442b6f..4d86cb87 100644 --- a/vendor/symfony/css-selector/XPath/Extension/NodeExtension.php +++ b/vendor/symfony/css-selector/XPath/Extension/NodeExtension.php @@ -64,17 +64,17 @@ class NodeExtension extends AbstractExtension */ public function getNodeTranslators() { - return array( - 'Selector' => array($this, 'translateSelector'), - 'CombinedSelector' => array($this, 'translateCombinedSelector'), - 'Negation' => array($this, 'translateNegation'), - 'Function' => array($this, 'translateFunction'), - 'Pseudo' => array($this, 'translatePseudo'), - 'Attribute' => array($this, 'translateAttribute'), - 'Class' => array($this, 'translateClass'), - 'Hash' => array($this, 'translateHash'), - 'Element' => array($this, 'translateElement'), - ); + return [ + 'Selector' => [$this, 'translateSelector'], + 'CombinedSelector' => [$this, 'translateCombinedSelector'], + 'Negation' => [$this, 'translateNegation'], + 'Function' => [$this, 'translateFunction'], + 'Pseudo' => [$this, 'translatePseudo'], + 'Attribute' => [$this, 'translateAttribute'], + 'Class' => [$this, 'translateClass'], + 'Hash' => [$this, 'translateHash'], + 'Element' => [$this, 'translateElement'], + ]; } public function translateSelector(Node\SelectorNode $node, Translator $translator): XPathExpr diff --git a/vendor/symfony/css-selector/XPath/Extension/PseudoClassExtension.php b/vendor/symfony/css-selector/XPath/Extension/PseudoClassExtension.php index 378dfb7d..27fe47f9 100644 --- a/vendor/symfony/css-selector/XPath/Extension/PseudoClassExtension.php +++ b/vendor/symfony/css-selector/XPath/Extension/PseudoClassExtension.php @@ -31,16 +31,16 @@ class PseudoClassExtension extends AbstractExtension */ public function getPseudoClassTranslators() { - return array( - 'root' => array($this, 'translateRoot'), - 'first-child' => array($this, 'translateFirstChild'), - 'last-child' => array($this, 'translateLastChild'), - 'first-of-type' => array($this, 'translateFirstOfType'), - 'last-of-type' => array($this, 'translateLastOfType'), - 'only-child' => array($this, 'translateOnlyChild'), - 'only-of-type' => array($this, 'translateOnlyOfType'), - 'empty' => array($this, 'translateEmpty'), - ); + return [ + 'root' => [$this, 'translateRoot'], + 'first-child' => [$this, 'translateFirstChild'], + 'last-child' => [$this, 'translateLastChild'], + 'first-of-type' => [$this, 'translateFirstOfType'], + 'last-of-type' => [$this, 'translateLastOfType'], + 'only-child' => [$this, 'translateOnlyChild'], + 'only-of-type' => [$this, 'translateOnlyOfType'], + 'empty' => [$this, 'translateEmpty'], + ]; } /** diff --git a/vendor/symfony/css-selector/XPath/Translator.php b/vendor/symfony/css-selector/XPath/Translator.php index 6426aeab..5a568dad 100644 --- a/vendor/symfony/css-selector/XPath/Translator.php +++ b/vendor/symfony/css-selector/XPath/Translator.php @@ -35,18 +35,18 @@ class Translator implements TranslatorInterface /** * @var ParserInterface[] */ - private $shortcutParsers = array(); + private $shortcutParsers = []; /** * @var Extension\ExtensionInterface[] */ - private $extensions = array(); + private $extensions = []; - private $nodeTranslators = array(); - private $combinationTranslators = array(); - private $functionTranslators = array(); - private $pseudoClassTranslators = array(); - private $attributeMatchingTranslators = array(); + private $nodeTranslators = []; + private $combinationTranslators = []; + private $functionTranslators = []; + private $pseudoClassTranslators = []; + private $attributeMatchingTranslators = []; public function __construct(ParserInterface $parser = null) { @@ -72,7 +72,7 @@ class Translator implements TranslatorInterface } $string = $element; - $parts = array(); + $parts = []; while (true) { if (false !== $pos = strpos($string, "'")) { $parts[] = sprintf("'%s'", substr($string, 0, $pos)); diff --git a/vendor/symfony/css-selector/composer.json b/vendor/symfony/css-selector/composer.json index ebe7d0d5..91e64f27 100644 --- a/vendor/symfony/css-selector/composer.json +++ b/vendor/symfony/css-selector/composer.json @@ -31,7 +31,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "4.2-dev" + "dev-master": "4.3-dev" } } } diff --git a/vendor/symfony/debug/BufferingLogger.php b/vendor/symfony/debug/BufferingLogger.php index a2ed75b9..e7db3a4c 100644 --- a/vendor/symfony/debug/BufferingLogger.php +++ b/vendor/symfony/debug/BufferingLogger.php @@ -20,17 +20,17 @@ use Psr\Log\AbstractLogger; */ class BufferingLogger extends AbstractLogger { - private $logs = array(); + private $logs = []; - public function log($level, $message, array $context = array()) + public function log($level, $message, array $context = []) { - $this->logs[] = array($level, $message, $context); + $this->logs[] = [$level, $message, $context]; } public function cleanLogs() { $logs = $this->logs; - $this->logs = array(); + $this->logs = []; return $logs; } diff --git a/vendor/symfony/debug/CHANGELOG.md b/vendor/symfony/debug/CHANGELOG.md index 122af731..367e834f 100644 --- a/vendor/symfony/debug/CHANGELOG.md +++ b/vendor/symfony/debug/CHANGELOG.md @@ -1,6 +1,14 @@ CHANGELOG ========= +4.3.0 +----- + +* made the `ErrorHandler` and `ExceptionHandler` classes final +* added `Exception\FlattenException::getAsString` and +`Exception\FlattenException::getTraceAsString` to increase compatibility to php +exception objects + 4.0.0 ----- diff --git a/vendor/symfony/debug/Debug.php b/vendor/symfony/debug/Debug.php index a31d71e6..5d2d55cf 100644 --- a/vendor/symfony/debug/Debug.php +++ b/vendor/symfony/debug/Debug.php @@ -42,7 +42,7 @@ class Debug error_reporting(E_ALL); } - if (!\in_array(\PHP_SAPI, array('cli', 'phpdbg'), true)) { + if (!\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true)) { ini_set('display_errors', 0); ExceptionHandler::register(); } elseif ($displayErrors && (!filter_var(ini_get('log_errors'), FILTER_VALIDATE_BOOLEAN) || ini_get('error_log'))) { diff --git a/vendor/symfony/debug/DebugClassLoader.php b/vendor/symfony/debug/DebugClassLoader.php index 19e80af7..db92f5ad 100644 --- a/vendor/symfony/debug/DebugClassLoader.php +++ b/vendor/symfony/debug/DebugClassLoader.php @@ -29,16 +29,17 @@ class DebugClassLoader { private $classLoader; private $isFinder; - private $loaded = array(); + private $loaded = []; private static $caseCheck; - private static $checkedClasses = array(); - private static $final = array(); - private static $finalMethods = array(); - private static $deprecated = array(); - private static $internal = array(); - private static $internalMethods = array(); - private static $annotatedParameters = array(); - private static $darwinCache = array('/' => array('/', array())); + private static $checkedClasses = []; + private static $final = []; + private static $finalMethods = []; + private static $deprecated = []; + private static $internal = []; + private static $internalMethods = []; + private static $annotatedParameters = []; + private static $darwinCache = ['/' => ['/', []]]; + private static $method = []; public function __construct(callable $classLoader) { @@ -98,7 +99,7 @@ class DebugClassLoader foreach ($functions as $function) { if (!\is_array($function) || !$function[0] instanceof self) { - $function = array(new static($function), 'loadClass'); + $function = [new static($function), 'loadClass']; } spl_autoload_register($function); @@ -127,6 +128,14 @@ class DebugClassLoader } } + /** + * @return string|null + */ + public function findFile($class) + { + return $this->isFinder ? $this->classLoader[0]->findFile($class) ?: null : null; + } + /** * Loads the given class or interface. * @@ -211,7 +220,7 @@ class DebugClassLoader public function checkAnnotations(\ReflectionClass $refl, $class) { - $deprecations = array(); + $deprecations = []; // Don't trigger deprecations for classes in the same vendor if (2 > $len = 1 + (\strpos($class, '\\') ?: \strpos($class, '_'))) { @@ -223,9 +232,27 @@ class DebugClassLoader // Detect annotations on the class if (false !== $doc = $refl->getDocComment()) { - foreach (array('final', 'deprecated', 'internal') as $annotation) { - if (false !== \strpos($doc, $annotation) && preg_match('#\n \* @'.$annotation.'(?:( .+?)\.?)?\r?\n \*(?: @|/$)#s', $doc, $notice)) { - self::${$annotation}[$class] = isset($notice[1]) ? preg_replace('#\s*\r?\n \* +#', ' ', $notice[1]) : ''; + foreach (['final', 'deprecated', 'internal'] as $annotation) { + if (false !== \strpos($doc, $annotation) && preg_match('#\n\s+\* @'.$annotation.'(?:( .+?)\.?)?\r?\n\s+\*(?: @|/$|\r?\n)#s', $doc, $notice)) { + self::${$annotation}[$class] = isset($notice[1]) ? preg_replace('#\.?\r?\n( \*)? *(?= |\r?\n|$)#', '', $notice[1]) : ''; + } + } + + if ($refl->isInterface() && false !== \strpos($doc, 'method') && preg_match_all('#\n \* @method\s+(static\s+)?+(?:[\w\|&\[\]\\\]+\s+)?(\w+(?:\s*\([^\)]*\))?)+(.+?([[:punct:]]\s*)?)?(?=\r?\n \*(?: @|/$|\r?\n))#', $doc, $notice, PREG_SET_ORDER)) { + foreach ($notice as $method) { + $static = '' !== $method[1]; + $name = $method[2]; + $description = $method[3] ?? null; + if (false === strpos($name, '(')) { + $name .= '()'; + } + if (null !== $description) { + $description = trim($description); + if (!isset($method[4])) { + $description .= '.'; + } + } + self::$method[$class][] = [$class, $name, $static, $description]; } } } @@ -249,7 +276,7 @@ class DebugClassLoader if (!isset(self::$checkedClasses[$use])) { $this->checkClass($use); } - if (isset(self::$deprecated[$use]) && \strncmp($ns, \str_replace('_', '\\', $use), $len)) { + if (isset(self::$deprecated[$use]) && \strncmp($ns, \str_replace('_', '\\', $use), $len) && !isset(self::$deprecated[$class])) { $type = class_exists($class, false) ? 'class' : (interface_exists($class, false) ? 'interface' : 'trait'); $verb = class_exists($use, false) || interface_exists($class, false) ? 'extends' : (interface_exists($use, false) ? 'implements' : 'uses'); @@ -258,6 +285,28 @@ class DebugClassLoader if (isset(self::$internal[$use]) && \strncmp($ns, \str_replace('_', '\\', $use), $len)) { $deprecations[] = sprintf('The "%s" %s is considered internal%s. It may change without further notice. You should not use it from "%s".', $use, class_exists($use, false) ? 'class' : (interface_exists($use, false) ? 'interface' : 'trait'), self::$internal[$use], $class); } + if (isset(self::$method[$use])) { + if ($refl->isAbstract()) { + if (isset(self::$method[$class])) { + self::$method[$class] = array_merge(self::$method[$class], self::$method[$use]); + } else { + self::$method[$class] = self::$method[$use]; + } + } elseif (!$refl->isInterface()) { + $hasCall = $refl->hasMethod('__call'); + $hasStaticCall = $refl->hasMethod('__callStatic'); + foreach (self::$method[$use] as $method) { + list($interface, $name, $static, $description) = $method; + if ($static ? $hasStaticCall : $hasCall) { + continue; + } + $realName = substr($name, 0, strpos($name, '(')); + if (!$refl->hasMethod($realName) || !($methodRefl = $refl->getMethod($realName))->isPublic() || ($static && !$methodRefl->isStatic()) || (!$static && $methodRefl->isStatic())) { + $deprecations[] = sprintf('Class "%s" should implement method "%s::%s"%s', $class, ($static ? 'static ' : '').$interface, $name, null == $description ? '.' : ': '.$description); + } + } + } + } } if (\trait_exists($class)) { @@ -265,11 +314,11 @@ class DebugClassLoader } // Inherit @final, @internal and @param annotations for methods - self::$finalMethods[$class] = array(); - self::$internalMethods[$class] = array(); - self::$annotatedParameters[$class] = array(); + self::$finalMethods[$class] = []; + self::$internalMethods[$class] = []; + self::$annotatedParameters[$class] = []; foreach ($parentAndOwnInterfaces as $use) { - foreach (array('finalMethods', 'internalMethods', 'annotatedParameters') as $property) { + foreach (['finalMethods', 'internalMethods', 'annotatedParameters'] as $property) { if (isset(self::${$property}[$use])) { self::${$property}[$class] = self::${$property}[$class] ? self::${$property}[$use] + self::${$property}[$class] : self::${$property}[$use]; } @@ -297,13 +346,13 @@ class DebugClassLoader $doc = $method->getDocComment(); if (isset(self::$annotatedParameters[$class][$method->name])) { - $definedParameters = array(); + $definedParameters = []; foreach ($method->getParameters() as $parameter) { $definedParameters[$parameter->name] = true; } foreach (self::$annotatedParameters[$class][$method->name] as $parameterName => $deprecation) { - if (!isset($definedParameters[$parameterName]) && !($doc && preg_match("/\\n\\s+\\* @param (.*?)(?<= )\\\${$parameterName}\\b/", $doc))) { + if (!isset($definedParameters[$parameterName]) && !($doc && preg_match("/\\n\\s+\\* @param +((?(?!callable *\().*?|callable *\(.*\).*?))(?<= )\\\${$parameterName}\\b/", $doc))) { $deprecations[] = sprintf($deprecation, $class); } } @@ -315,10 +364,10 @@ class DebugClassLoader $finalOrInternal = false; - foreach (array('final', 'internal') as $annotation) { - if (false !== \strpos($doc, $annotation) && preg_match('#\n\s+\* @'.$annotation.'(?:( .+?)\.?)?\r?\n\s+\*(?: @|/$)#s', $doc, $notice)) { - $message = isset($notice[1]) ? preg_replace('#\s*\r?\n \* +#', ' ', $notice[1]) : ''; - self::${$annotation.'Methods'}[$class][$method->name] = array($class, $message); + foreach (['final', 'internal'] as $annotation) { + if (false !== \strpos($doc, $annotation) && preg_match('#\n\s+\* @'.$annotation.'(?:( .+?)\.?)?\r?\n\s+\*(?: @|/$|\r?\n)#s', $doc, $notice)) { + $message = isset($notice[1]) ? preg_replace('#\.?\r?\n( \*)? *(?= |\r?\n|$)#', '', $notice[1]) : ''; + self::${$annotation.'Methods'}[$class][$method->name] = [$class, $message]; $finalOrInternal = true; } } @@ -326,11 +375,11 @@ class DebugClassLoader if ($finalOrInternal || $method->isConstructor() || false === \strpos($doc, '@param') || StatelessInvocation::class === $class) { continue; } - if (!preg_match_all('#\n\s+\* @param (.*?)(?<= )\$([a-zA-Z0-9_\x7f-\xff]++)#', $doc, $matches, PREG_SET_ORDER)) { + if (!preg_match_all('#\n\s+\* @param +((?(?!callable *\().*?|callable *\(.*\).*?))(?<= )\$([a-zA-Z0-9_\x7f-\xff]++)#', $doc, $matches, PREG_SET_ORDER)) { continue; } if (!isset(self::$annotatedParameters[$class][$method->name])) { - $definedParameters = array(); + $definedParameters = []; foreach ($method->getParameters() as $parameter) { $definedParameters[$parameter->name] = true; } @@ -376,7 +425,7 @@ class DebugClassLoader if (0 === substr_compare($real, $tail, -$tailLen, $tailLen, true) && 0 !== substr_compare($real, $tail, -$tailLen, $tailLen, false) ) { - return array(substr($tail, -$tailLen + 1), substr($real, -$tailLen + 1), substr($real, 0, -$tailLen + 1)); + return [substr($tail, -$tailLen + 1), substr($real, -$tailLen + 1), substr($real, 0, -$tailLen + 1)]; } } @@ -406,7 +455,7 @@ class DebugClassLoader $k = $kDir; $i = \strlen($dir) - 1; while (!isset(self::$darwinCache[$k])) { - self::$darwinCache[$k] = array($dir, array()); + self::$darwinCache[$k] = [$dir, []]; self::$darwinCache[$dir] = &self::$darwinCache[$k]; while ('/' !== $dir[--$i]) { @@ -419,6 +468,11 @@ class DebugClassLoader $dirFiles = self::$darwinCache[$kDir][1]; + if (!isset($dirFiles[$file]) && ') : eval()\'d code' === substr($file, -17)) { + // Get the file name from "file_name.php(123) : eval()'d code" + $file = substr($file, 0, strrpos($file, '(', -17)); + } + if (isset($dirFiles[$file])) { return $real .= $dirFiles[$file]; } diff --git a/vendor/symfony/debug/ErrorHandler.php b/vendor/symfony/debug/ErrorHandler.php index 2eb058eb..2f250cba 100644 --- a/vendor/symfony/debug/ErrorHandler.php +++ b/vendor/symfony/debug/ErrorHandler.php @@ -45,10 +45,12 @@ use Symfony\Component\Debug\FatalErrorHandler\UndefinedMethodFatalErrorHandler; * * @author Nicolas Grekas * @author Grégoire Pineau + * + * @final since Symfony 4.3 */ class ErrorHandler { - private $levels = array( + private $levels = [ E_DEPRECATED => 'Deprecated', E_USER_DEPRECATED => 'User Deprecated', E_NOTICE => 'Notice', @@ -64,25 +66,25 @@ class ErrorHandler E_PARSE => 'Parse Error', E_ERROR => 'Error', E_CORE_ERROR => 'Core Error', - ); + ]; - private $loggers = array( - E_DEPRECATED => array(null, LogLevel::INFO), - E_USER_DEPRECATED => array(null, LogLevel::INFO), - E_NOTICE => array(null, LogLevel::WARNING), - E_USER_NOTICE => array(null, LogLevel::WARNING), - E_STRICT => array(null, LogLevel::WARNING), - E_WARNING => array(null, LogLevel::WARNING), - E_USER_WARNING => array(null, LogLevel::WARNING), - E_COMPILE_WARNING => array(null, LogLevel::WARNING), - E_CORE_WARNING => array(null, LogLevel::WARNING), - E_USER_ERROR => array(null, LogLevel::CRITICAL), - E_RECOVERABLE_ERROR => array(null, LogLevel::CRITICAL), - E_COMPILE_ERROR => array(null, LogLevel::CRITICAL), - E_PARSE => array(null, LogLevel::CRITICAL), - E_ERROR => array(null, LogLevel::CRITICAL), - E_CORE_ERROR => array(null, LogLevel::CRITICAL), - ); + private $loggers = [ + E_DEPRECATED => [null, LogLevel::INFO], + E_USER_DEPRECATED => [null, LogLevel::INFO], + E_NOTICE => [null, LogLevel::WARNING], + E_USER_NOTICE => [null, LogLevel::WARNING], + E_STRICT => [null, LogLevel::WARNING], + E_WARNING => [null, LogLevel::WARNING], + E_USER_WARNING => [null, LogLevel::WARNING], + E_COMPILE_WARNING => [null, LogLevel::WARNING], + E_CORE_WARNING => [null, LogLevel::WARNING], + E_USER_ERROR => [null, LogLevel::CRITICAL], + E_RECOVERABLE_ERROR => [null, LogLevel::CRITICAL], + E_COMPILE_ERROR => [null, LogLevel::CRITICAL], + E_PARSE => [null, LogLevel::CRITICAL], + E_ERROR => [null, LogLevel::CRITICAL], + E_CORE_ERROR => [null, LogLevel::CRITICAL], + ]; private $thrownErrors = 0x1FFF; // E_ALL - E_DEPRECATED - E_USER_DEPRECATED private $scopedErrors = 0x1FFF; // E_ALL - E_DEPRECATED - E_USER_DEPRECATED @@ -98,7 +100,7 @@ class ErrorHandler private static $reservedMemory; private static $toStringException = null; - private static $silencedErrorCache = array(); + private static $silencedErrorCache = []; private static $silencedErrorCount = 0; private static $exitCode = 0; @@ -121,10 +123,10 @@ class ErrorHandler $handler = new static(); } - if (null === $prev = set_error_handler(array($handler, 'handleError'))) { + if (null === $prev = set_error_handler([$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); + set_error_handler([$handler, 'handleError'], $handler->thrownErrors | $handler->loggedErrors); $handler->isRoot = true; } @@ -138,12 +140,12 @@ class ErrorHandler } else { $handlerIsRegistered = true; } - if (\is_array($prev = set_exception_handler(array($handler, 'handleException'))) && $prev[0] instanceof self) { + if (\is_array($prev = set_exception_handler([$handler, 'handleException'])) && $prev[0] instanceof self) { restore_exception_handler(); if (!$handlerIsRegistered) { $handler = $prev[0]; } elseif ($handler !== $prev[0] && $replace) { - set_exception_handler(array($handler, 'handleException')); + set_exception_handler([$handler, 'handleException']); $p = $prev[0]->setExceptionHandler(null); $handler->setExceptionHandler($p); $prev[0]->setExceptionHandler($p); @@ -176,12 +178,12 @@ class ErrorHandler */ public function setDefaultLogger(LoggerInterface $logger, $levels = E_ALL, $replace = false) { - $loggers = array(); + $loggers = []; if (\is_array($levels)) { foreach ($levels as $type => $logLevel) { if (empty($this->loggers[$type][0]) || $replace || $this->loggers[$type][0] === $this->bootstrappingLogger) { - $loggers[$type] = array($logger, $logLevel); + $loggers[$type] = [$logger, $logLevel]; } } } else { @@ -212,15 +214,15 @@ class ErrorHandler { $prevLogged = $this->loggedErrors; $prev = $this->loggers; - $flush = array(); + $flush = []; foreach ($loggers as $type => $log) { if (!isset($prev[$type])) { throw new \InvalidArgumentException('Unknown error type: '.$type); } if (!\is_array($log)) { - $log = array($log); - } elseif (!array_key_exists(0, $log)) { + $log = [$log]; + } elseif (!\array_key_exists(0, $log)) { throw new \InvalidArgumentException('No logger provided'); } if (null === $log[0]) { @@ -356,9 +358,9 @@ class ErrorHandler if ($handler === $this) { restore_error_handler(); if ($this->isRoot) { - set_error_handler(array($this, 'handleError'), $this->thrownErrors | $this->loggedErrors); + set_error_handler([$this, 'handleError'], $this->thrownErrors | $this->loggedErrors); } else { - set_error_handler(array($this, 'handleError')); + set_error_handler([$this, 'handleError']); } } } @@ -395,9 +397,9 @@ class ErrorHandler $scope = $this->scopedErrors & $type; if (4 < $numArgs = \func_num_args()) { - $context = $scope ? (func_get_arg(4) ?: array()) : array(); + $context = $scope ? (func_get_arg(4) ?: []) : []; } else { - $context = array(); + $context = []; } if (isset($context['GLOBALS']) && $scope) { @@ -417,19 +419,19 @@ class ErrorHandler self::$toStringException = null; } elseif (!$throw && !($type & $level)) { if (!isset(self::$silencedErrorCache[$id = $file.':'.$line])) { - $lightTrace = $this->tracedErrors & $type ? $this->cleanTrace(debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 5), $type, $file, $line, false) : array(); - $errorAsException = new SilencedErrorContext($type, $file, $line, isset($lightTrace[1]) ? array($lightTrace[0]) : $lightTrace); + $lightTrace = $this->tracedErrors & $type ? $this->cleanTrace(debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 5), $type, $file, $line, false) : []; + $errorAsException = new SilencedErrorContext($type, $file, $line, isset($lightTrace[1]) ? [$lightTrace[0]] : $lightTrace); } elseif (isset(self::$silencedErrorCache[$id][$message])) { $lightTrace = null; $errorAsException = self::$silencedErrorCache[$id][$message]; ++$errorAsException->count; } else { - $lightTrace = array(); + $lightTrace = []; $errorAsException = null; } if (100 < ++self::$silencedErrorCount) { - self::$silencedErrorCache = $lightTrace = array(); + self::$silencedErrorCache = $lightTrace = []; self::$silencedErrorCount = 1; } if ($errorAsException) { @@ -446,8 +448,8 @@ class ErrorHandler $lightTrace = $this->cleanTrace($backtrace, $type, $file, $line, $throw); $this->traceReflector->setValue($errorAsException, $lightTrace); } else { - $this->traceReflector->setValue($errorAsException, array()); - $backtrace = array(); + $this->traceReflector->setValue($errorAsException, []); + $backtrace = []; } } @@ -490,12 +492,21 @@ class ErrorHandler if ($this->isRecursive) { $log = 0; } else { + if (!\defined('HHVM_VERSION')) { + $currentErrorHandler = set_error_handler('var_dump'); + restore_error_handler(); + } + try { $this->isRecursive = true; $level = ($type & $level) ? $this->loggers[$type][1] : LogLevel::DEBUG; - $this->loggers[$type][0]->log($level, $logMessage, $errorAsException ? array('exception' => $errorAsException) : array()); + $this->loggers[$type][0]->log($level, $logMessage, $errorAsException ? ['exception' => $errorAsException] : []); } finally { $this->isRecursive = false; + + if (!\defined('HHVM_VERSION')) { + set_error_handler($currentErrorHandler); + } } } @@ -527,12 +538,12 @@ class ErrorHandler } if ($exception instanceof FatalErrorException) { if ($exception instanceof FatalThrowableError) { - $error = array( + $error = [ 'type' => $type, 'message' => $message, 'file' => $exception->getFile(), 'line' => $exception->getLine(), - ); + ]; } else { $message = 'Fatal '.$message; } @@ -544,7 +555,7 @@ class ErrorHandler } if ($this->loggedErrors & $type) { try { - $this->loggers[$type][0]->log($this->loggers[$type][1], $message, array('exception' => $exception)); + $this->loggers[$type][0]->log($this->loggers[$type][1], $message, ['exception' => $exception]); } catch (\Throwable $handlerException) { } } @@ -586,7 +597,7 @@ class ErrorHandler } $handler = self::$reservedMemory = null; - $handlers = array(); + $handlers = []; $previousHandler = null; $sameHandlerLimit = 10; @@ -617,7 +628,7 @@ class ErrorHandler $handler[0]->setExceptionHandler($h); } $handler = $handler[0]; - $handlers = array(); + $handlers = []; if ($exit = null === $error) { $error = error_get_last(); @@ -661,11 +672,11 @@ class ErrorHandler */ protected function getFatalErrorHandlers() { - return array( + return [ new UndefinedFunctionFatalErrorHandler(), new UndefinedMethodFatalErrorHandler(), new ClassNotFoundFatalErrorHandler(), - ); + ]; } /** diff --git a/vendor/symfony/debug/Exception/FatalErrorException.php b/vendor/symfony/debug/Exception/FatalErrorException.php index 8305d392..93880fbc 100644 --- a/vendor/symfony/debug/Exception/FatalErrorException.php +++ b/vendor/symfony/debug/Exception/FatalErrorException.php @@ -61,7 +61,7 @@ class FatalErrorException extends \ErrorException unset($frame); $trace = array_reverse($trace); } else { - $trace = array(); + $trace = []; } $this->setTrace($trace); diff --git a/vendor/symfony/debug/Exception/FlattenException.php b/vendor/symfony/debug/Exception/FlattenException.php index f85522ce..304df040 100644 --- a/vendor/symfony/debug/Exception/FlattenException.php +++ b/vendor/symfony/debug/Exception/FlattenException.php @@ -27,18 +27,19 @@ class FlattenException private $code; private $previous; private $trace; + private $traceAsString; private $class; private $statusCode; private $headers; private $file; private $line; - public static function create(\Exception $exception, $statusCode = null, array $headers = array()) + public static function create(\Exception $exception, $statusCode = null, array $headers = []) { return static::createFromThrowable($exception, $statusCode, $headers); } - public static function createFromThrowable(\Throwable $exception, ?int $statusCode = null, array $headers = array()): self + public static function createFromThrowable(\Throwable $exception, ?int $statusCode = null, array $headers = []): self { $e = new static(); $e->setMessage($exception->getMessage()); @@ -73,13 +74,13 @@ class FlattenException public function toArray() { - $exceptions = array(); - foreach (array_merge(array($this), $this->getAllPrevious()) as $exception) { - $exceptions[] = array( + $exceptions = []; + foreach (array_merge([$this], $this->getAllPrevious()) as $exception) { + $exceptions[] = [ 'message' => $exception->getMessage(), 'class' => $exception->getClass(), 'trace' => $exception->getTrace(), - ); + ]; } return $exceptions; @@ -213,7 +214,7 @@ class FlattenException public function getAllPrevious() { - $exceptions = array(); + $exceptions = []; $e = $this; while ($e = $e->getPrevious()) { $exceptions[] = $e; @@ -239,6 +240,8 @@ class FlattenException public function setTraceFromThrowable(\Throwable $throwable) { + $this->traceAsString = $throwable->getTraceAsString(); + return $this->setTrace($throwable->getTrace(), $throwable->getFile(), $throwable->getLine()); } @@ -247,8 +250,8 @@ class FlattenException */ public function setTrace($trace, $file, $line) { - $this->trace = array(); - $this->trace[] = array( + $this->trace = []; + $this->trace[] = [ 'namespace' => '', 'short_class' => '', 'class' => '', @@ -256,8 +259,8 @@ class FlattenException 'function' => '', 'file' => $file, 'line' => $line, - 'args' => array(), - ); + 'args' => [], + ]; foreach ($trace as $entry) { $class = ''; $namespace = ''; @@ -267,7 +270,7 @@ class FlattenException $namespace = implode('\\', $parts); } - $this->trace[] = array( + $this->trace[] = [ 'namespace' => $namespace, 'short_class' => $class, 'class' => isset($entry['class']) ? $entry['class'] : '', @@ -275,8 +278,8 @@ class FlattenException 'function' => isset($entry['function']) ? $entry['function'] : null, 'file' => isset($entry['file']) ? $entry['file'] : null, 'line' => isset($entry['line']) ? $entry['line'] : null, - 'args' => isset($entry['args']) ? $this->flattenArgs($entry['args']) : array(), - ); + 'args' => isset($entry['args']) ? $this->flattenArgs($entry['args']) : [], + ]; } return $this; @@ -284,34 +287,34 @@ class FlattenException private function flattenArgs($args, $level = 0, &$count = 0) { - $result = array(); + $result = []; foreach ($args as $key => $value) { if (++$count > 1e4) { - return array('array', '*SKIPPED over 10000 entries*'); + return ['array', '*SKIPPED over 10000 entries*']; } if ($value instanceof \__PHP_Incomplete_Class) { // is_object() returns false on PHP<=7.1 - $result[$key] = array('incomplete-object', $this->getClassNameFromIncomplete($value)); + $result[$key] = ['incomplete-object', $this->getClassNameFromIncomplete($value)]; } elseif (\is_object($value)) { - $result[$key] = array('object', \get_class($value)); + $result[$key] = ['object', \get_class($value)]; } elseif (\is_array($value)) { if ($level > 10) { - $result[$key] = array('array', '*DEEP NESTED ARRAY*'); + $result[$key] = ['array', '*DEEP NESTED ARRAY*']; } else { - $result[$key] = array('array', $this->flattenArgs($value, $level + 1, $count)); + $result[$key] = ['array', $this->flattenArgs($value, $level + 1, $count)]; } } elseif (null === $value) { - $result[$key] = array('null', null); + $result[$key] = ['null', null]; } elseif (\is_bool($value)) { - $result[$key] = array('boolean', $value); + $result[$key] = ['boolean', $value]; } elseif (\is_int($value)) { - $result[$key] = array('integer', $value); + $result[$key] = ['integer', $value]; } elseif (\is_float($value)) { - $result[$key] = array('float', $value); + $result[$key] = ['float', $value]; } elseif (\is_resource($value)) { - $result[$key] = array('resource', get_resource_type($value)); + $result[$key] = ['resource', get_resource_type($value)]; } else { - $result[$key] = array('string', (string) $value); + $result[$key] = ['string', (string) $value]; } } @@ -324,4 +327,33 @@ class FlattenException return $array['__PHP_Incomplete_Class_Name']; } + + public function getTraceAsString() + { + return $this->traceAsString; + } + + public function getAsString() + { + $message = ''; + $next = false; + + foreach (array_reverse(array_merge([$this], $this->getAllPrevious())) as $exception) { + if ($next) { + $message .= 'Next '; + } else { + $next = true; + } + $message .= $exception->getClass(); + + if ('' != $exception->getMessage()) { + $message .= ': '.$exception->getMessage(); + } + + $message .= ' in '.$exception->getFile().':'.$exception->getLine(). + "\nStack trace:\n".$exception->getTraceAsString()."\n\n"; + } + + return rtrim($message); + } } diff --git a/vendor/symfony/debug/Exception/SilencedErrorContext.php b/vendor/symfony/debug/Exception/SilencedErrorContext.php index 6f84617c..236c56ed 100644 --- a/vendor/symfony/debug/Exception/SilencedErrorContext.php +++ b/vendor/symfony/debug/Exception/SilencedErrorContext.php @@ -25,7 +25,7 @@ class SilencedErrorContext implements \JsonSerializable private $line; private $trace; - public function __construct(int $severity, string $file, int $line, array $trace = array(), int $count = 1) + public function __construct(int $severity, string $file, int $line, array $trace = [], int $count = 1) { $this->severity = $severity; $this->file = $file; @@ -56,12 +56,12 @@ class SilencedErrorContext implements \JsonSerializable public function JsonSerialize() { - return array( + return [ 'severity' => $this->severity, 'file' => $this->file, 'line' => $this->line, 'trace' => $this->trace, 'count' => $this->count, - ); + ]; } } diff --git a/vendor/symfony/debug/ExceptionHandler.php b/vendor/symfony/debug/ExceptionHandler.php index 2483a57a..7ae85eeb 100644 --- a/vendor/symfony/debug/ExceptionHandler.php +++ b/vendor/symfony/debug/ExceptionHandler.php @@ -26,9 +26,21 @@ use Symfony\Component\HttpKernel\Debug\FileLinkFormatter; * * @author Fabien Potencier * @author Nicolas Grekas + * + * @final since Symfony 4.3 */ class ExceptionHandler { + private const GHOST_ADDONS = [ + '02-14' => self::GHOST_HEART, + '02-29' => self::GHOST_PLUS, + '10-18' => self::GHOST_GIFT, + ]; + + private const GHOST_GIFT = 'M124.005 5.36c.396-.715 1.119-1.648-.124-1.873-.346-.177-.692-.492-1.038-.141-.769.303-1.435.728-.627 1.523.36.514.685 1.634 1.092 1.758.242-.417.47-.842.697-1.266zm-1.699 1.977c-.706-1.26-1.274-2.612-2.138-3.774-1.051-1.123-3.122-.622-3.593.825-.625 1.431.724 3.14 2.251 2.96 1.159.02 2.324.072 3.48-.011zm5.867.043c1.502-.202 2.365-2.092 1.51-3.347-.757-1.34-2.937-1.387-3.698-.025-.659 1.1-1.23 2.25-1.835 3.38 1.336.077 2.686.06 4.023-.008zm2.487 1.611c.512-.45 2.494-.981.993-1.409-.372-.105-.805-.59-1.14-.457-.726.902-1.842 1.432-3.007 1.376-.228.075-1.391-.114-1.077.1.822.47 1.623.979 2.474 1.395.595-.317 1.173-.667 1.757-1.005zm-11.696.255l1.314-.765c-1.338-.066-2.87.127-3.881-.95-.285-.319-.559-.684-.954-.282-.473.326-1.929.66-.808 1.058.976.576 1.945 1.167 2.946 1.701.476-.223.926-.503 1.383-.762zm6.416 2.846c.567-.456 1.942-.89 1.987-1.38-1.282-.737-2.527-1.56-3.87-2.183-.461-.175-.835.094-1.207.328-1.1.654-2.225 1.267-3.288 1.978 1.39.86 2.798 1.695 4.219 2.504.725-.407 1.44-.83 2.16-1.247zm5.692 1.423l1.765-1.114c-.005-1.244.015-2.488-.019-3.732a77.306 77.306 0 0 0-3.51 2.084c-.126 1.282-.062 2.586-.034 3.876.607-.358 1.2-.741 1.798-1.114zm-13.804-.784c.06-1.06.19-2.269-1.09-2.583-.807-.376-1.926-1.341-2.548-1.332-.02 1.195-.01 2.39-.011 3.585 1.192.744 2.364 1.524 3.582 2.226.119-.616.041-1.269.067-1.896zm8.541 4.105l2.117-1.336c-.003-1.284.05-2.57-.008-3.853-.776.223-1.662.91-2.48 1.337l-1.834 1.075c.012 1.37-.033 2.744.044 4.113.732-.427 1.443-.887 2.161-1.336zm-2.957-.72v-2.057c-1.416-.828-2.828-1.664-4.25-2.482-.078 1.311-.033 2.627-.045 3.94 1.416.887 2.817 1.798 4.25 2.655.057-.683.036-1.372.045-2.057zm8.255 2.755l1.731-1.153c-.024-1.218.06-2.453-.062-3.658-1.2.685-2.358 1.464-3.537 2.195.028 1.261-.058 2.536.072 3.786.609-.373 1.2-.777 1.796-1.17zm-13.851-.683l-.014-1.916c-1.193-.746-2.37-1.517-3.58-2.234-.076 1.224-.033 2.453-.044 3.679 1.203.796 2.392 1.614 3.61 2.385.048-.636.024-1.276.028-1.914zm8.584 4.199l2.102-1.396c-.002-1.298.024-2.596-.01-3.893-1.427.88-2.843 1.775-4.25 2.686-.158 1.253-.055 2.545-.056 3.811.437.266 1.553-.912 2.214-1.208zm-2.988-.556c-.085-.894.365-2.154-.773-2.5-1.146-.727-2.288-1.46-3.45-2.163-.17 1.228.008 2.508-.122 3.751a79.399 79.399 0 0 0 4.278 2.885c.117-.641.044-1.32.067-1.973zm-4.872-.236l-5.087-3.396c.002-3.493-.047-6.988.015-10.48.85-.524 1.753-.954 2.627-1.434-.564-1.616.25-3.58 1.887-4.184 1.372-.563 3.025-.055 3.9 1.13l1.906-.978 1.916.987c.915-1.086 2.483-1.706 3.842-1.097 1.631.573 2.52 2.532 1.936 4.145.88.497 1.837.886 2.644 1.492.036 3.473 0 6.946-.003 10.419-3.374 2.233-6.693 4.55-10.122 6.699-.997 0-1.858-1.083-2.783-1.522a735.316 735.316 0 0 1-2.678-1.781z'; + private const GHOST_HEART = 'M125.914 8.305c3.036-8.71 14.933 0 0 11.2-14.932-11.2-3.036-19.91 0-11.2z'; + private const GHOST_PLUS = 'M111.368 8.97h7.324V1.645h7.512v7.323h7.324v7.513h-7.324v7.323h-7.512v-7.323h-7.324z'; + private $debug; private $charset; private $handler; @@ -56,10 +68,10 @@ class ExceptionHandler { $handler = new static($debug, $charset, $fileLinkFormat); - $prev = set_exception_handler(array($handler, 'handle')); + $prev = set_exception_handler([$handler, 'handle']); if (\is_array($prev) && $prev[0] instanceof ErrorHandler) { restore_exception_handler(); - $prev[0]->setExceptionHandler(array($handler, 'handle')); + $prev[0]->setExceptionHandler([$handler, 'handle']); } return $handler; @@ -205,7 +217,7 @@ class ExceptionHandler $title = 'Sorry, the page you are looking for could not be found.'; break; default: - $title = 'Whoops, looks like something went wrong.'; + $title = $this->debug ? $this->escapeHtml($exception->getMessage()) : 'Whoops, looks like something went wrong.'; } if (!$this->debug) { @@ -373,12 +385,12 @@ EOF; $fmt = $this->fileLinkFormat ?: ini_get('xdebug.file_link_format') ?: get_cfg_var('xdebug.file_link_format'); if (!$fmt) { - return sprintf('in %s%s', $this->escapeHtml($path), $file, 0 < $line ? ' line '.$line : ''); + return sprintf('in %s%s', $this->escapeHtml($path), $file, 0 < $line ? ' line '.$line : ''); } if (\is_string($fmt)) { $i = strpos($f = $fmt, '&', max(strrpos($f, '%f'), strrpos($f, '%l'))) ?: \strlen($f); - $fmt = array(substr($f, 0, $i)) + preg_split('/&([^>]++)>/', substr($f, $i), -1, PREG_SPLIT_DELIM_CAPTURE); + $fmt = [substr($f, 0, $i)] + preg_split('/&([^>]++)>/', substr($f, $i), -1, PREG_SPLIT_DELIM_CAPTURE); for ($i = 1; isset($fmt[$i]); ++$i) { if (0 === strpos($path, $k = $fmt[$i++])) { @@ -387,9 +399,13 @@ EOF; } } - $link = strtr($fmt[0], array('%f' => $path, '%l' => $line)); + $link = strtr($fmt[0], ['%f' => $path, '%l' => $line]); } else { - $link = $fmt->format($path, $line); + try { + $link = $fmt->format($path, $line); + } catch (\Exception $e) { + return sprintf('in %s%s', $this->escapeHtml($path), $file, 0 < $line ? ' line '.$line : ''); + } } return sprintf('in %s%s', $this->escapeHtml($link), $file, 0 < $line ? ' line '.$line : ''); @@ -404,7 +420,7 @@ EOF; */ private function formatArgs(array $args) { - $result = array(); + $result = []; foreach ($args as $key => $item) { if ('object' === $item[0]) { $formattedValue = sprintf('object(%s)', $this->formatClass($item[1])); @@ -436,6 +452,15 @@ EOF; private function getSymfonyGhostAsSvg() { - return ''; + return ''.$this->addElementToGhost().''; + } + + private function addElementToGhost() + { + if (!isset(self::GHOST_ADDONS[\date('m-d')])) { + return ''; + } + + return ''; } } diff --git a/vendor/symfony/debug/FatalErrorHandler/ClassNotFoundFatalErrorHandler.php b/vendor/symfony/debug/FatalErrorHandler/ClassNotFoundFatalErrorHandler.php index 4ccd16fe..a0e2f770 100644 --- a/vendor/symfony/debug/FatalErrorHandler/ClassNotFoundFatalErrorHandler.php +++ b/vendor/symfony/debug/FatalErrorHandler/ClassNotFoundFatalErrorHandler.php @@ -40,7 +40,7 @@ class ClassNotFoundFatalErrorHandler implements FatalErrorHandlerInterface return; } - foreach (array('class', 'interface', 'trait') as $typeName) { + foreach (['class', 'interface', 'trait'] as $typeName) { $prefix = ucfirst($typeName).' \''; $prefixLen = \strlen($prefix); if (0 !== strpos($error['message'], $prefix)) { @@ -86,11 +86,11 @@ class ClassNotFoundFatalErrorHandler implements FatalErrorHandlerInterface private function getClassCandidates(string $class): array { if (!\is_array($functions = spl_autoload_functions())) { - return array(); + return []; } // find Symfony and Composer autoloaders - $classes = array(); + $classes = []; foreach ($functions as $function) { if (!\is_array($function)) { @@ -127,10 +127,10 @@ class ClassNotFoundFatalErrorHandler implements FatalErrorHandlerInterface private function findClassInPath(string $path, string $class, string $prefix): array { if (!$path = realpath($path.'/'.strtr($prefix, '\\_', '//')) ?: realpath($path.'/'.\dirname(strtr($prefix, '\\_', '//'))) ?: realpath($path)) { - return array(); + return []; } - $classes = array(); + $classes = []; $filename = $class.'.php'; foreach (new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($path, \RecursiveDirectoryIterator::SKIP_DOTS), \RecursiveIteratorIterator::LEAVES_ONLY) as $file) { if ($filename == $file->getFileName() && $class = $this->convertFileToClass($path, $file->getPathName(), $prefix)) { @@ -143,9 +143,9 @@ class ClassNotFoundFatalErrorHandler implements FatalErrorHandlerInterface private function convertFileToClass(string $path, string $file, string $prefix): ?string { - $candidates = array( + $candidates = [ // namespaced class - $namespacedClass = str_replace(array($path.\DIRECTORY_SEPARATOR, '.php', '/'), array('', '', '\\'), $file), + $namespacedClass = str_replace([$path.\DIRECTORY_SEPARATOR, '.php', '/'], ['', '', '\\'], $file), // namespaced class (with target dir) $prefix.$namespacedClass, // namespaced class (with target dir and separator) @@ -156,7 +156,7 @@ class ClassNotFoundFatalErrorHandler implements FatalErrorHandlerInterface str_replace('\\', '_', $prefix.$namespacedClass), // PEAR class (with target dir and separator) str_replace('\\', '_', $prefix.'\\'.$namespacedClass), - ); + ]; if ($prefix) { $candidates = array_filter($candidates, function ($candidate) use ($prefix) { return 0 === strpos($candidate, $prefix); }); @@ -171,7 +171,11 @@ class ClassNotFoundFatalErrorHandler implements FatalErrorHandlerInterface } } - require_once $file; + try { + require_once $file; + } catch (\Throwable $e) { + return null; + } foreach ($candidates as $candidate) { if ($this->classExists($candidate)) { diff --git a/vendor/symfony/debug/FatalErrorHandler/UndefinedFunctionFatalErrorHandler.php b/vendor/symfony/debug/FatalErrorHandler/UndefinedFunctionFatalErrorHandler.php index db241803..9eddeba5 100644 --- a/vendor/symfony/debug/FatalErrorHandler/UndefinedFunctionFatalErrorHandler.php +++ b/vendor/symfony/debug/FatalErrorHandler/UndefinedFunctionFatalErrorHandler.php @@ -53,7 +53,7 @@ class UndefinedFunctionFatalErrorHandler implements FatalErrorHandlerInterface $message = sprintf('Attempted to call function "%s" from the global namespace.', $functionName); } - $candidates = array(); + $candidates = []; foreach (get_defined_functions() as $type => $definedFunctionNames) { foreach ($definedFunctionNames as $definedFunctionName) { if (false !== $namespaceSeparatorIndex = strrpos($definedFunctionName, '\\')) { diff --git a/vendor/symfony/debug/FatalErrorHandler/UndefinedMethodFatalErrorHandler.php b/vendor/symfony/debug/FatalErrorHandler/UndefinedMethodFatalErrorHandler.php index 618a2c20..1318cb13 100644 --- a/vendor/symfony/debug/FatalErrorHandler/UndefinedMethodFatalErrorHandler.php +++ b/vendor/symfony/debug/FatalErrorHandler/UndefinedMethodFatalErrorHandler.php @@ -41,7 +41,7 @@ class UndefinedMethodFatalErrorHandler implements FatalErrorHandlerInterface return new UndefinedMethodException($message, $exception); } - $candidates = array(); + $candidates = []; foreach ($methods as $definedMethodName) { $lev = levenshtein($methodName, $definedMethodName); if ($lev <= \strlen($methodName) / 3 || false !== strpos($definedMethodName, $methodName)) { diff --git a/vendor/symfony/debug/Tests/DebugClassLoaderTest.php b/vendor/symfony/debug/Tests/DebugClassLoaderTest.php index c7e03fbe..6ee20ae8 100644 --- a/vendor/symfony/debug/Tests/DebugClassLoaderTest.php +++ b/vendor/symfony/debug/Tests/DebugClassLoaderTest.php @@ -27,14 +27,14 @@ class DebugClassLoaderTest extends TestCase { $this->errorReporting = error_reporting(E_ALL); $this->loader = new ClassLoader(); - spl_autoload_register(array($this->loader, 'loadClass'), true, true); + spl_autoload_register([$this->loader, 'loadClass'], true, true); DebugClassLoader::enable(); } protected function tearDown() { DebugClassLoader::disable(); - spl_autoload_unregister(array($this->loader, 'loadClass')); + spl_autoload_unregister([$this->loader, 'loadClass']); error_reporting($this->errorReporting); } @@ -44,7 +44,7 @@ class DebugClassLoaderTest extends TestCase $functions = spl_autoload_functions(); foreach ($functions as $function) { - if (is_array($function) && $function[0] instanceof DebugClassLoader) { + if (\is_array($function) && $function[0] instanceof DebugClassLoader) { $reflClass = new \ReflectionClass($function[0]); $reflProp = $reflClass->getProperty('classLoader'); $reflProp->setAccessible(true); @@ -136,20 +136,20 @@ class DebugClassLoaderTest extends TestCase $lastError = error_get_last(); unset($lastError['file'], $lastError['line']); - $xError = array( + $xError = [ 'type' => E_USER_DEPRECATED, 'message' => 'The "Test\Symfony\Component\Debug\Tests\\'.$class.'" class '.$type.' "Symfony\Component\Debug\Tests\Fixtures\\'.$super.'" that is deprecated but this is a test deprecation notice.', - ); + ]; $this->assertSame($xError, $lastError); } public function provideDeprecatedSuper() { - return array( - array('DeprecatedInterfaceClass', 'DeprecatedInterface', 'implements'), - array('DeprecatedParentClass', 'DeprecatedClass', 'extends'), - ); + return [ + ['DeprecatedInterfaceClass', 'DeprecatedInterface', 'implements'], + ['DeprecatedParentClass', 'DeprecatedClass', 'extends'], + ]; } public function testInterfaceExtendsDeprecatedInterface() @@ -166,10 +166,10 @@ class DebugClassLoaderTest extends TestCase $lastError = error_get_last(); unset($lastError['file'], $lastError['line']); - $xError = array( + $xError = [ 'type' => E_USER_NOTICE, 'message' => '', - ); + ]; $this->assertSame($xError, $lastError); } @@ -188,39 +188,46 @@ class DebugClassLoaderTest extends TestCase $lastError = error_get_last(); unset($lastError['file'], $lastError['line']); - $xError = array( + $xError = [ 'type' => E_USER_NOTICE, 'message' => '', - ); + ]; $this->assertSame($xError, $lastError); } public function testExtendedFinalClass() { - set_error_handler(function () { return false; }); - $e = error_reporting(0); - trigger_error('', E_USER_NOTICE); + $deprecations = []; + set_error_handler(function ($type, $msg) use (&$deprecations) { $deprecations[] = $msg; }); + $e = error_reporting(E_USER_DEPRECATED); - class_exists('Test\\'.__NAMESPACE__.'\\ExtendsFinalClass', true); + require __DIR__.'/Fixtures/FinalClasses.php'; + + $i = 1; + while (class_exists($finalClass = __NAMESPACE__.'\\Fixtures\\FinalClass'.$i++, false)) { + spl_autoload_call($finalClass); + class_exists('Test\\'.__NAMESPACE__.'\\Extends'.substr($finalClass, strrpos($finalClass, '\\') + 1), true); + } error_reporting($e); restore_error_handler(); - $lastError = error_get_last(); - unset($lastError['file'], $lastError['line']); - - $xError = array( - 'type' => E_USER_DEPRECATED, - 'message' => 'The "Symfony\Component\Debug\Tests\Fixtures\FinalClass" class is considered final. It may change without further notice as of its next major version. You should not extend it from "Test\Symfony\Component\Debug\Tests\ExtendsFinalClass".', - ); - - $this->assertSame($xError, $lastError); + $this->assertSame([ + 'The "Symfony\Component\Debug\Tests\Fixtures\FinalClass1" class is considered final since version 3.3. It may change without further notice as of its next major version. You should not extend it from "Test\Symfony\Component\Debug\Tests\ExtendsFinalClass1".', + 'The "Symfony\Component\Debug\Tests\Fixtures\FinalClass2" class is considered final. It may change without further notice as of its next major version. You should not extend it from "Test\Symfony\Component\Debug\Tests\ExtendsFinalClass2".', + 'The "Symfony\Component\Debug\Tests\Fixtures\FinalClass3" class is considered final comment with @@@ and ***. It may change without further notice as of its next major version. You should not extend it from "Test\Symfony\Component\Debug\Tests\ExtendsFinalClass3".', + 'The "Symfony\Component\Debug\Tests\Fixtures\FinalClass4" class is considered final. It may change without further notice as of its next major version. You should not extend it from "Test\Symfony\Component\Debug\Tests\ExtendsFinalClass4".', + 'The "Symfony\Component\Debug\Tests\Fixtures\FinalClass5" class is considered final multiline comment. It may change without further notice as of its next major version. You should not extend it from "Test\Symfony\Component\Debug\Tests\ExtendsFinalClass5".', + 'The "Symfony\Component\Debug\Tests\Fixtures\FinalClass6" class is considered final. It may change without further notice as of its next major version. You should not extend it from "Test\Symfony\Component\Debug\Tests\ExtendsFinalClass6".', + 'The "Symfony\Component\Debug\Tests\Fixtures\FinalClass7" class is considered final another multiline comment... It may change without further notice as of its next major version. You should not extend it from "Test\Symfony\Component\Debug\Tests\ExtendsFinalClass7".', + 'The "Symfony\Component\Debug\Tests\Fixtures\FinalClass8" class is considered final. It may change without further notice as of its next major version. You should not extend it from "Test\Symfony\Component\Debug\Tests\ExtendsFinalClass8".', + ], $deprecations); } public function testExtendedFinalMethod() { - $deprecations = array(); + $deprecations = []; set_error_handler(function ($type, $msg) use (&$deprecations) { $deprecations[] = $msg; }); $e = error_reporting(E_USER_DEPRECATED); @@ -229,10 +236,10 @@ class DebugClassLoaderTest extends TestCase error_reporting($e); restore_error_handler(); - $xError = array( + $xError = [ 'The "Symfony\Component\Debug\Tests\Fixtures\FinalMethod::finalMethod()" method is considered final. It may change without further notice as of its next major version. You should not extend it from "Symfony\Component\Debug\Tests\Fixtures\ExtendedFinalMethod".', 'The "Symfony\Component\Debug\Tests\Fixtures\FinalMethod::finalMethod2()" method is considered final. It may change without further notice as of its next major version. You should not extend it from "Symfony\Component\Debug\Tests\Fixtures\ExtendedFinalMethod".', - ); + ]; $this->assertSame($xError, $deprecations); } @@ -251,12 +258,12 @@ class DebugClassLoaderTest extends TestCase $lastError = error_get_last(); unset($lastError['file'], $lastError['line']); - $this->assertSame(array('type' => E_USER_NOTICE, 'message' => ''), $lastError); + $this->assertSame(['type' => E_USER_NOTICE, 'message' => ''], $lastError); } public function testInternalsUse() { - $deprecations = array(); + $deprecations = []; set_error_handler(function ($type, $msg) use (&$deprecations) { $deprecations[] = $msg; }); $e = error_reporting(E_USER_DEPRECATED); @@ -265,17 +272,17 @@ class DebugClassLoaderTest extends TestCase error_reporting($e); restore_error_handler(); - $this->assertSame($deprecations, array( + $this->assertSame($deprecations, [ 'The "Symfony\Component\Debug\Tests\Fixtures\InternalInterface" interface is considered internal. It may change without further notice. You should not use it from "Test\Symfony\Component\Debug\Tests\ExtendsInternalsParent".', 'The "Symfony\Component\Debug\Tests\Fixtures\InternalClass" class is considered internal. It may change without further notice. You should not use it from "Test\Symfony\Component\Debug\Tests\ExtendsInternalsParent".', 'The "Symfony\Component\Debug\Tests\Fixtures\InternalTrait" trait is considered internal. It may change without further notice. You should not use it from "Test\Symfony\Component\Debug\Tests\ExtendsInternals".', 'The "Symfony\Component\Debug\Tests\Fixtures\InternalClass::internalMethod()" method is considered internal. It may change without further notice. You should not extend it from "Test\Symfony\Component\Debug\Tests\ExtendsInternals".', - )); + ]); } public function testExtendedMethodDefinesNewParameters() { - $deprecations = array(); + $deprecations = []; set_error_handler(function ($type, $msg) use (&$deprecations) { $deprecations[] = $msg; }); $e = error_reporting(E_USER_DEPRECATED); @@ -284,16 +291,21 @@ class DebugClassLoaderTest extends TestCase error_reporting($e); restore_error_handler(); - $this->assertSame(array( + $this->assertSame([ 'The "Symfony\Component\Debug\Tests\Fixtures\SubClassWithAnnotatedParameters::quzMethod()" method will require a new "Quz $quz" argument in the next major version of its parent class "Symfony\Component\Debug\Tests\Fixtures\ClassWithAnnotatedParameters", not defining it is deprecated.', 'The "Symfony\Component\Debug\Tests\Fixtures\SubClassWithAnnotatedParameters::whereAmI()" method will require a new "bool $matrix" argument in the next major version of its parent class "Symfony\Component\Debug\Tests\Fixtures\InterfaceWithAnnotatedParameters", not defining it is deprecated.', + 'The "Symfony\Component\Debug\Tests\Fixtures\SubClassWithAnnotatedParameters::iAmHere()" method will require a new "$noType" argument in the next major version of its parent class "Symfony\Component\Debug\Tests\Fixtures\InterfaceWithAnnotatedParameters", not defining it is deprecated.', + 'The "Symfony\Component\Debug\Tests\Fixtures\SubClassWithAnnotatedParameters::iAmHere()" method will require a new "callable(\Throwable|null $reason, mixed $value) $callback" argument in the next major version of its parent class "Symfony\Component\Debug\Tests\Fixtures\InterfaceWithAnnotatedParameters", not defining it is deprecated.', + 'The "Symfony\Component\Debug\Tests\Fixtures\SubClassWithAnnotatedParameters::iAmHere()" method will require a new "string $param" argument in the next major version of its parent class "Symfony\Component\Debug\Tests\Fixtures\InterfaceWithAnnotatedParameters", not defining it is deprecated.', + 'The "Symfony\Component\Debug\Tests\Fixtures\SubClassWithAnnotatedParameters::iAmHere()" method will require a new "callable ($a, $b) $anotherOne" argument in the next major version of its parent class "Symfony\Component\Debug\Tests\Fixtures\InterfaceWithAnnotatedParameters", not defining it is deprecated.', + 'The "Symfony\Component\Debug\Tests\Fixtures\SubClassWithAnnotatedParameters::iAmHere()" method will require a new "Type$WithDollarIsStillAType $ccc" argument in the next major version of its parent class "Symfony\Component\Debug\Tests\Fixtures\InterfaceWithAnnotatedParameters", not defining it is deprecated.', 'The "Symfony\Component\Debug\Tests\Fixtures\SubClassWithAnnotatedParameters::isSymfony()" method will require a new "true $yes" argument in the next major version of its parent class "Symfony\Component\Debug\Tests\Fixtures\ClassWithAnnotatedParameters", not defining it is deprecated.', - ), $deprecations); + ], $deprecations); } public function testUseTraitWithInternalMethod() { - $deprecations = array(); + $deprecations = []; set_error_handler(function ($type, $msg) use (&$deprecations) { $deprecations[] = $msg; }); $e = error_reporting(E_USER_DEPRECATED); @@ -302,7 +314,52 @@ class DebugClassLoaderTest extends TestCase error_reporting($e); restore_error_handler(); - $this->assertSame(array(), $deprecations); + $this->assertSame([], $deprecations); + } + + public function testVirtualUse() + { + $deprecations = []; + set_error_handler(function ($type, $msg) use (&$deprecations) { $deprecations[] = $msg; }); + $e = error_reporting(E_USER_DEPRECATED); + + class_exists('Test\\'.__NAMESPACE__.'\\ExtendsVirtual', true); + + error_reporting($e); + restore_error_handler(); + + $this->assertSame([ + 'Class "Test\Symfony\Component\Debug\Tests\ExtendsVirtualParent" should implement method "Symfony\Component\Debug\Tests\Fixtures\VirtualInterface::sameLineInterfaceMethodNoBraces()".', + 'Class "Test\Symfony\Component\Debug\Tests\ExtendsVirtualParent" should implement method "Symfony\Component\Debug\Tests\Fixtures\VirtualInterface::newLineInterfaceMethod()": Some description!', + 'Class "Test\Symfony\Component\Debug\Tests\ExtendsVirtualParent" should implement method "Symfony\Component\Debug\Tests\Fixtures\VirtualInterface::newLineInterfaceMethodNoBraces()": Description.', + 'Class "Test\Symfony\Component\Debug\Tests\ExtendsVirtualParent" should implement method "Symfony\Component\Debug\Tests\Fixtures\VirtualInterface::invalidInterfaceMethod()".', + 'Class "Test\Symfony\Component\Debug\Tests\ExtendsVirtualParent" should implement method "Symfony\Component\Debug\Tests\Fixtures\VirtualInterface::invalidInterfaceMethodNoBraces()".', + 'Class "Test\Symfony\Component\Debug\Tests\ExtendsVirtualParent" should implement method "Symfony\Component\Debug\Tests\Fixtures\VirtualInterface::complexInterfaceMethod($arg, ...$args)".', + 'Class "Test\Symfony\Component\Debug\Tests\ExtendsVirtualParent" should implement method "Symfony\Component\Debug\Tests\Fixtures\VirtualInterface::complexInterfaceMethodTyped($arg, int ...$args)": Description ...', + 'Class "Test\Symfony\Component\Debug\Tests\ExtendsVirtualParent" should implement method "static Symfony\Component\Debug\Tests\Fixtures\VirtualInterface::staticMethodNoBraces()".', + 'Class "Test\Symfony\Component\Debug\Tests\ExtendsVirtualParent" should implement method "static Symfony\Component\Debug\Tests\Fixtures\VirtualInterface::staticMethodTyped(int $arg)": Description.', + 'Class "Test\Symfony\Component\Debug\Tests\ExtendsVirtualParent" should implement method "static Symfony\Component\Debug\Tests\Fixtures\VirtualInterface::staticMethodTypedNoBraces()".', + 'Class "Test\Symfony\Component\Debug\Tests\ExtendsVirtual" should implement method "Symfony\Component\Debug\Tests\Fixtures\VirtualSubInterface::subInterfaceMethod()".', + ], $deprecations); + } + + public function testVirtualUseWithMagicCall() + { + $deprecations = []; + set_error_handler(function ($type, $msg) use (&$deprecations) { $deprecations[] = $msg; }); + $e = error_reporting(E_USER_DEPRECATED); + + class_exists('Test\\'.__NAMESPACE__.'\\ExtendsVirtualMagicCall', true); + + error_reporting($e); + restore_error_handler(); + + $this->assertSame([], $deprecations); + } + + public function testEvaluatedCode() + { + $this->assertTrue(class_exists(__NAMESPACE__.'\Fixtures\DefinitionInEvaluatedCode', true)); } } @@ -314,12 +371,12 @@ class ClassLoader public function getClassMap() { - return array(__NAMESPACE__.'\Fixtures\NotPSR0bis' => __DIR__.'/Fixtures/notPsr0Bis.php'); + return [__NAMESPACE__.'\Fixtures\NotPSR0bis' => __DIR__.'/Fixtures/notPsr0Bis.php']; } public function findFile($class) { - $fixtureDir = __DIR__.DIRECTORY_SEPARATOR.'Fixtures'.DIRECTORY_SEPARATOR; + $fixtureDir = __DIR__.\DIRECTORY_SEPARATOR.'Fixtures'.\DIRECTORY_SEPARATOR; if (__NAMESPACE__.'\TestingUnsilencing' === $class) { eval('-- parse error --'); @@ -328,7 +385,7 @@ class ClassLoader } elseif (__NAMESPACE__.'\TestingCaseMismatch' === $class) { eval('namespace '.__NAMESPACE__.'; class TestingCaseMisMatch {}'); } elseif (__NAMESPACE__.'\Fixtures\Psr4CaseMismatch' === $class) { - return $fixtureDir.'psr4'.DIRECTORY_SEPARATOR.'Psr4CaseMismatch.php'; + return $fixtureDir.'psr4'.\DIRECTORY_SEPARATOR.'Psr4CaseMismatch.php'; } elseif (__NAMESPACE__.'\Fixtures\NotPSR0' === $class) { return $fixtureDir.'reallyNotPsr0.php'; } elseif (__NAMESPACE__.'\Fixtures\NotPSR0bis' === $class) { @@ -343,8 +400,9 @@ class ClassLoader eval('namespace Test\\'.__NAMESPACE__.'; class NonDeprecatedInterfaceClass implements \\'.__NAMESPACE__.'\Fixtures\NonDeprecatedInterface {}'); } elseif ('Test\\'.__NAMESPACE__.'\Float' === $class) { eval('namespace Test\\'.__NAMESPACE__.'; class Float {}'); - } elseif ('Test\\'.__NAMESPACE__.'\ExtendsFinalClass' === $class) { - eval('namespace Test\\'.__NAMESPACE__.'; class ExtendsFinalClass extends \\'.__NAMESPACE__.'\Fixtures\FinalClass {}'); + } elseif (0 === strpos($class, 'Test\\'.__NAMESPACE__.'\ExtendsFinalClass')) { + $classShortName = substr($class, strrpos($class, '\\') + 1); + eval('namespace Test\\'.__NAMESPACE__.'; class '.$classShortName.' extends \\'.__NAMESPACE__.'\Fixtures\\'.substr($classShortName, 7).' {}'); } elseif ('Test\\'.__NAMESPACE__.'\ExtendsAnnotatedClass' === $class) { eval('namespace Test\\'.__NAMESPACE__.'; class ExtendsAnnotatedClass extends \\'.__NAMESPACE__.'\Fixtures\AnnotatedClass { public function deprecatedMethod() { } @@ -359,6 +417,32 @@ class ClassLoader eval('namespace Test\\'.__NAMESPACE__.'; class ExtendsInternalsParent extends \\'.__NAMESPACE__.'\Fixtures\InternalClass implements \\'.__NAMESPACE__.'\Fixtures\InternalInterface { }'); } elseif ('Test\\'.__NAMESPACE__.'\UseTraitWithInternalMethod' === $class) { eval('namespace Test\\'.__NAMESPACE__.'; class UseTraitWithInternalMethod { use \\'.__NAMESPACE__.'\Fixtures\TraitWithInternalMethod; }'); + } elseif ('Test\\'.__NAMESPACE__.'\ExtendsVirtual' === $class) { + eval('namespace Test\\'.__NAMESPACE__.'; class ExtendsVirtual extends ExtendsVirtualParent implements \\'.__NAMESPACE__.'\Fixtures\VirtualSubInterface { + public function ownClassMethod() { } + public function classMethod() { } + public function sameLineInterfaceMethodNoBraces() { } + }'); + } elseif ('Test\\'.__NAMESPACE__.'\ExtendsVirtualParent' === $class) { + eval('namespace Test\\'.__NAMESPACE__.'; class ExtendsVirtualParent extends ExtendsVirtualAbstract { + public function ownParentMethod() { } + public function traitMethod() { } + public function sameLineInterfaceMethod() { } + public function staticMethodNoBraces() { } // should be static + }'); + } elseif ('Test\\'.__NAMESPACE__.'\ExtendsVirtualAbstract' === $class) { + eval('namespace Test\\'.__NAMESPACE__.'; abstract class ExtendsVirtualAbstract extends ExtendsVirtualAbstractBase { + public static function staticMethod() { } + public function ownAbstractMethod() { } + public function interfaceMethod() { } + }'); + } elseif ('Test\\'.__NAMESPACE__.'\ExtendsVirtualAbstractBase' === $class) { + eval('namespace Test\\'.__NAMESPACE__.'; abstract class ExtendsVirtualAbstractBase extends \\'.__NAMESPACE__.'\Fixtures\VirtualClass implements \\'.__NAMESPACE__.'\Fixtures\VirtualInterface { + public function ownAbstractBaseMethod() { } + }'); + } elseif ('Test\\'.__NAMESPACE__.'\ExtendsVirtualMagicCall' === $class) { + eval('namespace Test\\'.__NAMESPACE__.'; class ExtendsVirtualMagicCall extends \\'.__NAMESPACE__.'\Fixtures\VirtualClassMagicCall implements \\'.__NAMESPACE__.'\Fixtures\VirtualInterface { + }'); } } } diff --git a/vendor/symfony/debug/Tests/ErrorHandlerTest.php b/vendor/symfony/debug/Tests/ErrorHandlerTest.php index 15e47638..f758d21e 100644 --- a/vendor/symfony/debug/Tests/ErrorHandlerTest.php +++ b/vendor/symfony/debug/Tests/ErrorHandlerTest.php @@ -13,9 +13,12 @@ namespace Symfony\Component\Debug\Tests; use PHPUnit\Framework\TestCase; use Psr\Log\LogLevel; +use Psr\Log\NullLogger; use Symfony\Component\Debug\BufferingLogger; use Symfony\Component\Debug\ErrorHandler; use Symfony\Component\Debug\Exception\SilencedErrorContext; +use Symfony\Component\Debug\Tests\Fixtures\ErrorHandlerThatUsesThePreviousOne; +use Symfony\Component\Debug\Tests\Fixtures\LoggerThatSetAnErrorHandler; /** * ErrorHandlerTest. @@ -38,13 +41,13 @@ class ErrorHandlerTest extends TestCase $this->assertSame($handler, ErrorHandler::register($newHandler, false)); $h = set_error_handler('var_dump'); restore_error_handler(); - $this->assertSame(array($handler, 'handleError'), $h); + $this->assertSame([$handler, 'handleError'], $h); try { $this->assertSame($newHandler, ErrorHandler::register($newHandler, true)); $h = set_error_handler('var_dump'); restore_error_handler(); - $this->assertSame(array($newHandler, 'handleError'), $h); + $this->assertSame([$newHandler, 'handleError'], $h); } catch (\Exception $e) { } @@ -74,12 +77,12 @@ class ErrorHandlerTest extends TestCase try { @trigger_error('Hello', E_USER_WARNING); - $expected = array( + $expected = [ 'type' => E_USER_WARNING, 'message' => 'Hello', 'file' => __FILE__, 'line' => __LINE__ - 5, - ); + ]; $this->assertSame($expected, error_get_last()); } catch (\Exception $e) { restore_error_handler(); @@ -145,26 +148,26 @@ class ErrorHandlerTest extends TestCase $logger = $this->getMockBuilder('Psr\Log\LoggerInterface')->getMock(); $handler->setDefaultLogger($logger, E_NOTICE); - $handler->setDefaultLogger($logger, array(E_USER_NOTICE => LogLevel::CRITICAL)); + $handler->setDefaultLogger($logger, [E_USER_NOTICE => LogLevel::CRITICAL]); - $loggers = array( - E_DEPRECATED => array(null, LogLevel::INFO), - E_USER_DEPRECATED => array(null, LogLevel::INFO), - E_NOTICE => array($logger, LogLevel::WARNING), - E_USER_NOTICE => array($logger, LogLevel::CRITICAL), - E_STRICT => array(null, LogLevel::WARNING), - E_WARNING => array(null, LogLevel::WARNING), - E_USER_WARNING => array(null, LogLevel::WARNING), - E_COMPILE_WARNING => array(null, LogLevel::WARNING), - E_CORE_WARNING => array(null, LogLevel::WARNING), - E_USER_ERROR => array(null, LogLevel::CRITICAL), - E_RECOVERABLE_ERROR => array(null, LogLevel::CRITICAL), - E_COMPILE_ERROR => array(null, LogLevel::CRITICAL), - E_PARSE => array(null, LogLevel::CRITICAL), - E_ERROR => array(null, LogLevel::CRITICAL), - E_CORE_ERROR => array(null, LogLevel::CRITICAL), - ); - $this->assertSame($loggers, $handler->setLoggers(array())); + $loggers = [ + E_DEPRECATED => [null, LogLevel::INFO], + E_USER_DEPRECATED => [null, LogLevel::INFO], + E_NOTICE => [$logger, LogLevel::WARNING], + E_USER_NOTICE => [$logger, LogLevel::CRITICAL], + E_STRICT => [null, LogLevel::WARNING], + E_WARNING => [null, LogLevel::WARNING], + E_USER_WARNING => [null, LogLevel::WARNING], + E_COMPILE_WARNING => [null, LogLevel::WARNING], + E_CORE_WARNING => [null, LogLevel::WARNING], + E_USER_ERROR => [null, LogLevel::CRITICAL], + E_RECOVERABLE_ERROR => [null, LogLevel::CRITICAL], + E_COMPILE_ERROR => [null, LogLevel::CRITICAL], + E_PARSE => [null, LogLevel::CRITICAL], + E_ERROR => [null, LogLevel::CRITICAL], + E_CORE_ERROR => [null, LogLevel::CRITICAL], + ]; + $this->assertSame($loggers, $handler->setLoggers([])); } finally { restore_error_handler(); restore_exception_handler(); @@ -176,14 +179,14 @@ class ErrorHandlerTest extends TestCase try { $handler = ErrorHandler::register(); $handler->throwAt(0, true); - $this->assertFalse($handler->handleError(0, 'foo', 'foo.php', 12, array())); + $this->assertFalse($handler->handleError(0, 'foo', 'foo.php', 12, [])); restore_error_handler(); restore_exception_handler(); $handler = ErrorHandler::register(); $handler->throwAt(3, true); - $this->assertFalse($handler->handleError(4, 'foo', 'foo.php', 12, array())); + $this->assertFalse($handler->handleError(4, 'foo', 'foo.php', 12, [])); restore_error_handler(); restore_exception_handler(); @@ -191,7 +194,7 @@ class ErrorHandlerTest extends TestCase $handler = ErrorHandler::register(); $handler->throwAt(3, true); try { - $handler->handleError(4, 'foo', 'foo.php', 12, array()); + $handler->handleError(4, 'foo', 'foo.php', 12, []); } catch (\ErrorException $e) { $this->assertSame('Parse Error: foo', $e->getMessage()); $this->assertSame(4, $e->getSeverity()); @@ -204,14 +207,14 @@ class ErrorHandlerTest extends TestCase $handler = ErrorHandler::register(); $handler->throwAt(E_USER_DEPRECATED, true); - $this->assertFalse($handler->handleError(E_USER_DEPRECATED, 'foo', 'foo.php', 12, array())); + $this->assertFalse($handler->handleError(E_USER_DEPRECATED, 'foo', 'foo.php', 12, [])); restore_error_handler(); restore_exception_handler(); $handler = ErrorHandler::register(); $handler->throwAt(E_DEPRECATED, true); - $this->assertFalse($handler->handleError(E_DEPRECATED, 'foo', 'foo.php', 12, array())); + $this->assertFalse($handler->handleError(E_DEPRECATED, 'foo', 'foo.php', 12, [])); restore_error_handler(); restore_exception_handler(); @@ -231,12 +234,12 @@ class ErrorHandlerTest extends TestCase $logger ->expects($this->once()) ->method('log') - ->will($this->returnCallback($warnArgCheck)) + ->willReturnCallback($warnArgCheck) ; $handler = ErrorHandler::register(); $handler->setDefaultLogger($logger, E_USER_DEPRECATED); - $this->assertTrue($handler->handleError(E_USER_DEPRECATED, 'foo', 'foo.php', 12, array())); + $this->assertTrue($handler->handleError(E_USER_DEPRECATED, 'foo', 'foo.php', 12, [])); restore_error_handler(); restore_exception_handler(); @@ -259,7 +262,7 @@ class ErrorHandlerTest extends TestCase $logger ->expects($this->once()) ->method('log') - ->will($this->returnCallback($logArgCheck)) + ->willReturnCallback($logArgCheck) ; $handler = ErrorHandler::register(); @@ -315,12 +318,14 @@ class ErrorHandlerTest extends TestCase $logger ->expects($this->once()) ->method('log') - ->will($this->returnCallback($logArgCheck)) + ->willReturnCallback($logArgCheck) ; $handler = new ErrorHandler(); $handler->setDefaultLogger($logger); - @$handler->handleError(E_USER_DEPRECATED, 'Foo deprecation', __FILE__, __LINE__, array()); + @$handler->handleError(E_USER_DEPRECATED, 'Foo deprecation', __FILE__, __LINE__, []); + + restore_error_handler(); } public function testHandleException() @@ -341,7 +346,7 @@ class ErrorHandlerTest extends TestCase $logger ->expects($this->exactly(2)) ->method('log') - ->will($this->returnCallback($logArgCheck)) + ->willReturnCallback($logArgCheck) ; $handler->setDefaultLogger($logger, E_ERROR); @@ -369,27 +374,27 @@ class ErrorHandlerTest extends TestCase $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), - ); + $loggers = [ + E_DEPRECATED => [$bootLogger, LogLevel::INFO], + E_USER_DEPRECATED => [$bootLogger, LogLevel::INFO], + E_NOTICE => [$bootLogger, LogLevel::WARNING], + E_USER_NOTICE => [$bootLogger, LogLevel::WARNING], + E_STRICT => [$bootLogger, LogLevel::WARNING], + E_WARNING => [$bootLogger, LogLevel::WARNING], + E_USER_WARNING => [$bootLogger, LogLevel::WARNING], + E_COMPILE_WARNING => [$bootLogger, LogLevel::WARNING], + E_CORE_WARNING => [$bootLogger, LogLevel::WARNING], + E_USER_ERROR => [$bootLogger, LogLevel::CRITICAL], + E_RECOVERABLE_ERROR => [$bootLogger, LogLevel::CRITICAL], + E_COMPILE_ERROR => [$bootLogger, LogLevel::CRITICAL], + E_PARSE => [$bootLogger, LogLevel::CRITICAL], + E_ERROR => [$bootLogger, LogLevel::CRITICAL], + E_CORE_ERROR => [$bootLogger, LogLevel::CRITICAL], + ]; - $this->assertSame($loggers, $handler->setLoggers(array())); + $this->assertSame($loggers, $handler->setLoggers([])); - $handler->handleError(E_DEPRECATED, 'Foo message', __FILE__, 123, array()); + $handler->handleError(E_DEPRECATED, 'Foo message', __FILE__, 123, []); $logs = $bootLogger->cleanLogs(); @@ -405,14 +410,14 @@ class ErrorHandlerTest extends TestCase $this->assertSame(123, $exception->getLine()); $this->assertSame(E_DEPRECATED, $exception->getSeverity()); - $bootLogger->log(LogLevel::WARNING, 'Foo message', array('exception' => $exception)); + $bootLogger->log(LogLevel::WARNING, 'Foo message', ['exception' => $exception]); $mockLogger = $this->getMockBuilder('Psr\Log\LoggerInterface')->getMock(); $mockLogger->expects($this->once()) ->method('log') - ->with(LogLevel::WARNING, 'Foo message', array('exception' => $exception)); + ->with(LogLevel::WARNING, 'Foo message', ['exception' => $exception]); - $handler->setLoggers(array(E_DEPRECATED => array($mockLogger, LogLevel::WARNING))); + $handler->setLoggers([E_DEPRECATED => [$mockLogger, LogLevel::WARNING]]); } public function testSettingLoggerWhenExceptionIsBuffered() @@ -425,7 +430,7 @@ class ErrorHandlerTest extends TestCase $mockLogger = $this->getMockBuilder('Psr\Log\LoggerInterface')->getMock(); $mockLogger->expects($this->once()) ->method('log') - ->with(LogLevel::CRITICAL, 'Uncaught Exception: Foo message', array('exception' => $exception)); + ->with(LogLevel::CRITICAL, 'Uncaught Exception: Foo message', ['exception' => $exception]); $handler->setExceptionHandler(function () use ($handler, $mockLogger) { $handler->setDefaultLogger($mockLogger); @@ -439,12 +444,12 @@ class ErrorHandlerTest extends TestCase try { $handler = ErrorHandler::register(); - $error = array( + $error = [ 'type' => E_PARSE, 'message' => 'foo', 'file' => 'bar', 'line' => 123, - ); + ]; $logger = $this->getMockBuilder('Psr\Log\LoggerInterface')->getMock(); @@ -457,7 +462,7 @@ class ErrorHandlerTest extends TestCase $logger ->expects($this->once()) ->method('log') - ->will($this->returnCallback($logArgCheck)) + ->willReturnCallback($logArgCheck) ; $handler->setDefaultLogger($logger, E_PARSE); @@ -476,7 +481,7 @@ class ErrorHandlerTest extends TestCase public function testHandleErrorException() { - $exception = new \Error("Class 'Foo' not found"); + $exception = new \Error("Class 'IReallyReallyDoNotExistAnywhereInTheRepositoryISwear' not found"); $handler = new ErrorHandler(); $handler->setExceptionHandler(function () use (&$args) { @@ -486,7 +491,7 @@ class ErrorHandlerTest extends TestCase $handler->handleException($exception); $this->assertInstanceOf('Symfony\Component\Debug\Exception\ClassNotFoundException', $args[0]); - $this->assertStringStartsWith("Attempted to load class \"Foo\" from the global namespace.\nDid you forget a \"use\" statement", $args[0]->getMessage()); + $this->assertStringStartsWith("Attempted to load class \"IReallyReallyDoNotExistAnywhereInTheRepositoryISwear\" from the global namespace.\nDid you forget a \"use\" statement", $args[0]->getMessage()); } /** @@ -501,4 +506,58 @@ class ErrorHandlerTest extends TestCase $handler->handleException(new \Exception()); } + + /** + * @dataProvider errorHandlerWhenLoggingProvider + */ + public function testErrorHandlerWhenLogging($previousHandlerWasDefined, $loggerSetsAnotherHandler, $nextHandlerIsDefined) + { + try { + if ($previousHandlerWasDefined) { + set_error_handler('count'); + } + + $logger = $loggerSetsAnotherHandler ? new LoggerThatSetAnErrorHandler() : new NullLogger(); + + $handler = ErrorHandler::register(); + $handler->setDefaultLogger($logger); + + if ($nextHandlerIsDefined) { + $handler = ErrorHandlerThatUsesThePreviousOne::register(); + } + + @trigger_error('foo', E_USER_DEPRECATED); + @trigger_error('bar', E_USER_DEPRECATED); + + $this->assertSame([$handler, 'handleError'], set_error_handler('var_dump')); + + if ($logger instanceof LoggerThatSetAnErrorHandler) { + $this->assertCount(2, $logger->cleanLogs()); + } + + restore_error_handler(); + + if ($previousHandlerWasDefined) { + restore_error_handler(); + } + + if ($nextHandlerIsDefined) { + restore_error_handler(); + } + } finally { + restore_error_handler(); + restore_exception_handler(); + } + } + + public function errorHandlerWhenLoggingProvider() + { + foreach ([false, true] as $previousHandlerWasDefined) { + foreach ([false, true] as $loggerSetsAnotherHandler) { + foreach ([false, true] as $nextHandlerIsDefined) { + yield [$previousHandlerWasDefined, $loggerSetsAnotherHandler, $nextHandlerIsDefined]; + } + } + } + } } diff --git a/vendor/symfony/debug/Tests/Exception/FlattenExceptionTest.php b/vendor/symfony/debug/Tests/Exception/FlattenExceptionTest.php index 5b77b999..e86210b9 100644 --- a/vendor/symfony/debug/Tests/Exception/FlattenExceptionTest.php +++ b/vendor/symfony/debug/Tests/Exception/FlattenExceptionTest.php @@ -61,7 +61,7 @@ class FlattenExceptionTest extends TestCase $flattened = FlattenException::create(new ConflictHttpException()); $this->assertEquals('409', $flattened->getStatusCode()); - $flattened = FlattenException::create(new MethodNotAllowedHttpException(array('POST'))); + $flattened = FlattenException::create(new MethodNotAllowedHttpException(['POST'])); $this->assertEquals('405', $flattened->getStatusCode()); $flattened = FlattenException::create(new AccessDeniedHttpException()); @@ -96,23 +96,23 @@ class FlattenExceptionTest extends TestCase public function testHeadersForHttpException() { - $flattened = FlattenException::create(new MethodNotAllowedHttpException(array('POST'))); - $this->assertEquals(array('Allow' => 'POST'), $flattened->getHeaders()); + $flattened = FlattenException::create(new MethodNotAllowedHttpException(['POST'])); + $this->assertEquals(['Allow' => 'POST'], $flattened->getHeaders()); $flattened = FlattenException::create(new UnauthorizedHttpException('Basic realm="My Realm"')); - $this->assertEquals(array('WWW-Authenticate' => 'Basic realm="My Realm"'), $flattened->getHeaders()); + $this->assertEquals(['WWW-Authenticate' => 'Basic realm="My Realm"'], $flattened->getHeaders()); $flattened = FlattenException::create(new ServiceUnavailableHttpException('Fri, 31 Dec 1999 23:59:59 GMT')); - $this->assertEquals(array('Retry-After' => 'Fri, 31 Dec 1999 23:59:59 GMT'), $flattened->getHeaders()); + $this->assertEquals(['Retry-After' => 'Fri, 31 Dec 1999 23:59:59 GMT'], $flattened->getHeaders()); $flattened = FlattenException::create(new ServiceUnavailableHttpException(120)); - $this->assertEquals(array('Retry-After' => 120), $flattened->getHeaders()); + $this->assertEquals(['Retry-After' => 120], $flattened->getHeaders()); $flattened = FlattenException::create(new TooManyRequestsHttpException('Fri, 31 Dec 1999 23:59:59 GMT')); - $this->assertEquals(array('Retry-After' => 'Fri, 31 Dec 1999 23:59:59 GMT'), $flattened->getHeaders()); + $this->assertEquals(['Retry-After' => 'Fri, 31 Dec 1999 23:59:59 GMT'], $flattened->getHeaders()); $flattened = FlattenException::create(new TooManyRequestsHttpException(120)); - $this->assertEquals(array('Retry-After' => 120), $flattened->getHeaders()); + $this->assertEquals(['Retry-After' => 120], $flattened->getHeaders()); } /** @@ -162,7 +162,7 @@ class FlattenExceptionTest extends TestCase $this->assertSame($flattened2, $flattened->getPrevious()); - $this->assertSame(array($flattened2), $flattened->getAllPrevious()); + $this->assertSame([$flattened2], $flattened->getAllPrevious()); } public function testPreviousError() @@ -200,18 +200,18 @@ class FlattenExceptionTest extends TestCase public function testToArray(\Throwable $exception, string $expectedClass) { $flattened = FlattenException::createFromThrowable($exception); - $flattened->setTrace(array(), 'foo.php', 123); + $flattened->setTrace([], 'foo.php', 123); - $this->assertEquals(array( - array( + $this->assertEquals([ + [ 'message' => 'test', 'class' => $expectedClass, - 'trace' => array(array( + 'trace' => [[ 'namespace' => '', 'short_class' => '', 'class' => '', 'type' => '', 'function' => '', 'file' => 'foo.php', 'line' => 123, - 'args' => array(), - )), - ), - ), $flattened->toArray()); + 'args' => [], + ]], + ], + ], $flattened->toArray()); } public function testCreate() @@ -229,10 +229,10 @@ class FlattenExceptionTest extends TestCase public function flattenDataProvider() { - return array( - array(new \Exception('test', 123), 'Exception'), - array(new \Error('test', 123), 'Error'), - ); + return [ + [new \Exception('test', 123), 'Exception'], + [new \Error('test', 123), 'Error'], + ]; } public function testArguments() @@ -242,15 +242,15 @@ class FlattenExceptionTest extends TestCase $incomplete = unserialize('O:14:"BogusTestClass":0:{}'); - $exception = $this->createException(array( - (object) array('foo' => 1), + $exception = $this->createException([ + (object) ['foo' => 1], new NotFoundHttpException(), $incomplete, $dh, $fh, function () {}, - array(1, 2), - array('foo' => 123), + [1, 2], + ['foo' => 123], null, true, false, @@ -260,7 +260,7 @@ class FlattenExceptionTest extends TestCase '', INF, NAN, - )); + ]); $flattened = FlattenException::create($exception); $trace = $flattened->getTrace(); @@ -271,26 +271,26 @@ class FlattenExceptionTest extends TestCase fclose($fh); $i = 0; - $this->assertSame(array('object', 'stdClass'), $array[$i++]); - $this->assertSame(array('object', 'Symfony\Component\HttpKernel\Exception\NotFoundHttpException'), $array[$i++]); - $this->assertSame(array('incomplete-object', 'BogusTestClass'), $array[$i++]); - $this->assertSame(array('resource', 'stream'), $array[$i++]); - $this->assertSame(array('resource', 'stream'), $array[$i++]); + $this->assertSame(['object', 'stdClass'], $array[$i++]); + $this->assertSame(['object', 'Symfony\Component\HttpKernel\Exception\NotFoundHttpException'], $array[$i++]); + $this->assertSame(['incomplete-object', 'BogusTestClass'], $array[$i++]); + $this->assertSame(['resource', 'stream'], $array[$i++]); + $this->assertSame(['resource', 'stream'], $array[$i++]); $args = $array[$i++]; $this->assertSame($args[0], 'object'); $this->assertTrue('Closure' === $args[1] || is_subclass_of($args[1], '\Closure'), 'Expect object class name to be Closure or a subclass of Closure.'); - $this->assertSame(array('array', array(array('integer', 1), array('integer', 2))), $array[$i++]); - $this->assertSame(array('array', array('foo' => array('integer', 123))), $array[$i++]); - $this->assertSame(array('null', null), $array[$i++]); - $this->assertSame(array('boolean', true), $array[$i++]); - $this->assertSame(array('boolean', false), $array[$i++]); - $this->assertSame(array('integer', 0), $array[$i++]); - $this->assertSame(array('float', 0.0), $array[$i++]); - $this->assertSame(array('string', '0'), $array[$i++]); - $this->assertSame(array('string', ''), $array[$i++]); - $this->assertSame(array('float', INF), $array[$i++]); + $this->assertSame(['array', [['integer', 1], ['integer', 2]]], $array[$i++]); + $this->assertSame(['array', ['foo' => ['integer', 123]]], $array[$i++]); + $this->assertSame(['null', null], $array[$i++]); + $this->assertSame(['boolean', true], $array[$i++]); + $this->assertSame(['boolean', false], $array[$i++]); + $this->assertSame(['integer', 0], $array[$i++]); + $this->assertSame(['float', 0.0], $array[$i++]); + $this->assertSame(['string', '0'], $array[$i++]); + $this->assertSame(['string', ''], $array[$i++]); + $this->assertSame(['float', INF], $array[$i++]); // assertEquals() does not like NAN values. $this->assertEquals($array[$i][0], 'float'); @@ -300,7 +300,7 @@ class FlattenExceptionTest extends TestCase public function testRecursionInArguments() { $a = null; - $a = array('foo', array(2, &$a)); + $a = ['foo', [2, &$a]]; $exception = $this->createException($a); $flattened = FlattenException::create($exception); @@ -310,7 +310,7 @@ class FlattenExceptionTest extends TestCase public function testTooBigArray() { - $a = array(); + $a = []; for ($i = 0; $i < 20; ++$i) { for ($j = 0; $j < 50; ++$j) { for ($k = 0; $k < 10; ++$k) { @@ -325,7 +325,7 @@ class FlattenExceptionTest extends TestCase $flattened = FlattenException::create($exception); $trace = $flattened->getTrace(); - $this->assertSame($trace[1]['args'][0], array('array', array('array', '*SKIPPED over 10000 entries*'))); + $this->assertSame($trace[1]['args'][0], ['array', ['array', '*SKIPPED over 10000 entries*']]); $serializeTrace = serialize($trace); @@ -346,6 +346,41 @@ class FlattenExceptionTest extends TestCase $this->assertSame('Class "RuntimeException@anonymous" blah.', $flattened->getMessage()); } + public function testToStringEmptyMessage() + { + $exception = new \RuntimeException(); + + $flattened = FlattenException::create($exception); + + $this->assertSame($exception->getTraceAsString(), $flattened->getTraceAsString()); + $this->assertSame($exception->__toString(), $flattened->getAsString()); + } + + public function testToString() + { + $test = function ($a, $b, $c, $d) { + return new \RuntimeException('This is a test message'); + }; + + $exception = $test('foo123', 1, null, 1.5); + + $flattened = FlattenException::create($exception); + + $this->assertSame($exception->getTraceAsString(), $flattened->getTraceAsString()); + $this->assertSame($exception->__toString(), $flattened->getAsString()); + } + + public function testToStringParent() + { + $exception = new \LogicException('This is message 1'); + $exception = new \RuntimeException('This is messsage 2', 500, $exception); + + $flattened = FlattenException::create($exception); + + $this->assertSame($exception->getTraceAsString(), $flattened->getTraceAsString()); + $this->assertSame($exception->__toString(), $flattened->getAsString()); + } + private function createException($foo) { return new \Exception(); diff --git a/vendor/symfony/debug/Tests/ExceptionHandlerTest.php b/vendor/symfony/debug/Tests/ExceptionHandlerTest.php index 6ff6a74f..4910fe5e 100644 --- a/vendor/symfony/debug/Tests/ExceptionHandlerTest.php +++ b/vendor/symfony/debug/Tests/ExceptionHandlerTest.php @@ -48,8 +48,17 @@ class ExceptionHandlerTest extends TestCase $handler->sendPhpResponse(new \RuntimeException('Foo')); $response = ob_get_clean(); - $this->assertContains('Whoops, looks like something went wrong.', $response); + $this->assertContains('

Foo

', $response); $this->assertContains('
', $response); + + // taken from https://www.owasp.org/index.php/Cross-site_Scripting_(XSS) + $htmlWithXss = ' click me! '; + ob_start(); + $handler->sendPhpResponse(new \RuntimeException($htmlWithXss)); + $response = ob_get_clean(); + + $this->assertContains(sprintf('

%s

', htmlspecialchars($htmlWithXss, ENT_COMPAT | ENT_SUBSTITUTE, 'UTF-8')), $response); } public function testStatusCode() @@ -62,10 +71,10 @@ class ExceptionHandlerTest extends TestCase $this->assertContains('Sorry, the page you are looking for could not be found.', $response); - $expectedHeaders = array( - array('HTTP/1.0 404', true, null), - array('Content-Type: text/html; charset=iso8859-1', true, null), - ); + $expectedHeaders = [ + ['HTTP/1.0 404', true, null], + ['Content-Type: text/html; charset=iso8859-1', true, null], + ]; $this->assertSame($expectedHeaders, testHeader()); } @@ -75,14 +84,14 @@ class ExceptionHandlerTest extends TestCase $handler = new ExceptionHandler(false, 'iso8859-1'); ob_start(); - $handler->sendPhpResponse(new MethodNotAllowedHttpException(array('POST'))); + $handler->sendPhpResponse(new MethodNotAllowedHttpException(['POST'])); $response = ob_get_clean(); - $expectedHeaders = array( - array('HTTP/1.0 405', true, null), - array('Allow: POST', false, null), - array('Content-Type: text/html; charset=iso8859-1', true, null), - ); + $expectedHeaders = [ + ['HTTP/1.0 405', true, null], + ['Allow: POST', false, null], + ['Content-Type: text/html; charset=iso8859-1', true, null], + ]; $this->assertSame($expectedHeaders, testHeader()); } @@ -101,7 +110,7 @@ class ExceptionHandlerTest extends TestCase { $exception = new \Exception('foo'); - $handler = $this->getMockBuilder('Symfony\Component\Debug\ExceptionHandler')->setMethods(array('sendPhpResponse'))->getMock(); + $handler = $this->getMockBuilder('Symfony\Component\Debug\ExceptionHandler')->setMethods(['sendPhpResponse'])->getMock(); $handler ->expects($this->exactly(2)) ->method('sendPhpResponse'); @@ -119,7 +128,7 @@ class ExceptionHandlerTest extends TestCase { $exception = new OutOfMemoryException('foo', 0, E_ERROR, __FILE__, __LINE__); - $handler = $this->getMockBuilder('Symfony\Component\Debug\ExceptionHandler')->setMethods(array('sendPhpResponse'))->getMock(); + $handler = $this->getMockBuilder('Symfony\Component\Debug\ExceptionHandler')->setMethods(['sendPhpResponse'])->getMock(); $handler ->expects($this->once()) ->method('sendPhpResponse'); diff --git a/vendor/symfony/debug/Tests/FatalErrorHandler/ClassNotFoundFatalErrorHandlerTest.php b/vendor/symfony/debug/Tests/FatalErrorHandler/ClassNotFoundFatalErrorHandlerTest.php index 5cdac2f1..8e615ac6 100644 --- a/vendor/symfony/debug/Tests/FatalErrorHandler/ClassNotFoundFatalErrorHandlerTest.php +++ b/vendor/symfony/debug/Tests/FatalErrorHandler/ClassNotFoundFatalErrorHandlerTest.php @@ -72,85 +72,85 @@ class ClassNotFoundFatalErrorHandlerTest extends TestCase $autoloader = new ComposerClassLoader(); $autoloader->add('Symfony\Component\Debug\Exception\\', realpath(__DIR__.'/../../Exception')); - $debugClassLoader = new DebugClassLoader(array($autoloader, 'loadClass')); + $debugClassLoader = new DebugClassLoader([$autoloader, 'loadClass']); - return array( - array( - array( + return [ + [ + [ 'type' => 1, 'line' => 12, 'file' => 'foo.php', 'message' => 'Class \'WhizBangFactory\' not found', - ), + ], "Attempted to load class \"WhizBangFactory\" from the global namespace.\nDid you forget a \"use\" statement?", - ), - array( - array( + ], + [ + [ 'type' => 1, 'line' => 12, 'file' => 'foo.php', 'message' => 'Class \'Foo\\Bar\\WhizBangFactory\' not found', - ), + ], "Attempted to load class \"WhizBangFactory\" from namespace \"Foo\\Bar\".\nDid you forget a \"use\" statement for another namespace?", - ), - array( - array( + ], + [ + [ 'type' => 1, 'line' => 12, 'file' => 'foo.php', 'message' => 'Class \'UndefinedFunctionException\' not found', - ), + ], "Attempted to load class \"UndefinedFunctionException\" from the global namespace.\nDid you forget a \"use\" statement for \"Symfony\Component\Debug\Exception\UndefinedFunctionException\"?", - ), - array( - array( + ], + [ + [ 'type' => 1, 'line' => 12, 'file' => 'foo.php', 'message' => 'Class \'PEARClass\' not found', - ), + ], "Attempted to load class \"PEARClass\" from the global namespace.\nDid you forget a \"use\" statement for \"Symfony_Component_Debug_Tests_Fixtures_PEARClass\"?", - ), - array( - array( + ], + [ + [ 'type' => 1, 'line' => 12, 'file' => 'foo.php', 'message' => 'Class \'Foo\\Bar\\UndefinedFunctionException\' not found', - ), + ], "Attempted to load class \"UndefinedFunctionException\" from namespace \"Foo\Bar\".\nDid you forget a \"use\" statement for \"Symfony\Component\Debug\Exception\UndefinedFunctionException\"?", - ), - array( - array( + ], + [ + [ 'type' => 1, 'line' => 12, 'file' => 'foo.php', 'message' => 'Class \'Foo\\Bar\\UndefinedFunctionException\' not found', - ), + ], "Attempted to load class \"UndefinedFunctionException\" from namespace \"Foo\Bar\".\nDid you forget a \"use\" statement for \"Symfony\Component\Debug\Exception\UndefinedFunctionException\"?", - array($autoloader, 'loadClass'), - ), - array( - array( + [$autoloader, 'loadClass'], + ], + [ + [ 'type' => 1, 'line' => 12, 'file' => 'foo.php', 'message' => 'Class \'Foo\\Bar\\UndefinedFunctionException\' not found', - ), + ], "Attempted to load class \"UndefinedFunctionException\" from namespace \"Foo\Bar\".\nDid you forget a \"use\" statement for \"Symfony\Component\Debug\Exception\UndefinedFunctionException\"?", - array($debugClassLoader, 'loadClass'), - ), - array( - array( + [$debugClassLoader, 'loadClass'], + ], + [ + [ 'type' => 1, 'line' => 12, 'file' => 'foo.php', 'message' => 'Class \'Foo\\Bar\\UndefinedFunctionException\' not found', - ), + ], "Attempted to load class \"UndefinedFunctionException\" from namespace \"Foo\\Bar\".\nDid you forget a \"use\" statement for another namespace?", function ($className) { /* do nothing here */ }, - ), - ); + ], + ]; } public function testCannotRedeclareClass() @@ -161,12 +161,12 @@ class ClassNotFoundFatalErrorHandlerTest extends TestCase require_once __DIR__.'/../FIXTURES2/REQUIREDTWICE.PHP'; - $error = array( + $error = [ 'type' => 1, 'line' => 12, 'file' => 'foo.php', 'message' => 'Class \'Foo\\Bar\\RequiredTwice\' not found', - ); + ]; $handler = new ClassNotFoundFatalErrorHandler(); $exception = $handler->handleError($error, new FatalErrorException('', 0, $error['type'], $error['file'], $error['line'])); diff --git a/vendor/symfony/debug/Tests/FatalErrorHandler/UndefinedFunctionFatalErrorHandlerTest.php b/vendor/symfony/debug/Tests/FatalErrorHandler/UndefinedFunctionFatalErrorHandlerTest.php index 60153fc5..de9994e4 100644 --- a/vendor/symfony/debug/Tests/FatalErrorHandler/UndefinedFunctionFatalErrorHandlerTest.php +++ b/vendor/symfony/debug/Tests/FatalErrorHandler/UndefinedFunctionFatalErrorHandlerTest.php @@ -35,44 +35,44 @@ class UndefinedFunctionFatalErrorHandlerTest extends TestCase public function provideUndefinedFunctionData() { - return array( - array( - array( + return [ + [ + [ 'type' => 1, 'line' => 12, 'file' => 'foo.php', 'message' => 'Call to undefined function test_namespaced_function()', - ), + ], "Attempted to call function \"test_namespaced_function\" from the global namespace.\nDid you mean to call \"\\symfony\\component\\debug\\tests\\fatalerrorhandler\\test_namespaced_function\"?", - ), - array( - array( + ], + [ + [ 'type' => 1, 'line' => 12, 'file' => 'foo.php', 'message' => 'Call to undefined function Foo\\Bar\\Baz\\test_namespaced_function()', - ), + ], "Attempted to call function \"test_namespaced_function\" from namespace \"Foo\\Bar\\Baz\".\nDid you mean to call \"\\symfony\\component\\debug\\tests\\fatalerrorhandler\\test_namespaced_function\"?", - ), - array( - array( + ], + [ + [ 'type' => 1, 'line' => 12, 'file' => 'foo.php', 'message' => 'Call to undefined function foo()', - ), + ], 'Attempted to call function "foo" from the global namespace.', - ), - array( - array( + ], + [ + [ 'type' => 1, 'line' => 12, 'file' => 'foo.php', 'message' => 'Call to undefined function Foo\\Bar\\Baz\\foo()', - ), + ], 'Attempted to call function "foo" from namespace "Foo\Bar\Baz".', - ), - ); + ], + ]; } } diff --git a/vendor/symfony/debug/Tests/FatalErrorHandler/UndefinedMethodFatalErrorHandlerTest.php b/vendor/symfony/debug/Tests/FatalErrorHandler/UndefinedMethodFatalErrorHandlerTest.php index a2647f57..268a8413 100644 --- a/vendor/symfony/debug/Tests/FatalErrorHandler/UndefinedMethodFatalErrorHandlerTest.php +++ b/vendor/symfony/debug/Tests/FatalErrorHandler/UndefinedMethodFatalErrorHandlerTest.php @@ -34,43 +34,43 @@ class UndefinedMethodFatalErrorHandlerTest extends TestCase public function provideUndefinedMethodData() { - return array( - array( - array( + return [ + [ + [ 'type' => 1, 'line' => 12, 'file' => 'foo.php', 'message' => 'Call to undefined method SplObjectStorage::what()', - ), + ], 'Attempted to call an undefined method named "what" of class "SplObjectStorage".', - ), - array( - array( + ], + [ + [ 'type' => 1, 'line' => 12, 'file' => 'foo.php', 'message' => 'Call to undefined method SplObjectStorage::walid()', - ), + ], "Attempted to call an undefined method named \"walid\" of class \"SplObjectStorage\".\nDid you mean to call \"valid\"?", - ), - array( - array( + ], + [ + [ 'type' => 1, 'line' => 12, 'file' => 'foo.php', 'message' => 'Call to undefined method SplObjectStorage::offsetFet()', - ), + ], "Attempted to call an undefined method named \"offsetFet\" of class \"SplObjectStorage\".\nDid you mean to call e.g. \"offsetGet\", \"offsetSet\" or \"offsetUnset\"?", - ), - array( - array( + ], + [ + [ 'type' => 1, 'message' => 'Call to undefined method class@anonymous::test()', 'file' => '/home/possum/work/symfony/test.php', 'line' => 11, - ), + ], 'Attempted to call an undefined method named "test" of class "class@anonymous".', - ), - ); + ], + ]; } } diff --git a/vendor/symfony/debug/Tests/Fixtures/DefinitionInEvaluatedCode.php b/vendor/symfony/debug/Tests/Fixtures/DefinitionInEvaluatedCode.php new file mode 100644 index 00000000..ff6976e0 --- /dev/null +++ b/vendor/symfony/debug/Tests/Fixtures/DefinitionInEvaluatedCode.php @@ -0,0 +1,11 @@ +setExceptionHandler('print_r'); if (true) { - class Broken implements \Serializable + class Broken implements \JsonSerializable { } } @@ -37,6 +37,6 @@ array(1) { } object(Symfony\Component\Debug\Exception\FatalErrorException)#%d (%d) { ["message":protected]=> - string(199) "Error: Class Symfony\Component\Debug\Broken contains 2 abstract methods and must therefore be declared abstract or implement the remaining methods (Serializable::serialize, Serializable::unserialize)" + string(179) "Error: Class Symfony\Component\Debug\Broken contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (JsonSerializable::jsonSerialize)" %a } diff --git a/vendor/symfony/debug/composer.json b/vendor/symfony/debug/composer.json index 45799e2e..7fd5ff9c 100644 --- a/vendor/symfony/debug/composer.json +++ b/vendor/symfony/debug/composer.json @@ -34,7 +34,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "4.2-dev" + "dev-master": "4.3-dev" } } } diff --git a/vendor/symfony/event-dispatcher-contracts/Event.php b/vendor/symfony/event-dispatcher-contracts/Event.php new file mode 100644 index 00000000..84f60f3e --- /dev/null +++ b/vendor/symfony/event-dispatcher-contracts/Event.php @@ -0,0 +1,96 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Contracts\EventDispatcher; + +use Psr\EventDispatcher\StoppableEventInterface; + +if (interface_exists(StoppableEventInterface::class)) { + /** + * Event is the base class for classes containing event data. + * + * This class contains no event data. It is used by events that do not pass + * state information to an event handler when an event is raised. + * + * You can call the method stopPropagation() to abort the execution of + * further listeners in your event listener. + * + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + * @author Bernhard Schussek + * @author Nicolas Grekas + */ + class Event implements StoppableEventInterface + { + private $propagationStopped = false; + + /** + * Returns whether further event listeners should be triggered. + */ + public function isPropagationStopped(): bool + { + return $this->propagationStopped; + } + + /** + * Stops the propagation of the event to further event listeners. + * + * If multiple event listeners are connected to the same event, no + * further event listener will be triggered once any trigger calls + * stopPropagation(). + */ + public function stopPropagation(): void + { + $this->propagationStopped = true; + } + } +} else { + /** + * Event is the base class for classes containing event data. + * + * This class contains no event data. It is used by events that do not pass + * state information to an event handler when an event is raised. + * + * You can call the method stopPropagation() to abort the execution of + * further listeners in your event listener. + * + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + * @author Bernhard Schussek + * @author Nicolas Grekas + */ + class Event + { + private $propagationStopped = false; + + /** + * Returns whether further event listeners should be triggered. + */ + public function isPropagationStopped(): bool + { + return $this->propagationStopped; + } + + /** + * Stops the propagation of the event to further event listeners. + * + * If multiple event listeners are connected to the same event, no + * further event listener will be triggered once any trigger calls + * stopPropagation(). + */ + public function stopPropagation(): void + { + $this->propagationStopped = true; + } + } +} diff --git a/vendor/symfony/event-dispatcher-contracts/EventDispatcherInterface.php b/vendor/symfony/event-dispatcher-contracts/EventDispatcherInterface.php new file mode 100644 index 00000000..9b1a69ad --- /dev/null +++ b/vendor/symfony/event-dispatcher-contracts/EventDispatcherInterface.php @@ -0,0 +1,58 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Contracts\EventDispatcher; + +use Psr\EventDispatcher\EventDispatcherInterface as PsrEventDispatcherInterface; + +if (interface_exists(PsrEventDispatcherInterface::class)) { + /** + * Allows providing hooks on domain-specific lifecycles by dispatching events. + */ + interface EventDispatcherInterface extends PsrEventDispatcherInterface + { + /** + * Dispatches an event to all registered listeners. + * + * For BC with Symfony 4, the $eventName argument is not declared explicitly on the + * signature of the method. Implementations that are not bound by this BC contraint + * MUST declare it explicitly, as allowed by PHP. + * + * @param object $event The event to pass to the event handlers/listeners + * @param string|null $eventName The name of the event to dispatch. If not supplied, + * the class of $event should be used instead. + * + * @return object The passed $event MUST be returned + */ + public function dispatch($event/*, string $eventName = null*/); + } +} else { + /** + * Allows providing hooks on domain-specific lifecycles by dispatching events. + */ + interface EventDispatcherInterface + { + /** + * Dispatches an event to all registered listeners. + * + * For BC with Symfony 4, the $eventName argument is not declared explicitly on the + * signature of the method. Implementations that are not bound by this BC contraint + * MUST declare it explicitly, as allowed by PHP. + * + * @param object $event The event to pass to the event handlers/listeners + * @param string|null $eventName The name of the event to dispatch. If not supplied, + * the class of $event should be used instead. + * + * @return object The passed $event MUST be returned + */ + public function dispatch($event/*, string $eventName = null*/); + } +} diff --git a/vendor/symfony/contracts/LICENSE b/vendor/symfony/event-dispatcher-contracts/LICENSE similarity index 96% rename from vendor/symfony/contracts/LICENSE rename to vendor/symfony/event-dispatcher-contracts/LICENSE index ad399a79..3f853aaf 100644 --- a/vendor/symfony/contracts/LICENSE +++ b/vendor/symfony/event-dispatcher-contracts/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2018 Fabien Potencier +Copyright (c) 2018-2019 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-contracts/README.md b/vendor/symfony/event-dispatcher-contracts/README.md new file mode 100644 index 00000000..fb051c73 --- /dev/null +++ b/vendor/symfony/event-dispatcher-contracts/README.md @@ -0,0 +1,9 @@ +Symfony EventDispatcher Contracts +================================= + +A set of abstractions extracted out of the Symfony components. + +Can be used to build on semantics that the Symfony components proved useful - and +that already have battle tested implementations. + +See https://github.com/symfony/contracts/blob/master/README.md for more information. diff --git a/vendor/symfony/event-dispatcher-contracts/composer.json b/vendor/symfony/event-dispatcher-contracts/composer.json new file mode 100644 index 00000000..55802a49 --- /dev/null +++ b/vendor/symfony/event-dispatcher-contracts/composer.json @@ -0,0 +1,34 @@ +{ + "name": "symfony/event-dispatcher-contracts", + "type": "library", + "description": "Generic abstractions related to dispatching event", + "keywords": ["abstractions", "contracts", "decoupling", "interfaces", "interoperability", "standards"], + "homepage": "https://symfony.com", + "license": "MIT", + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "require": { + "php": "^7.1.3" + }, + "suggest": { + "psr/event-dispatcher": "", + "symfony/event-dispatcher-implementation": "" + }, + "autoload": { + "psr-4": { "Symfony\\Contracts\\EventDispatcher\\": "" } + }, + "minimum-stability": "dev", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + } +} diff --git a/vendor/symfony/event-dispatcher/CHANGELOG.md b/vendor/symfony/event-dispatcher/CHANGELOG.md index b581d314..7653cad1 100644 --- a/vendor/symfony/event-dispatcher/CHANGELOG.md +++ b/vendor/symfony/event-dispatcher/CHANGELOG.md @@ -1,6 +1,12 @@ CHANGELOG ========= +4.3.0 +----- + + * The signature of the `EventDispatcherInterface::dispatch()` method should be updated to `dispatch($event, string $eventName = null)`, not doing so is deprecated + * deprecated the `Event` class, use `Symfony\Contracts\EventDispatcher\Event` instead + 4.1.0 ----- diff --git a/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php b/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php index d421941f..7716d866 100644 --- a/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php +++ b/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php @@ -11,11 +11,17 @@ namespace Symfony\Component\EventDispatcher\Debug; +use Psr\EventDispatcher\StoppableEventInterface; use Psr\Log\LoggerInterface; +use Symfony\Component\BrowserKit\Request; use Symfony\Component\EventDispatcher\Event; use Symfony\Component\EventDispatcher\EventDispatcherInterface; use Symfony\Component\EventDispatcher\EventSubscriberInterface; +use Symfony\Component\EventDispatcher\LegacyEventDispatcherProxy; +use Symfony\Component\EventDispatcher\LegacyEventProxy; +use Symfony\Component\HttpFoundation\RequestStack; use Symfony\Component\Stopwatch\Stopwatch; +use Symfony\Contracts\EventDispatcher\Event as ContractsEvent; /** * Collects some data about event listeners. @@ -33,14 +39,17 @@ class TraceableEventDispatcher implements TraceableEventDispatcherInterface private $dispatcher; private $wrappedListeners; private $orphanedEvents; + private $requestStack; + private $currentRequestHash = ''; - public function __construct(EventDispatcherInterface $dispatcher, Stopwatch $stopwatch, LoggerInterface $logger = null) + public function __construct(EventDispatcherInterface $dispatcher, Stopwatch $stopwatch, LoggerInterface $logger = null, RequestStack $requestStack = null) { - $this->dispatcher = $dispatcher; + $this->dispatcher = LegacyEventDispatcherProxy::decorate($dispatcher); $this->stopwatch = $stopwatch; $this->logger = $logger; - $this->wrappedListeners = array(); - $this->orphanedEvents = array(); + $this->wrappedListeners = []; + $this->orphanedEvents = []; + $this->requestStack = $requestStack; } /** @@ -121,37 +130,52 @@ class TraceableEventDispatcher implements TraceableEventDispatcherInterface /** * {@inheritdoc} + * + * @param string|null $eventName */ - public function dispatch($eventName, Event $event = null) + public function dispatch($event/*, string $eventName = null*/) { if (null === $this->callStack) { $this->callStack = new \SplObjectStorage(); } - if (null === $event) { - $event = new Event(); + $currentRequestHash = $this->currentRequestHash = $this->requestStack && ($request = $this->requestStack->getCurrentRequest()) ? spl_object_hash($request) : ''; + $eventName = 1 < \func_num_args() ? \func_get_arg(1) : null; + + if (\is_object($event)) { + $eventName = $eventName ?? \get_class($event); + } else { + @trigger_error(sprintf('Calling the "%s::dispatch()" method with the event name as first argument is deprecated since Symfony 4.3, pass it second and provide the event object first instead.', EventDispatcherInterface::class), E_USER_DEPRECATED); + $swap = $event; + $event = $eventName ?? new Event(); + $eventName = $swap; + + if (!$event instanceof Event) { + throw new \TypeError(sprintf('Argument 1 passed to "%s::dispatch()" must be an instance of %s, %s given.', EventDispatcherInterface::class, Event::class, \is_object($event) ? \get_class($event) : \gettype($event))); + } } - if (null !== $this->logger && $event->isPropagationStopped()) { + if (null !== $this->logger && ($event instanceof Event || $event instanceof ContractsEvent || $event instanceof StoppableEventInterface) && $event->isPropagationStopped()) { $this->logger->debug(sprintf('The "%s" event is already stopped. No listeners have been called.', $eventName)); } $this->preProcess($eventName); try { - $this->preDispatch($eventName, $event); + $this->beforeDispatch($eventName, $event); try { $e = $this->stopwatch->start($eventName, 'section'); try { - $this->dispatcher->dispatch($eventName, $event); + $this->dispatcher->dispatch($event, $eventName); } finally { if ($e->isStarted()) { $e->stop(); } } } finally { - $this->postDispatch($eventName, $event); + $this->afterDispatch($eventName, $event); } } finally { + $this->currentRequestHash = $currentRequestHash; $this->postProcess($eventName); } @@ -160,18 +184,22 @@ class TraceableEventDispatcher implements TraceableEventDispatcherInterface /** * {@inheritdoc} + * + * @param Request|null $request The request to get listeners for */ - public function getCalledListeners() + public function getCalledListeners(/* Request $request = null */) { if (null === $this->callStack) { - return array(); + return []; } - $called = array(); + $hash = 1 <= \func_num_args() && null !== ($request = \func_get_arg(0)) ? spl_object_hash($request) : null; + $called = []; foreach ($this->callStack as $listener) { - list($eventName) = $this->callStack->getInfo(); - - $called[] = $listener->getInfo($eventName); + list($eventName, $requestHash) = $this->callStack->getInfo(); + if (null === $hash || $hash === $requestHash) { + $called[] = $listener->getInfo($eventName); + } } return $called; @@ -179,27 +207,31 @@ class TraceableEventDispatcher implements TraceableEventDispatcherInterface /** * {@inheritdoc} + * + * @param Request|null $request The request to get listeners for */ - public function getNotCalledListeners() + public function getNotCalledListeners(/* Request $request = null */) { try { $allListeners = $this->getListeners(); } catch (\Exception $e) { if (null !== $this->logger) { - $this->logger->info('An exception was thrown while getting the uncalled listeners.', array('exception' => $e)); + $this->logger->info('An exception was thrown while getting the uncalled listeners.', ['exception' => $e]); } // unable to retrieve the uncalled listeners - return array(); + return []; } - $notCalled = array(); + $hash = 1 <= \func_num_args() && null !== ($request = \func_get_arg(0)) ? spl_object_hash($request) : null; + $notCalled = []; foreach ($allListeners as $eventName => $listeners) { foreach ($listeners as $listener) { $called = false; if (null !== $this->callStack) { foreach ($this->callStack as $calledListener) { - if ($calledListener->getWrappedListener() === $listener) { + list(, $requestHash) = $this->callStack->getInfo(); + if ((null === $hash || $hash === $requestHash) && $calledListener->getWrappedListener() === $listener) { $called = true; break; @@ -216,20 +248,32 @@ class TraceableEventDispatcher implements TraceableEventDispatcherInterface } } - uasort($notCalled, array($this, 'sortNotCalledListeners')); + uasort($notCalled, [$this, 'sortNotCalledListeners']); return $notCalled; } - public function getOrphanedEvents(): array + /** + * @param Request|null $request The request to get orphaned events for + */ + public function getOrphanedEvents(/* Request $request = null */): array { - return $this->orphanedEvents; + if (1 <= \func_num_args() && null !== $request = \func_get_arg(0)) { + return $this->orphanedEvents[spl_object_hash($request)] ?? []; + } + + if (!$this->orphanedEvents) { + return []; + } + + return array_merge(...array_values($this->orphanedEvents)); } public function reset() { $this->callStack = null; - $this->orphanedEvents = array(); + $this->orphanedEvents = []; + $this->currentRequestHash = ''; } /** @@ -248,18 +292,32 @@ class TraceableEventDispatcher implements TraceableEventDispatcherInterface /** * Called before dispatching the event. * - * @param string $eventName The event name - * @param Event $event The event + * @param object $event + */ + protected function beforeDispatch(string $eventName, $event) + { + $this->preDispatch($eventName, $event instanceof Event ? $event : new LegacyEventProxy($event)); + } + + /** + * Called after dispatching the event. + * + * @param object $event + */ + protected function afterDispatch(string $eventName, $event) + { + $this->postDispatch($eventName, $event instanceof Event ? $event : new LegacyEventProxy($event)); + } + + /** + * @deprecated since Symfony 4.3, will be removed in 5.0, use beforeDispatch instead */ protected function preDispatch($eventName, Event $event) { } /** - * Called after dispatching the event. - * - * @param string $eventName The event name - * @param Event $event The event + * @deprecated since Symfony 4.3, will be removed in 5.0, use afterDispatch instead */ protected function postDispatch($eventName, Event $event) { @@ -268,7 +326,7 @@ class TraceableEventDispatcher implements TraceableEventDispatcherInterface private function preProcess($eventName) { if (!$this->dispatcher->hasListeners($eventName)) { - $this->orphanedEvents[] = $eventName; + $this->orphanedEvents[$this->currentRequestHash][] = $eventName; return; } @@ -279,7 +337,7 @@ class TraceableEventDispatcher implements TraceableEventDispatcherInterface $this->wrappedListeners[$eventName][] = $wrappedListener; $this->dispatcher->removeListener($eventName, $listener); $this->dispatcher->addListener($eventName, $wrappedListener, $priority); - $this->callStack->attach($wrappedListener, array($eventName)); + $this->callStack->attach($wrappedListener, [$eventName, $this->currentRequestHash]); } } @@ -297,17 +355,13 @@ class TraceableEventDispatcher implements TraceableEventDispatcherInterface $this->dispatcher->addListener($eventName, $listener->getWrappedListener(), $priority); if (null !== $this->logger) { - $context = array('event' => $eventName, 'listener' => $listener->getPretty()); + $context = ['event' => $eventName, 'listener' => $listener->getPretty()]; } if ($listener->wasCalled()) { if (null !== $this->logger) { $this->logger->debug('Notified event "{event}" to listener "{listener}".', $context); } - - if (!isset($this->called[$eventName])) { - $this->called[$eventName] = new \SplObjectStorage(); - } } else { $this->callStack->detach($listener); } diff --git a/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcherInterface.php b/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcherInterface.php index cd4d7470..4fedb9a4 100644 --- a/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcherInterface.php +++ b/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcherInterface.php @@ -12,6 +12,7 @@ namespace Symfony\Component\EventDispatcher\Debug; use Symfony\Component\EventDispatcher\EventDispatcherInterface; +use Symfony\Component\HttpFoundation\Request; use Symfony\Contracts\Service\ResetInterface; /** @@ -24,14 +25,18 @@ interface TraceableEventDispatcherInterface extends EventDispatcherInterface, Re /** * Gets the called listeners. * + * @param Request|null $request The request to get listeners for + * * @return array An array of called listeners */ - public function getCalledListeners(); + public function getCalledListeners(/* Request $request = null */); /** * Gets the not called listeners. * + * @param Request|null $request The request to get listeners for + * * @return array An array of not called listeners */ - public function getNotCalledListeners(); + public function getNotCalledListeners(/* Request $request = null */); } diff --git a/vendor/symfony/event-dispatcher/Debug/WrappedListener.php b/vendor/symfony/event-dispatcher/Debug/WrappedListener.php index 6acaa38e..e0476390 100644 --- a/vendor/symfony/event-dispatcher/Debug/WrappedListener.php +++ b/vendor/symfony/event-dispatcher/Debug/WrappedListener.php @@ -11,17 +11,23 @@ namespace Symfony\Component\EventDispatcher\Debug; +use Psr\EventDispatcher\StoppableEventInterface; use Symfony\Component\EventDispatcher\Event; use Symfony\Component\EventDispatcher\EventDispatcherInterface; +use Symfony\Component\EventDispatcher\LegacyEventProxy; use Symfony\Component\Stopwatch\Stopwatch; use Symfony\Component\VarDumper\Caster\ClassStub; +use Symfony\Contracts\EventDispatcher\Event as ContractsEvent; /** * @author Fabien Potencier + * + * @final since Symfony 4.3: the "Event" type-hint on __invoke() will be replaced by "object" in 5.0 */ class WrappedListener { private $listener; + private $optimizedListener; private $name; private $called; private $stoppedPropagation; @@ -29,11 +35,13 @@ class WrappedListener private $dispatcher; private $pretty; private $stub; + private $priority; private static $hasClassStub; - public function __construct($listener, $name, Stopwatch $stopwatch, EventDispatcherInterface $dispatcher = null) + public function __construct($listener, ?string $name, Stopwatch $stopwatch, EventDispatcherInterface $dispatcher = null) { $this->listener = $listener; + $this->optimizedListener = $listener instanceof \Closure ? $listener : (\is_callable($listener) ? \Closure::fromCallable($listener) : null); $this->stopwatch = $stopwatch; $this->dispatcher = $dispatcher; $this->called = false; @@ -94,27 +102,34 @@ class WrappedListener $this->stub = self::$hasClassStub ? new ClassStub($this->pretty.'()', $this->listener) : $this->pretty.'()'; } - return array( + return [ 'event' => $eventName, - 'priority' => null !== $this->dispatcher ? $this->dispatcher->getListenerPriority($eventName, $this->listener) : null, + 'priority' => null !== $this->priority ? $this->priority : (null !== $this->dispatcher ? $this->dispatcher->getListenerPriority($eventName, $this->listener) : null), 'pretty' => $this->pretty, 'stub' => $this->stub, - ); + ]; } public function __invoke(Event $event, $eventName, EventDispatcherInterface $dispatcher) { + if ($event instanceof LegacyEventProxy) { + $event = $event->getEvent(); + } + + $dispatcher = $this->dispatcher ?: $dispatcher; + $this->called = true; + $this->priority = $dispatcher->getListenerPriority($eventName, $this->listener); $e = $this->stopwatch->start($this->name, 'event_listener'); - ($this->listener)($event, $eventName, $this->dispatcher ?: $dispatcher); + ($this->optimizedListener ?? $this->listener)($event, $eventName, $dispatcher); if ($e->isStarted()) { $e->stop(); } - if ($event->isPropagationStopped()) { + if (($event instanceof Event || $event instanceof ContractsEvent || $event instanceof StoppableEventInterface) && $event->isPropagationStopped()) { $this->stoppedPropagation = true; } } diff --git a/vendor/symfony/event-dispatcher/DependencyInjection/RegisterListenersPass.php b/vendor/symfony/event-dispatcher/DependencyInjection/RegisterListenersPass.php index 4c8db4c6..3e6493eb 100644 --- a/vendor/symfony/event-dispatcher/DependencyInjection/RegisterListenersPass.php +++ b/vendor/symfony/event-dispatcher/DependencyInjection/RegisterListenersPass.php @@ -27,15 +27,17 @@ class RegisterListenersPass implements CompilerPassInterface protected $dispatcherService; protected $listenerTag; protected $subscriberTag; + protected $eventAliasesParameter; - private $hotPathEvents = array(); + private $hotPathEvents = []; private $hotPathTagName; - public function __construct(string $dispatcherService = 'event_dispatcher', string $listenerTag = 'kernel.event_listener', string $subscriberTag = 'kernel.event_subscriber') + public function __construct(string $dispatcherService = 'event_dispatcher', string $listenerTag = 'kernel.event_listener', string $subscriberTag = 'kernel.event_subscriber', string $eventAliasesParameter = 'event_dispatcher.event_aliases') { $this->dispatcherService = $dispatcherService; $this->listenerTag = $listenerTag; $this->subscriberTag = $subscriberTag; + $this->eventAliasesParameter = $eventAliasesParameter; } public function setHotPathEvents(array $hotPathEvents, $tagName = 'container.hot_path') @@ -52,6 +54,12 @@ class RegisterListenersPass implements CompilerPassInterface return; } + if ($container->hasParameter($this->eventAliasesParameter)) { + $aliases = $container->getParameter($this->eventAliasesParameter); + $container->getParameterBag()->remove($this->eventAliasesParameter); + } else { + $aliases = []; + } $definition = $container->findDefinition($this->dispatcherService); foreach ($container->findTaggedServiceIds($this->listenerTag, true) as $id => $events) { @@ -61,12 +69,13 @@ class RegisterListenersPass implements CompilerPassInterface if (!isset($event['event'])) { throw new InvalidArgumentException(sprintf('Service "%s" must define the "event" attribute on "%s" tags.', $id, $this->listenerTag)); } + $event['event'] = $aliases[$event['event']] ?? $event['event']; if (!isset($event['method'])) { - $event['method'] = 'on'.preg_replace_callback(array( + $event['method'] = 'on'.preg_replace_callback([ '/(?<=\b)[a-z]/i', '/[^a-z0-9]/i', - ), function ($matches) { return strtoupper($matches[0]); }, $event['event']); + ], function ($matches) { return strtoupper($matches[0]); }, $event['event']); $event['method'] = preg_replace('/[^a-z0-9]/i', '', $event['method']); if (null !== ($class = $container->getDefinition($id)->getClass()) && ($r = $container->getReflectionClass($class, false)) && !$r->hasMethod($event['method']) && $r->hasMethod('__invoke')) { @@ -74,7 +83,7 @@ class RegisterListenersPass implements CompilerPassInterface } } - $definition->addMethodCall('addListener', array($event['event'], array(new ServiceClosureArgument(new Reference($id)), $event['method']), $priority)); + $definition->addMethodCall('addListener', [$event['event'], [new ServiceClosureArgument(new Reference($id)), $event['method']], $priority]); if (isset($this->hotPathEvents[$event['event']])) { $container->getDefinition($id)->addTag($this->hotPathTagName); @@ -98,17 +107,19 @@ class RegisterListenersPass implements CompilerPassInterface } $class = $r->name; + ExtractingEventDispatcher::$aliases = $aliases; ExtractingEventDispatcher::$subscriber = $class; $extractingDispatcher->addSubscriber($extractingDispatcher); foreach ($extractingDispatcher->listeners as $args) { - $args[1] = array(new ServiceClosureArgument(new Reference($id)), $args[1]); + $args[1] = [new ServiceClosureArgument(new Reference($id)), $args[1]]; $definition->addMethodCall('addListener', $args); if (isset($this->hotPathEvents[$args[0]])) { - $container->getDefinition($id)->addTag('container.hot_path'); + $container->getDefinition($id)->addTag($this->hotPathTagName); } } - $extractingDispatcher->listeners = array(); + $extractingDispatcher->listeners = []; + ExtractingEventDispatcher::$aliases = []; } } } @@ -118,19 +129,24 @@ class RegisterListenersPass implements CompilerPassInterface */ class ExtractingEventDispatcher extends EventDispatcher implements EventSubscriberInterface { - public $listeners = array(); + public $listeners = []; + public static $aliases = []; public static $subscriber; public function addListener($eventName, $listener, $priority = 0) { - $this->listeners[] = array($eventName, $listener[1], $priority); + $this->listeners[] = [$eventName, $listener[1], $priority]; } public static function getSubscribedEvents() { - $callback = array(self::$subscriber, 'getSubscribedEvents'); + $events = []; - return $callback(); + foreach ([self::$subscriber, 'getSubscribedEvents']() as $eventName => $params) { + $events[self::$aliases[$eventName] ?? $eventName] = $params; + } + + return $events; } } diff --git a/vendor/symfony/event-dispatcher/Event.php b/vendor/symfony/event-dispatcher/Event.php index 9c56b2f5..307c4be5 100644 --- a/vendor/symfony/event-dispatcher/Event.php +++ b/vendor/symfony/event-dispatcher/Event.php @@ -12,32 +12,16 @@ namespace Symfony\Component\EventDispatcher; /** - * Event is the base class for classes containing event data. - * - * This class contains no event data. It is used by events that do not pass - * state information to an event handler when an event is raised. - * - * You can call the method stopPropagation() to abort the execution of - * further listeners in your event listener. - * - * @author Guilherme Blanco - * @author Jonathan Wage - * @author Roman Borschel - * @author Bernhard Schussek + * @deprecated since Symfony 4.3, use "Symfony\Contracts\EventDispatcher\Event" instead */ class Event { - /** - * @var bool Whether no further event listeners should be triggered - */ private $propagationStopped = false; /** - * Returns whether further event listeners should be triggered. - * - * @see Event::stopPropagation() - * * @return bool Whether propagation was already stopped for this event + * + * @deprecated since Symfony 4.3, use "Symfony\Contracts\EventDispatcher\Event" instead */ public function isPropagationStopped() { @@ -45,11 +29,7 @@ class Event } /** - * Stops the propagation of the event to further event listeners. - * - * If multiple event listeners are connected to the same event, no - * further event listener will be triggered once any trigger calls - * stopPropagation(). + * @deprecated since Symfony 4.3, use "Symfony\Contracts\EventDispatcher\Event" instead */ public function stopPropagation() { diff --git a/vendor/symfony/event-dispatcher/EventDispatcher.php b/vendor/symfony/event-dispatcher/EventDispatcher.php index 4c90ce5b..e68918c3 100644 --- a/vendor/symfony/event-dispatcher/EventDispatcher.php +++ b/vendor/symfony/event-dispatcher/EventDispatcher.php @@ -11,6 +11,10 @@ namespace Symfony\Component\EventDispatcher; +use Psr\EventDispatcher\StoppableEventInterface; +use Symfony\Component\EventDispatcher\Debug\WrappedListener; +use Symfony\Contracts\EventDispatcher\Event as ContractsEvent; + /** * The EventDispatcherInterface is the central point of Symfony's event listener system. * @@ -28,20 +32,47 @@ namespace Symfony\Component\EventDispatcher; */ class EventDispatcher implements EventDispatcherInterface { - private $listeners = array(); - private $sorted = array(); + private $listeners = []; + private $sorted = []; + private $optimized; + + public function __construct() + { + if (__CLASS__ === \get_class($this)) { + $this->optimized = []; + } + } /** * {@inheritdoc} + * + * @param string|null $eventName */ - public function dispatch($eventName, Event $event = null) + public function dispatch($event/*, string $eventName = null*/) { - if (null === $event) { - $event = new Event(); + $eventName = 1 < \func_num_args() ? \func_get_arg(1) : null; + + if (\is_object($event)) { + $eventName = $eventName ?? \get_class($event); + } else { + @trigger_error(sprintf('Calling the "%s::dispatch()" method with the event name as first argument is deprecated since Symfony 4.3, pass it second and provide the event object first instead.', EventDispatcherInterface::class), E_USER_DEPRECATED); + $swap = $event; + $event = $eventName ?? new Event(); + $eventName = $swap; + + if (!$event instanceof Event) { + throw new \TypeError(sprintf('Argument 1 passed to "%s::dispatch()" must be an instance of %s, %s given.', EventDispatcherInterface::class, Event::class, \is_object($event) ? \get_class($event) : \gettype($event))); + } } - if ($listeners = $this->getListeners($eventName)) { - $this->doDispatch($listeners, $eventName, $event); + if (null !== $this->optimized && null !== $eventName) { + $listeners = $this->optimized[$eventName] ?? (empty($this->listeners[$eventName]) ? [] : $this->optimizeListeners($eventName)); + } else { + $listeners = $this->getListeners($eventName); + } + + if ($listeners) { + $this->callListeners($listeners, $eventName, $event); } return $event; @@ -54,7 +85,7 @@ class EventDispatcher implements EventDispatcherInterface { if (null !== $eventName) { if (empty($this->listeners[$eventName])) { - return array(); + return []; } if (!isset($this->sorted[$eventName])) { @@ -86,11 +117,10 @@ class EventDispatcher implements EventDispatcherInterface $listener[0] = $listener[0](); } - foreach ($this->listeners[$eventName] as $priority => $listeners) { - foreach ($listeners as $k => $v) { + foreach ($this->listeners[$eventName] as $priority => &$listeners) { + foreach ($listeners as &$v) { if ($v !== $listener && \is_array($v) && isset($v[0]) && $v[0] instanceof \Closure) { $v[0] = $v[0](); - $this->listeners[$eventName][$priority][$k] = $v; } if ($v === $listener) { return $priority; @@ -123,7 +153,7 @@ class EventDispatcher implements EventDispatcherInterface public function addListener($eventName, $listener, $priority = 0) { $this->listeners[$eventName][$priority][] = $listener; - unset($this->sorted[$eventName]); + unset($this->sorted[$eventName], $this->optimized[$eventName]); } /** @@ -139,21 +169,17 @@ class EventDispatcher implements EventDispatcherInterface $listener[0] = $listener[0](); } - foreach ($this->listeners[$eventName] as $priority => $listeners) { - foreach ($listeners as $k => $v) { + foreach ($this->listeners[$eventName] as $priority => &$listeners) { + foreach ($listeners as $k => &$v) { if ($v !== $listener && \is_array($v) && isset($v[0]) && $v[0] instanceof \Closure) { $v[0] = $v[0](); } if ($v === $listener) { - unset($listeners[$k], $this->sorted[$eventName]); - } else { - $listeners[$k] = $v; + unset($listeners[$k], $this->sorted[$eventName], $this->optimized[$eventName]); } } - if ($listeners) { - $this->listeners[$eventName][$priority] = $listeners; - } else { + if (!$listeners) { unset($this->listeners[$eventName][$priority]); } } @@ -166,12 +192,12 @@ class EventDispatcher implements EventDispatcherInterface { foreach ($subscriber->getSubscribedEvents() as $eventName => $params) { if (\is_string($params)) { - $this->addListener($eventName, array($subscriber, $params)); + $this->addListener($eventName, [$subscriber, $params]); } elseif (\is_string($params[0])) { - $this->addListener($eventName, array($subscriber, $params[0]), isset($params[1]) ? $params[1] : 0); + $this->addListener($eventName, [$subscriber, $params[0]], isset($params[1]) ? $params[1] : 0); } else { foreach ($params as $listener) { - $this->addListener($eventName, array($subscriber, $listener[0]), isset($listener[1]) ? $listener[1] : 0); + $this->addListener($eventName, [$subscriber, $listener[0]], isset($listener[1]) ? $listener[1] : 0); } } } @@ -185,10 +211,10 @@ class EventDispatcher implements EventDispatcherInterface foreach ($subscriber->getSubscribedEvents() as $eventName => $params) { if (\is_array($params) && \is_array($params[0])) { foreach ($params as $listener) { - $this->removeListener($eventName, array($subscriber, $listener[0])); + $this->removeListener($eventName, [$subscriber, $listener[0]]); } } else { - $this->removeListener($eventName, array($subscriber, \is_string($params) ? $params : $params[0])); + $this->removeListener($eventName, [$subscriber, \is_string($params) ? $params : $params[0]]); } } } @@ -201,7 +227,29 @@ class EventDispatcher implements EventDispatcherInterface * * @param callable[] $listeners The event listeners * @param string $eventName The name of the event to dispatch - * @param Event $event The event object to pass to the event handlers/listeners + * @param object $event The event object to pass to the event handlers/listeners + */ + protected function callListeners(iterable $listeners, string $eventName, $event) + { + if ($event instanceof Event) { + $this->doDispatch($listeners, $eventName, $event); + + return; + } + + $stoppable = $event instanceof ContractsEvent || $event instanceof StoppableEventInterface; + + foreach ($listeners as $listener) { + if ($stoppable && $event->isPropagationStopped()) { + break; + } + // @deprecated: the ternary operator is part of a BC layer and should be removed in 5.0 + $listener($listener instanceof WrappedListener ? new LegacyEventProxy($event) : $event, $eventName, $this); + } + } + + /** + * @deprecated since Symfony 4.3, use callListeners() instead */ protected function doDispatch($listeners, $eventName, Event $event) { @@ -215,22 +263,46 @@ class EventDispatcher implements EventDispatcherInterface /** * Sorts the internal list of listeners for the given event by priority. - * - * @param string $eventName The name of the event */ - private function sortListeners($eventName) + private function sortListeners(string $eventName) { krsort($this->listeners[$eventName]); - $this->sorted[$eventName] = array(); + $this->sorted[$eventName] = []; - foreach ($this->listeners[$eventName] as $priority => $listeners) { + foreach ($this->listeners[$eventName] as &$listeners) { foreach ($listeners as $k => $listener) { if (\is_array($listener) && isset($listener[0]) && $listener[0] instanceof \Closure) { $listener[0] = $listener[0](); - $this->listeners[$eventName][$priority][$k] = $listener; } $this->sorted[$eventName][] = $listener; } } } + + /** + * Optimizes the internal list of listeners for the given event by priority. + */ + private function optimizeListeners(string $eventName): array + { + krsort($this->listeners[$eventName]); + $this->optimized[$eventName] = []; + + foreach ($this->listeners[$eventName] as &$listeners) { + foreach ($listeners as &$listener) { + $closure = &$this->optimized[$eventName][]; + if (\is_array($listener) && isset($listener[0]) && $listener[0] instanceof \Closure) { + $closure = static function (...$args) use (&$listener, &$closure) { + if ($listener[0] instanceof \Closure) { + $listener[0] = $listener[0](); + } + ($closure = \Closure::fromCallable($listener))(...$args); + }; + } else { + $closure = $listener instanceof \Closure || $listener instanceof WrappedListener ? $listener : \Closure::fromCallable($listener); + } + } + } + + return $this->optimized[$eventName]; + } } diff --git a/vendor/symfony/event-dispatcher/EventDispatcherInterface.php b/vendor/symfony/event-dispatcher/EventDispatcherInterface.php index bde753a1..ceaa62ae 100644 --- a/vendor/symfony/event-dispatcher/EventDispatcherInterface.php +++ b/vendor/symfony/event-dispatcher/EventDispatcherInterface.php @@ -11,6 +11,8 @@ namespace Symfony\Component\EventDispatcher; +use Symfony\Contracts\EventDispatcher\EventDispatcherInterface as ContractsEventDispatcherInterface; + /** * The EventDispatcherInterface is the central point of Symfony's event listener system. * Listeners are registered on the manager and events are dispatched through the @@ -18,21 +20,8 @@ namespace Symfony\Component\EventDispatcher; * * @author Bernhard Schussek */ -interface EventDispatcherInterface +interface EventDispatcherInterface extends ContractsEventDispatcherInterface { - /** - * Dispatches an event to all registered listeners. - * - * @param string $eventName The name of the event to dispatch. The name of - * the event is the name of the method that is - * invoked on listeners. - * @param Event|null $event The event to pass to the event handlers/listeners - * If not supplied, an empty Event instance is created - * - * @return Event - */ - public function dispatch($eventName, Event $event = null); - /** * Adds an event listener that listens on the specified events. * diff --git a/vendor/symfony/event-dispatcher/EventSubscriberInterface.php b/vendor/symfony/event-dispatcher/EventSubscriberInterface.php index 6e1976b8..824f2159 100644 --- a/vendor/symfony/event-dispatcher/EventSubscriberInterface.php +++ b/vendor/symfony/event-dispatcher/EventSubscriberInterface.php @@ -36,9 +36,9 @@ interface EventSubscriberInterface * * For instance: * - * * array('eventName' => 'methodName') - * * array('eventName' => array('methodName', $priority)) - * * array('eventName' => array(array('methodName1', $priority), array('methodName2'))) + * * ['eventName' => 'methodName'] + * * ['eventName' => ['methodName', $priority]] + * * ['eventName' => [['methodName1', $priority], ['methodName2']]] * * @return array The event names to listen to */ diff --git a/vendor/symfony/event-dispatcher/GenericEvent.php b/vendor/symfony/event-dispatcher/GenericEvent.php index f0be7e18..f005e3a3 100644 --- a/vendor/symfony/event-dispatcher/GenericEvent.php +++ b/vendor/symfony/event-dispatcher/GenericEvent.php @@ -29,7 +29,7 @@ class GenericEvent extends Event implements \ArrayAccess, \IteratorAggregate * @param mixed $subject The subject of the event, usually an object or a callable * @param array $arguments Arguments to store in the event */ - public function __construct($subject = null, array $arguments = array()) + public function __construct($subject = null, array $arguments = []) { $this->subject = $subject; $this->arguments = $arguments; @@ -95,7 +95,7 @@ class GenericEvent extends Event implements \ArrayAccess, \IteratorAggregate * * @return $this */ - public function setArguments(array $args = array()) + public function setArguments(array $args = []) { $this->arguments = $args; @@ -111,7 +111,7 @@ class GenericEvent extends Event implements \ArrayAccess, \IteratorAggregate */ public function hasArgument($key) { - return array_key_exists($key, $this->arguments); + return \array_key_exists($key, $this->arguments); } /** diff --git a/vendor/symfony/event-dispatcher/ImmutableEventDispatcher.php b/vendor/symfony/event-dispatcher/ImmutableEventDispatcher.php index b3cf56c5..082e2a05 100644 --- a/vendor/symfony/event-dispatcher/ImmutableEventDispatcher.php +++ b/vendor/symfony/event-dispatcher/ImmutableEventDispatcher.php @@ -22,15 +22,26 @@ class ImmutableEventDispatcher implements EventDispatcherInterface public function __construct(EventDispatcherInterface $dispatcher) { - $this->dispatcher = $dispatcher; + $this->dispatcher = LegacyEventDispatcherProxy::decorate($dispatcher); } /** * {@inheritdoc} + * + * @param string|null $eventName */ - public function dispatch($eventName, Event $event = null) + public function dispatch($event/*, string $eventName = null*/) { - return $this->dispatcher->dispatch($eventName, $event); + $eventName = 1 < \func_num_args() ? \func_get_arg(1) : null; + + if (\is_scalar($event)) { + // deprecated + $swap = $event; + $event = $eventName ?? new Event(); + $eventName = $swap; + } + + return $this->dispatcher->dispatch($event, $eventName); } /** diff --git a/vendor/symfony/event-dispatcher/LegacyEventDispatcherProxy.php b/vendor/symfony/event-dispatcher/LegacyEventDispatcherProxy.php new file mode 100644 index 00000000..3ae3735e --- /dev/null +++ b/vendor/symfony/event-dispatcher/LegacyEventDispatcherProxy.php @@ -0,0 +1,147 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\EventDispatcher; + +use Psr\EventDispatcher\StoppableEventInterface; +use Symfony\Contracts\EventDispatcher\Event as ContractsEvent; +use Symfony\Contracts\EventDispatcher\EventDispatcherInterface as ContractsEventDispatcherInterface; + +/** + * An helper class to provide BC/FC with the legacy signature of EventDispatcherInterface::dispatch(). + * + * This class should be deprecated in Symfony 5.1 + * + * @author Nicolas Grekas + */ +final class LegacyEventDispatcherProxy implements EventDispatcherInterface +{ + private $dispatcher; + + public static function decorate(?ContractsEventDispatcherInterface $dispatcher): ?ContractsEventDispatcherInterface + { + if (null === $dispatcher) { + return null; + } + $r = new \ReflectionMethod($dispatcher, 'dispatch'); + $param2 = $r->getParameters()[1] ?? null; + + if (!$param2 || !$param2->hasType() || $param2->getType()->isBuiltin()) { + return $dispatcher; + } + + @trigger_error(sprintf('The signature of the "%s::dispatch()" method should be updated to "dispatch($event, string $eventName = null)", not doing so is deprecated since Symfony 4.3.', $r->class), E_USER_DEPRECATED); + + $self = new self(); + $self->dispatcher = $dispatcher; + + return $self; + } + + /** + * {@inheritdoc} + * + * @param string|null $eventName + */ + public function dispatch($event/*, string $eventName = null*/) + { + $eventName = 1 < \func_num_args() ? \func_get_arg(1) : null; + + if (\is_object($event)) { + $eventName = $eventName ?? \get_class($event); + } else { + @trigger_error(sprintf('Calling the "%s::dispatch()" method with the event name as first argument is deprecated since Symfony 4.3, pass it second and provide the event object first instead.', ContractsEventDispatcherInterface::class), E_USER_DEPRECATED); + $swap = $event; + $event = $eventName ?? new Event(); + $eventName = $swap; + + if (!$event instanceof Event) { + throw new \TypeError(sprintf('Argument 1 passed to "%s::dispatch()" must be an instance of %s, %s given.', ContractsEventDispatcherInterface::class, Event::class, \is_object($event) ? \get_class($event) : \gettype($event))); + } + } + + $listeners = $this->getListeners($eventName); + $stoppable = $event instanceof Event || $event instanceof ContractsEvent || $event instanceof StoppableEventInterface; + + foreach ($listeners as $listener) { + if ($stoppable && $event->isPropagationStopped()) { + break; + } + $listener($event, $eventName, $this); + } + + return $event; + } + + /** + * {@inheritdoc} + */ + public function addListener($eventName, $listener, $priority = 0) + { + return $this->dispatcher->addListener($eventName, $listener, $priority); + } + + /** + * {@inheritdoc} + */ + public function addSubscriber(EventSubscriberInterface $subscriber) + { + return $this->dispatcher->addSubscriber($subscriber); + } + + /** + * {@inheritdoc} + */ + public function removeListener($eventName, $listener) + { + return $this->dispatcher->removeListener($eventName, $listener); + } + + /** + * {@inheritdoc} + */ + public function removeSubscriber(EventSubscriberInterface $subscriber) + { + return $this->dispatcher->removeSubscriber($subscriber); + } + + /** + * {@inheritdoc} + */ + public function getListeners($eventName = null) + { + return $this->dispatcher->getListeners($eventName); + } + + /** + * {@inheritdoc} + */ + public function getListenerPriority($eventName, $listener) + { + return $this->dispatcher->getListenerPriority($eventName, $listener); + } + + /** + * {@inheritdoc} + */ + public function hasListeners($eventName = null) + { + return $this->dispatcher->hasListeners($eventName); + } + + /** + * Proxies all method calls to the original event dispatcher. + */ + public function __call($method, $arguments) + { + return $this->dispatcher->{$method}(...$arguments); + } +} diff --git a/vendor/symfony/event-dispatcher/LegacyEventProxy.php b/vendor/symfony/event-dispatcher/LegacyEventProxy.php new file mode 100644 index 00000000..cad8cfae --- /dev/null +++ b/vendor/symfony/event-dispatcher/LegacyEventProxy.php @@ -0,0 +1,62 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\EventDispatcher; + +use Psr\EventDispatcher\StoppableEventInterface; +use Symfony\Contracts\EventDispatcher\Event as ContractsEvent; + +/** + * @internal to be removed in 5.0. + */ +final class LegacyEventProxy extends Event +{ + private $event; + + /** + * @param object $event + */ + public function __construct($event) + { + $this->event = $event; + } + + /** + * @return object $event + */ + public function getEvent() + { + return $this->event; + } + + public function isPropagationStopped() + { + if (!$this->event instanceof ContractsEvent && !$this->event instanceof StoppableEventInterface) { + return false; + } + + return $this->event->isPropagationStopped(); + } + + public function stopPropagation() + { + if (!$this->event instanceof ContractsEvent) { + return; + } + + $this->event->stopPropagation(); + } + + public function __call($name, $args) + { + return $this->event->{$name}(...$args); + } +} diff --git a/vendor/symfony/event-dispatcher/Tests/AbstractEventDispatcherTest.php b/vendor/symfony/event-dispatcher/Tests/AbstractEventDispatcherTest.php deleted file mode 100644 index 6d377d11..00000000 --- a/vendor/symfony/event-dispatcher/Tests/AbstractEventDispatcherTest.php +++ /dev/null @@ -1,442 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\EventDispatcher\Tests; - -use PHPUnit\Framework\TestCase; -use Symfony\Component\EventDispatcher\Event; -use Symfony\Component\EventDispatcher\EventDispatcher; -use Symfony\Component\EventDispatcher\EventSubscriberInterface; - -abstract class AbstractEventDispatcherTest extends TestCase -{ - /* Some pseudo events */ - const preFoo = 'pre.foo'; - const postFoo = 'post.foo'; - const preBar = 'pre.bar'; - const postBar = 'post.bar'; - - /** - * @var EventDispatcher - */ - private $dispatcher; - - private $listener; - - protected function setUp() - { - $this->dispatcher = $this->createEventDispatcher(); - $this->listener = new TestEventListener(); - } - - protected function tearDown() - { - $this->dispatcher = null; - $this->listener = null; - } - - abstract protected function createEventDispatcher(); - - public function testInitialState() - { - $this->assertEquals(array(), $this->dispatcher->getListeners()); - $this->assertFalse($this->dispatcher->hasListeners(self::preFoo)); - $this->assertFalse($this->dispatcher->hasListeners(self::postFoo)); - } - - public function testAddListener() - { - $this->dispatcher->addListener('pre.foo', array($this->listener, 'preFoo')); - $this->dispatcher->addListener('post.foo', array($this->listener, 'postFoo')); - $this->assertTrue($this->dispatcher->hasListeners()); - $this->assertTrue($this->dispatcher->hasListeners(self::preFoo)); - $this->assertTrue($this->dispatcher->hasListeners(self::postFoo)); - $this->assertCount(1, $this->dispatcher->getListeners(self::preFoo)); - $this->assertCount(1, $this->dispatcher->getListeners(self::postFoo)); - $this->assertCount(2, $this->dispatcher->getListeners()); - } - - public function testGetListenersSortsByPriority() - { - $listener1 = new TestEventListener(); - $listener2 = new TestEventListener(); - $listener3 = new TestEventListener(); - $listener1->name = '1'; - $listener2->name = '2'; - $listener3->name = '3'; - - $this->dispatcher->addListener('pre.foo', array($listener1, 'preFoo'), -10); - $this->dispatcher->addListener('pre.foo', array($listener2, 'preFoo'), 10); - $this->dispatcher->addListener('pre.foo', array($listener3, 'preFoo')); - - $expected = array( - array($listener2, 'preFoo'), - array($listener3, 'preFoo'), - array($listener1, 'preFoo'), - ); - - $this->assertSame($expected, $this->dispatcher->getListeners('pre.foo')); - } - - public function testGetAllListenersSortsByPriority() - { - $listener1 = new TestEventListener(); - $listener2 = new TestEventListener(); - $listener3 = new TestEventListener(); - $listener4 = new TestEventListener(); - $listener5 = new TestEventListener(); - $listener6 = new TestEventListener(); - - $this->dispatcher->addListener('pre.foo', $listener1, -10); - $this->dispatcher->addListener('pre.foo', $listener2); - $this->dispatcher->addListener('pre.foo', $listener3, 10); - $this->dispatcher->addListener('post.foo', $listener4, -10); - $this->dispatcher->addListener('post.foo', $listener5); - $this->dispatcher->addListener('post.foo', $listener6, 10); - - $expected = array( - 'pre.foo' => array($listener3, $listener2, $listener1), - 'post.foo' => array($listener6, $listener5, $listener4), - ); - - $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')); - $this->dispatcher->addListener('post.foo', array($this->listener, 'postFoo')); - $this->dispatcher->dispatch(self::preFoo); - $this->assertTrue($this->listener->preFooInvoked); - $this->assertFalse($this->listener->postFooInvoked); - $this->assertInstanceOf('Symfony\Component\EventDispatcher\Event', $this->dispatcher->dispatch('noevent')); - $this->assertInstanceOf('Symfony\Component\EventDispatcher\Event', $this->dispatcher->dispatch(self::preFoo)); - $event = new Event(); - $return = $this->dispatcher->dispatch(self::preFoo, $event); - $this->assertSame($event, $return); - } - - public function testDispatchForClosure() - { - $invoked = 0; - $listener = function () use (&$invoked) { - ++$invoked; - }; - $this->dispatcher->addListener('pre.foo', $listener); - $this->dispatcher->addListener('post.foo', $listener); - $this->dispatcher->dispatch(self::preFoo); - $this->assertEquals(1, $invoked); - } - - public function testStopEventPropagation() - { - $otherListener = new TestEventListener(); - - // postFoo() stops the propagation, so only one listener should - // be executed - // Manually set priority to enforce $this->listener to be called first - $this->dispatcher->addListener('post.foo', array($this->listener, 'postFoo'), 10); - $this->dispatcher->addListener('post.foo', array($otherListener, 'postFoo')); - $this->dispatcher->dispatch(self::postFoo); - $this->assertTrue($this->listener->postFooInvoked); - $this->assertFalse($otherListener->postFooInvoked); - } - - public function testDispatchByPriority() - { - $invoked = array(); - $listener1 = function () use (&$invoked) { - $invoked[] = '1'; - }; - $listener2 = function () use (&$invoked) { - $invoked[] = '2'; - }; - $listener3 = function () use (&$invoked) { - $invoked[] = '3'; - }; - $this->dispatcher->addListener('pre.foo', $listener1, -10); - $this->dispatcher->addListener('pre.foo', $listener2); - $this->dispatcher->addListener('pre.foo', $listener3, 10); - $this->dispatcher->dispatch(self::preFoo); - $this->assertEquals(array('3', '2', '1'), $invoked); - } - - public function testRemoveListener() - { - $this->dispatcher->addListener('pre.bar', $this->listener); - $this->assertTrue($this->dispatcher->hasListeners(self::preBar)); - $this->dispatcher->removeListener('pre.bar', $this->listener); - $this->assertFalse($this->dispatcher->hasListeners(self::preBar)); - $this->dispatcher->removeListener('notExists', $this->listener); - } - - public function testAddSubscriber() - { - $eventSubscriber = new TestEventSubscriber(); - $this->dispatcher->addSubscriber($eventSubscriber); - $this->assertTrue($this->dispatcher->hasListeners(self::preFoo)); - $this->assertTrue($this->dispatcher->hasListeners(self::postFoo)); - } - - public function testAddSubscriberWithPriorities() - { - $eventSubscriber = new TestEventSubscriber(); - $this->dispatcher->addSubscriber($eventSubscriber); - - $eventSubscriber = new TestEventSubscriberWithPriorities(); - $this->dispatcher->addSubscriber($eventSubscriber); - - $listeners = $this->dispatcher->getListeners('pre.foo'); - $this->assertTrue($this->dispatcher->hasListeners(self::preFoo)); - $this->assertCount(2, $listeners); - $this->assertInstanceOf('Symfony\Component\EventDispatcher\Tests\TestEventSubscriberWithPriorities', $listeners[0][0]); - } - - public function testAddSubscriberWithMultipleListeners() - { - $eventSubscriber = new TestEventSubscriberWithMultipleListeners(); - $this->dispatcher->addSubscriber($eventSubscriber); - - $listeners = $this->dispatcher->getListeners('pre.foo'); - $this->assertTrue($this->dispatcher->hasListeners(self::preFoo)); - $this->assertCount(2, $listeners); - $this->assertEquals('preFoo2', $listeners[0][1]); - } - - public function testRemoveSubscriber() - { - $eventSubscriber = new TestEventSubscriber(); - $this->dispatcher->addSubscriber($eventSubscriber); - $this->assertTrue($this->dispatcher->hasListeners(self::preFoo)); - $this->assertTrue($this->dispatcher->hasListeners(self::postFoo)); - $this->dispatcher->removeSubscriber($eventSubscriber); - $this->assertFalse($this->dispatcher->hasListeners(self::preFoo)); - $this->assertFalse($this->dispatcher->hasListeners(self::postFoo)); - } - - public function testRemoveSubscriberWithPriorities() - { - $eventSubscriber = new TestEventSubscriberWithPriorities(); - $this->dispatcher->addSubscriber($eventSubscriber); - $this->assertTrue($this->dispatcher->hasListeners(self::preFoo)); - $this->dispatcher->removeSubscriber($eventSubscriber); - $this->assertFalse($this->dispatcher->hasListeners(self::preFoo)); - } - - public function testRemoveSubscriberWithMultipleListeners() - { - $eventSubscriber = new TestEventSubscriberWithMultipleListeners(); - $this->dispatcher->addSubscriber($eventSubscriber); - $this->assertTrue($this->dispatcher->hasListeners(self::preFoo)); - $this->assertCount(2, $this->dispatcher->getListeners(self::preFoo)); - $this->dispatcher->removeSubscriber($eventSubscriber); - $this->assertFalse($this->dispatcher->hasListeners(self::preFoo)); - } - - public function testEventReceivesTheDispatcherInstanceAsArgument() - { - $listener = new TestWithDispatcher(); - $this->dispatcher->addListener('test', array($listener, 'foo')); - $this->assertNull($listener->name); - $this->assertNull($listener->dispatcher); - $this->dispatcher->dispatch('test'); - $this->assertEquals('test', $listener->name); - $this->assertSame($this->dispatcher, $listener->dispatcher); - } - - /** - * @see https://bugs.php.net/bug.php?id=62976 - * - * This bug affects: - * - The PHP 5.3 branch for versions < 5.3.18 - * - The PHP 5.4 branch for versions < 5.4.8 - * - The PHP 5.5 branch is not affected - */ - public function testWorkaroundForPhpBug62976() - { - $dispatcher = $this->createEventDispatcher(); - $dispatcher->addListener('bug.62976', new CallableClass()); - $dispatcher->removeListener('bug.62976', function () {}); - $this->assertTrue($dispatcher->hasListeners('bug.62976')); - } - - public function testHasListenersWhenAddedCallbackListenerIsRemoved() - { - $listener = function () {}; - $this->dispatcher->addListener('foo', $listener); - $this->dispatcher->removeListener('foo', $listener); - $this->assertFalse($this->dispatcher->hasListeners()); - } - - public function testGetListenersWhenAddedCallbackListenerIsRemoved() - { - $listener = function () {}; - $this->dispatcher->addListener('foo', $listener); - $this->dispatcher->removeListener('foo', $listener); - $this->assertSame(array(), $this->dispatcher->getListeners()); - } - - public function testHasListenersWithoutEventsReturnsFalseAfterHasListenersWithEventHasBeenCalled() - { - $this->assertFalse($this->dispatcher->hasListeners('foo')); - $this->assertFalse($this->dispatcher->hasListeners()); - } - - public function testHasListenersIsLazy() - { - $called = 0; - $listener = array(function () use (&$called) { ++$called; }, 'onFoo'); - $this->dispatcher->addListener('foo', $listener); - $this->assertTrue($this->dispatcher->hasListeners()); - $this->assertTrue($this->dispatcher->hasListeners('foo')); - $this->assertSame(0, $called); - } - - public function testDispatchLazyListener() - { - $called = 0; - $factory = function () use (&$called) { - ++$called; - - return new TestWithDispatcher(); - }; - $this->dispatcher->addListener('foo', array($factory, 'foo')); - $this->assertSame(0, $called); - $this->dispatcher->dispatch('foo', new Event()); - $this->dispatcher->dispatch('foo', new Event()); - $this->assertSame(1, $called); - } - - public function testRemoveFindsLazyListeners() - { - $test = new TestWithDispatcher(); - $factory = function () use ($test) { return $test; }; - - $this->dispatcher->addListener('foo', array($factory, 'foo')); - $this->assertTrue($this->dispatcher->hasListeners('foo')); - $this->dispatcher->removeListener('foo', array($test, 'foo')); - $this->assertFalse($this->dispatcher->hasListeners('foo')); - - $this->dispatcher->addListener('foo', array($test, 'foo')); - $this->assertTrue($this->dispatcher->hasListeners('foo')); - $this->dispatcher->removeListener('foo', array($factory, 'foo')); - $this->assertFalse($this->dispatcher->hasListeners('foo')); - } - - public function testPriorityFindsLazyListeners() - { - $test = new TestWithDispatcher(); - $factory = function () use ($test) { return $test; }; - - $this->dispatcher->addListener('foo', array($factory, 'foo'), 3); - $this->assertSame(3, $this->dispatcher->getListenerPriority('foo', array($test, 'foo'))); - $this->dispatcher->removeListener('foo', array($factory, 'foo')); - - $this->dispatcher->addListener('foo', array($test, 'foo'), 5); - $this->assertSame(5, $this->dispatcher->getListenerPriority('foo', array($factory, 'foo'))); - } - - public function testGetLazyListeners() - { - $test = new TestWithDispatcher(); - $factory = function () use ($test) { return $test; }; - - $this->dispatcher->addListener('foo', array($factory, 'foo'), 3); - $this->assertSame(array(array($test, 'foo')), $this->dispatcher->getListeners('foo')); - - $this->dispatcher->removeListener('foo', array($test, 'foo')); - $this->dispatcher->addListener('bar', array($factory, 'foo'), 3); - $this->assertSame(array('bar' => array(array($test, 'foo'))), $this->dispatcher->getListeners()); - } -} - -class CallableClass -{ - public function __invoke() - { - } -} - -class TestEventListener -{ - public $preFooInvoked = false; - public $postFooInvoked = false; - - /* Listener methods */ - - public function preFoo(Event $e) - { - $this->preFooInvoked = true; - } - - public function postFoo(Event $e) - { - $this->postFooInvoked = true; - - $e->stopPropagation(); - } -} - -class TestWithDispatcher -{ - public $name; - public $dispatcher; - - public function foo(Event $e, $name, $dispatcher) - { - $this->name = $name; - $this->dispatcher = $dispatcher; - } -} - -class TestEventSubscriber implements EventSubscriberInterface -{ - public static function getSubscribedEvents() - { - return array('pre.foo' => 'preFoo', 'post.foo' => 'postFoo'); - } -} - -class TestEventSubscriberWithPriorities implements EventSubscriberInterface -{ - public static function getSubscribedEvents() - { - return array( - 'pre.foo' => array('preFoo', 10), - 'post.foo' => array('postFoo'), - ); - } -} - -class TestEventSubscriberWithMultipleListeners implements EventSubscriberInterface -{ - public static function getSubscribedEvents() - { - return array('pre.foo' => array( - array('preFoo1'), - array('preFoo2', 10), - )); - } -} diff --git a/vendor/symfony/event-dispatcher/Tests/ChildEventDispatcherTest.php b/vendor/symfony/event-dispatcher/Tests/ChildEventDispatcherTest.php new file mode 100644 index 00000000..442b88fb --- /dev/null +++ b/vendor/symfony/event-dispatcher/Tests/ChildEventDispatcherTest.php @@ -0,0 +1,26 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\EventDispatcher\Tests; + +use Symfony\Component\EventDispatcher\EventDispatcher; + +class ChildEventDispatcherTest extends EventDispatcherTest +{ + protected function createEventDispatcher() + { + return new ChildEventDispatcher(); + } +} + +class ChildEventDispatcher extends EventDispatcher +{ +} diff --git a/vendor/symfony/event-dispatcher/Tests/Debug/TraceableEventDispatcherTest.php b/vendor/symfony/event-dispatcher/Tests/Debug/TraceableEventDispatcherTest.php index 0a2b3279..ea476eee 100644 --- a/vendor/symfony/event-dispatcher/Tests/Debug/TraceableEventDispatcherTest.php +++ b/vendor/symfony/event-dispatcher/Tests/Debug/TraceableEventDispatcherTest.php @@ -18,6 +18,7 @@ use Symfony\Component\EventDispatcher\EventDispatcher; use Symfony\Component\EventDispatcher\EventDispatcherInterface; use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Symfony\Component\Stopwatch\Stopwatch; +use Symfony\Contracts\EventDispatcher\Event as ContractsEvent; class TraceableEventDispatcherTest extends TestCase { @@ -69,7 +70,7 @@ class TraceableEventDispatcherTest extends TestCase // Verify that priority is preserved when listener is removed and re-added // in preProcess() and postProcess(). - $tdispatcher->dispatch('foo', new Event()); + $tdispatcher->dispatch(new Event(), 'foo'); $listeners = $dispatcher->getListeners('foo'); $this->assertSame(123, $tdispatcher->getListenerPriority('foo', $listeners[0])); } @@ -84,7 +85,7 @@ class TraceableEventDispatcherTest extends TestCase }; $tdispatcher->addListener('bar', $listener, 5); - $tdispatcher->dispatch('bar'); + $tdispatcher->dispatch(new Event(), 'bar'); $this->assertSame(5, $priorityWhileDispatching); } @@ -98,7 +99,7 @@ class TraceableEventDispatcherTest extends TestCase $tdispatcher->addSubscriber($subscriber); $listeners = $dispatcher->getListeners('foo'); $this->assertCount(1, $listeners); - $this->assertSame(array($subscriber, 'call'), $listeners[0]); + $this->assertSame([$subscriber, 'call'], $listeners[0]); $tdispatcher->removeSubscriber($subscriber); $this->assertCount(0, $dispatcher->getListeners('foo')); @@ -112,16 +113,16 @@ class TraceableEventDispatcherTest extends TestCase $listeners = $tdispatcher->getNotCalledListeners(); $this->assertArrayHasKey('stub', $listeners[0]); unset($listeners[0]['stub']); - $this->assertEquals(array(), $tdispatcher->getCalledListeners()); - $this->assertEquals(array(array('event' => 'foo', 'pretty' => 'closure', 'priority' => 5)), $listeners); + $this->assertEquals([], $tdispatcher->getCalledListeners()); + $this->assertEquals([['event' => 'foo', 'pretty' => 'closure', 'priority' => 5]], $listeners); - $tdispatcher->dispatch('foo'); + $tdispatcher->dispatch(new Event(), 'foo'); $listeners = $tdispatcher->getCalledListeners(); $this->assertArrayHasKey('stub', $listeners[0]); unset($listeners[0]['stub']); - $this->assertEquals(array(array('event' => 'foo', 'pretty' => 'closure', 'priority' => 5)), $listeners); - $this->assertEquals(array(), $tdispatcher->getNotCalledListeners()); + $this->assertEquals([['event' => 'foo', 'pretty' => 'closure', 'priority' => 5]], $listeners); + $this->assertEquals([], $tdispatcher->getNotCalledListeners()); } public function testClearCalledListeners() @@ -129,14 +130,27 @@ class TraceableEventDispatcherTest extends TestCase $tdispatcher = new TraceableEventDispatcher(new EventDispatcher(), new Stopwatch()); $tdispatcher->addListener('foo', function () {}, 5); - $tdispatcher->dispatch('foo'); + $tdispatcher->dispatch(new Event(), 'foo'); $tdispatcher->reset(); $listeners = $tdispatcher->getNotCalledListeners(); $this->assertArrayHasKey('stub', $listeners[0]); unset($listeners[0]['stub']); - $this->assertEquals(array(), $tdispatcher->getCalledListeners()); - $this->assertEquals(array(array('event' => 'foo', 'pretty' => 'closure', 'priority' => 5)), $listeners); + $this->assertEquals([], $tdispatcher->getCalledListeners()); + $this->assertEquals([['event' => 'foo', 'pretty' => 'closure', 'priority' => 5]], $listeners); + } + + public function testDispatchContractsEvent() + { + $expectedEvent = new ContractsEvent(); + $tdispatcher = new TraceableEventDispatcher(new EventDispatcher(), new Stopwatch()); + $tdispatcher->addListener('foo', function ($event) use ($expectedEvent) { + $this->assertSame($event, $expectedEvent); + }, 5); + $tdispatcher->dispatch($expectedEvent, 'foo'); + + $listeners = $tdispatcher->getCalledListeners(); + $this->assertArrayHasKey('stub', $listeners[0]); } public function testDispatchAfterReset() @@ -145,7 +159,7 @@ class TraceableEventDispatcherTest extends TestCase $tdispatcher->addListener('foo', function () {}, 5); $tdispatcher->reset(); - $tdispatcher->dispatch('foo'); + $tdispatcher->dispatch(new Event(), 'foo'); $listeners = $tdispatcher->getCalledListeners(); $this->assertArrayHasKey('stub', $listeners[0]); @@ -157,10 +171,10 @@ class TraceableEventDispatcherTest extends TestCase $dispatcher = new TraceableEventDispatcher(new EventDispatcher(), new Stopwatch()); $dispatcher->addListener('foo', function (Event $event, $eventName, $dispatcher) use (&$tdispatcher) { $tdispatcher = $dispatcher; - $dispatcher->dispatch('bar'); + $dispatcher->dispatch(new Event(), 'bar'); }); $dispatcher->addListener('bar', function (Event $event) {}); - $dispatcher->dispatch('foo'); + $dispatcher->dispatch(new Event(), 'foo'); $this->assertSame($dispatcher, $tdispatcher); $this->assertCount(2, $dispatcher->getCalledListeners()); } @@ -175,17 +189,17 @@ class TraceableEventDispatcherTest extends TestCase public function testItReturnsOrphanedEventsAfterDispatch() { $tdispatcher = new TraceableEventDispatcher(new EventDispatcher(), new Stopwatch()); - $tdispatcher->dispatch('foo'); + $tdispatcher->dispatch(new Event(), 'foo'); $events = $tdispatcher->getOrphanedEvents(); $this->assertCount(1, $events); - $this->assertEquals(array('foo'), $events); + $this->assertEquals(['foo'], $events); } public function testItDoesNotReturnHandledEvents() { $tdispatcher = new TraceableEventDispatcher(new EventDispatcher(), new Stopwatch()); $tdispatcher->addListener('foo', function () {}); - $tdispatcher->dispatch('foo'); + $tdispatcher->dispatch(new Event(), 'foo'); $events = $tdispatcher->getOrphanedEvents(); $this->assertEmpty($events); } @@ -199,10 +213,10 @@ class TraceableEventDispatcherTest extends TestCase $tdispatcher->addListener('foo', $listener1 = function () {}); $tdispatcher->addListener('foo', $listener2 = function () {}); - $logger->expects($this->at(0))->method('debug')->with('Notified event "{event}" to listener "{listener}".', array('event' => 'foo', 'listener' => 'closure')); - $logger->expects($this->at(1))->method('debug')->with('Notified event "{event}" to listener "{listener}".', array('event' => 'foo', 'listener' => 'closure')); + $logger->expects($this->at(0))->method('debug')->with('Notified event "{event}" to listener "{listener}".', ['event' => 'foo', 'listener' => 'closure']); + $logger->expects($this->at(1))->method('debug')->with('Notified event "{event}" to listener "{listener}".', ['event' => 'foo', 'listener' => 'closure']); - $tdispatcher->dispatch('foo'); + $tdispatcher->dispatch(new Event(), 'foo'); } public function testLoggerWithStoppedEvent() @@ -214,25 +228,25 @@ class TraceableEventDispatcherTest extends TestCase $tdispatcher->addListener('foo', $listener1 = function (Event $event) { $event->stopPropagation(); }); $tdispatcher->addListener('foo', $listener2 = function () {}); - $logger->expects($this->at(0))->method('debug')->with('Notified event "{event}" to listener "{listener}".', array('event' => 'foo', 'listener' => 'closure')); - $logger->expects($this->at(1))->method('debug')->with('Listener "{listener}" stopped propagation of the event "{event}".', array('event' => 'foo', 'listener' => 'closure')); - $logger->expects($this->at(2))->method('debug')->with('Listener "{listener}" was not called for event "{event}".', array('event' => 'foo', 'listener' => 'closure')); + $logger->expects($this->at(0))->method('debug')->with('Notified event "{event}" to listener "{listener}".', ['event' => 'foo', 'listener' => 'closure']); + $logger->expects($this->at(1))->method('debug')->with('Listener "{listener}" stopped propagation of the event "{event}".', ['event' => 'foo', 'listener' => 'closure']); + $logger->expects($this->at(2))->method('debug')->with('Listener "{listener}" was not called for event "{event}".', ['event' => 'foo', 'listener' => 'closure']); - $tdispatcher->dispatch('foo'); + $tdispatcher->dispatch(new Event(), 'foo'); } public function testDispatchCallListeners() { - $called = array(); + $called = []; $dispatcher = new EventDispatcher(); $tdispatcher = new TraceableEventDispatcher($dispatcher, new Stopwatch()); $tdispatcher->addListener('foo', function () use (&$called) { $called[] = 'foo1'; }, 10); $tdispatcher->addListener('foo', function () use (&$called) { $called[] = 'foo2'; }, 20); - $tdispatcher->dispatch('foo'); + $tdispatcher->dispatch(new Event(), 'foo'); - $this->assertSame(array('foo2', 'foo1'), $called); + $this->assertSame(['foo2', 'foo1'], $called); } public function testDispatchNested() @@ -243,14 +257,14 @@ class TraceableEventDispatcherTest extends TestCase $dispatcher->addListener('foo', $listener1 = function () use ($dispatcher, &$loop) { ++$loop; if (2 == $loop) { - $dispatcher->dispatch('foo'); + $dispatcher->dispatch(new Event(), 'foo'); } }); $dispatcher->addListener('foo', function () use (&$dispatchedEvents) { ++$dispatchedEvents; }); - $dispatcher->dispatch('foo'); + $dispatcher->dispatch(new Event(), 'foo'); $this->assertSame(2, $dispatchedEvents); } @@ -260,14 +274,14 @@ class TraceableEventDispatcherTest extends TestCase $nestedCall = false; $dispatcher = new TraceableEventDispatcher(new EventDispatcher(), new Stopwatch()); $dispatcher->addListener('foo', function (Event $e) use ($dispatcher) { - $dispatcher->dispatch('bar', $e); + $dispatcher->dispatch(new Event(), 'bar', $e); }); $dispatcher->addListener('bar', function (Event $e) use (&$nestedCall) { $nestedCall = true; }); $this->assertFalse($nestedCall); - $dispatcher->dispatch('foo'); + $dispatcher->dispatch(new Event(), 'foo'); $this->assertTrue($nestedCall); } @@ -279,7 +293,7 @@ class TraceableEventDispatcherTest extends TestCase }; $eventDispatcher->addListener('foo', $listener1); $eventDispatcher->addListener('foo', function () {}); - $eventDispatcher->dispatch('foo'); + $eventDispatcher->dispatch(new Event(), 'foo'); $this->assertCount(1, $eventDispatcher->getListeners('foo'), 'expected listener1 to be removed'); } @@ -287,7 +301,7 @@ class TraceableEventDispatcherTest extends TestCase public function testClearOrphanedEvents() { $tdispatcher = new TraceableEventDispatcher(new EventDispatcher(), new Stopwatch()); - $tdispatcher->dispatch('foo'); + $tdispatcher->dispatch(new Event(), 'foo'); $events = $tdispatcher->getOrphanedEvents(); $this->assertCount(1, $events); $tdispatcher->reset(); @@ -300,6 +314,6 @@ class EventSubscriber implements EventSubscriberInterface { public static function getSubscribedEvents() { - return array('foo' => 'call'); + return ['foo' => 'call']; } } diff --git a/vendor/symfony/event-dispatcher/Tests/Debug/WrappedListenerTest.php b/vendor/symfony/event-dispatcher/Tests/Debug/WrappedListenerTest.php index 3847a155..75e90120 100644 --- a/vendor/symfony/event-dispatcher/Tests/Debug/WrappedListenerTest.php +++ b/vendor/symfony/event-dispatcher/Tests/Debug/WrappedListenerTest.php @@ -21,7 +21,7 @@ class WrappedListenerTest extends TestCase /** * @dataProvider provideListenersToDescribe */ - public function testListenerDescription(callable $listener, $expected) + public function testListenerDescription($listener, $expected) { $wrappedListener = new WrappedListener($listener, null, $this->getMockBuilder(Stopwatch::class)->getMock(), $this->getMockBuilder(EventDispatcherInterface::class)->getMock()); @@ -30,16 +30,17 @@ class WrappedListenerTest extends TestCase public function provideListenersToDescribe() { - return array( - array(new FooListener(), 'Symfony\Component\EventDispatcher\Tests\Debug\FooListener::__invoke'), - array(array(new FooListener(), 'listen'), 'Symfony\Component\EventDispatcher\Tests\Debug\FooListener::listen'), - array(array('Symfony\Component\EventDispatcher\Tests\Debug\FooListener', 'listenStatic'), 'Symfony\Component\EventDispatcher\Tests\Debug\FooListener::listenStatic'), - array('var_dump', 'var_dump'), - array(function () {}, 'closure'), - array(\Closure::fromCallable(array(new FooListener(), 'listen')), 'Symfony\Component\EventDispatcher\Tests\Debug\FooListener::listen'), - array(\Closure::fromCallable(array('Symfony\Component\EventDispatcher\Tests\Debug\FooListener', 'listenStatic')), 'Symfony\Component\EventDispatcher\Tests\Debug\FooListener::listenStatic'), - array(\Closure::fromCallable(function () {}), 'closure'), - ); + return [ + [new FooListener(), 'Symfony\Component\EventDispatcher\Tests\Debug\FooListener::__invoke'], + [[new FooListener(), 'listen'], 'Symfony\Component\EventDispatcher\Tests\Debug\FooListener::listen'], + [['Symfony\Component\EventDispatcher\Tests\Debug\FooListener', 'listenStatic'], 'Symfony\Component\EventDispatcher\Tests\Debug\FooListener::listenStatic'], + [['Symfony\Component\EventDispatcher\Tests\Debug\FooListener', 'invalidMethod'], 'Symfony\Component\EventDispatcher\Tests\Debug\FooListener::invalidMethod'], + ['var_dump', 'var_dump'], + [function () {}, 'closure'], + [\Closure::fromCallable([new FooListener(), 'listen']), 'Symfony\Component\EventDispatcher\Tests\Debug\FooListener::listen'], + [\Closure::fromCallable(['Symfony\Component\EventDispatcher\Tests\Debug\FooListener', 'listenStatic']), 'Symfony\Component\EventDispatcher\Tests\Debug\FooListener::listenStatic'], + [\Closure::fromCallable(function () {}), 'closure'], + ]; } } diff --git a/vendor/symfony/event-dispatcher/Tests/DependencyInjection/RegisterListenersPassTest.php b/vendor/symfony/event-dispatcher/Tests/DependencyInjection/RegisterListenersPassTest.php index a359bd7e..d665f426 100644 --- a/vendor/symfony/event-dispatcher/Tests/DependencyInjection/RegisterListenersPassTest.php +++ b/vendor/symfony/event-dispatcher/Tests/DependencyInjection/RegisterListenersPassTest.php @@ -38,9 +38,9 @@ class RegisterListenersPassTest extends TestCase public function testValidEventSubscriber() { - $services = array( - 'my_event_subscriber' => array(0 => array()), - ); + $services = [ + 'my_event_subscriber' => [0 => []], + ]; $builder = new ContainerBuilder(); $eventDispatcherDefinition = $builder->register('event_dispatcher'); @@ -50,16 +50,16 @@ class RegisterListenersPassTest extends TestCase $registerListenersPass = new RegisterListenersPass(); $registerListenersPass->process($builder); - $expectedCalls = array( - array( + $expectedCalls = [ + [ 'addListener', - array( + [ 'event', - array(new ServiceClosureArgument(new Reference('my_event_subscriber')), 'onEvent'), + [new ServiceClosureArgument(new Reference('my_event_subscriber')), 'onEvent'], 0, - ), - ), - ); + ], + ], + ]; $this->assertEquals($expectedCalls, $eventDispatcherDefinition->getMethodCalls()); } @@ -70,7 +70,7 @@ class RegisterListenersPassTest extends TestCase public function testAbstractEventListener() { $container = new ContainerBuilder(); - $container->register('foo', 'stdClass')->setAbstract(true)->addTag('kernel.event_listener', array()); + $container->register('foo', 'stdClass')->setAbstract(true)->addTag('kernel.event_listener', []); $container->register('event_dispatcher', 'stdClass'); $registerListenersPass = new RegisterListenersPass(); @@ -84,7 +84,7 @@ class RegisterListenersPassTest extends TestCase public function testAbstractEventSubscriber() { $container = new ContainerBuilder(); - $container->register('foo', 'stdClass')->setAbstract(true)->addTag('kernel.event_subscriber', array()); + $container->register('foo', 'stdClass')->setAbstract(true)->addTag('kernel.event_subscriber', []); $container->register('event_dispatcher', 'stdClass'); $registerListenersPass = new RegisterListenersPass(); @@ -96,23 +96,23 @@ class RegisterListenersPassTest extends TestCase $container = new ContainerBuilder(); $container->setParameter('subscriber.class', 'Symfony\Component\EventDispatcher\Tests\DependencyInjection\SubscriberService'); - $container->register('foo', '%subscriber.class%')->addTag('kernel.event_subscriber', array()); + $container->register('foo', '%subscriber.class%')->addTag('kernel.event_subscriber', []); $container->register('event_dispatcher', 'stdClass'); $registerListenersPass = new RegisterListenersPass(); $registerListenersPass->process($container); $definition = $container->getDefinition('event_dispatcher'); - $expectedCalls = array( - array( + $expectedCalls = [ + [ 'addListener', - array( + [ 'event', - array(new ServiceClosureArgument(new Reference('foo')), 'onEvent'), + [new ServiceClosureArgument(new Reference('foo')), 'onEvent'], 0, - ), - ), - ); + ], + ], + ]; $this->assertEquals($expectedCalls, $definition->getMethodCalls()); } @@ -120,10 +120,10 @@ class RegisterListenersPassTest extends TestCase { $container = new ContainerBuilder(); - $container->register('foo', SubscriberService::class)->addTag('kernel.event_subscriber', array()); + $container->register('foo', SubscriberService::class)->addTag('kernel.event_subscriber', []); $container->register('event_dispatcher', 'stdClass'); - (new RegisterListenersPass())->setHotPathEvents(array('event'))->process($container); + (new RegisterListenersPass())->setHotPathEvents(['event'])->process($container); $this->assertTrue($container->getDefinition('foo')->hasTag('container.hot_path')); } @@ -135,7 +135,7 @@ class RegisterListenersPassTest extends TestCase public function testEventSubscriberUnresolvableClassName() { $container = new ContainerBuilder(); - $container->register('foo', '%subscriber.class%')->addTag('kernel.event_subscriber', array()); + $container->register('foo', '%subscriber.class%')->addTag('kernel.event_subscriber', []); $container->register('event_dispatcher', 'stdClass'); $registerListenersPass = new RegisterListenersPass(); @@ -145,41 +145,41 @@ class RegisterListenersPassTest extends TestCase public function testInvokableEventListener() { $container = new ContainerBuilder(); - $container->register('foo', \stdClass::class)->addTag('kernel.event_listener', array('event' => 'foo.bar')); - $container->register('bar', InvokableListenerService::class)->addTag('kernel.event_listener', array('event' => 'foo.bar')); - $container->register('baz', InvokableListenerService::class)->addTag('kernel.event_listener', array('event' => 'event')); + $container->register('foo', \stdClass::class)->addTag('kernel.event_listener', ['event' => 'foo.bar']); + $container->register('bar', InvokableListenerService::class)->addTag('kernel.event_listener', ['event' => 'foo.bar']); + $container->register('baz', InvokableListenerService::class)->addTag('kernel.event_listener', ['event' => 'event']); $container->register('event_dispatcher', \stdClass::class); $registerListenersPass = new RegisterListenersPass(); $registerListenersPass->process($container); $definition = $container->getDefinition('event_dispatcher'); - $expectedCalls = array( - array( + $expectedCalls = [ + [ 'addListener', - array( + [ 'foo.bar', - array(new ServiceClosureArgument(new Reference('foo')), 'onFooBar'), + [new ServiceClosureArgument(new Reference('foo')), 'onFooBar'], 0, - ), - ), - array( + ], + ], + [ 'addListener', - array( + [ 'foo.bar', - array(new ServiceClosureArgument(new Reference('bar')), '__invoke'), + [new ServiceClosureArgument(new Reference('bar')), '__invoke'], 0, - ), - ), - array( + ], + ], + [ 'addListener', - array( + [ 'event', - array(new ServiceClosureArgument(new Reference('baz')), 'onEvent'), + [new ServiceClosureArgument(new Reference('baz')), 'onEvent'], 0, - ), - ), - ); + ], + ], + ]; $this->assertEquals($expectedCalls, $definition->getMethodCalls()); } } @@ -188,9 +188,9 @@ class SubscriberService implements \Symfony\Component\EventDispatcher\EventSubsc { public static function getSubscribedEvents() { - return array( + return [ 'event' => 'onEvent', - ); + ]; } } diff --git a/vendor/symfony/event-dispatcher/Tests/EventDispatcherTest.php b/vendor/symfony/event-dispatcher/Tests/EventDispatcherTest.php index 5faa5c8b..e89f78cd 100644 --- a/vendor/symfony/event-dispatcher/Tests/EventDispatcherTest.php +++ b/vendor/symfony/event-dispatcher/Tests/EventDispatcherTest.php @@ -11,12 +11,476 @@ namespace Symfony\Component\EventDispatcher\Tests; +use PHPUnit\Framework\TestCase; +use Symfony\Component\EventDispatcher\Event; use Symfony\Component\EventDispatcher\EventDispatcher; +use Symfony\Component\EventDispatcher\EventSubscriberInterface; +use Symfony\Contracts\EventDispatcher\Event as ContractsEvent; -class EventDispatcherTest extends AbstractEventDispatcherTest +class EventDispatcherTest extends TestCase { + /* Some pseudo events */ + const preFoo = 'pre.foo'; + const postFoo = 'post.foo'; + const preBar = 'pre.bar'; + const postBar = 'post.bar'; + + /** + * @var EventDispatcher + */ + private $dispatcher; + + private $listener; + + protected function setUp() + { + $this->dispatcher = $this->createEventDispatcher(); + $this->listener = new TestEventListener(); + } + + protected function tearDown() + { + $this->dispatcher = null; + $this->listener = null; + } + protected function createEventDispatcher() { return new EventDispatcher(); } + + public function testInitialState() + { + $this->assertEquals([], $this->dispatcher->getListeners()); + $this->assertFalse($this->dispatcher->hasListeners(self::preFoo)); + $this->assertFalse($this->dispatcher->hasListeners(self::postFoo)); + } + + public function testAddListener() + { + $this->dispatcher->addListener('pre.foo', [$this->listener, 'preFoo']); + $this->dispatcher->addListener('post.foo', [$this->listener, 'postFoo']); + $this->assertTrue($this->dispatcher->hasListeners()); + $this->assertTrue($this->dispatcher->hasListeners(self::preFoo)); + $this->assertTrue($this->dispatcher->hasListeners(self::postFoo)); + $this->assertCount(1, $this->dispatcher->getListeners(self::preFoo)); + $this->assertCount(1, $this->dispatcher->getListeners(self::postFoo)); + $this->assertCount(2, $this->dispatcher->getListeners()); + } + + public function testGetListenersSortsByPriority() + { + $listener1 = new TestEventListener(); + $listener2 = new TestEventListener(); + $listener3 = new TestEventListener(); + $listener1->name = '1'; + $listener2->name = '2'; + $listener3->name = '3'; + + $this->dispatcher->addListener('pre.foo', [$listener1, 'preFoo'], -10); + $this->dispatcher->addListener('pre.foo', [$listener2, 'preFoo'], 10); + $this->dispatcher->addListener('pre.foo', [$listener3, 'preFoo']); + + $expected = [ + [$listener2, 'preFoo'], + [$listener3, 'preFoo'], + [$listener1, 'preFoo'], + ]; + + $this->assertSame($expected, $this->dispatcher->getListeners('pre.foo')); + } + + public function testGetAllListenersSortsByPriority() + { + $listener1 = new TestEventListener(); + $listener2 = new TestEventListener(); + $listener3 = new TestEventListener(); + $listener4 = new TestEventListener(); + $listener5 = new TestEventListener(); + $listener6 = new TestEventListener(); + + $this->dispatcher->addListener('pre.foo', $listener1, -10); + $this->dispatcher->addListener('pre.foo', $listener2); + $this->dispatcher->addListener('pre.foo', $listener3, 10); + $this->dispatcher->addListener('post.foo', $listener4, -10); + $this->dispatcher->addListener('post.foo', $listener5); + $this->dispatcher->addListener('post.foo', $listener6, 10); + + $expected = [ + 'pre.foo' => [$listener3, $listener2, $listener1], + 'post.foo' => [$listener6, $listener5, $listener4], + ]; + + $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', [$this->listener, 'preFoo']); + $this->dispatcher->addListener('post.foo', [$this->listener, 'postFoo']); + $this->dispatcher->dispatch(new Event(), self::preFoo); + $this->assertTrue($this->listener->preFooInvoked); + $this->assertFalse($this->listener->postFooInvoked); + $this->assertInstanceOf('Symfony\Component\EventDispatcher\Event', $this->dispatcher->dispatch(new Event(), 'noevent')); + $this->assertInstanceOf('Symfony\Component\EventDispatcher\Event', $this->dispatcher->dispatch(new Event(), self::preFoo)); + $event = new Event(); + $return = $this->dispatcher->dispatch($event, self::preFoo); + $this->assertSame($event, $return); + } + + public function testDispatchContractsEvent() + { + $this->dispatcher->addListener('pre.foo', [$this->listener, 'preFoo']); + $this->dispatcher->addListener('post.foo', [$this->listener, 'postFoo']); + $this->dispatcher->dispatch(new ContractsEvent(), self::preFoo); + $this->assertTrue($this->listener->preFooInvoked); + $this->assertFalse($this->listener->postFooInvoked); + $this->assertInstanceOf('Symfony\Component\EventDispatcher\Event', $this->dispatcher->dispatch(new Event(), 'noevent')); + $this->assertInstanceOf('Symfony\Component\EventDispatcher\Event', $this->dispatcher->dispatch(new Event(), self::preFoo)); + $event = new Event(); + $return = $this->dispatcher->dispatch($event, self::preFoo); + $this->assertSame($event, $return); + } + + public function testDispatchForClosure() + { + $invoked = 0; + $listener = function () use (&$invoked) { + ++$invoked; + }; + $this->dispatcher->addListener('pre.foo', $listener); + $this->dispatcher->addListener('post.foo', $listener); + $this->dispatcher->dispatch(new Event(), self::preFoo); + $this->assertEquals(1, $invoked); + } + + public function testStopEventPropagation() + { + $otherListener = new TestEventListener(); + + // postFoo() stops the propagation, so only one listener should + // be executed + // Manually set priority to enforce $this->listener to be called first + $this->dispatcher->addListener('post.foo', [$this->listener, 'postFoo'], 10); + $this->dispatcher->addListener('post.foo', [$otherListener, 'postFoo']); + $this->dispatcher->dispatch(new Event(), self::postFoo); + $this->assertTrue($this->listener->postFooInvoked); + $this->assertFalse($otherListener->postFooInvoked); + } + + public function testDispatchByPriority() + { + $invoked = []; + $listener1 = function () use (&$invoked) { + $invoked[] = '1'; + }; + $listener2 = function () use (&$invoked) { + $invoked[] = '2'; + }; + $listener3 = function () use (&$invoked) { + $invoked[] = '3'; + }; + $this->dispatcher->addListener('pre.foo', $listener1, -10); + $this->dispatcher->addListener('pre.foo', $listener2); + $this->dispatcher->addListener('pre.foo', $listener3, 10); + $this->dispatcher->dispatch(new Event(), self::preFoo); + $this->assertEquals(['3', '2', '1'], $invoked); + } + + public function testRemoveListener() + { + $this->dispatcher->addListener('pre.bar', $this->listener); + $this->assertTrue($this->dispatcher->hasListeners(self::preBar)); + $this->dispatcher->removeListener('pre.bar', $this->listener); + $this->assertFalse($this->dispatcher->hasListeners(self::preBar)); + $this->dispatcher->removeListener('notExists', $this->listener); + } + + public function testAddSubscriber() + { + $eventSubscriber = new TestEventSubscriber(); + $this->dispatcher->addSubscriber($eventSubscriber); + $this->assertTrue($this->dispatcher->hasListeners(self::preFoo)); + $this->assertTrue($this->dispatcher->hasListeners(self::postFoo)); + } + + public function testAddSubscriberWithPriorities() + { + $eventSubscriber = new TestEventSubscriber(); + $this->dispatcher->addSubscriber($eventSubscriber); + + $eventSubscriber = new TestEventSubscriberWithPriorities(); + $this->dispatcher->addSubscriber($eventSubscriber); + + $listeners = $this->dispatcher->getListeners('pre.foo'); + $this->assertTrue($this->dispatcher->hasListeners(self::preFoo)); + $this->assertCount(2, $listeners); + $this->assertInstanceOf('Symfony\Component\EventDispatcher\Tests\TestEventSubscriberWithPriorities', $listeners[0][0]); + } + + public function testAddSubscriberWithMultipleListeners() + { + $eventSubscriber = new TestEventSubscriberWithMultipleListeners(); + $this->dispatcher->addSubscriber($eventSubscriber); + + $listeners = $this->dispatcher->getListeners('pre.foo'); + $this->assertTrue($this->dispatcher->hasListeners(self::preFoo)); + $this->assertCount(2, $listeners); + $this->assertEquals('preFoo2', $listeners[0][1]); + } + + public function testRemoveSubscriber() + { + $eventSubscriber = new TestEventSubscriber(); + $this->dispatcher->addSubscriber($eventSubscriber); + $this->assertTrue($this->dispatcher->hasListeners(self::preFoo)); + $this->assertTrue($this->dispatcher->hasListeners(self::postFoo)); + $this->dispatcher->removeSubscriber($eventSubscriber); + $this->assertFalse($this->dispatcher->hasListeners(self::preFoo)); + $this->assertFalse($this->dispatcher->hasListeners(self::postFoo)); + } + + public function testRemoveSubscriberWithPriorities() + { + $eventSubscriber = new TestEventSubscriberWithPriorities(); + $this->dispatcher->addSubscriber($eventSubscriber); + $this->assertTrue($this->dispatcher->hasListeners(self::preFoo)); + $this->dispatcher->removeSubscriber($eventSubscriber); + $this->assertFalse($this->dispatcher->hasListeners(self::preFoo)); + } + + public function testRemoveSubscriberWithMultipleListeners() + { + $eventSubscriber = new TestEventSubscriberWithMultipleListeners(); + $this->dispatcher->addSubscriber($eventSubscriber); + $this->assertTrue($this->dispatcher->hasListeners(self::preFoo)); + $this->assertCount(2, $this->dispatcher->getListeners(self::preFoo)); + $this->dispatcher->removeSubscriber($eventSubscriber); + $this->assertFalse($this->dispatcher->hasListeners(self::preFoo)); + } + + public function testEventReceivesTheDispatcherInstanceAsArgument() + { + $listener = new TestWithDispatcher(); + $this->dispatcher->addListener('test', [$listener, 'foo']); + $this->assertNull($listener->name); + $this->assertNull($listener->dispatcher); + $this->dispatcher->dispatch(new Event(), 'test'); + $this->assertEquals('test', $listener->name); + $this->assertSame($this->dispatcher, $listener->dispatcher); + } + + /** + * @see https://bugs.php.net/bug.php?id=62976 + * + * This bug affects: + * - The PHP 5.3 branch for versions < 5.3.18 + * - The PHP 5.4 branch for versions < 5.4.8 + * - The PHP 5.5 branch is not affected + */ + public function testWorkaroundForPhpBug62976() + { + $dispatcher = $this->createEventDispatcher(); + $dispatcher->addListener('bug.62976', new CallableClass()); + $dispatcher->removeListener('bug.62976', function () {}); + $this->assertTrue($dispatcher->hasListeners('bug.62976')); + } + + public function testHasListenersWhenAddedCallbackListenerIsRemoved() + { + $listener = function () {}; + $this->dispatcher->addListener('foo', $listener); + $this->dispatcher->removeListener('foo', $listener); + $this->assertFalse($this->dispatcher->hasListeners()); + } + + public function testGetListenersWhenAddedCallbackListenerIsRemoved() + { + $listener = function () {}; + $this->dispatcher->addListener('foo', $listener); + $this->dispatcher->removeListener('foo', $listener); + $this->assertSame([], $this->dispatcher->getListeners()); + } + + public function testHasListenersWithoutEventsReturnsFalseAfterHasListenersWithEventHasBeenCalled() + { + $this->assertFalse($this->dispatcher->hasListeners('foo')); + $this->assertFalse($this->dispatcher->hasListeners()); + } + + public function testHasListenersIsLazy() + { + $called = 0; + $listener = [function () use (&$called) { ++$called; }, 'onFoo']; + $this->dispatcher->addListener('foo', $listener); + $this->assertTrue($this->dispatcher->hasListeners()); + $this->assertTrue($this->dispatcher->hasListeners('foo')); + $this->assertSame(0, $called); + } + + public function testDispatchLazyListener() + { + $called = 0; + $factory = function () use (&$called) { + ++$called; + + return new TestWithDispatcher(); + }; + $this->dispatcher->addListener('foo', [$factory, 'foo']); + $this->assertSame(0, $called); + $this->dispatcher->dispatch(new Event(), 'foo'); + $this->dispatcher->dispatch(new Event(), 'foo'); + $this->assertSame(1, $called); + } + + public function testRemoveFindsLazyListeners() + { + $test = new TestWithDispatcher(); + $factory = function () use ($test) { return $test; }; + + $this->dispatcher->addListener('foo', [$factory, 'foo']); + $this->assertTrue($this->dispatcher->hasListeners('foo')); + $this->dispatcher->removeListener('foo', [$test, 'foo']); + $this->assertFalse($this->dispatcher->hasListeners('foo')); + + $this->dispatcher->addListener('foo', [$test, 'foo']); + $this->assertTrue($this->dispatcher->hasListeners('foo')); + $this->dispatcher->removeListener('foo', [$factory, 'foo']); + $this->assertFalse($this->dispatcher->hasListeners('foo')); + } + + public function testPriorityFindsLazyListeners() + { + $test = new TestWithDispatcher(); + $factory = function () use ($test) { return $test; }; + + $this->dispatcher->addListener('foo', [$factory, 'foo'], 3); + $this->assertSame(3, $this->dispatcher->getListenerPriority('foo', [$test, 'foo'])); + $this->dispatcher->removeListener('foo', [$factory, 'foo']); + + $this->dispatcher->addListener('foo', [$test, 'foo'], 5); + $this->assertSame(5, $this->dispatcher->getListenerPriority('foo', [$factory, 'foo'])); + } + + public function testGetLazyListeners() + { + $test = new TestWithDispatcher(); + $factory = function () use ($test) { return $test; }; + + $this->dispatcher->addListener('foo', [$factory, 'foo'], 3); + $this->assertSame([[$test, 'foo']], $this->dispatcher->getListeners('foo')); + + $this->dispatcher->removeListener('foo', [$test, 'foo']); + $this->dispatcher->addListener('bar', [$factory, 'foo'], 3); + $this->assertSame(['bar' => [[$test, 'foo']]], $this->dispatcher->getListeners()); + } + + public function testMutatingWhilePropagationIsStopped() + { + $testLoaded = false; + $test = new TestEventListener(); + $this->dispatcher->addListener('foo', [$test, 'postFoo']); + $this->dispatcher->addListener('foo', [function () use ($test, &$testLoaded) { + $testLoaded = true; + + return $test; + }, 'preFoo']); + + $this->dispatcher->dispatch(new Event(), 'foo'); + + $this->assertTrue($test->postFooInvoked); + $this->assertFalse($test->preFooInvoked); + + $this->assertsame(0, $this->dispatcher->getListenerPriority('foo', [$test, 'preFoo'])); + + $test->preFoo(new Event()); + $this->dispatcher->dispatch(new Event(), 'foo'); + + $this->assertTrue($testLoaded); + } +} + +class CallableClass +{ + public function __invoke() + { + } +} + +class TestEventListener +{ + public $preFooInvoked = false; + public $postFooInvoked = false; + + /* Listener methods */ + + public function preFoo($e) + { + $this->preFooInvoked = true; + } + + public function postFoo($e) + { + $this->postFooInvoked = true; + + if (!$this->preFooInvoked) { + $e->stopPropagation(); + } + } +} + +class TestWithDispatcher +{ + public $name; + public $dispatcher; + + public function foo($e, $name, $dispatcher) + { + $this->name = $name; + $this->dispatcher = $dispatcher; + } +} + +class TestEventSubscriber implements EventSubscriberInterface +{ + public static function getSubscribedEvents() + { + return ['pre.foo' => 'preFoo', 'post.foo' => 'postFoo']; + } +} + +class TestEventSubscriberWithPriorities implements EventSubscriberInterface +{ + public static function getSubscribedEvents() + { + return [ + 'pre.foo' => ['preFoo', 10], + 'post.foo' => ['postFoo'], + ]; + } +} + +class TestEventSubscriberWithMultipleListeners implements EventSubscriberInterface +{ + public static function getSubscribedEvents() + { + return ['pre.foo' => [ + ['preFoo1'], + ['preFoo2', 10], + ]]; + } } diff --git a/vendor/symfony/event-dispatcher/Tests/EventTest.php b/vendor/symfony/event-dispatcher/Tests/EventTest.php index 5be2ea09..ca8e945c 100644 --- a/vendor/symfony/event-dispatcher/Tests/EventTest.php +++ b/vendor/symfony/event-dispatcher/Tests/EventTest.php @@ -15,7 +15,7 @@ use PHPUnit\Framework\TestCase; use Symfony\Component\EventDispatcher\Event; /** - * Test class for Event. + * @group legacy */ class EventTest extends TestCase { diff --git a/vendor/symfony/event-dispatcher/Tests/GenericEventTest.php b/vendor/symfony/event-dispatcher/Tests/GenericEventTest.php index b63f69df..e9e011a2 100644 --- a/vendor/symfony/event-dispatcher/Tests/GenericEventTest.php +++ b/vendor/symfony/event-dispatcher/Tests/GenericEventTest.php @@ -32,7 +32,7 @@ class GenericEventTest extends TestCase protected function setUp() { $this->subject = new \stdClass(); - $this->event = new GenericEvent($this->subject, array('name' => 'Event')); + $this->event = new GenericEvent($this->subject, ['name' => 'Event']); } /** @@ -46,7 +46,7 @@ class GenericEventTest extends TestCase public function testConstruct() { - $this->assertEquals($this->event, new GenericEvent($this->subject, array('name' => 'Event'))); + $this->assertEquals($this->event, new GenericEvent($this->subject, ['name' => 'Event'])); } /** @@ -55,20 +55,20 @@ class GenericEventTest extends TestCase public function testGetArguments() { // test getting all - $this->assertSame(array('name' => 'Event'), $this->event->getArguments()); + $this->assertSame(['name' => 'Event'], $this->event->getArguments()); } public function testSetArguments() { - $result = $this->event->setArguments(array('foo' => 'bar')); - $this->assertAttributeSame(array('foo' => 'bar'), 'arguments', $this->event); + $result = $this->event->setArguments(['foo' => 'bar']); + $this->assertAttributeSame(['foo' => 'bar'], 'arguments', $this->event); $this->assertSame($this->event, $result); } public function testSetArgument() { $result = $this->event->setArgument('foo2', 'bar2'); - $this->assertAttributeSame(array('name' => 'Event', 'foo2' => 'bar2'), 'arguments', $this->event); + $this->assertAttributeSame(['name' => 'Event', 'foo2' => 'bar2'], 'arguments', $this->event); $this->assertEquals($this->event, $result); } @@ -92,20 +92,20 @@ class GenericEventTest extends TestCase $this->assertEquals('Event', $this->event['name']); // test getting invalid arg - $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('InvalidArgumentException'); + $this->expectException('InvalidArgumentException'); $this->assertFalse($this->event['nameNotExist']); } public function testOffsetSet() { $this->event['foo2'] = 'bar2'; - $this->assertAttributeSame(array('name' => 'Event', 'foo2' => 'bar2'), 'arguments', $this->event); + $this->assertAttributeSame(['name' => 'Event', 'foo2' => 'bar2'], 'arguments', $this->event); } public function testOffsetUnset() { unset($this->event['name']); - $this->assertAttributeSame(array(), 'arguments', $this->event); + $this->assertAttributeSame([], 'arguments', $this->event); } public function testOffsetIsset() @@ -127,10 +127,10 @@ class GenericEventTest extends TestCase public function testHasIterator() { - $data = array(); + $data = []; foreach ($this->event as $key => $value) { $data[$key] = $value; } - $this->assertEquals(array('name' => 'Event'), $data); + $this->assertEquals(['name' => 'Event'], $data); } } diff --git a/vendor/symfony/event-dispatcher/Tests/ImmutableEventDispatcherTest.php b/vendor/symfony/event-dispatcher/Tests/ImmutableEventDispatcherTest.php index 04f2861e..f6556f0b 100644 --- a/vendor/symfony/event-dispatcher/Tests/ImmutableEventDispatcherTest.php +++ b/vendor/symfony/event-dispatcher/Tests/ImmutableEventDispatcherTest.php @@ -42,10 +42,10 @@ class ImmutableEventDispatcherTest extends TestCase $this->innerDispatcher->expects($this->once()) ->method('dispatch') - ->with('event', $event) - ->will($this->returnValue('result')); + ->with($event, 'event') + ->willReturn('result'); - $this->assertSame('result', $this->dispatcher->dispatch('event', $event)); + $this->assertSame('result', $this->dispatcher->dispatch($event, 'event')); } public function testGetListenersDelegates() @@ -53,7 +53,7 @@ class ImmutableEventDispatcherTest extends TestCase $this->innerDispatcher->expects($this->once()) ->method('getListeners') ->with('event') - ->will($this->returnValue('result')); + ->willReturn('result'); $this->assertSame('result', $this->dispatcher->getListeners('event')); } @@ -63,7 +63,7 @@ class ImmutableEventDispatcherTest extends TestCase $this->innerDispatcher->expects($this->once()) ->method('hasListeners') ->with('event') - ->will($this->returnValue('result')); + ->willReturn('result'); $this->assertSame('result', $this->dispatcher->hasListeners('event')); } diff --git a/vendor/symfony/event-dispatcher/Tests/LegacyEventDispatcherTest.php b/vendor/symfony/event-dispatcher/Tests/LegacyEventDispatcherTest.php new file mode 100644 index 00000000..49aa2f9f --- /dev/null +++ b/vendor/symfony/event-dispatcher/Tests/LegacyEventDispatcherTest.php @@ -0,0 +1,35 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\EventDispatcher\Tests; + +use Symfony\Component\EventDispatcher\Event; +use Symfony\Component\EventDispatcher\EventDispatcher; +use Symfony\Component\EventDispatcher\LegacyEventDispatcherProxy; + +/** + * @group legacy + */ +class LegacyEventDispatcherTest extends EventDispatcherTest +{ + protected function createEventDispatcher() + { + return LegacyEventDispatcherProxy::decorate(new TestLegacyEventDispatcher()); + } +} + +class TestLegacyEventDispatcher extends EventDispatcher +{ + public function dispatch($eventName, Event $event = null) + { + return parent::dispatch($event, $eventName); + } +} diff --git a/vendor/symfony/event-dispatcher/composer.json b/vendor/symfony/event-dispatcher/composer.json index 6c75dfbb..8449c478 100644 --- a/vendor/symfony/event-dispatcher/composer.json +++ b/vendor/symfony/event-dispatcher/composer.json @@ -17,18 +17,24 @@ ], "require": { "php": "^7.1.3", - "symfony/contracts": "^1.0" + "symfony/event-dispatcher-contracts": "^1.1" }, "require-dev": { "symfony/dependency-injection": "~3.4|~4.0", "symfony/expression-language": "~3.4|~4.0", "symfony/config": "~3.4|~4.0", + "symfony/http-foundation": "^3.4|^4.0", + "symfony/service-contracts": "^1.1", "symfony/stopwatch": "~3.4|~4.0", "psr/log": "~1.0" }, "conflict": { "symfony/dependency-injection": "<3.4" }, + "provide": { + "psr/event-dispatcher-implementation": "1.0", + "symfony/event-dispatcher-implementation": "1.1" + }, "suggest": { "symfony/dependency-injection": "", "symfony/http-kernel": "" @@ -42,7 +48,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "4.2-dev" + "dev-master": "4.3-dev" } } } diff --git a/vendor/symfony/finder/CHANGELOG.md b/vendor/symfony/finder/CHANGELOG.md index 9abccfc2..2045184e 100644 --- a/vendor/symfony/finder/CHANGELOG.md +++ b/vendor/symfony/finder/CHANGELOG.md @@ -1,6 +1,11 @@ CHANGELOG ========= +4.3.0 +----- + + * added Finder::ignoreVCSIgnored() to ignore files based on rules listed in .gitignore + 4.2.0 ----- diff --git a/vendor/symfony/finder/Comparator/Comparator.php b/vendor/symfony/finder/Comparator/Comparator.php index ea37566d..6aee21cf 100644 --- a/vendor/symfony/finder/Comparator/Comparator.php +++ b/vendor/symfony/finder/Comparator/Comparator.php @@ -64,7 +64,7 @@ class Comparator $operator = '=='; } - if (!\in_array($operator, array('>', '<', '>=', '<=', '==', '!='))) { + if (!\in_array($operator, ['>', '<', '>=', '<=', '==', '!='])) { throw new \InvalidArgumentException(sprintf('Invalid operator "%s".', $operator)); } diff --git a/vendor/symfony/finder/Exception/DirectoryNotFoundException.php b/vendor/symfony/finder/Exception/DirectoryNotFoundException.php new file mode 100644 index 00000000..c6cc0f27 --- /dev/null +++ b/vendor/symfony/finder/Exception/DirectoryNotFoundException.php @@ -0,0 +1,19 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Finder\Exception; + +/** + * @author Andreas Erhard + */ +class DirectoryNotFoundException extends \InvalidArgumentException +{ +} diff --git a/vendor/symfony/finder/Finder.php b/vendor/symfony/finder/Finder.php index 993f9e34..33b18059 100644 --- a/vendor/symfony/finder/Finder.php +++ b/vendor/symfony/finder/Finder.php @@ -13,6 +13,7 @@ namespace Symfony\Component\Finder; use Symfony\Component\Finder\Comparator\DateComparator; use Symfony\Component\Finder\Comparator\NumberComparator; +use Symfony\Component\Finder\Exception\DirectoryNotFoundException; use Symfony\Component\Finder\Iterator\CustomFilterIterator; use Symfony\Component\Finder\Iterator\DateRangeFilterIterator; use Symfony\Component\Finder\Iterator\DepthRangeFilterIterator; @@ -29,7 +30,7 @@ use Symfony\Component\Finder\Iterator\SortableIterator; * * All rules may be invoked several times. * - * All methods return the current Finder object to allow easy chaining: + * All methods return the current Finder object to allow chaining: * * $finder = Finder::create()->files()->name('*.php')->in(__DIR__); * @@ -39,28 +40,29 @@ class Finder implements \IteratorAggregate, \Countable { const IGNORE_VCS_FILES = 1; const IGNORE_DOT_FILES = 2; + const IGNORE_VCS_IGNORED_FILES = 4; private $mode = 0; - private $names = array(); - private $notNames = array(); - private $exclude = array(); - private $filters = array(); - private $depths = array(); - private $sizes = array(); + private $names = []; + private $notNames = []; + private $exclude = []; + private $filters = []; + private $depths = []; + private $sizes = []; private $followLinks = false; private $reverseSorting = false; private $sort = false; private $ignore = 0; - private $dirs = array(); - private $dates = array(); - private $iterators = array(); - private $contains = array(); - private $notContains = array(); - private $paths = array(); - private $notPaths = array(); + private $dirs = []; + private $dates = []; + private $iterators = []; + private $contains = []; + private $notContains = []; + private $paths = []; + private $notPaths = []; private $ignoreUnreadableDirs = false; - private static $vcsPatterns = array('.svn', '_svn', 'CVS', '_darcs', '.arch-params', '.monotone', '.bzr', '.git', '.hg'); + private static $vcsPatterns = ['.svn', '_svn', 'CVS', '_darcs', '.arch-params', '.monotone', '.bzr', '.git', '.hg']; public function __construct() { @@ -373,6 +375,24 @@ class Finder implements \IteratorAggregate, \Countable return $this; } + /** + * Forces Finder to obey .gitignore and ignore files based on rules listed there. + * + * This option is disabled by default. + * + * @return $this + */ + public function ignoreVCSIgnored(bool $ignoreVCSIgnored) + { + if ($ignoreVCSIgnored) { + $this->ignore |= static::IGNORE_VCS_IGNORED_FILES; + } else { + $this->ignore &= ~static::IGNORE_VCS_IGNORED_FILES; + } + + return $this; + } + /** * Adds VCS patterns. * @@ -566,19 +586,19 @@ class Finder implements \IteratorAggregate, \Countable * * @return $this * - * @throws \InvalidArgumentException if one of the directories does not exist + * @throws DirectoryNotFoundException if one of the directories does not exist */ public function in($dirs) { - $resolvedDirs = array(); + $resolvedDirs = []; foreach ((array) $dirs as $dir) { if (is_dir($dir)) { $resolvedDirs[] = $this->normalizeDir($dir); } elseif ($glob = glob($dir, (\defined('GLOB_BRACE') ? GLOB_BRACE : 0) | GLOB_ONLYDIR)) { - $resolvedDirs = array_merge($resolvedDirs, array_map(array($this, 'normalizeDir'), $glob)); + $resolvedDirs = array_merge($resolvedDirs, array_map([$this, 'normalizeDir'], $glob)); } else { - throw new \InvalidArgumentException(sprintf('The "%s" directory does not exist.', $dir)); + throw new DirectoryNotFoundException(sprintf('The "%s" directory does not exist.', $dir)); } } @@ -674,12 +694,23 @@ class Finder implements \IteratorAggregate, \Countable private function searchInDirectory(string $dir): \Iterator { + $exclude = $this->exclude; + $notPaths = $this->notPaths; + if (static::IGNORE_VCS_FILES === (static::IGNORE_VCS_FILES & $this->ignore)) { - $this->exclude = array_merge($this->exclude, self::$vcsPatterns); + $exclude = array_merge($exclude, self::$vcsPatterns); } if (static::IGNORE_DOT_FILES === (static::IGNORE_DOT_FILES & $this->ignore)) { - $this->notPaths[] = '#(^|/)\..+(/|$)#'; + $notPaths[] = '#(^|/)\..+(/|$)#'; + } + + if (static::IGNORE_VCS_IGNORED_FILES === (static::IGNORE_VCS_IGNORED_FILES & $this->ignore)) { + $gitignoreFilePath = sprintf('%s/.gitignore', $dir); + if (!is_readable($gitignoreFilePath)) { + throw new \RuntimeException(sprintf('The "ignoreVCSIgnored" option cannot be used by the Finder as the "%s" file is not readable.', $gitignoreFilePath)); + } + $notPaths = array_merge($notPaths, [Gitignore::toRegex(file_get_contents($gitignoreFilePath))]); } $minDepth = 0; @@ -712,8 +743,8 @@ class Finder implements \IteratorAggregate, \Countable $iterator = new Iterator\RecursiveDirectoryIterator($dir, $flags, $this->ignoreUnreadableDirs); - if ($this->exclude) { - $iterator = new Iterator\ExcludeDirectoryFilterIterator($iterator, $this->exclude); + if ($exclude) { + $iterator = new Iterator\ExcludeDirectoryFilterIterator($iterator, $exclude); } $iterator = new \RecursiveIteratorIterator($iterator, \RecursiveIteratorIterator::SELF_FIRST); @@ -746,8 +777,8 @@ class Finder implements \IteratorAggregate, \Countable $iterator = new Iterator\CustomFilterIterator($iterator, $this->filters); } - if ($this->paths || $this->notPaths) { - $iterator = new Iterator\PathFilterIterator($iterator, $this->paths, $this->notPaths); + if ($this->paths || $notPaths) { + $iterator = new Iterator\PathFilterIterator($iterator, $this->paths, $notPaths); } if ($this->sort || $this->reverseSorting) { diff --git a/vendor/symfony/finder/Gitignore.php b/vendor/symfony/finder/Gitignore.php new file mode 100644 index 00000000..fbeabdbd --- /dev/null +++ b/vendor/symfony/finder/Gitignore.php @@ -0,0 +1,107 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Finder; + +/** + * Gitignore matches against text. + * + * @author Ahmed Abdou + */ +class Gitignore +{ + /** + * Returns a regexp which is the equivalent of the gitignore pattern. + * + * @param string $gitignoreFileContent + * + * @return string The regexp + */ + public static function toRegex(string $gitignoreFileContent): string + { + $gitignoreFileContent = preg_replace('/^[^\\\\]*#.*/', '', $gitignoreFileContent); + $gitignoreLines = preg_split('/\r\n|\r|\n/', $gitignoreFileContent); + $gitignoreLines = array_map('trim', $gitignoreLines); + $gitignoreLines = array_filter($gitignoreLines); + + $ignoreLinesPositive = array_filter($gitignoreLines, function (string $line) { + return !preg_match('/^!/', $line); + }); + + $ignoreLinesNegative = array_filter($gitignoreLines, function (string $line) { + return preg_match('/^!/', $line); + }); + + $ignoreLinesNegative = array_map(function (string $line) { + return preg_replace('/^!(.*)/', '${1}', $line); + }, $ignoreLinesNegative); + $ignoreLinesNegative = array_map([__CLASS__, 'getRegexFromGitignore'], $ignoreLinesNegative); + + $ignoreLinesPositive = array_map([__CLASS__, 'getRegexFromGitignore'], $ignoreLinesPositive); + if (empty($ignoreLinesPositive)) { + return '/^$/'; + } + + if (empty($ignoreLinesNegative)) { + return sprintf('/%s/', implode('|', $ignoreLinesPositive)); + } + + return sprintf('/(?=^(?:(?!(%s)).)*$)(%s)/', implode('|', $ignoreLinesNegative), implode('|', $ignoreLinesPositive)); + } + + private static function getRegexFromGitignore(string $gitignorePattern): string + { + $regex = '('; + if (0 === strpos($gitignorePattern, '/')) { + $gitignorePattern = substr($gitignorePattern, 1); + $regex .= '^'; + } else { + $regex .= '(^|\/)'; + } + + if ('/' === $gitignorePattern[\strlen($gitignorePattern) - 1]) { + $gitignorePattern = substr($gitignorePattern, 0, -1); + } + + $iMax = \strlen($gitignorePattern); + for ($i = 0; $i < $iMax; ++$i) { + $doubleChars = substr($gitignorePattern, $i, 2); + if ('**' === $doubleChars) { + $regex .= '.+'; + ++$i; + continue; + } + + $c = $gitignorePattern[$i]; + switch ($c) { + case '*': + $regex .= '[^\/]+'; + break; + case '/': + case '.': + case ':': + case '(': + case ')': + case '{': + case '}': + $regex .= '\\'.$c; + break; + default: + $regex .= $c; + } + } + + $regex .= '($|\/)'; + $regex .= ')'; + + return $regex; + } +} diff --git a/vendor/symfony/finder/Glob.php b/vendor/symfony/finder/Glob.php index 27d9ce3d..ea76d51a 100644 --- a/vendor/symfony/finder/Glob.php +++ b/vendor/symfony/finder/Glob.php @@ -18,7 +18,7 @@ namespace Symfony\Component\Finder; * * // prints foo.bar and foo.baz * $regex = glob_to_regex("foo.*"); - * for (array('foo.bar', 'foo.baz', 'foo', 'bar') as $t) + * for (['foo.bar', 'foo.baz', 'foo', 'bar'] as $t) * { * if (/$regex/) echo "matched: $car\n"; * } diff --git a/vendor/symfony/finder/Iterator/CustomFilterIterator.php b/vendor/symfony/finder/Iterator/CustomFilterIterator.php index 6359727d..a30bbd0b 100644 --- a/vendor/symfony/finder/Iterator/CustomFilterIterator.php +++ b/vendor/symfony/finder/Iterator/CustomFilterIterator.php @@ -21,7 +21,7 @@ namespace Symfony\Component\Finder\Iterator; */ class CustomFilterIterator extends \FilterIterator { - private $filters = array(); + private $filters = []; /** * @param \Iterator $iterator The Iterator to filter diff --git a/vendor/symfony/finder/Iterator/DateRangeFilterIterator.php b/vendor/symfony/finder/Iterator/DateRangeFilterIterator.php index c08e0a16..2e97e00d 100644 --- a/vendor/symfony/finder/Iterator/DateRangeFilterIterator.php +++ b/vendor/symfony/finder/Iterator/DateRangeFilterIterator.php @@ -20,7 +20,7 @@ use Symfony\Component\Finder\Comparator\DateComparator; */ class DateRangeFilterIterator extends \FilterIterator { - private $comparators = array(); + private $comparators = []; /** * @param \Iterator $iterator The Iterator to filter diff --git a/vendor/symfony/finder/Iterator/ExcludeDirectoryFilterIterator.php b/vendor/symfony/finder/Iterator/ExcludeDirectoryFilterIterator.php index d2d41f4a..3c5a3f0e 100644 --- a/vendor/symfony/finder/Iterator/ExcludeDirectoryFilterIterator.php +++ b/vendor/symfony/finder/Iterator/ExcludeDirectoryFilterIterator.php @@ -20,7 +20,7 @@ class ExcludeDirectoryFilterIterator extends \FilterIterator implements \Recursi { private $iterator; private $isRecursive; - private $excludedDirs = array(); + private $excludedDirs = []; private $excludedPattern; /** @@ -31,7 +31,7 @@ class ExcludeDirectoryFilterIterator extends \FilterIterator implements \Recursi { $this->iterator = $iterator; $this->isRecursive = $iterator instanceof \RecursiveIterator; - $patterns = array(); + $patterns = []; foreach ($directories as $directory) { $directory = rtrim($directory, '/'); if (!$this->isRecursive || false !== strpos($directory, '/')) { @@ -75,7 +75,7 @@ class ExcludeDirectoryFilterIterator extends \FilterIterator implements \Recursi public function getChildren() { - $children = new self($this->iterator->getChildren(), array()); + $children = new self($this->iterator->getChildren(), []); $children->excludedDirs = $this->excludedDirs; $children->excludedPattern = $this->excludedPattern; diff --git a/vendor/symfony/finder/Iterator/MultiplePcreFilterIterator.php b/vendor/symfony/finder/Iterator/MultiplePcreFilterIterator.php index b94e1d43..18b082ec 100644 --- a/vendor/symfony/finder/Iterator/MultiplePcreFilterIterator.php +++ b/vendor/symfony/finder/Iterator/MultiplePcreFilterIterator.php @@ -18,8 +18,8 @@ namespace Symfony\Component\Finder\Iterator; */ abstract class MultiplePcreFilterIterator extends \FilterIterator { - protected $matchRegexps = array(); - protected $noMatchRegexps = array(); + protected $matchRegexps = []; + protected $noMatchRegexps = []; /** * @param \Iterator $iterator The Iterator to filter @@ -91,7 +91,7 @@ abstract class MultiplePcreFilterIterator extends \FilterIterator return !preg_match('/[*?[:alnum:] \\\\]/', $start); } - foreach (array(array('{', '}'), array('(', ')'), array('[', ']'), array('<', '>')) as $delimiters) { + foreach ([['{', '}'], ['(', ')'], ['[', ']'], ['<', '>']] as $delimiters) { if ($start === $delimiters[0] && $end === $delimiters[1]) { return true; } diff --git a/vendor/symfony/finder/Iterator/RecursiveDirectoryIterator.php b/vendor/symfony/finder/Iterator/RecursiveDirectoryIterator.php index 844ba469..3facef58 100644 --- a/vendor/symfony/finder/Iterator/RecursiveDirectoryIterator.php +++ b/vendor/symfony/finder/Iterator/RecursiveDirectoryIterator.php @@ -96,7 +96,7 @@ class RecursiveDirectoryIterator extends \RecursiveDirectoryIterator } catch (\UnexpectedValueException $e) { if ($this->ignoreUnreadableDirs) { // If directory is unreadable and finder is set to ignore it, a fake empty content is returned. - return new \RecursiveArrayIterator(array()); + return new \RecursiveArrayIterator([]); } else { throw new AccessDeniedException($e->getMessage(), $e->getCode(), $e); } diff --git a/vendor/symfony/finder/Iterator/SizeRangeFilterIterator.php b/vendor/symfony/finder/Iterator/SizeRangeFilterIterator.php index a68666b4..2aeef67b 100644 --- a/vendor/symfony/finder/Iterator/SizeRangeFilterIterator.php +++ b/vendor/symfony/finder/Iterator/SizeRangeFilterIterator.php @@ -20,7 +20,7 @@ use Symfony\Component\Finder\Comparator\NumberComparator; */ class SizeRangeFilterIterator extends \FilterIterator { - private $comparators = array(); + private $comparators = []; /** * @param \Iterator $iterator The Iterator to filter diff --git a/vendor/symfony/finder/Iterator/SortableIterator.php b/vendor/symfony/finder/Iterator/SortableIterator.php index 56bdcfb1..eda093fa 100644 --- a/vendor/symfony/finder/Iterator/SortableIterator.php +++ b/vendor/symfony/finder/Iterator/SortableIterator.php @@ -42,7 +42,7 @@ class SortableIterator implements \IteratorAggregate if (self::SORT_BY_NAME === $sort) { $this->sort = function ($a, $b) use ($order) { - return $order * strcmp($a->getRealpath() ?: $a->getPathname(), $b->getRealpath() ?: $b->getPathname()); + return $order * strcmp($a->getRealPath() ?: $a->getPathname(), $b->getRealPath() ?: $b->getPathname()); }; } elseif (self::SORT_BY_NAME_NATURAL === $sort) { $this->sort = function ($a, $b) use ($order) { @@ -56,7 +56,7 @@ class SortableIterator implements \IteratorAggregate return $order; } - return $order * strcmp($a->getRealpath() ?: $a->getPathname(), $b->getRealpath() ?: $b->getPathname()); + return $order * strcmp($a->getRealPath() ?: $a->getPathname(), $b->getRealPath() ?: $b->getPathname()); }; } elseif (self::SORT_BY_ACCESSED_TIME === $sort) { $this->sort = function ($a, $b) use ($order) { @@ -73,7 +73,8 @@ class SortableIterator implements \IteratorAggregate } elseif (self::SORT_BY_NONE === $sort) { $this->sort = $order; } elseif (\is_callable($sort)) { - $this->sort = $reverseOrder ? function ($a, $b) use ($sort) { return -$sort($a, $b); } : $sort; + $this->sort = $reverseOrder ? function ($a, $b) use ($sort) { return -$sort($a, $b); } + : $sort; } else { throw new \InvalidArgumentException('The SortableIterator takes a PHP callable or a valid built-in sort algorithm as an argument.'); } diff --git a/vendor/symfony/finder/SplFileInfo.php b/vendor/symfony/finder/SplFileInfo.php index b8143ed7..ee798dc7 100644 --- a/vendor/symfony/finder/SplFileInfo.php +++ b/vendor/symfony/finder/SplFileInfo.php @@ -57,6 +57,13 @@ class SplFileInfo extends \SplFileInfo return $this->relativePathname; } + public function getFilenameWithoutExtension(): string + { + $filename = $this->getFilename(); + + return \pathinfo($filename, PATHINFO_FILENAME); + } + /** * Returns the contents of the file. * diff --git a/vendor/symfony/finder/Tests/Comparator/ComparatorTest.php b/vendor/symfony/finder/Tests/Comparator/ComparatorTest.php index 656fc57a..2f56092e 100644 --- a/vendor/symfony/finder/Tests/Comparator/ComparatorTest.php +++ b/vendor/symfony/finder/Tests/Comparator/ComparatorTest.php @@ -58,8 +58,8 @@ class ComparatorTest extends TestCase public function getTestData() { - return array( - array('<', '1000', array('500', '999'), array('1000', '1500')), - ); + return [ + ['<', '1000', ['500', '999'], ['1000', '1500']], + ]; } } diff --git a/vendor/symfony/finder/Tests/Comparator/DateComparatorTest.php b/vendor/symfony/finder/Tests/Comparator/DateComparatorTest.php index 8a6c1ddf..3aebf524 100644 --- a/vendor/symfony/finder/Tests/Comparator/DateComparatorTest.php +++ b/vendor/symfony/finder/Tests/Comparator/DateComparatorTest.php @@ -51,14 +51,14 @@ class DateComparatorTest extends TestCase public function getTestData() { - return array( - array('< 2005-10-10', array(strtotime('2005-10-09')), array(strtotime('2005-10-15'))), - array('until 2005-10-10', array(strtotime('2005-10-09')), array(strtotime('2005-10-15'))), - array('before 2005-10-10', array(strtotime('2005-10-09')), array(strtotime('2005-10-15'))), - array('> 2005-10-10', array(strtotime('2005-10-15')), array(strtotime('2005-10-09'))), - array('after 2005-10-10', array(strtotime('2005-10-15')), array(strtotime('2005-10-09'))), - array('since 2005-10-10', array(strtotime('2005-10-15')), array(strtotime('2005-10-09'))), - array('!= 2005-10-10', array(strtotime('2005-10-11')), array(strtotime('2005-10-10'))), - ); + return [ + ['< 2005-10-10', [strtotime('2005-10-09')], [strtotime('2005-10-15')]], + ['until 2005-10-10', [strtotime('2005-10-09')], [strtotime('2005-10-15')]], + ['before 2005-10-10', [strtotime('2005-10-09')], [strtotime('2005-10-15')]], + ['> 2005-10-10', [strtotime('2005-10-15')], [strtotime('2005-10-09')]], + ['after 2005-10-10', [strtotime('2005-10-15')], [strtotime('2005-10-09')]], + ['since 2005-10-10', [strtotime('2005-10-15')], [strtotime('2005-10-09')]], + ['!= 2005-10-10', [strtotime('2005-10-11')], [strtotime('2005-10-10')]], + ]; } } diff --git a/vendor/symfony/finder/Tests/Comparator/NumberComparatorTest.php b/vendor/symfony/finder/Tests/Comparator/NumberComparatorTest.php index 30a75c73..5b49b660 100644 --- a/vendor/symfony/finder/Tests/Comparator/NumberComparatorTest.php +++ b/vendor/symfony/finder/Tests/Comparator/NumberComparatorTest.php @@ -53,39 +53,39 @@ class NumberComparatorTest extends TestCase public function getTestData() { - return array( - array('< 1000', array('500', '999'), array('1000', '1500')), + return [ + ['< 1000', ['500', '999'], ['1000', '1500']], - array('< 1K', array('500', '999'), array('1000', '1500')), - array('<1k', array('500', '999'), array('1000', '1500')), - array(' < 1 K ', array('500', '999'), array('1000', '1500')), - array('<= 1K', array('1000'), array('1001')), - array('> 1K', array('1001'), array('1000')), - array('>= 1K', array('1000'), array('999')), + ['< 1K', ['500', '999'], ['1000', '1500']], + ['<1k', ['500', '999'], ['1000', '1500']], + [' < 1 K ', ['500', '999'], ['1000', '1500']], + ['<= 1K', ['1000'], ['1001']], + ['> 1K', ['1001'], ['1000']], + ['>= 1K', ['1000'], ['999']], - array('< 1KI', array('500', '1023'), array('1024', '1500')), - array('<= 1KI', array('1024'), array('1025')), - array('> 1KI', array('1025'), array('1024')), - array('>= 1KI', array('1024'), array('1023')), + ['< 1KI', ['500', '1023'], ['1024', '1500']], + ['<= 1KI', ['1024'], ['1025']], + ['> 1KI', ['1025'], ['1024']], + ['>= 1KI', ['1024'], ['1023']], - array('1KI', array('1024'), array('1023', '1025')), - array('==1KI', array('1024'), array('1023', '1025')), + ['1KI', ['1024'], ['1023', '1025']], + ['==1KI', ['1024'], ['1023', '1025']], - array('==1m', array('1000000'), array('999999', '1000001')), - array('==1mi', array(1024 * 1024), array(1024 * 1024 - 1, 1024 * 1024 + 1)), + ['==1m', ['1000000'], ['999999', '1000001']], + ['==1mi', [1024 * 1024], [1024 * 1024 - 1, 1024 * 1024 + 1]], - array('==1g', array('1000000000'), array('999999999', '1000000001')), - array('==1gi', array(1024 * 1024 * 1024), array(1024 * 1024 * 1024 - 1, 1024 * 1024 * 1024 + 1)), + ['==1g', ['1000000000'], ['999999999', '1000000001']], + ['==1gi', [1024 * 1024 * 1024], [1024 * 1024 * 1024 - 1, 1024 * 1024 * 1024 + 1]], - array('!= 1000', array('500', '999'), array('1000')), - ); + ['!= 1000', ['500', '999'], ['1000']], + ]; } public function getConstructorTestData() { - return array( - array( - array( + return [ + [ + [ '1', '0', '3.5', '33.55', '123.456', '123456.78', '.1', '.123', @@ -94,15 +94,15 @@ class NumberComparatorTest extends TestCase '==1', '!=1', '<1', '>1', '<=1', '>=1', '==1k', '==1ki', '==1m', '==1mi', '==1g', '==1gi', '1k', '1ki', '1m', '1mi', '1g', '1gi', - ), - array( + ], + [ false, null, '', ' ', 'foobar', '=1', '===1', '0 . 1', '123 .45', '234. 567', '..', '.0.', '0.1.2', - ), - ), - ); + ], + ], + ]; } } diff --git a/vendor/symfony/finder/Tests/FinderTest.php b/vendor/symfony/finder/Tests/FinderTest.php index cdd176d7..8d663790 100644 --- a/vendor/symfony/finder/Tests/FinderTest.php +++ b/vendor/symfony/finder/Tests/FinderTest.php @@ -24,20 +24,20 @@ class FinderTest extends Iterator\RealIteratorTestCase { $finder = $this->buildFinder(); $this->assertSame($finder, $finder->directories()); - $this->assertIterator($this->toAbsolute(array('foo', 'qux', 'toto')), $finder->in(self::$tmpDir)->getIterator()); + $this->assertIterator($this->toAbsolute(['foo', 'qux', 'toto']), $finder->in(self::$tmpDir)->getIterator()); $finder = $this->buildFinder(); $finder->directories(); $finder->files(); $finder->directories(); - $this->assertIterator($this->toAbsolute(array('foo', 'qux', 'toto')), $finder->in(self::$tmpDir)->getIterator()); + $this->assertIterator($this->toAbsolute(['foo', 'qux', 'toto']), $finder->in(self::$tmpDir)->getIterator()); } public function testFiles() { $finder = $this->buildFinder(); $this->assertSame($finder, $finder->files()); - $this->assertIterator($this->toAbsolute(array('foo/bar.tmp', + $this->assertIterator($this->toAbsolute(['foo/bar.tmp', 'test.php', 'test.py', 'foo bar', @@ -49,13 +49,13 @@ class FinderTest extends Iterator\RealIteratorTestCase 'qux_10_2.php', 'qux_12_0.php', 'qux_2_0.php', - )), $finder->in(self::$tmpDir)->getIterator()); + ]), $finder->in(self::$tmpDir)->getIterator()); $finder = $this->buildFinder(); $finder->files(); $finder->directories(); $finder->files(); - $this->assertIterator($this->toAbsolute(array('foo/bar.tmp', + $this->assertIterator($this->toAbsolute(['foo/bar.tmp', 'test.php', 'test.py', 'foo bar', @@ -67,14 +67,14 @@ class FinderTest extends Iterator\RealIteratorTestCase 'qux_10_2.php', 'qux_12_0.php', 'qux_2_0.php', - )), $finder->in(self::$tmpDir)->getIterator()); + ]), $finder->in(self::$tmpDir)->getIterator()); } public function testRemoveTrailingSlash() { $finder = $this->buildFinder(); - $expected = $this->toAbsolute(array( + $expected = $this->toAbsolute([ 'foo/bar.tmp', 'test.php', 'test.py', @@ -87,7 +87,7 @@ class FinderTest extends Iterator\RealIteratorTestCase 'qux_10_2.php', 'qux_12_0.php', 'qux_2_0.php', - )); + ]); $in = self::$tmpDir.'//'; $this->assertIterator($expected, $finder->in($in)->files()->getIterator()); @@ -102,7 +102,7 @@ class FinderTest extends Iterator\RealIteratorTestCase $finder = $this->buildFinder(); symlink($this->toAbsolute('foo'), $this->toAbsolute('baz')); - $expected = $this->toAbsolute(array('baz/bar.tmp')); + $expected = $this->toAbsolute(['baz/bar.tmp']); $in = self::$tmpDir.'/baz/'; try { $this->assertIterator($expected, $finder->in($in)->files()->getIterator()); @@ -117,7 +117,7 @@ class FinderTest extends Iterator\RealIteratorTestCase { $finder = $this->buildFinder(); - $expected = $this->toAbsolute(array('foo/../foo/bar.tmp')); + $expected = $this->toAbsolute(['foo/../foo/bar.tmp']); $in = self::$tmpDir.'/foo/../foo/'; $this->assertIterator($expected, $finder->in($in)->files()->getIterator()); } @@ -126,7 +126,7 @@ class FinderTest extends Iterator\RealIteratorTestCase { $finder = $this->buildFinder(); $this->assertSame($finder, $finder->depth('< 1')); - $this->assertIterator($this->toAbsolute(array('foo', + $this->assertIterator($this->toAbsolute(['foo', 'test.php', 'test.py', 'toto', @@ -138,11 +138,11 @@ class FinderTest extends Iterator\RealIteratorTestCase 'qux_10_2.php', 'qux_12_0.php', 'qux_2_0.php', - )), $finder->in(self::$tmpDir)->getIterator()); + ]), $finder->in(self::$tmpDir)->getIterator()); $finder = $this->buildFinder(); $this->assertSame($finder, $finder->depth('<= 0')); - $this->assertIterator($this->toAbsolute(array('foo', + $this->assertIterator($this->toAbsolute(['foo', 'test.php', 'test.py', 'toto', @@ -154,37 +154,37 @@ class FinderTest extends Iterator\RealIteratorTestCase 'qux_10_2.php', 'qux_12_0.php', 'qux_2_0.php', - )), $finder->in(self::$tmpDir)->getIterator()); + ]), $finder->in(self::$tmpDir)->getIterator()); $finder = $this->buildFinder(); $this->assertSame($finder, $finder->depth('>= 1')); - $this->assertIterator($this->toAbsolute(array( + $this->assertIterator($this->toAbsolute([ 'foo/bar.tmp', 'qux/baz_100_1.py', 'qux/baz_1_2.py', - )), $finder->in(self::$tmpDir)->getIterator()); + ]), $finder->in(self::$tmpDir)->getIterator()); $finder = $this->buildFinder(); $finder->depth('< 1')->depth('>= 1'); - $this->assertIterator(array(), $finder->in(self::$tmpDir)->getIterator()); + $this->assertIterator([], $finder->in(self::$tmpDir)->getIterator()); } public function testDepthWithArrayParam() { $finder = $this->buildFinder(); - $finder->depth(array('>= 1', '< 2')); - $this->assertIterator($this->toAbsolute(array( + $finder->depth(['>= 1', '< 2']); + $this->assertIterator($this->toAbsolute([ 'foo/bar.tmp', 'qux/baz_100_1.py', 'qux/baz_1_2.py', - )), $finder->in(self::$tmpDir)->getIterator()); + ]), $finder->in(self::$tmpDir)->getIterator()); } public function testName() { $finder = $this->buildFinder(); $this->assertSame($finder, $finder->name('*.php')); - $this->assertIterator($this->toAbsolute(array( + $this->assertIterator($this->toAbsolute([ 'test.php', 'qux_0_1.php', 'qux_1000_1.php', @@ -192,20 +192,20 @@ class FinderTest extends Iterator\RealIteratorTestCase 'qux_10_2.php', 'qux_12_0.php', 'qux_2_0.php', - )), $finder->in(self::$tmpDir)->getIterator()); + ]), $finder->in(self::$tmpDir)->getIterator()); $finder = $this->buildFinder(); $finder->name('test.ph*'); $finder->name('test.py'); - $this->assertIterator($this->toAbsolute(array('test.php', 'test.py')), $finder->in(self::$tmpDir)->getIterator()); + $this->assertIterator($this->toAbsolute(['test.php', 'test.py']), $finder->in(self::$tmpDir)->getIterator()); $finder = $this->buildFinder(); $finder->name('~^test~i'); - $this->assertIterator($this->toAbsolute(array('test.php', 'test.py')), $finder->in(self::$tmpDir)->getIterator()); + $this->assertIterator($this->toAbsolute(['test.php', 'test.py']), $finder->in(self::$tmpDir)->getIterator()); $finder = $this->buildFinder(); $finder->name('~\\.php$~i'); - $this->assertIterator($this->toAbsolute(array( + $this->assertIterator($this->toAbsolute([ 'test.php', 'qux_0_1.php', 'qux_1000_1.php', @@ -213,25 +213,25 @@ class FinderTest extends Iterator\RealIteratorTestCase 'qux_10_2.php', 'qux_12_0.php', 'qux_2_0.php', - )), $finder->in(self::$tmpDir)->getIterator()); + ]), $finder->in(self::$tmpDir)->getIterator()); $finder = $this->buildFinder(); $finder->name('test.p{hp,y}'); - $this->assertIterator($this->toAbsolute(array('test.php', 'test.py')), $finder->in(self::$tmpDir)->getIterator()); + $this->assertIterator($this->toAbsolute(['test.php', 'test.py']), $finder->in(self::$tmpDir)->getIterator()); } public function testNameWithArrayParam() { $finder = $this->buildFinder(); - $finder->name(array('test.php', 'test.py')); - $this->assertIterator($this->toAbsolute(array('test.php', 'test.py')), $finder->in(self::$tmpDir)->getIterator()); + $finder->name(['test.php', 'test.py']); + $this->assertIterator($this->toAbsolute(['test.php', 'test.py']), $finder->in(self::$tmpDir)->getIterator()); } public function testNotName() { $finder = $this->buildFinder(); $this->assertSame($finder, $finder->notName('*.php')); - $this->assertIterator($this->toAbsolute(array( + $this->assertIterator($this->toAbsolute([ 'foo', 'foo/bar.tmp', 'test.py', @@ -240,44 +240,44 @@ class FinderTest extends Iterator\RealIteratorTestCase 'qux', 'qux/baz_100_1.py', 'qux/baz_1_2.py', - )), $finder->in(self::$tmpDir)->getIterator()); + ]), $finder->in(self::$tmpDir)->getIterator()); $finder = $this->buildFinder(); $finder->notName('*.php'); $finder->notName('*.py'); - $this->assertIterator($this->toAbsolute(array( + $this->assertIterator($this->toAbsolute([ 'foo', 'foo/bar.tmp', 'toto', 'foo bar', 'qux', - )), $finder->in(self::$tmpDir)->getIterator()); + ]), $finder->in(self::$tmpDir)->getIterator()); $finder = $this->buildFinder(); $finder->name('test.ph*'); $finder->name('test.py'); $finder->notName('*.php'); $finder->notName('*.py'); - $this->assertIterator(array(), $finder->in(self::$tmpDir)->getIterator()); + $this->assertIterator([], $finder->in(self::$tmpDir)->getIterator()); $finder = $this->buildFinder(); $finder->name('test.ph*'); $finder->name('test.py'); $finder->notName('*.p{hp,y}'); - $this->assertIterator(array(), $finder->in(self::$tmpDir)->getIterator()); + $this->assertIterator([], $finder->in(self::$tmpDir)->getIterator()); } public function testNotNameWithArrayParam() { $finder = $this->buildFinder(); - $finder->notName(array('*.php', '*.py')); - $this->assertIterator($this->toAbsolute(array( + $finder->notName(['*.php', '*.py']); + $this->assertIterator($this->toAbsolute([ 'foo', 'foo/bar.tmp', 'toto', 'foo bar', 'qux', - )), $finder->in(self::$tmpDir)->getIterator()); + ]), $finder->in(self::$tmpDir)->getIterator()); } /** @@ -287,45 +287,45 @@ class FinderTest extends Iterator\RealIteratorTestCase { $finder = $this->buildFinder(); $finder->name($regex); - $this->assertIterator($this->toAbsolute(array( + $this->assertIterator($this->toAbsolute([ 'test.py', 'test.php', - )), $finder->in(self::$tmpDir)->getIterator()); + ]), $finder->in(self::$tmpDir)->getIterator()); } public function testSize() { $finder = $this->buildFinder(); $this->assertSame($finder, $finder->files()->size('< 1K')->size('> 500')); - $this->assertIterator($this->toAbsolute(array('test.php')), $finder->in(self::$tmpDir)->getIterator()); + $this->assertIterator($this->toAbsolute(['test.php']), $finder->in(self::$tmpDir)->getIterator()); } public function testSizeWithArrayParam() { $finder = $this->buildFinder(); - $this->assertSame($finder, $finder->files()->size(array('< 1K', '> 500'))); - $this->assertIterator($this->toAbsolute(array('test.php')), $finder->in(self::$tmpDir)->getIterator()); + $this->assertSame($finder, $finder->files()->size(['< 1K', '> 500'])); + $this->assertIterator($this->toAbsolute(['test.php']), $finder->in(self::$tmpDir)->getIterator()); } public function testDate() { $finder = $this->buildFinder(); $this->assertSame($finder, $finder->files()->date('until last month')); - $this->assertIterator($this->toAbsolute(array('foo/bar.tmp', 'test.php')), $finder->in(self::$tmpDir)->getIterator()); + $this->assertIterator($this->toAbsolute(['foo/bar.tmp', 'test.php']), $finder->in(self::$tmpDir)->getIterator()); } public function testDateWithArrayParam() { $finder = $this->buildFinder(); - $this->assertSame($finder, $finder->files()->date(array('>= 2005-10-15', 'until last month'))); - $this->assertIterator($this->toAbsolute(array('foo/bar.tmp', 'test.php')), $finder->in(self::$tmpDir)->getIterator()); + $this->assertSame($finder, $finder->files()->date(['>= 2005-10-15', 'until last month'])); + $this->assertIterator($this->toAbsolute(['foo/bar.tmp', 'test.php']), $finder->in(self::$tmpDir)->getIterator()); } public function testExclude() { $finder = $this->buildFinder(); $this->assertSame($finder, $finder->exclude('foo')); - $this->assertIterator($this->toAbsolute(array( + $this->assertIterator($this->toAbsolute([ 'test.php', 'test.py', 'toto', @@ -339,14 +339,15 @@ class FinderTest extends Iterator\RealIteratorTestCase 'qux_10_2.php', 'qux_12_0.php', 'qux_2_0.php', - )), $finder->in(self::$tmpDir)->getIterator()); + ]), $finder->in(self::$tmpDir)->getIterator()); } public function testIgnoreVCS() { $finder = $this->buildFinder(); $this->assertSame($finder, $finder->ignoreVCS(false)->ignoreDotFiles(false)); - $this->assertIterator($this->toAbsolute(array( + $this->assertIterator($this->toAbsolute([ + '.gitignore', '.git', 'foo', 'foo/bar.tmp', @@ -368,11 +369,12 @@ class FinderTest extends Iterator\RealIteratorTestCase 'qux_10_2.php', 'qux_12_0.php', 'qux_2_0.php', - )), $finder->in(self::$tmpDir)->getIterator()); + ]), $finder->in(self::$tmpDir)->getIterator()); $finder = $this->buildFinder(); $finder->ignoreVCS(false)->ignoreVCS(false)->ignoreDotFiles(false); - $this->assertIterator($this->toAbsolute(array( + $this->assertIterator($this->toAbsolute([ + '.gitignore', '.git', 'foo', 'foo/bar.tmp', @@ -394,11 +396,12 @@ class FinderTest extends Iterator\RealIteratorTestCase 'qux_10_2.php', 'qux_12_0.php', 'qux_2_0.php', - )), $finder->in(self::$tmpDir)->getIterator()); + ]), $finder->in(self::$tmpDir)->getIterator()); $finder = $this->buildFinder(); $this->assertSame($finder, $finder->ignoreVCS(true)->ignoreDotFiles(false)); - $this->assertIterator($this->toAbsolute(array( + $this->assertIterator($this->toAbsolute([ + '.gitignore', 'foo', 'foo/bar.tmp', 'test.php', @@ -418,14 +421,93 @@ class FinderTest extends Iterator\RealIteratorTestCase 'qux_10_2.php', 'qux_12_0.php', 'qux_2_0.php', - )), $finder->in(self::$tmpDir)->getIterator()); + ]), $finder->in(self::$tmpDir)->getIterator()); + } + + public function testIgnoreVCSIgnored() + { + $finder = $this->buildFinder(); + $this->assertSame( + $finder, + $finder + ->ignoreVCS(true) + ->ignoreDotFiles(true) + ->ignoreVCSIgnored(true) + ); + $this->assertIterator($this->toAbsolute([ + 'foo', + 'foo/bar.tmp', + 'test.py', + 'toto', + 'foo bar', + 'qux', + 'qux/baz_100_1.py', + 'qux/baz_1_2.py', + ]), $finder->in(self::$tmpDir)->getIterator()); + } + + public function testIgnoreVCSCanBeDisabledAfterFirstIteration() + { + $finder = $this->buildFinder(); + $finder->in(self::$tmpDir); + $finder->ignoreDotFiles(false); + + $this->assertIterator($this->toAbsolute([ + '.gitignore', + 'foo', + 'foo/bar.tmp', + 'qux', + 'qux/baz_100_1.py', + 'qux/baz_1_2.py', + 'qux_0_1.php', + 'qux_1000_1.php', + 'qux_1002_0.php', + 'qux_10_2.php', + 'qux_12_0.php', + 'qux_2_0.php', + 'test.php', + 'test.py', + 'toto', + '.bar', + '.foo', + '.foo/.bar', + '.foo/bar', + 'foo bar', + ]), $finder->getIterator()); + + $finder->ignoreVCS(false); + $this->assertIterator($this->toAbsolute([ + '.gitignore', + '.git', + 'foo', + 'foo/bar.tmp', + 'qux', + 'qux/baz_100_1.py', + 'qux/baz_1_2.py', + 'qux_0_1.php', + 'qux_1000_1.php', + 'qux_1002_0.php', + 'qux_10_2.php', + 'qux_12_0.php', + 'qux_2_0.php', + 'test.php', + 'test.py', + 'toto', + 'toto/.git', + '.bar', + '.foo', + '.foo/.bar', + '.foo/bar', + 'foo bar', + ]), $finder->getIterator()); } public function testIgnoreDotFiles() { $finder = $this->buildFinder(); $this->assertSame($finder, $finder->ignoreDotFiles(false)->ignoreVCS(false)); - $this->assertIterator($this->toAbsolute(array( + $this->assertIterator($this->toAbsolute([ + '.gitignore', '.git', '.bar', '.foo', @@ -447,11 +529,12 @@ class FinderTest extends Iterator\RealIteratorTestCase 'qux_10_2.php', 'qux_12_0.php', 'qux_2_0.php', - )), $finder->in(self::$tmpDir)->getIterator()); + ]), $finder->in(self::$tmpDir)->getIterator()); $finder = $this->buildFinder(); $finder->ignoreDotFiles(false)->ignoreDotFiles(false)->ignoreVCS(false); - $this->assertIterator($this->toAbsolute(array( + $this->assertIterator($this->toAbsolute([ + '.gitignore', '.git', '.bar', '.foo', @@ -473,11 +556,11 @@ class FinderTest extends Iterator\RealIteratorTestCase 'qux_10_2.php', 'qux_12_0.php', 'qux_2_0.php', - )), $finder->in(self::$tmpDir)->getIterator()); + ]), $finder->in(self::$tmpDir)->getIterator()); $finder = $this->buildFinder(); $this->assertSame($finder, $finder->ignoreDotFiles(true)->ignoreVCS(false)); - $this->assertIterator($this->toAbsolute(array( + $this->assertIterator($this->toAbsolute([ 'foo', 'foo/bar.tmp', 'test.php', @@ -493,14 +576,62 @@ class FinderTest extends Iterator\RealIteratorTestCase 'qux_10_2.php', 'qux_12_0.php', 'qux_2_0.php', - )), $finder->in(self::$tmpDir)->getIterator()); + ]), $finder->in(self::$tmpDir)->getIterator()); + } + + public function testIgnoreDotFilesCanBeDisabledAfterFirstIteration() + { + $finder = $this->buildFinder(); + $finder->in(self::$tmpDir); + + $this->assertIterator($this->toAbsolute([ + 'foo', + 'foo/bar.tmp', + 'qux', + 'qux/baz_100_1.py', + 'qux/baz_1_2.py', + 'qux_0_1.php', + 'qux_1000_1.php', + 'qux_1002_0.php', + 'qux_10_2.php', + 'qux_12_0.php', + 'qux_2_0.php', + 'test.php', + 'test.py', + 'toto', + 'foo bar', + ]), $finder->getIterator()); + + $finder->ignoreDotFiles(false); + $this->assertIterator($this->toAbsolute([ + '.gitignore', + 'foo', + 'foo/bar.tmp', + 'qux', + 'qux/baz_100_1.py', + 'qux/baz_1_2.py', + 'qux_0_1.php', + 'qux_1000_1.php', + 'qux_1002_0.php', + 'qux_10_2.php', + 'qux_12_0.php', + 'qux_2_0.php', + 'test.php', + 'test.py', + 'toto', + '.bar', + '.foo', + '.foo/.bar', + '.foo/bar', + 'foo bar', + ]), $finder->getIterator()); } public function testSortByName() { $finder = $this->buildFinder(); $this->assertSame($finder, $finder->sortByName()); - $this->assertIterator($this->toAbsolute(array( + $this->assertIterator($this->toAbsolute([ 'foo', 'foo bar', 'foo/bar.tmp', @@ -516,14 +647,14 @@ class FinderTest extends Iterator\RealIteratorTestCase 'test.php', 'test.py', 'toto', - )), $finder->in(self::$tmpDir)->getIterator()); + ]), $finder->in(self::$tmpDir)->getIterator()); } public function testSortByType() { $finder = $this->buildFinder(); $this->assertSame($finder, $finder->sortByType()); - $this->assertIterator($this->toAbsolute(array( + $this->assertIterator($this->toAbsolute([ 'foo', 'foo bar', 'toto', @@ -539,14 +670,14 @@ class FinderTest extends Iterator\RealIteratorTestCase 'qux_10_2.php', 'qux_12_0.php', 'qux_2_0.php', - )), $finder->in(self::$tmpDir)->getIterator()); + ]), $finder->in(self::$tmpDir)->getIterator()); } public function testSortByAccessedTime() { $finder = $this->buildFinder(); $this->assertSame($finder, $finder->sortByAccessedTime()); - $this->assertIterator($this->toAbsolute(array( + $this->assertIterator($this->toAbsolute([ 'foo/bar.tmp', 'test.php', 'toto', @@ -562,14 +693,14 @@ class FinderTest extends Iterator\RealIteratorTestCase 'qux_10_2.php', 'qux_12_0.php', 'qux_2_0.php', - )), $finder->in(self::$tmpDir)->getIterator()); + ]), $finder->in(self::$tmpDir)->getIterator()); } public function testSortByChangedTime() { $finder = $this->buildFinder(); $this->assertSame($finder, $finder->sortByChangedTime()); - $this->assertIterator($this->toAbsolute(array( + $this->assertIterator($this->toAbsolute([ 'toto', 'test.py', 'test.php', @@ -585,14 +716,14 @@ class FinderTest extends Iterator\RealIteratorTestCase 'qux_10_2.php', 'qux_12_0.php', 'qux_2_0.php', - )), $finder->in(self::$tmpDir)->getIterator()); + ]), $finder->in(self::$tmpDir)->getIterator()); } public function testSortByModifiedTime() { $finder = $this->buildFinder(); $this->assertSame($finder, $finder->sortByModifiedTime()); - $this->assertIterator($this->toAbsolute(array( + $this->assertIterator($this->toAbsolute([ 'foo/bar.tmp', 'test.php', 'toto', @@ -608,7 +739,7 @@ class FinderTest extends Iterator\RealIteratorTestCase 'qux_10_2.php', 'qux_12_0.php', 'qux_2_0.php', - )), $finder->in(self::$tmpDir)->getIterator()); + ]), $finder->in(self::$tmpDir)->getIterator()); } public function testReverseSorting() @@ -616,7 +747,7 @@ class FinderTest extends Iterator\RealIteratorTestCase $finder = $this->buildFinder(); $this->assertSame($finder, $finder->sortByName()); $this->assertSame($finder, $finder->reverseSorting()); - $this->assertOrderedIteratorInForeach($this->toAbsolute(array( + $this->assertOrderedIteratorInForeach($this->toAbsolute([ 'toto', 'test.py', 'test.php', @@ -632,14 +763,14 @@ class FinderTest extends Iterator\RealIteratorTestCase 'foo/bar.tmp', 'foo bar', 'foo', - )), $finder->in(self::$tmpDir)->getIterator()); + ]), $finder->in(self::$tmpDir)->getIterator()); } public function testSortByNameNatural() { $finder = $this->buildFinder(); $this->assertSame($finder, $finder->sortByName(true)); - $this->assertIterator($this->toAbsolute(array( + $this->assertIterator($this->toAbsolute([ 'foo', 'foo bar', 'foo/bar.tmp', @@ -655,11 +786,11 @@ class FinderTest extends Iterator\RealIteratorTestCase 'test.php', 'test.py', 'toto', - )), $finder->in(self::$tmpDir)->getIterator()); + ]), $finder->in(self::$tmpDir)->getIterator()); $finder = $this->buildFinder(); $this->assertSame($finder, $finder->sortByName(false)); - $this->assertIterator($this->toAbsolute(array( + $this->assertIterator($this->toAbsolute([ 'foo', 'foo bar', 'foo/bar.tmp', @@ -675,14 +806,14 @@ class FinderTest extends Iterator\RealIteratorTestCase 'test.php', 'test.py', 'toto', - )), $finder->in(self::$tmpDir)->getIterator()); + ]), $finder->in(self::$tmpDir)->getIterator()); } public function testSort() { $finder = $this->buildFinder(); $this->assertSame($finder, $finder->sort(function (\SplFileInfo $a, \SplFileInfo $b) { return strcmp($a->getRealPath(), $b->getRealPath()); })); - $this->assertIterator($this->toAbsolute(array( + $this->assertIterator($this->toAbsolute([ 'foo', 'foo bar', 'foo/bar.tmp', @@ -698,14 +829,14 @@ class FinderTest extends Iterator\RealIteratorTestCase 'qux_10_2.php', 'qux_12_0.php', 'qux_2_0.php', - )), $finder->in(self::$tmpDir)->getIterator()); + ]), $finder->in(self::$tmpDir)->getIterator()); } public function testFilter() { $finder = $this->buildFinder(); $this->assertSame($finder, $finder->filter(function (\SplFileInfo $f) { return false !== strpos($f, 'test'); })); - $this->assertIterator($this->toAbsolute(array('test.php', 'test.py')), $finder->in(self::$tmpDir)->getIterator()); + $this->assertIterator($this->toAbsolute(['test.php', 'test.py']), $finder->in(self::$tmpDir)->getIterator()); } public function testFollowLinks() @@ -716,7 +847,7 @@ class FinderTest extends Iterator\RealIteratorTestCase $finder = $this->buildFinder(); $this->assertSame($finder, $finder->followLinks()); - $this->assertIterator($this->toAbsolute(array( + $this->assertIterator($this->toAbsolute([ 'foo', 'foo/bar.tmp', 'test.php', @@ -732,16 +863,17 @@ class FinderTest extends Iterator\RealIteratorTestCase 'qux_10_2.php', 'qux_12_0.php', 'qux_2_0.php', - )), $finder->in(self::$tmpDir)->getIterator()); + ]), $finder->in(self::$tmpDir)->getIterator()); } public function testIn() { $finder = $this->buildFinder(); - $iterator = $finder->files()->name('*.php')->depth('< 1')->in(array(self::$tmpDir, __DIR__))->getIterator(); + $iterator = $finder->files()->name('*.php')->depth('< 1')->in([self::$tmpDir, __DIR__])->getIterator(); - $expected = array( + $expected = [ self::$tmpDir.\DIRECTORY_SEPARATOR.'test.php', + __DIR__.\DIRECTORY_SEPARATOR.'GitignoreTest.php', __DIR__.\DIRECTORY_SEPARATOR.'FinderTest.php', __DIR__.\DIRECTORY_SEPARATOR.'GlobTest.php', self::$tmpDir.\DIRECTORY_SEPARATOR.'qux_0_1.php', @@ -750,13 +882,13 @@ class FinderTest extends Iterator\RealIteratorTestCase self::$tmpDir.\DIRECTORY_SEPARATOR.'qux_10_2.php', self::$tmpDir.\DIRECTORY_SEPARATOR.'qux_12_0.php', self::$tmpDir.\DIRECTORY_SEPARATOR.'qux_2_0.php', - ); + ]; $this->assertIterator($expected, $iterator); } /** - * @expectedException \InvalidArgumentException + * @expectedException \Symfony\Component\Finder\Exception\DirectoryNotFoundException */ public function testInWithNonExistentDirectory() { @@ -764,12 +896,21 @@ class FinderTest extends Iterator\RealIteratorTestCase $finder->in('foobar'); } + /** + * @expectedException \InvalidArgumentException + */ + public function testInWithNonExistentDirectoryLegacyException() + { + $finder = new Finder(); + $finder->in('foobar'); + } + public function testInWithGlob() { $finder = $this->buildFinder(); - $finder->in(array(__DIR__.'/Fixtures/*/B/C/', __DIR__.'/Fixtures/*/*/B/C/'))->getIterator(); + $finder->in([__DIR__.'/Fixtures/*/B/C/', __DIR__.'/Fixtures/*/*/B/C/'])->getIterator(); - $this->assertIterator($this->toAbsoluteFixtures(array('A/B/C/abc.dat', 'copy/A/B/C/abc.dat.copy')), $finder); + $this->assertIterator($this->toAbsoluteFixtures(['A/B/C/abc.dat', 'copy/A/B/C/abc.dat.copy']), $finder); } /** @@ -783,10 +924,14 @@ class FinderTest extends Iterator\RealIteratorTestCase public function testInWithGlobBrace() { - $finder = $this->buildFinder(); - $finder->in(array(__DIR__.'/Fixtures/{A,copy/A}/B/C'))->getIterator(); + if (!\defined('GLOB_BRACE')) { + $this->markTestSkipped('Glob brace is not supported on this system.'); + } - $this->assertIterator($this->toAbsoluteFixtures(array('A/B/C/abc.dat', 'copy/A/B/C/abc.dat.copy')), $finder); + $finder = $this->buildFinder(); + $finder->in([__DIR__.'/Fixtures/{A,copy/A}/B/C'])->getIterator(); + + $this->assertIterator($this->toAbsoluteFixtures(['A/B/C/abc.dat', 'copy/A/B/C/abc.dat.copy']), $finder); } /** @@ -801,12 +946,12 @@ class FinderTest extends Iterator\RealIteratorTestCase public function testGetIterator() { $finder = $this->buildFinder(); - $dirs = array(); + $dirs = []; foreach ($finder->directories()->in(self::$tmpDir) as $dir) { $dirs[] = (string) $dir; } - $expected = $this->toAbsolute(array('foo', 'qux', 'toto')); + $expected = $this->toAbsolute(['foo', 'qux', 'toto']); sort($dirs); sort($expected); @@ -827,13 +972,13 @@ class FinderTest extends Iterator\RealIteratorTestCase { $finder = $this->buildFinder()->in(self::$tmpDir); - $paths = array(); + $paths = []; foreach ($finder as $file) { $paths[] = $file->getRelativePath(); } - $ref = array('', '', '', '', '', '', '', '', '', '', '', 'foo', 'qux', 'qux', ''); + $ref = ['', '', '', '', '', '', '', '', '', '', '', 'foo', 'qux', 'qux', '']; sort($ref); sort($paths); @@ -845,13 +990,13 @@ class FinderTest extends Iterator\RealIteratorTestCase { $finder = $this->buildFinder()->in(self::$tmpDir)->sortByName(); - $paths = array(); + $paths = []; foreach ($finder as $file) { $paths[] = $file->getRelativePathname(); } - $ref = array( + $ref = [ 'test.php', 'toto', 'test.py', @@ -867,7 +1012,7 @@ class FinderTest extends Iterator\RealIteratorTestCase 'qux_10_2.php', 'qux_12_0.php', 'qux_2_0.php', - ); + ]; sort($paths); sort($ref); @@ -875,6 +1020,40 @@ class FinderTest extends Iterator\RealIteratorTestCase $this->assertEquals($ref, $paths); } + public function testGetFilenameWithoutExtension() + { + $finder = $this->buildFinder()->in(self::$tmpDir)->sortByName(); + + $fileNames = []; + + foreach ($finder as $file) { + $fileNames[] = $file->getFilenameWithoutExtension(); + } + + $ref = [ + 'test', + 'toto', + 'test', + 'foo', + 'bar', + 'foo bar', + 'qux', + 'baz_100_1', + 'baz_1_2', + 'qux_0_1', + 'qux_1000_1', + 'qux_1002_0', + 'qux_10_2', + 'qux_12_0', + 'qux_2_0', + ]; + + sort($fileNames); + sort($ref); + + $this->assertEquals($ref, $fileNames); + } + public function testAppendWithAFinder() { $finder = $this->buildFinder(); @@ -885,7 +1064,7 @@ class FinderTest extends Iterator\RealIteratorTestCase $finder = $finder->append($finder1); - $this->assertIterator($this->toAbsolute(array('foo', 'foo/bar.tmp', 'qux', 'toto')), $finder->getIterator()); + $this->assertIterator($this->toAbsolute(['foo', 'foo/bar.tmp', 'qux', 'toto']), $finder->getIterator()); } public function testAppendWithAnArray() @@ -893,14 +1072,14 @@ class FinderTest extends Iterator\RealIteratorTestCase $finder = $this->buildFinder(); $finder->files()->in(self::$tmpDir.\DIRECTORY_SEPARATOR.'foo'); - $finder->append($this->toAbsolute(array('foo', 'toto'))); + $finder->append($this->toAbsolute(['foo', 'toto'])); - $this->assertIterator($this->toAbsolute(array('foo', 'foo/bar.tmp', 'toto')), $finder->getIterator()); + $this->assertIterator($this->toAbsolute(['foo', 'foo/bar.tmp', 'toto']), $finder->getIterator()); } public function testAppendReturnsAFinder() { - $this->assertInstanceOf('Symfony\\Component\\Finder\\Finder', Finder::create()->append(array())); + $this->assertInstanceOf('Symfony\\Component\\Finder\\Finder', Finder::create()->append([])); } public function testAppendDoesNotRequireIn() @@ -981,7 +1160,7 @@ class FinderTest extends Iterator\RealIteratorTestCase ->directories() ->name('Fixtures') ->contains('abc'); - $this->assertIterator(array(), $finder); + $this->assertIterator([], $finder); } public function testNotContainsOnDirectory() @@ -991,7 +1170,7 @@ class FinderTest extends Iterator\RealIteratorTestCase ->directories() ->name('Fixtures') ->notContains('abc'); - $this->assertIterator(array(), $finder); + $this->assertIterator([], $finder); } /** @@ -1002,10 +1181,10 @@ class FinderTest extends Iterator\RealIteratorTestCase */ public function testMultipleLocations() { - $locations = array( + $locations = [ self::$tmpDir.'/', self::$tmpDir.'/toto/', - ); + ]; // it is expected that there are test.py test.php in the tmpDir $finder = new Finder(); @@ -1027,18 +1206,18 @@ class FinderTest extends Iterator\RealIteratorTestCase */ public function testMultipleLocationsWithSubDirectories() { - $locations = array( + $locations = [ __DIR__.'/Fixtures/one', self::$tmpDir.\DIRECTORY_SEPARATOR.'toto', - ); + ]; $finder = $this->buildFinder(); $finder->in($locations)->depth('< 10')->name('*.neon'); - $expected = array( + $expected = [ __DIR__.'/Fixtures/one'.\DIRECTORY_SEPARATOR.'b'.\DIRECTORY_SEPARATOR.'c.neon', __DIR__.'/Fixtures/one'.\DIRECTORY_SEPARATOR.'b'.\DIRECTORY_SEPARATOR.'d.neon', - ); + ]; $this->assertIterator($expected, $finder); $this->assertIteratorInForeach($expected, $finder); @@ -1061,34 +1240,34 @@ class FinderTest extends Iterator\RealIteratorTestCase $finder->in(__DIR__.\DIRECTORY_SEPARATOR.'Fixtures'.\DIRECTORY_SEPARATOR.'r+e.gex[c]a(r)s') ->path('/^dir/'); - $expected = array('r+e.gex[c]a(r)s'.\DIRECTORY_SEPARATOR.'dir', 'r+e.gex[c]a(r)s'.\DIRECTORY_SEPARATOR.'dir'.\DIRECTORY_SEPARATOR.'bar.dat'); + $expected = ['r+e.gex[c]a(r)s'.\DIRECTORY_SEPARATOR.'dir', 'r+e.gex[c]a(r)s'.\DIRECTORY_SEPARATOR.'dir'.\DIRECTORY_SEPARATOR.'bar.dat']; $this->assertIterator($this->toAbsoluteFixtures($expected), $finder); } public function getContainsTestData() { - return array( - array('', '', array()), - array('foo', 'bar', array()), - array('', 'foobar', array('dolor.txt', 'ipsum.txt', 'lorem.txt')), - array('lorem ipsum dolor sit amet', 'foobar', array('lorem.txt')), - array('sit', 'bar', array('dolor.txt', 'ipsum.txt', 'lorem.txt')), - array('dolor sit amet', '@^L@m', array('dolor.txt', 'ipsum.txt')), - array('/^lorem ipsum dolor sit amet$/m', 'foobar', array('lorem.txt')), - array('lorem', 'foobar', array('lorem.txt')), - array('', 'lorem', array('dolor.txt', 'ipsum.txt')), - array('ipsum dolor sit amet', '/^IPSUM/m', array('lorem.txt')), - array(array('lorem', 'dolor'), array(), array('lorem.txt', 'ipsum.txt', 'dolor.txt')), - array('', array('lorem', 'ipsum'), array('dolor.txt')), - ); + return [ + ['', '', []], + ['foo', 'bar', []], + ['', 'foobar', ['dolor.txt', 'ipsum.txt', 'lorem.txt']], + ['lorem ipsum dolor sit amet', 'foobar', ['lorem.txt']], + ['sit', 'bar', ['dolor.txt', 'ipsum.txt', 'lorem.txt']], + ['dolor sit amet', '@^L@m', ['dolor.txt', 'ipsum.txt']], + ['/^lorem ipsum dolor sit amet$/m', 'foobar', ['lorem.txt']], + ['lorem', 'foobar', ['lorem.txt']], + ['', 'lorem', ['dolor.txt', 'ipsum.txt']], + ['ipsum dolor sit amet', '/^IPSUM/m', ['lorem.txt']], + [['lorem', 'dolor'], [], ['lorem.txt', 'ipsum.txt', 'dolor.txt']], + ['', ['lorem', 'ipsum'], ['dolor.txt']], + ]; } public function getRegexNameTestData() { - return array( - array('~.*t\\.p.+~i'), - array('~t.*s~i'), - ); + return [ + ['~.*t\\.p.+~i'], + ['~t.*s~i'], + ]; } /** @@ -1106,29 +1285,29 @@ class FinderTest extends Iterator\RealIteratorTestCase public function getTestPathData() { - return array( - array('', '', array()), - array('/^A\/B\/C/', '/C$/', - array('A'.\DIRECTORY_SEPARATOR.'B'.\DIRECTORY_SEPARATOR.'C'.\DIRECTORY_SEPARATOR.'abc.dat'), - ), - array('/^A\/B/', 'foobar', - array( + return [ + ['', '', []], + ['/^A\/B\/C/', '/C$/', + ['A'.\DIRECTORY_SEPARATOR.'B'.\DIRECTORY_SEPARATOR.'C'.\DIRECTORY_SEPARATOR.'abc.dat'], + ], + ['/^A\/B/', 'foobar', + [ 'A'.\DIRECTORY_SEPARATOR.'B', 'A'.\DIRECTORY_SEPARATOR.'B'.\DIRECTORY_SEPARATOR.'C', 'A'.\DIRECTORY_SEPARATOR.'B'.\DIRECTORY_SEPARATOR.'ab.dat', 'A'.\DIRECTORY_SEPARATOR.'B'.\DIRECTORY_SEPARATOR.'C'.\DIRECTORY_SEPARATOR.'abc.dat', - ), - ), - array('A/B/C', 'foobar', - array( + ], + ], + ['A/B/C', 'foobar', + [ 'A'.\DIRECTORY_SEPARATOR.'B'.\DIRECTORY_SEPARATOR.'C', 'A'.\DIRECTORY_SEPARATOR.'B'.\DIRECTORY_SEPARATOR.'C'.\DIRECTORY_SEPARATOR.'abc.dat', 'copy'.\DIRECTORY_SEPARATOR.'A'.\DIRECTORY_SEPARATOR.'B'.\DIRECTORY_SEPARATOR.'C', 'copy'.\DIRECTORY_SEPARATOR.'A'.\DIRECTORY_SEPARATOR.'B'.\DIRECTORY_SEPARATOR.'C'.\DIRECTORY_SEPARATOR.'abc.dat.copy', - ), - ), - array('A/B', 'foobar', - array( + ], + ], + ['A/B', 'foobar', + [ //dirs 'A'.\DIRECTORY_SEPARATOR.'B', 'A'.\DIRECTORY_SEPARATOR.'B'.\DIRECTORY_SEPARATOR.'C', @@ -1139,27 +1318,27 @@ class FinderTest extends Iterator\RealIteratorTestCase 'A'.\DIRECTORY_SEPARATOR.'B'.\DIRECTORY_SEPARATOR.'C'.\DIRECTORY_SEPARATOR.'abc.dat', 'copy'.\DIRECTORY_SEPARATOR.'A'.\DIRECTORY_SEPARATOR.'B'.\DIRECTORY_SEPARATOR.'ab.dat.copy', 'copy'.\DIRECTORY_SEPARATOR.'A'.\DIRECTORY_SEPARATOR.'B'.\DIRECTORY_SEPARATOR.'C'.\DIRECTORY_SEPARATOR.'abc.dat.copy', - ), - ), - array('/^with space\//', 'foobar', - array( + ], + ], + ['/^with space\//', 'foobar', + [ 'with space'.\DIRECTORY_SEPARATOR.'foo.txt', - ), - ), - array( + ], + ], + [ '/^A/', - array('a.dat', 'abc.dat'), - array( + ['a.dat', 'abc.dat'], + [ 'A', 'A'.\DIRECTORY_SEPARATOR.'B', 'A'.\DIRECTORY_SEPARATOR.'B'.\DIRECTORY_SEPARATOR.'C', 'A'.\DIRECTORY_SEPARATOR.'B'.\DIRECTORY_SEPARATOR.'ab.dat', - ), - ), - array( - array('/^A/', 'one'), + ], + ], + [ + ['/^A/', 'one'], 'foobar', - array( + [ 'A', 'A'.\DIRECTORY_SEPARATOR.'B', 'A'.\DIRECTORY_SEPARATOR.'B'.\DIRECTORY_SEPARATOR.'C', @@ -1171,9 +1350,9 @@ class FinderTest extends Iterator\RealIteratorTestCase 'one'.\DIRECTORY_SEPARATOR.'b', 'one'.\DIRECTORY_SEPARATOR.'b'.\DIRECTORY_SEPARATOR.'c.neon', 'one'.\DIRECTORY_SEPARATOR.'b'.\DIRECTORY_SEPARATOR.'d.neon', - ), - ), - ); + ], + ], + ]; } public function testAccessDeniedException() @@ -1191,7 +1370,7 @@ class FinderTest extends Iterator\RealIteratorTestCase if (false === $couldRead = is_readable($testDir)) { try { - $this->assertIterator($this->toAbsolute(array('foo bar', 'test.php', 'test.py')), $finder->getIterator()); + $this->assertIterator($this->toAbsolute(['foo bar', 'test.php', 'test.py']), $finder->getIterator()); $this->fail('Finder should throw an exception when opening a non-readable directory.'); } catch (\Exception $e) { $expectedExceptionClass = 'Symfony\\Component\\Finder\\Exception\\AccessDeniedException'; @@ -1230,7 +1409,7 @@ class FinderTest extends Iterator\RealIteratorTestCase chmod($testDir, 0333); if (false === ($couldRead = is_readable($testDir))) { - $this->assertIterator($this->toAbsolute(array( + $this->assertIterator($this->toAbsolute([ 'foo bar', 'test.php', 'test.py', @@ -1242,7 +1421,7 @@ class FinderTest extends Iterator\RealIteratorTestCase 'qux_10_2.php', 'qux_12_0.php', 'qux_2_0.php', - ) + ] ), $finder->getIterator()); } diff --git a/vendor/symfony/finder/Tests/GitignoreTest.php b/vendor/symfony/finder/Tests/GitignoreTest.php new file mode 100644 index 00000000..fca846d8 --- /dev/null +++ b/vendor/symfony/finder/Tests/GitignoreTest.php @@ -0,0 +1,118 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Finder\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Finder\Gitignore; + +class GitignoreTest extends TestCase +{ + /** + * @dataProvider provider + * + * @param string $patterns + * @param array $matchingCases + * @param array $nonMatchingCases + */ + public function testCases(string $patterns, array $matchingCases, array $nonMatchingCases) + { + $regex = Gitignore::toRegex($patterns); + + foreach ($matchingCases as $matchingCase) { + $this->assertRegExp($regex, $matchingCase, sprintf('Failed asserting path [%s] matches gitignore patterns [%s] using regex [%s]', $matchingCase, $patterns, $regex)); + } + + foreach ($nonMatchingCases as $nonMatchingCase) { + $this->assertNotRegExp($regex, $nonMatchingCase, sprintf('Failed asserting path [%s] not matching gitignore patterns [%s] using regex [%s]', $nonMatchingCase, $patterns, $regex)); + } + } + + /** + * @return array return is array of + * [ + * [ + * '', // Git-ignore Pattern + * [], // array of file paths matching + * [], // array of file paths not matching + * ], + * ] + */ + public function provider() + { + return [ + [ + ' + * + !/bin/bash + ', + ['bin/cat', 'abc/bin/cat'], + ['bin/bash'], + ], + [ + 'fi#le.txt', + [], + ['#file.txt'], + ], + [ + ' + /bin/ + /usr/local/ + !/bin/bash + !/usr/local/bin/bash + ', + ['bin/cat'], + ['bin/bash'], + ], + [ + '*.py[co]', + ['file.pyc', 'file.pyc'], + ['filexpyc', 'file.pycx', 'file.py'], + ], + [ + 'dir1/**/dir2/', + ['dir1/dirA/dir2/', 'dir1/dirA/dirB/dir2/'], + [], + ], + [ + 'dir1/*/dir2/', + ['dir1/dirA/dir2/'], + ['dir1/dirA/dirB/dir2/'], + ], + [ + '/*.php', + ['file.php'], + ['app/file.php'], + ], + [ + '\#file.txt', + ['#file.txt'], + [], + ], + [ + '*.php', + ['app/file.php', 'file.php'], + ['file.phps', 'file.phps', 'filephps'], + ], + [ + 'app/cache/', + ['app/cache/file.txt', 'app/cache/dir1/dir2/file.txt', 'a/app/cache/file.txt'], + [], + ], + [ + ' + #IamComment + /app/cache/', + ['app/cache/file.txt', 'app/cache/subdir/ile.txt'], + ['a/app/cache/file.txt'], + ], + ]; + } +} diff --git a/vendor/symfony/finder/Tests/GlobTest.php b/vendor/symfony/finder/Tests/GlobTest.php index 3a5aab31..2d48799c 100644 --- a/vendor/symfony/finder/Tests/GlobTest.php +++ b/vendor/symfony/finder/Tests/GlobTest.php @@ -39,7 +39,7 @@ class GlobTest extends TestCase } sort($match); - $this->assertSame(array('one/b/c.neon', 'one/b/d.neon'), $match); + $this->assertSame(['one/b/c.neon', 'one/b/d.neon'], $match); } public function testGlobToRegexDoubleStarNonStrictDots() @@ -56,7 +56,7 @@ class GlobTest extends TestCase } sort($match); - $this->assertSame(array('.dot/b/c.neon', '.dot/b/d.neon', 'one/b/c.neon', 'one/b/d.neon'), $match); + $this->assertSame(['.dot/b/c.neon', '.dot/b/d.neon', 'one/b/c.neon', 'one/b/d.neon'], $match); } public function testGlobToRegexDoubleStarWithoutLeadingSlash() @@ -73,7 +73,7 @@ class GlobTest extends TestCase } sort($match); - $this->assertSame(array('one/a', 'one/b', 'one/b/c.neon', 'one/b/d.neon'), $match); + $this->assertSame(['one/a', 'one/b', 'one/b/c.neon', 'one/b/d.neon'], $match); } public function testGlobToRegexDoubleStarWithoutLeadingSlashNotStrictLeadingDot() @@ -90,6 +90,6 @@ class GlobTest extends TestCase } sort($match); - $this->assertSame(array('one/.dot', 'one/a', 'one/b', 'one/b/c.neon', 'one/b/d.neon'), $match); + $this->assertSame(['one/.dot', 'one/a', 'one/b', 'one/b/c.neon', 'one/b/d.neon'], $match); } } diff --git a/vendor/symfony/finder/Tests/Iterator/CustomFilterIteratorTest.php b/vendor/symfony/finder/Tests/Iterator/CustomFilterIteratorTest.php index b036ad13..ad0187e0 100644 --- a/vendor/symfony/finder/Tests/Iterator/CustomFilterIteratorTest.php +++ b/vendor/symfony/finder/Tests/Iterator/CustomFilterIteratorTest.php @@ -20,7 +20,7 @@ class CustomFilterIteratorTest extends IteratorTestCase */ public function testWithInvalidFilter() { - new CustomFilterIterator(new Iterator(), array('foo')); + new CustomFilterIterator(new Iterator(), ['foo']); } /** @@ -28,7 +28,7 @@ class CustomFilterIteratorTest extends IteratorTestCase */ public function testAccept($filters, $expected) { - $inner = new Iterator(array('test.php', 'test.py', 'foo.php')); + $inner = new Iterator(['test.php', 'test.py', 'foo.php']); $iterator = new CustomFilterIterator($inner, $filters); @@ -37,10 +37,10 @@ class CustomFilterIteratorTest extends IteratorTestCase public function getAcceptData() { - return array( - array(array(function (\SplFileInfo $fileinfo) { return false; }), array()), - array(array(function (\SplFileInfo $fileinfo) { return 0 === strpos($fileinfo, 'test'); }), array('test.php', 'test.py')), - array(array('is_dir'), array()), - ); + return [ + [[function (\SplFileInfo $fileinfo) { return false; }], []], + [[function (\SplFileInfo $fileinfo) { return 0 === strpos($fileinfo, 'test'); }], ['test.php', 'test.py']], + [['is_dir'], []], + ]; } } diff --git a/vendor/symfony/finder/Tests/Iterator/DateRangeFilterIteratorTest.php b/vendor/symfony/finder/Tests/Iterator/DateRangeFilterIteratorTest.php index ade1a41a..2d8cfb30 100644 --- a/vendor/symfony/finder/Tests/Iterator/DateRangeFilterIteratorTest.php +++ b/vendor/symfony/finder/Tests/Iterator/DateRangeFilterIteratorTest.php @@ -32,7 +32,7 @@ class DateRangeFilterIteratorTest extends RealIteratorTestCase public function getAcceptData() { - $since20YearsAgo = array( + $since20YearsAgo = [ '.git', 'test.py', 'foo', @@ -54,9 +54,9 @@ class DateRangeFilterIteratorTest extends RealIteratorTestCase 'qux_10_2.php', 'qux_12_0.php', 'qux_2_0.php', - ); + ]; - $since2MonthsAgo = array( + $since2MonthsAgo = [ '.git', 'test.py', 'foo', @@ -76,17 +76,17 @@ class DateRangeFilterIteratorTest extends RealIteratorTestCase 'qux_10_2.php', 'qux_12_0.php', 'qux_2_0.php', - ); + ]; - $untilLastMonth = array( + $untilLastMonth = [ 'foo/bar.tmp', 'test.php', - ); + ]; - return array( - array(array(new DateComparator('since 20 years ago')), $this->toAbsolute($since20YearsAgo)), - array(array(new DateComparator('since 2 months ago')), $this->toAbsolute($since2MonthsAgo)), - array(array(new DateComparator('until last month')), $this->toAbsolute($untilLastMonth)), - ); + return [ + [[new DateComparator('since 20 years ago')], $this->toAbsolute($since20YearsAgo)], + [[new DateComparator('since 2 months ago')], $this->toAbsolute($since2MonthsAgo)], + [[new DateComparator('until last month')], $this->toAbsolute($untilLastMonth)], + ]; } } diff --git a/vendor/symfony/finder/Tests/Iterator/DepthRangeFilterIteratorTest.php b/vendor/symfony/finder/Tests/Iterator/DepthRangeFilterIteratorTest.php index 3a403cb9..7c2572d2 100644 --- a/vendor/symfony/finder/Tests/Iterator/DepthRangeFilterIteratorTest.php +++ b/vendor/symfony/finder/Tests/Iterator/DepthRangeFilterIteratorTest.php @@ -32,7 +32,8 @@ class DepthRangeFilterIteratorTest extends RealIteratorTestCase public function getAcceptData() { - $lessThan1 = array( + $lessThan1 = [ + '.gitignore', '.git', 'test.py', 'foo', @@ -48,9 +49,10 @@ class DepthRangeFilterIteratorTest extends RealIteratorTestCase 'qux_10_2.php', 'qux_12_0.php', 'qux_2_0.php', - ); + ]; - $lessThanOrEqualTo1 = array( + $lessThanOrEqualTo1 = [ + '.gitignore', '.git', 'test.py', 'foo', @@ -72,32 +74,32 @@ class DepthRangeFilterIteratorTest extends RealIteratorTestCase 'qux_10_2.php', 'qux_12_0.php', 'qux_2_0.php', - ); + ]; - $graterThanOrEqualTo1 = array( + $graterThanOrEqualTo1 = [ 'toto/.git', 'foo/bar.tmp', '.foo/.bar', '.foo/bar', 'qux/baz_100_1.py', 'qux/baz_1_2.py', - ); + ]; - $equalTo1 = array( + $equalTo1 = [ 'toto/.git', 'foo/bar.tmp', '.foo/.bar', '.foo/bar', 'qux/baz_100_1.py', 'qux/baz_1_2.py', - ); + ]; - return array( - array(0, 0, $this->toAbsolute($lessThan1)), - array(0, 1, $this->toAbsolute($lessThanOrEqualTo1)), - array(2, PHP_INT_MAX, array()), - array(1, PHP_INT_MAX, $this->toAbsolute($graterThanOrEqualTo1)), - array(1, 1, $this->toAbsolute($equalTo1)), - ); + return [ + [0, 0, $this->toAbsolute($lessThan1)], + [0, 1, $this->toAbsolute($lessThanOrEqualTo1)], + [2, PHP_INT_MAX, []], + [1, PHP_INT_MAX, $this->toAbsolute($graterThanOrEqualTo1)], + [1, 1, $this->toAbsolute($equalTo1)], + ]; } } diff --git a/vendor/symfony/finder/Tests/Iterator/ExcludeDirectoryFilterIteratorTest.php b/vendor/symfony/finder/Tests/Iterator/ExcludeDirectoryFilterIteratorTest.php index c977b0cf..dbf461f6 100644 --- a/vendor/symfony/finder/Tests/Iterator/ExcludeDirectoryFilterIteratorTest.php +++ b/vendor/symfony/finder/Tests/Iterator/ExcludeDirectoryFilterIteratorTest.php @@ -30,7 +30,8 @@ class ExcludeDirectoryFilterIteratorTest extends RealIteratorTestCase public function getAcceptData() { - $foo = array( + $foo = [ + '.gitignore', '.bar', '.foo', '.foo/.bar', @@ -50,9 +51,10 @@ class ExcludeDirectoryFilterIteratorTest extends RealIteratorTestCase 'qux_10_2.php', 'qux_12_0.php', 'qux_2_0.php', - ); + ]; - $fo = array( + $fo = [ + '.gitignore', '.bar', '.foo', '.foo/.bar', @@ -74,9 +76,10 @@ class ExcludeDirectoryFilterIteratorTest extends RealIteratorTestCase 'qux_10_2.php', 'qux_12_0.php', 'qux_2_0.php', - ); + ]; - $toto = array( + $toto = [ + '.gitignore', '.bar', '.foo', '.foo/.bar', @@ -96,12 +99,12 @@ class ExcludeDirectoryFilterIteratorTest extends RealIteratorTestCase 'qux_10_2.php', 'qux_12_0.php', 'qux_2_0.php', - ); + ]; - return array( - array(array('foo'), $this->toAbsolute($foo)), - array(array('fo'), $this->toAbsolute($fo)), - array(array('toto/'), $this->toAbsolute($toto)), - ); + return [ + [['foo'], $this->toAbsolute($foo)], + [['fo'], $this->toAbsolute($fo)], + [['toto/'], $this->toAbsolute($toto)], + ]; } } diff --git a/vendor/symfony/finder/Tests/Iterator/FileTypeFilterIteratorTest.php b/vendor/symfony/finder/Tests/Iterator/FileTypeFilterIteratorTest.php index 0ecd8dfe..49616ce0 100644 --- a/vendor/symfony/finder/Tests/Iterator/FileTypeFilterIteratorTest.php +++ b/vendor/symfony/finder/Tests/Iterator/FileTypeFilterIteratorTest.php @@ -29,7 +29,7 @@ class FileTypeFilterIteratorTest extends RealIteratorTestCase public function getAcceptData() { - $onlyFiles = array( + $onlyFiles = [ 'test.py', 'foo/bar.tmp', 'test.php', @@ -45,21 +45,21 @@ class FileTypeFilterIteratorTest extends RealIteratorTestCase 'qux_10_2.php', 'qux_12_0.php', 'qux_2_0.php', - ); + ]; - $onlyDirectories = array( + $onlyDirectories = [ '.git', 'foo', 'qux', 'toto', 'toto/.git', '.foo', - ); + ]; - return array( - array(FileTypeFilterIterator::ONLY_FILES, $this->toAbsolute($onlyFiles)), - array(FileTypeFilterIterator::ONLY_DIRECTORIES, $this->toAbsolute($onlyDirectories)), - ); + return [ + [FileTypeFilterIterator::ONLY_FILES, $this->toAbsolute($onlyFiles)], + [FileTypeFilterIterator::ONLY_DIRECTORIES, $this->toAbsolute($onlyDirectories)], + ]; } } diff --git a/vendor/symfony/finder/Tests/Iterator/FilecontentFilterIteratorTest.php b/vendor/symfony/finder/Tests/Iterator/FilecontentFilterIteratorTest.php index 744bdae1..f4f70c8e 100644 --- a/vendor/symfony/finder/Tests/Iterator/FilecontentFilterIteratorTest.php +++ b/vendor/symfony/finder/Tests/Iterator/FilecontentFilterIteratorTest.php @@ -17,23 +17,23 @@ class FilecontentFilterIteratorTest extends IteratorTestCase { public function testAccept() { - $inner = new MockFileListIterator(array('test.txt')); - $iterator = new FilecontentFilterIterator($inner, array(), array()); - $this->assertIterator(array('test.txt'), $iterator); + $inner = new MockFileListIterator(['test.txt']); + $iterator = new FilecontentFilterIterator($inner, [], []); + $this->assertIterator(['test.txt'], $iterator); } public function testDirectory() { - $inner = new MockFileListIterator(array('directory')); - $iterator = new FilecontentFilterIterator($inner, array('directory'), array()); - $this->assertIterator(array(), $iterator); + $inner = new MockFileListIterator(['directory']); + $iterator = new FilecontentFilterIterator($inner, ['directory'], []); + $this->assertIterator([], $iterator); } public function testUnreadableFile() { - $inner = new MockFileListIterator(array('file r-')); - $iterator = new FilecontentFilterIterator($inner, array('file r-'), array()); - $this->assertIterator(array(), $iterator); + $inner = new MockFileListIterator(['file r-']); + $iterator = new FilecontentFilterIterator($inner, ['file r-'], []); + $this->assertIterator([], $iterator); } /** @@ -49,38 +49,38 @@ class FilecontentFilterIteratorTest extends IteratorTestCase { $inner = new MockFileListIterator(); - $inner[] = new MockSplFileInfo(array( + $inner[] = new MockSplFileInfo([ 'name' => 'a.txt', 'contents' => 'Lorem ipsum...', 'type' => 'file', - 'mode' => 'r+', ) + 'mode' => 'r+', ] ); - $inner[] = new MockSplFileInfo(array( + $inner[] = new MockSplFileInfo([ 'name' => 'b.yml', 'contents' => 'dolor sit...', 'type' => 'file', - 'mode' => 'r+', ) + 'mode' => 'r+', ] ); - $inner[] = new MockSplFileInfo(array( + $inner[] = new MockSplFileInfo([ 'name' => 'some/other/dir/third.php', 'contents' => 'amet...', 'type' => 'file', - 'mode' => 'r+', ) + 'mode' => 'r+', ] ); - $inner[] = new MockSplFileInfo(array( + $inner[] = new MockSplFileInfo([ 'name' => 'unreadable-file.txt', 'contents' => false, 'type' => 'file', - 'mode' => 'r+', ) + 'mode' => 'r+', ] ); - return array( - array($inner, array('.'), array(), array('a.txt', 'b.yml', 'some/other/dir/third.php')), - array($inner, array('ipsum'), array(), array('a.txt')), - array($inner, array('i', 'amet'), array('Lorem', 'amet'), array('b.yml')), - ); + return [ + [$inner, ['.'], [], ['a.txt', 'b.yml', 'some/other/dir/third.php']], + [$inner, ['ipsum'], [], ['a.txt']], + [$inner, ['i', 'amet'], ['Lorem', 'amet'], ['b.yml']], + ]; } } diff --git a/vendor/symfony/finder/Tests/Iterator/FilenameFilterIteratorTest.php b/vendor/symfony/finder/Tests/Iterator/FilenameFilterIteratorTest.php index c4b97959..9270dd1c 100644 --- a/vendor/symfony/finder/Tests/Iterator/FilenameFilterIteratorTest.php +++ b/vendor/symfony/finder/Tests/Iterator/FilenameFilterIteratorTest.php @@ -20,7 +20,7 @@ class FilenameFilterIteratorTest extends IteratorTestCase */ public function testAccept($matchPatterns, $noMatchPatterns, $expected) { - $inner = new InnerNameIterator(array('test.php', 'test.py', 'foo.php')); + $inner = new InnerNameIterator(['test.php', 'test.py', 'foo.php']); $iterator = new FilenameFilterIterator($inner, $matchPatterns, $noMatchPatterns); @@ -29,14 +29,14 @@ class FilenameFilterIteratorTest extends IteratorTestCase public function getAcceptData() { - return array( - array(array('test.*'), array(), array('test.php', 'test.py')), - array(array(), array('test.*'), array('foo.php')), - array(array('*.php'), array('test.*'), array('foo.php')), - array(array('*.php', '*.py'), array('foo.*'), array('test.php', 'test.py')), - array(array('/\.php$/'), array(), array('test.php', 'foo.php')), - array(array(), array('/\.php$/'), array('test.py')), - ); + return [ + [['test.*'], [], ['test.php', 'test.py']], + [[], ['test.*'], ['foo.php']], + [['*.php'], ['test.*'], ['foo.php']], + [['*.php', '*.py'], ['foo.*'], ['test.php', 'test.py']], + [['/\.php$/'], [], ['test.php', 'foo.php']], + [[], ['/\.php$/'], ['test.py']], + ]; } } diff --git a/vendor/symfony/finder/Tests/Iterator/Iterator.php b/vendor/symfony/finder/Tests/Iterator/Iterator.php index 849bf081..3e21a070 100644 --- a/vendor/symfony/finder/Tests/Iterator/Iterator.php +++ b/vendor/symfony/finder/Tests/Iterator/Iterator.php @@ -13,9 +13,9 @@ namespace Symfony\Component\Finder\Tests\Iterator; class Iterator implements \Iterator { - protected $values = array(); + protected $values = []; - public function __construct(array $values = array()) + public function __construct(array $values = []) { foreach ($values as $value) { $this->attach(new \SplFileInfo($value)); diff --git a/vendor/symfony/finder/Tests/Iterator/IteratorTestCase.php b/vendor/symfony/finder/Tests/Iterator/IteratorTestCase.php index 89f042ae..796dc6ac 100644 --- a/vendor/symfony/finder/Tests/Iterator/IteratorTestCase.php +++ b/vendor/symfony/finder/Tests/Iterator/IteratorTestCase.php @@ -51,7 +51,7 @@ abstract class IteratorTestCase extends TestCase $values = array_values(array_map(function (\SplFileInfo $fileinfo) { return $fileinfo->getPathname(); }, iterator_to_array($iterator))); foreach ($expected as $subarray) { - $temp = array(); + $temp = []; while (\count($values) && \count($temp) < \count($subarray)) { $temp[] = array_shift($values); } @@ -69,7 +69,7 @@ abstract class IteratorTestCase extends TestCase */ protected function assertIteratorInForeach($expected, \Traversable $iterator) { - $values = array(); + $values = []; foreach ($iterator as $file) { $this->assertInstanceOf('Symfony\\Component\\Finder\\SplFileInfo', $file); $values[] = $file->getPathname(); @@ -89,7 +89,7 @@ abstract class IteratorTestCase extends TestCase */ protected function assertOrderedIteratorInForeach($expected, \Traversable $iterator) { - $values = array(); + $values = []; foreach ($iterator as $file) { $this->assertInstanceOf('Symfony\\Component\\Finder\\SplFileInfo', $file); $values[] = $file->getPathname(); diff --git a/vendor/symfony/finder/Tests/Iterator/MockFileListIterator.php b/vendor/symfony/finder/Tests/Iterator/MockFileListIterator.php index eb0adfad..670478d7 100644 --- a/vendor/symfony/finder/Tests/Iterator/MockFileListIterator.php +++ b/vendor/symfony/finder/Tests/Iterator/MockFileListIterator.php @@ -13,7 +13,7 @@ namespace Symfony\Component\Finder\Tests\Iterator; class MockFileListIterator extends \ArrayIterator { - public function __construct(array $filesArray = array()) + public function __construct(array $filesArray = []) { $files = array_map(function ($file) { return new MockSplFileInfo($file); }, $filesArray); parent::__construct($files); diff --git a/vendor/symfony/finder/Tests/Iterator/MockSplFileInfo.php b/vendor/symfony/finder/Tests/Iterator/MockSplFileInfo.php index a5ac93a4..58bb5979 100644 --- a/vendor/symfony/finder/Tests/Iterator/MockSplFileInfo.php +++ b/vendor/symfony/finder/Tests/Iterator/MockSplFileInfo.php @@ -28,14 +28,14 @@ class MockSplFileInfo extends \SplFileInfo if (\is_string($param)) { parent::__construct($param); } elseif (\is_array($param)) { - $defaults = array( + $defaults = [ 'name' => 'file.txt', 'contents' => null, 'mode' => null, 'type' => null, 'relativePath' => null, 'relativePathname' => null, - ); + ]; $defaults = array_merge($defaults, $param); parent::__construct($defaults['name']); $this->setContents($defaults['contents']); diff --git a/vendor/symfony/finder/Tests/Iterator/MultiplePcreFilterIteratorTest.php b/vendor/symfony/finder/Tests/Iterator/MultiplePcreFilterIteratorTest.php index f2c1cd24..95567769 100644 --- a/vendor/symfony/finder/Tests/Iterator/MultiplePcreFilterIteratorTest.php +++ b/vendor/symfony/finder/Tests/Iterator/MultiplePcreFilterIteratorTest.php @@ -27,24 +27,24 @@ class MultiplePcreFilterIteratorTest extends TestCase public function getIsRegexFixtures() { - return array( - array('foo', false, 'string'), - array(' foo ', false, '" " is not a valid delimiter'), - array('\\foo\\', false, '"\\" is not a valid delimiter'), - array('afooa', false, '"a" is not a valid delimiter'), - array('//', false, 'the pattern should contain at least 1 character'), - array('/a/', true, 'valid regex'), - array('/foo/', true, 'valid regex'), - array('/foo/i', true, 'valid regex with a single modifier'), - array('/foo/imsxu', true, 'valid regex with multiple modifiers'), - array('#foo#', true, '"#" is a valid delimiter'), - array('{foo}', true, '"{,}" is a valid delimiter pair'), - array('[foo]', true, '"[,]" is a valid delimiter pair'), - array('(foo)', true, '"(,)" is a valid delimiter pair'), - array('', true, '"<,>" is a valid delimiter pair'), - array('*foo.*', false, '"*" is not considered as a valid delimiter'), - array('?foo.?', false, '"?" is not considered as a valid delimiter'), - ); + return [ + ['foo', false, 'string'], + [' foo ', false, '" " is not a valid delimiter'], + ['\\foo\\', false, '"\\" is not a valid delimiter'], + ['afooa', false, '"a" is not a valid delimiter'], + ['//', false, 'the pattern should contain at least 1 character'], + ['/a/', true, 'valid regex'], + ['/foo/', true, 'valid regex'], + ['/foo/i', true, 'valid regex with a single modifier'], + ['/foo/imsxu', true, 'valid regex with multiple modifiers'], + ['#foo#', true, '"#" is a valid delimiter'], + ['{foo}', true, '"{,}" is a valid delimiter pair'], + ['[foo]', true, '"[,]" is a valid delimiter pair'], + ['(foo)', true, '"(,)" is a valid delimiter pair'], + ['', true, '"<,>" is a valid delimiter pair'], + ['*foo.*', false, '"*" is not considered as a valid delimiter'], + ['?foo.?', false, '"?" is not considered as a valid delimiter'], + ]; } } diff --git a/vendor/symfony/finder/Tests/Iterator/PathFilterIteratorTest.php b/vendor/symfony/finder/Tests/Iterator/PathFilterIteratorTest.php index 38ed966a..9040ee04 100644 --- a/vendor/symfony/finder/Tests/Iterator/PathFilterIteratorTest.php +++ b/vendor/symfony/finder/Tests/Iterator/PathFilterIteratorTest.php @@ -29,54 +29,54 @@ class PathFilterIteratorTest extends IteratorTestCase $inner = new MockFileListIterator(); //PATH: A/B/C/abc.dat - $inner[] = new MockSplFileInfo(array( + $inner[] = new MockSplFileInfo([ 'name' => 'abc.dat', 'relativePathname' => 'A'.\DIRECTORY_SEPARATOR.'B'.\DIRECTORY_SEPARATOR.'C'.\DIRECTORY_SEPARATOR.'abc.dat', - )); + ]); //PATH: A/B/ab.dat - $inner[] = new MockSplFileInfo(array( + $inner[] = new MockSplFileInfo([ 'name' => 'ab.dat', 'relativePathname' => 'A'.\DIRECTORY_SEPARATOR.'B'.\DIRECTORY_SEPARATOR.'ab.dat', - )); + ]); //PATH: A/a.dat - $inner[] = new MockSplFileInfo(array( + $inner[] = new MockSplFileInfo([ 'name' => 'a.dat', 'relativePathname' => 'A'.\DIRECTORY_SEPARATOR.'a.dat', - )); + ]); //PATH: copy/A/B/C/abc.dat.copy - $inner[] = new MockSplFileInfo(array( + $inner[] = new MockSplFileInfo([ 'name' => 'abc.dat.copy', 'relativePathname' => 'copy'.\DIRECTORY_SEPARATOR.'A'.\DIRECTORY_SEPARATOR.'B'.\DIRECTORY_SEPARATOR.'C'.\DIRECTORY_SEPARATOR.'abc.dat', - )); + ]); //PATH: copy/A/B/ab.dat.copy - $inner[] = new MockSplFileInfo(array( + $inner[] = new MockSplFileInfo([ 'name' => 'ab.dat.copy', 'relativePathname' => 'copy'.\DIRECTORY_SEPARATOR.'A'.\DIRECTORY_SEPARATOR.'B'.\DIRECTORY_SEPARATOR.'ab.dat', - )); + ]); //PATH: copy/A/a.dat.copy - $inner[] = new MockSplFileInfo(array( + $inner[] = new MockSplFileInfo([ 'name' => 'a.dat.copy', 'relativePathname' => 'copy'.\DIRECTORY_SEPARATOR.'A'.\DIRECTORY_SEPARATOR.'a.dat', - )); + ]); - return array( - array($inner, array('/^A/'), array(), array('abc.dat', 'ab.dat', 'a.dat')), - array($inner, array('/^A\/B/'), array(), array('abc.dat', 'ab.dat')), - array($inner, array('/^A\/B\/C/'), array(), array('abc.dat')), - array($inner, array('/A\/B\/C/'), array(), array('abc.dat', 'abc.dat.copy')), + return [ + [$inner, ['/^A/'], [], ['abc.dat', 'ab.dat', 'a.dat']], + [$inner, ['/^A\/B/'], [], ['abc.dat', 'ab.dat']], + [$inner, ['/^A\/B\/C/'], [], ['abc.dat']], + [$inner, ['/A\/B\/C/'], [], ['abc.dat', 'abc.dat.copy']], - array($inner, array('A'), array(), array('abc.dat', 'ab.dat', 'a.dat', 'abc.dat.copy', 'ab.dat.copy', 'a.dat.copy')), - array($inner, array('A/B'), array(), array('abc.dat', 'ab.dat', 'abc.dat.copy', 'ab.dat.copy')), - array($inner, array('A/B/C'), array(), array('abc.dat', 'abc.dat.copy')), + [$inner, ['A'], [], ['abc.dat', 'ab.dat', 'a.dat', 'abc.dat.copy', 'ab.dat.copy', 'a.dat.copy']], + [$inner, ['A/B'], [], ['abc.dat', 'ab.dat', 'abc.dat.copy', 'ab.dat.copy']], + [$inner, ['A/B/C'], [], ['abc.dat', 'abc.dat.copy']], - array($inner, array('copy/A'), array(), array('abc.dat.copy', 'ab.dat.copy', 'a.dat.copy')), - array($inner, array('copy/A/B'), array(), array('abc.dat.copy', 'ab.dat.copy')), - array($inner, array('copy/A/B/C'), array(), array('abc.dat.copy')), - ); + [$inner, ['copy/A'], [], ['abc.dat.copy', 'ab.dat.copy', 'a.dat.copy']], + [$inner, ['copy/A/B'], [], ['abc.dat.copy', 'ab.dat.copy']], + [$inner, ['copy/A/B/C'], [], ['abc.dat.copy']], + ]; } } diff --git a/vendor/symfony/finder/Tests/Iterator/RealIteratorTestCase.php b/vendor/symfony/finder/Tests/Iterator/RealIteratorTestCase.php index 9aa68ea2..4f4ba016 100644 --- a/vendor/symfony/finder/Tests/Iterator/RealIteratorTestCase.php +++ b/vendor/symfony/finder/Tests/Iterator/RealIteratorTestCase.php @@ -20,7 +20,7 @@ abstract class RealIteratorTestCase extends IteratorTestCase { self::$tmpDir = realpath(sys_get_temp_dir()).\DIRECTORY_SEPARATOR.'symfony_finder'; - self::$files = array( + self::$files = [ '.git/', '.foo/', '.foo/.bar', @@ -42,7 +42,7 @@ abstract class RealIteratorTestCase extends IteratorTestCase 'qux/', 'qux/baz_1_2.py', 'qux/baz_100_1.py', - ); + ]; self::$files = self::toAbsolute(self::$files); @@ -63,6 +63,8 @@ abstract class RealIteratorTestCase extends IteratorTestCase file_put_contents(self::toAbsolute('test.php'), str_repeat(' ', 800)); file_put_contents(self::toAbsolute('test.py'), str_repeat(' ', 2000)); + file_put_contents(self::toAbsolute('.gitignore'), '*.php'); + touch(self::toAbsolute('foo/bar.tmp'), strtotime('2005-10-15')); touch(self::toAbsolute('test.php'), strtotime('2005-10-15')); } @@ -97,7 +99,7 @@ abstract class RealIteratorTestCase extends IteratorTestCase } if (\is_array($files)) { - $f = array(); + $f = []; foreach ($files as $file) { if (\is_array($file)) { $f[] = self::toAbsolute($file); @@ -118,7 +120,7 @@ abstract class RealIteratorTestCase extends IteratorTestCase protected static function toAbsoluteFixtures($files) { - $f = array(); + $f = []; foreach ($files as $file) { $f[] = realpath(__DIR__.\DIRECTORY_SEPARATOR.'..'.\DIRECTORY_SEPARATOR.'Fixtures'.\DIRECTORY_SEPARATOR.$file); } diff --git a/vendor/symfony/finder/Tests/Iterator/RecursiveDirectoryIteratorTest.php b/vendor/symfony/finder/Tests/Iterator/RecursiveDirectoryIteratorTest.php index 0c9aca24..037810ae 100644 --- a/vendor/symfony/finder/Tests/Iterator/RecursiveDirectoryIteratorTest.php +++ b/vendor/symfony/finder/Tests/Iterator/RecursiveDirectoryIteratorTest.php @@ -42,11 +42,11 @@ class RecursiveDirectoryIteratorTest extends IteratorTestCase $this->markTestSkipped('Unsupported stream "ftp".'); } - $contains = array( + $contains = [ 'ftp://speedtest.tele2.net'.\DIRECTORY_SEPARATOR.'1000GB.zip', 'ftp://speedtest.tele2.net'.\DIRECTORY_SEPARATOR.'100GB.zip', - ); - $actual = array(); + ]; + $actual = []; $i->seek(0); $actual[] = $i->getPathname(); diff --git a/vendor/symfony/finder/Tests/Iterator/SizeRangeFilterIteratorTest.php b/vendor/symfony/finder/Tests/Iterator/SizeRangeFilterIteratorTest.php index 0ee463c6..1c0381fe 100644 --- a/vendor/symfony/finder/Tests/Iterator/SizeRangeFilterIteratorTest.php +++ b/vendor/symfony/finder/Tests/Iterator/SizeRangeFilterIteratorTest.php @@ -30,7 +30,7 @@ class SizeRangeFilterIteratorTest extends RealIteratorTestCase public function getAcceptData() { - $lessThan1KGreaterThan05K = array( + $lessThan1KGreaterThan05K = [ '.foo', '.git', 'foo', @@ -38,11 +38,11 @@ class SizeRangeFilterIteratorTest extends RealIteratorTestCase 'test.php', 'toto', 'toto/.git', - ); + ]; - return array( - array(array(new NumberComparator('< 1K'), new NumberComparator('> 0.5K')), $this->toAbsolute($lessThan1KGreaterThan05K)), - ); + return [ + [[new NumberComparator('< 1K'), new NumberComparator('> 0.5K')], $this->toAbsolute($lessThan1KGreaterThan05K)], + ]; } } diff --git a/vendor/symfony/finder/Tests/Iterator/SortableIteratorTest.php b/vendor/symfony/finder/Tests/Iterator/SortableIteratorTest.php index 33687c52..e9dad1e0 100644 --- a/vendor/symfony/finder/Tests/Iterator/SortableIteratorTest.php +++ b/vendor/symfony/finder/Tests/Iterator/SortableIteratorTest.php @@ -18,7 +18,7 @@ class SortableIteratorTest extends RealIteratorTestCase public function testConstructor() { try { - new SortableIterator(new Iterator(array()), 'foobar'); + new SortableIterator(new Iterator([]), 'foobar'); $this->fail('__construct() throws an \InvalidArgumentException exception if the mode is not valid'); } catch (\Exception $e) { $this->assertInstanceOf('InvalidArgumentException', $e, '__construct() throws an \InvalidArgumentException exception if the mode is not valid'); @@ -73,7 +73,7 @@ class SortableIteratorTest extends RealIteratorTestCase public function getAcceptData() { - $sortByName = array( + $sortByName = [ '.bar', '.foo', '.foo/.bar', @@ -95,9 +95,9 @@ class SortableIteratorTest extends RealIteratorTestCase 'test.py', 'toto', 'toto/.git', - ); + ]; - $sortByType = array( + $sortByType = [ '.foo', '.git', 'foo', @@ -119,13 +119,13 @@ class SortableIteratorTest extends RealIteratorTestCase 'qux_2_0.php', 'test.php', 'test.py', - ); + ]; - $sortByAccessedTime = array( + $sortByAccessedTime = [ // For these two files the access time was set to 2005-10-15 - array('foo/bar.tmp', 'test.php'), + ['foo/bar.tmp', 'test.php'], // These files were created more or less at the same time - array( + [ '.git', '.foo', '.foo/.bar', @@ -144,13 +144,13 @@ class SortableIteratorTest extends RealIteratorTestCase 'qux_10_2.php', 'qux_12_0.php', 'qux_2_0.php', - ), + ], // This file was accessed after sleeping for 1 sec - array('.bar'), - ); + ['.bar'], + ]; - $sortByChangedTime = array( - array( + $sortByChangedTime = [ + [ '.git', '.foo', '.foo/.bar', @@ -170,13 +170,13 @@ class SortableIteratorTest extends RealIteratorTestCase 'qux_10_2.php', 'qux_12_0.php', 'qux_2_0.php', - ), - array('test.php'), - array('test.py'), - ); + ], + ['test.php'], + ['test.py'], + ]; - $sortByModifiedTime = array( - array( + $sortByModifiedTime = [ + [ '.git', '.foo', '.foo/.bar', @@ -196,12 +196,12 @@ class SortableIteratorTest extends RealIteratorTestCase 'qux_10_2.php', 'qux_12_0.php', 'qux_2_0.php', - ), - array('test.php'), - array('test.py'), - ); + ], + ['test.php'], + ['test.py'], + ]; - $sortByNameNatural = array( + $sortByNameNatural = [ '.bar', '.foo', '.foo/.bar', @@ -223,9 +223,9 @@ class SortableIteratorTest extends RealIteratorTestCase 'test.py', 'toto', 'toto/.git', - ); + ]; - $customComparison = array( + $customComparison = [ '.bar', '.foo', '.foo/.bar', @@ -247,16 +247,16 @@ class SortableIteratorTest extends RealIteratorTestCase 'test.py', 'toto', 'toto/.git', - ); + ]; - return array( - array(SortableIterator::SORT_BY_NAME, $this->toAbsolute($sortByName)), - array(SortableIterator::SORT_BY_TYPE, $this->toAbsolute($sortByType)), - array(SortableIterator::SORT_BY_ACCESSED_TIME, $this->toAbsolute($sortByAccessedTime)), - array(SortableIterator::SORT_BY_CHANGED_TIME, $this->toAbsolute($sortByChangedTime)), - array(SortableIterator::SORT_BY_MODIFIED_TIME, $this->toAbsolute($sortByModifiedTime)), - array(SortableIterator::SORT_BY_NAME_NATURAL, $this->toAbsolute($sortByNameNatural)), - array(function (\SplFileInfo $a, \SplFileInfo $b) { return strcmp($a->getRealPath(), $b->getRealPath()); }, $this->toAbsolute($customComparison)), - ); + return [ + [SortableIterator::SORT_BY_NAME, $this->toAbsolute($sortByName)], + [SortableIterator::SORT_BY_TYPE, $this->toAbsolute($sortByType)], + [SortableIterator::SORT_BY_ACCESSED_TIME, $this->toAbsolute($sortByAccessedTime)], + [SortableIterator::SORT_BY_CHANGED_TIME, $this->toAbsolute($sortByChangedTime)], + [SortableIterator::SORT_BY_MODIFIED_TIME, $this->toAbsolute($sortByModifiedTime)], + [SortableIterator::SORT_BY_NAME_NATURAL, $this->toAbsolute($sortByNameNatural)], + [function (\SplFileInfo $a, \SplFileInfo $b) { return strcmp($a->getRealPath(), $b->getRealPath()); }, $this->toAbsolute($customComparison)], + ]; } } diff --git a/vendor/symfony/finder/composer.json b/vendor/symfony/finder/composer.json index 37d34a5e..05d5d1bb 100644 --- a/vendor/symfony/finder/composer.json +++ b/vendor/symfony/finder/composer.json @@ -27,7 +27,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "4.2-dev" + "dev-master": "4.3-dev" } } } diff --git a/vendor/symfony/http-foundation/AcceptHeader.php b/vendor/symfony/http-foundation/AcceptHeader.php index c702371f..3f5fbb8f 100644 --- a/vendor/symfony/http-foundation/AcceptHeader.php +++ b/vendor/symfony/http-foundation/AcceptHeader.php @@ -24,7 +24,7 @@ class AcceptHeader /** * @var AcceptHeaderItem[] */ - private $items = array(); + private $items = []; /** * @var bool diff --git a/vendor/symfony/http-foundation/AcceptHeaderItem.php b/vendor/symfony/http-foundation/AcceptHeaderItem.php index 2aaf5957..954aac60 100644 --- a/vendor/symfony/http-foundation/AcceptHeaderItem.php +++ b/vendor/symfony/http-foundation/AcceptHeaderItem.php @@ -21,9 +21,9 @@ class AcceptHeaderItem private $value; private $quality = 1.0; private $index = 0; - private $attributes = array(); + private $attributes = []; - public function __construct(string $value, array $attributes = array()) + public function __construct(string $value, array $attributes = []) { $this->value = $value; foreach ($attributes as $name => $value) { diff --git a/vendor/symfony/http-foundation/BinaryFileResponse.php b/vendor/symfony/http-foundation/BinaryFileResponse.php index 07ef8005..e2178209 100644 --- a/vendor/symfony/http-foundation/BinaryFileResponse.php +++ b/vendor/symfony/http-foundation/BinaryFileResponse.php @@ -44,7 +44,7 @@ class BinaryFileResponse extends Response * @param bool $autoEtag Whether the ETag header should be automatically set * @param bool $autoLastModified Whether the Last-Modified header should be automatically set */ - public function __construct($file, int $status = 200, array $headers = array(), bool $public = true, string $contentDisposition = null, bool $autoEtag = false, bool $autoLastModified = true) + public function __construct($file, int $status = 200, array $headers = [], bool $public = true, string $contentDisposition = null, bool $autoEtag = false, bool $autoLastModified = true) { parent::__construct(null, $status, $headers); @@ -66,7 +66,7 @@ class BinaryFileResponse extends Response * * @return static */ - public static function create($file = null, $status = 200, $headers = array(), $public = true, $contentDisposition = null, $autoEtag = false, $autoLastModified = true) + public static function create($file = null, $status = 200, $headers = [], $public = true, $contentDisposition = null, $autoEtag = false, $autoLastModified = true) { return new static($file, $status, $headers, $public, $contentDisposition, $autoEtag, $autoLastModified); } @@ -223,18 +223,23 @@ class BinaryFileResponse extends Response list($pathPrefix, $location) = $part; if (substr($path, 0, \strlen($pathPrefix)) === $pathPrefix) { $path = $location.substr($path, \strlen($pathPrefix)); + // Only set X-Accel-Redirect header if a valid URI can be produced + // as nginx does not serve arbitrary file paths. + $this->headers->set($type, $path); + $this->maxlen = 0; break; } } + } else { + $this->headers->set($type, $path); + $this->maxlen = 0; } - $this->headers->set($type, $path); - $this->maxlen = 0; } elseif ($request->headers->has('Range')) { // Process the range headers. if (!$request->headers->has('If-Range') || $this->hasValidIfRangeHeader($request->headers->get('If-Range'))) { $range = $request->headers->get('Range'); - list($start, $end) = explode('-', substr($range, 6), 2) + array(0); + list($start, $end) = explode('-', substr($range, 6), 2) + [0]; $end = ('' === $end) ? $fileSize - 1 : (int) $end; @@ -300,7 +305,7 @@ class BinaryFileResponse extends Response fclose($out); fclose($file); - if ($this->deleteFileAfterSend) { + if ($this->deleteFileAfterSend && file_exists($this->file->getPathname())) { unlink($this->file->getPathname()); } diff --git a/vendor/symfony/http-foundation/CHANGELOG.md b/vendor/symfony/http-foundation/CHANGELOG.md index 55eed3f7..54acd6ae 100644 --- a/vendor/symfony/http-foundation/CHANGELOG.md +++ b/vendor/symfony/http-foundation/CHANGELOG.md @@ -1,6 +1,17 @@ CHANGELOG ========= +4.3.0 +----- + + * added PHPUnit constraints: `RequestAttributeValueSame`, `ResponseCookieValueSame`, `ResponseHasCookie`, + `ResponseHasHeader`, `ResponseHeaderSame`, `ResponseIsRedirected`, `ResponseIsSuccessful`, and `ResponseStatusCodeSame` + * deprecated `MimeTypeGuesserInterface` and `ExtensionGuesserInterface` in favor of `Symfony\Component\Mime\MimeTypesInterface`. + * deprecated `MimeType` and `MimeTypeExtensionGuesser` in favor of `Symfony\Component\Mime\MimeTypes`. + * deprecated `FileBinaryMimeTypeGuesser` in favor of `Symfony\Component\Mime\FileBinaryMimeTypeGuesser`. + * deprecated `FileinfoMimeTypeGuesser` in favor of `Symfony\Component\Mime\FileinfoMimeTypeGuesser`. + * added `UrlHelper` that allows to get an absolute URL and a relative path for a given path + 4.2.0 ----- @@ -190,10 +201,10 @@ CHANGELOG * Added `FlashBag`. Flashes expire when retrieved by `get()` or `all()`. This implementation is ESI compatible. * Added `AutoExpireFlashBag` (default) to replicate Symfony 2.0.x auto expire - behaviour of messages auto expiring after one page page load. Messages must + behavior of messages auto expiring after one page page load. Messages must be retrieved by `get()` or `all()`. * Added `Symfony\Component\HttpFoundation\Attribute\AttributeBag` to replicate - attributes storage behaviour from 2.0.x (default). + attributes storage behavior from 2.0.x (default). * Added `Symfony\Component\HttpFoundation\Attribute\NamespacedAttributeBag` for namespace session attributes. * Flash API can stores messages in an array so there may be multiple messages diff --git a/vendor/symfony/http-foundation/Cookie.php b/vendor/symfony/http-foundation/Cookie.php index 7aab318c..e6b8b798 100644 --- a/vendor/symfony/http-foundation/Cookie.php +++ b/vendor/symfony/http-foundation/Cookie.php @@ -29,6 +29,7 @@ class Cookie private $sameSite; private $secureDefault = false; + const SAMESITE_NONE = 'none'; const SAMESITE_LAX = 'lax'; const SAMESITE_STRICT = 'strict'; @@ -42,7 +43,7 @@ class Cookie */ public static function fromString($cookie, $decode = false) { - $data = array( + $data = [ 'expires' => 0, 'path' => '/', 'domain' => null, @@ -50,7 +51,7 @@ class Cookie 'httponly' => false, 'raw' => !$decode, 'samesite' => null, - ); + ]; $parts = HeaderUtils::split($cookie, ';='); $part = array_shift($parts); @@ -126,7 +127,7 @@ class Cookie $sameSite = strtolower($sameSite); } - if (!\in_array($sameSite, array(self::SAMESITE_LAX, self::SAMESITE_STRICT, null), true)) { + if (!\in_array($sameSite, [self::SAMESITE_LAX, self::SAMESITE_STRICT, self::SAMESITE_NONE, null], true)) { throw new \InvalidArgumentException('The "sameSite" parameter value is not valid.'); } diff --git a/vendor/symfony/http-foundation/ExpressionRequestMatcher.php b/vendor/symfony/http-foundation/ExpressionRequestMatcher.php index e9c8441c..26bed7d3 100644 --- a/vendor/symfony/http-foundation/ExpressionRequestMatcher.php +++ b/vendor/symfony/http-foundation/ExpressionRequestMatcher.php @@ -35,13 +35,13 @@ class ExpressionRequestMatcher extends RequestMatcher throw new \LogicException('Unable to match the request as the expression language is not available.'); } - return $this->language->evaluate($this->expression, array( + return $this->language->evaluate($this->expression, [ 'request' => $request, 'method' => $request->getMethod(), 'path' => rawurldecode($request->getPathInfo()), 'host' => $request->getHost(), 'ip' => $request->getClientIp(), 'attributes' => $request->attributes->all(), - )) && parent::matches($request); + ]) && parent::matches($request); } } diff --git a/vendor/symfony/http-foundation/File/File.php b/vendor/symfony/http-foundation/File/File.php index de7b0809..396ff345 100644 --- a/vendor/symfony/http-foundation/File/File.php +++ b/vendor/symfony/http-foundation/File/File.php @@ -13,8 +13,7 @@ namespace Symfony\Component\HttpFoundation\File; use Symfony\Component\HttpFoundation\File\Exception\FileException; use Symfony\Component\HttpFoundation\File\Exception\FileNotFoundException; -use Symfony\Component\HttpFoundation\File\MimeType\ExtensionGuesser; -use Symfony\Component\HttpFoundation\File\MimeType\MimeTypeGuesser; +use Symfony\Component\Mime\MimeTypes; /** * A file in the file system. @@ -50,33 +49,28 @@ class File extends \SplFileInfo * * @return string|null The guessed extension or null if it cannot be guessed * - * @see ExtensionGuesser + * @see MimeTypes * @see getMimeType() */ public function guessExtension() { - $type = $this->getMimeType(); - $guesser = ExtensionGuesser::getInstance(); - - return $guesser->guess($type); + return MimeTypes::getDefault()->getExtensions($this->getMimeType())[0] ?? null; } /** * Returns the mime type of the file. * - * The mime type is guessed using a MimeTypeGuesser instance, which uses finfo(), - * mime_content_type() and the system binary "file" (in this order), depending on - * which of those are available. + * The mime type is guessed using a MimeTypeGuesserInterface instance, + * which uses finfo_file() then the "file" system binary, + * depending on which of those are available. * * @return string|null The guessed mime type (e.g. "application/pdf") * - * @see MimeTypeGuesser + * @see MimeTypes */ public function getMimeType() { - $guesser = MimeTypeGuesser::getInstance(); - - return $guesser->guess($this->getPathname()); + return MimeTypes::getDefault()->guessMimeType($this->getPathname()); } /** diff --git a/vendor/symfony/http-foundation/File/MimeType/ExtensionGuesser.php b/vendor/symfony/http-foundation/File/MimeType/ExtensionGuesser.php index 263fb321..06e5b462 100644 --- a/vendor/symfony/http-foundation/File/MimeType/ExtensionGuesser.php +++ b/vendor/symfony/http-foundation/File/MimeType/ExtensionGuesser.php @@ -11,6 +11,10 @@ namespace Symfony\Component\HttpFoundation\File\MimeType; +use Symfony\Component\Mime\MimeTypes; + +@trigger_error(sprintf('The "%s" class is deprecated since Symfony 4.3, use "%s" instead.', ExtensionGuesser::class, MimeTypes::class), E_USER_DEPRECATED); + /** * A singleton mime type to file extension guesser. * @@ -22,6 +26,8 @@ namespace Symfony\Component\HttpFoundation\File\MimeType; * $guesser->register(new MyCustomExtensionGuesser()); * * The last registered guesser is preferred over previously registered ones. + * + * @deprecated since Symfony 4.3, use {@link MimeTypes} instead */ class ExtensionGuesser implements ExtensionGuesserInterface { @@ -37,7 +43,7 @@ class ExtensionGuesser implements ExtensionGuesserInterface * * @var array */ - protected $guessers = array(); + protected $guessers = []; /** * Returns the singleton instance. diff --git a/vendor/symfony/http-foundation/File/MimeType/ExtensionGuesserInterface.php b/vendor/symfony/http-foundation/File/MimeType/ExtensionGuesserInterface.php index d19a0e53..69fe6efb 100644 --- a/vendor/symfony/http-foundation/File/MimeType/ExtensionGuesserInterface.php +++ b/vendor/symfony/http-foundation/File/MimeType/ExtensionGuesserInterface.php @@ -11,8 +11,12 @@ namespace Symfony\Component\HttpFoundation\File\MimeType; +use Symfony\Component\Mime\MimeTypesInterface; + /** * Guesses the file extension corresponding to a given mime type. + * + * @deprecated since Symfony 4.3, use {@link MimeTypesInterface} instead */ interface ExtensionGuesserInterface { diff --git a/vendor/symfony/http-foundation/File/MimeType/FileBinaryMimeTypeGuesser.php b/vendor/symfony/http-foundation/File/MimeType/FileBinaryMimeTypeGuesser.php index 31300019..b4d51023 100644 --- a/vendor/symfony/http-foundation/File/MimeType/FileBinaryMimeTypeGuesser.php +++ b/vendor/symfony/http-foundation/File/MimeType/FileBinaryMimeTypeGuesser.php @@ -13,11 +13,16 @@ namespace Symfony\Component\HttpFoundation\File\MimeType; use Symfony\Component\HttpFoundation\File\Exception\AccessDeniedException; use Symfony\Component\HttpFoundation\File\Exception\FileNotFoundException; +use Symfony\Component\Mime\FileBinaryMimeTypeGuesser as NewFileBinaryMimeTypeGuesser; + +@trigger_error(sprintf('The "%s" class is deprecated since Symfony 4.3, use "%s" instead.', FileBinaryMimeTypeGuesser::class, NewFileBinaryMimeTypeGuesser::class), E_USER_DEPRECATED); /** * Guesses the mime type with the binary "file" (only available on *nix). * * @author Bernhard Schussek + * + * @deprecated since Symfony 4.3, use {@link NewFileBinaryMimeTypeGuesser} instead */ class FileBinaryMimeTypeGuesser implements MimeTypeGuesserInterface { diff --git a/vendor/symfony/http-foundation/File/MimeType/FileinfoMimeTypeGuesser.php b/vendor/symfony/http-foundation/File/MimeType/FileinfoMimeTypeGuesser.php index cee9ef3f..bb323701 100644 --- a/vendor/symfony/http-foundation/File/MimeType/FileinfoMimeTypeGuesser.php +++ b/vendor/symfony/http-foundation/File/MimeType/FileinfoMimeTypeGuesser.php @@ -13,11 +13,16 @@ namespace Symfony\Component\HttpFoundation\File\MimeType; use Symfony\Component\HttpFoundation\File\Exception\AccessDeniedException; use Symfony\Component\HttpFoundation\File\Exception\FileNotFoundException; +use Symfony\Component\Mime\FileinfoMimeTypeGuesser as NewFileinfoMimeTypeGuesser; + +@trigger_error(sprintf('The "%s" class is deprecated since Symfony 4.3, use "%s" instead.', FileinfoMimeTypeGuesser::class, NewFileinfoMimeTypeGuesser::class), E_USER_DEPRECATED); /** * Guesses the mime type using the PECL extension FileInfo. * * @author Bernhard Schussek + * + * @deprecated since Symfony 4.3, use {@link NewFileinfoMimeTypeGuesser} instead */ class FileinfoMimeTypeGuesser implements MimeTypeGuesserInterface { diff --git a/vendor/symfony/http-foundation/File/MimeType/MimeTypeExtensionGuesser.php b/vendor/symfony/http-foundation/File/MimeType/MimeTypeExtensionGuesser.php index 77bf51b1..651be070 100644 --- a/vendor/symfony/http-foundation/File/MimeType/MimeTypeExtensionGuesser.php +++ b/vendor/symfony/http-foundation/File/MimeType/MimeTypeExtensionGuesser.php @@ -11,8 +11,14 @@ namespace Symfony\Component\HttpFoundation\File\MimeType; +use Symfony\Component\Mime\MimeTypes; + +@trigger_error(sprintf('The "%s" class is deprecated since Symfony 4.3, use "%s" instead.', MimeTypeExtensionGuesser::class, MimeTypes::class), E_USER_DEPRECATED); + /** * Provides a best-guess mapping of mime type to file extension. + * + * @deprecated since Symfony 4.3, use {@link MimeTypes} instead */ class MimeTypeExtensionGuesser implements ExtensionGuesserInterface { @@ -20,11 +26,11 @@ class MimeTypeExtensionGuesser implements ExtensionGuesserInterface * A map of mime types and their default extensions. * * This list has been placed under the public domain by the Apache HTTPD project. - * This list has been updated from upstream on 2013-04-23. + * This list has been updated from upstream on 2019-01-14. * - * @see http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types + * @see https://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types */ - protected $defaultExtensions = array( + protected $defaultExtensions = [ 'application/andrew-inset' => 'ez', 'application/applixware' => 'aw', 'application/atom+xml' => 'atom', @@ -618,7 +624,7 @@ class MimeTypeExtensionGuesser implements ExtensionGuesserInterface 'audio/adpcm' => 'adp', 'audio/basic' => 'au', 'audio/midi' => 'mid', - 'audio/mp4' => 'mp4a', + 'audio/mp4' => 'm4a', 'audio/mpeg' => 'mpga', 'audio/ogg' => 'oga', 'audio/s3m' => 's3m', @@ -639,6 +645,7 @@ class MimeTypeExtensionGuesser implements ExtensionGuesserInterface 'audio/x-aiff' => 'aif', 'audio/x-caf' => 'caf', 'audio/x-flac' => 'flac', + 'audio/x-hx-aac-adts' => 'aac', 'audio/x-matroska' => 'mka', 'audio/x-mpegurl' => 'm3u', 'audio/x-ms-wax' => 'wax', @@ -653,6 +660,11 @@ class MimeTypeExtensionGuesser implements ExtensionGuesserInterface 'chemical/x-cml' => 'cml', 'chemical/x-csml' => 'csml', 'chemical/x-xyz' => 'xyz', + 'font/collection' => 'ttc', + 'font/otf' => 'otf', + 'font/ttf' => 'ttf', + 'font/woff' => 'woff', + 'font/woff2' => 'woff2', 'image/bmp' => 'bmp', 'image/x-ms-bmp' => 'bmp', 'image/cgm' => 'cgm', @@ -669,8 +681,8 @@ class MimeTypeExtensionGuesser implements ExtensionGuesserInterface 'image/tiff' => 'tiff', 'image/vnd.adobe.photoshop' => 'psd', 'image/vnd.dece.graphic' => 'uvi', - 'image/vnd.dvb.subtitle' => 'sub', 'image/vnd.djvu' => 'djvu', + 'image/vnd.dvb.subtitle' => 'sub', 'image/vnd.dwg' => 'dwg', 'image/vnd.dxf' => 'dxf', 'image/vnd.fastbidsheet' => 'fbs', @@ -732,8 +744,8 @@ class MimeTypeExtensionGuesser implements ExtensionGuesserInterface 'text/vcard' => 'vcard', 'text/vnd.curl' => 'curl', 'text/vnd.curl.dcurl' => 'dcurl', - 'text/vnd.curl.scurl' => 'scurl', 'text/vnd.curl.mcurl' => 'mcurl', + 'text/vnd.curl.scurl' => 'scurl', 'text/vnd.dvb.subtitle' => 'sub', 'text/vnd.fly' => 'fly', 'text/vnd.fmi.flexstor' => 'flx', @@ -747,10 +759,10 @@ class MimeTypeExtensionGuesser implements ExtensionGuesserInterface 'text/x-asm' => 's', 'text/x-c' => 'c', 'text/x-fortran' => 'f', - 'text/x-pascal' => 'p', 'text/x-java-source' => 'java', - 'text/x-opml' => 'opml', 'text/x-nfo' => 'nfo', + 'text/x-opml' => 'opml', + 'text/x-pascal' => 'p', 'text/x-setext' => 'etx', 'text/x-sfv' => 'sfv', 'text/x-uuencode' => 'uu', @@ -796,13 +808,19 @@ class MimeTypeExtensionGuesser implements ExtensionGuesserInterface 'video/x-sgi-movie' => 'movie', 'video/x-smv' => 'smv', 'x-conference/x-cooltalk' => 'ice', - ); + ]; /** * {@inheritdoc} */ public function guess($mimeType) { - return isset($this->defaultExtensions[$mimeType]) ? $this->defaultExtensions[$mimeType] : null; + if (isset($this->defaultExtensions[$mimeType])) { + return $this->defaultExtensions[$mimeType]; + } + + $lcMimeType = strtolower($mimeType); + + return isset($this->defaultExtensions[$lcMimeType]) ? $this->defaultExtensions[$lcMimeType] : null; } } diff --git a/vendor/symfony/http-foundation/File/MimeType/MimeTypeGuesser.php b/vendor/symfony/http-foundation/File/MimeType/MimeTypeGuesser.php index dae47a7c..2b30a62a 100644 --- a/vendor/symfony/http-foundation/File/MimeType/MimeTypeGuesser.php +++ b/vendor/symfony/http-foundation/File/MimeType/MimeTypeGuesser.php @@ -13,6 +13,9 @@ namespace Symfony\Component\HttpFoundation\File\MimeType; use Symfony\Component\HttpFoundation\File\Exception\AccessDeniedException; use Symfony\Component\HttpFoundation\File\Exception\FileNotFoundException; +use Symfony\Component\Mime\MimeTypes; + +@trigger_error(sprintf('The "%s" class is deprecated since Symfony 4.3, use "%s" instead.', MimeTypeGuesser::class, MimeTypes::class), E_USER_DEPRECATED); /** * A singleton mime type guesser. @@ -51,7 +54,7 @@ class MimeTypeGuesser implements MimeTypeGuesserInterface * * @var array */ - protected $guessers = array(); + protected $guessers = []; /** * Returns the singleton instance. diff --git a/vendor/symfony/http-foundation/File/MimeType/MimeTypeGuesserInterface.php b/vendor/symfony/http-foundation/File/MimeType/MimeTypeGuesserInterface.php index 5ac1acb8..0f048b53 100644 --- a/vendor/symfony/http-foundation/File/MimeType/MimeTypeGuesserInterface.php +++ b/vendor/symfony/http-foundation/File/MimeType/MimeTypeGuesserInterface.php @@ -13,11 +13,14 @@ namespace Symfony\Component\HttpFoundation\File\MimeType; use Symfony\Component\HttpFoundation\File\Exception\AccessDeniedException; use Symfony\Component\HttpFoundation\File\Exception\FileNotFoundException; +use Symfony\Component\Mime\MimeTypesInterface; /** * Guesses the mime type of a file. * * @author Bernhard Schussek + * + * @deprecated since Symfony 4.3, use {@link MimeTypesInterface} instead */ interface MimeTypeGuesserInterface { diff --git a/vendor/symfony/http-foundation/File/UploadedFile.php b/vendor/symfony/http-foundation/File/UploadedFile.php index 63fa6c73..568d192f 100644 --- a/vendor/symfony/http-foundation/File/UploadedFile.php +++ b/vendor/symfony/http-foundation/File/UploadedFile.php @@ -20,7 +20,7 @@ use Symfony\Component\HttpFoundation\File\Exception\IniSizeFileException; use Symfony\Component\HttpFoundation\File\Exception\NoFileException; use Symfony\Component\HttpFoundation\File\Exception\NoTmpDirFileException; use Symfony\Component\HttpFoundation\File\Exception\PartialFileException; -use Symfony\Component\HttpFoundation\File\MimeType\ExtensionGuesser; +use Symfony\Component\Mime\MimeTypes; /** * A file uploaded through a form. @@ -140,10 +140,7 @@ class UploadedFile extends File */ public function guessClientExtension() { - $type = $this->getClientMimeType(); - $guesser = ExtensionGuesser::getInstance(); - - return $guesser->guess($type); + return MimeTypes::getDefault()->getExtensions($this->getClientMimeType())[0] ?? null; } /** @@ -281,7 +278,7 @@ class UploadedFile extends File */ public function getErrorMessage() { - static $errors = array( + static $errors = [ UPLOAD_ERR_INI_SIZE => 'The file "%s" exceeds your upload_max_filesize ini directive (limit is %d KiB).', UPLOAD_ERR_FORM_SIZE => 'The file "%s" exceeds the upload limit defined in your form.', UPLOAD_ERR_PARTIAL => 'The file "%s" was only partially uploaded.', @@ -289,7 +286,7 @@ class UploadedFile extends File UPLOAD_ERR_CANT_WRITE => 'The file "%s" could not be written on disk.', UPLOAD_ERR_NO_TMP_DIR => 'File could not be uploaded: missing temporary directory.', UPLOAD_ERR_EXTENSION => 'File upload was stopped by a PHP extension.', - ); + ]; $errorCode = $this->error; $maxFilesize = UPLOAD_ERR_INI_SIZE === $errorCode ? self::getMaxFilesize() / 1024 : 0; diff --git a/vendor/symfony/http-foundation/FileBag.php b/vendor/symfony/http-foundation/FileBag.php index f37e10f2..efd83ffe 100644 --- a/vendor/symfony/http-foundation/FileBag.php +++ b/vendor/symfony/http-foundation/FileBag.php @@ -21,12 +21,12 @@ use Symfony\Component\HttpFoundation\File\UploadedFile; */ class FileBag extends ParameterBag { - private static $fileKeys = array('error', 'name', 'size', 'tmp_name', 'type'); + private static $fileKeys = ['error', 'name', 'size', 'tmp_name', 'type']; /** * @param array $parameters An array of HTTP files */ - public function __construct(array $parameters = array()) + public function __construct(array $parameters = []) { $this->replace($parameters); } @@ -34,9 +34,9 @@ class FileBag extends ParameterBag /** * {@inheritdoc} */ - public function replace(array $files = array()) + public function replace(array $files = []) { - $this->parameters = array(); + $this->parameters = []; $this->add($files); } @@ -55,7 +55,7 @@ class FileBag extends ParameterBag /** * {@inheritdoc} */ - public function add(array $files = array()) + public function add(array $files = []) { foreach ($files as $key => $file) { $this->set($key, $file); @@ -84,10 +84,10 @@ class FileBag extends ParameterBag if (UPLOAD_ERR_NO_FILE == $file['error']) { $file = null; } else { - $file = new UploadedFile($file['tmp_name'], $file['name'], $file['type'], $file['error']); + $file = new UploadedFile($file['tmp_name'], $file['name'], $file['type'], $file['error'], false); } } else { - $file = array_map(array($this, 'convertFileInformation'), $file); + $file = array_map([$this, 'convertFileInformation'], $file); if (array_keys($keys) === $keys) { $file = array_filter($file); } @@ -130,13 +130,13 @@ class FileBag extends ParameterBag } foreach ($data['name'] as $key => $name) { - $files[$key] = $this->fixPhpFilesArray(array( + $files[$key] = $this->fixPhpFilesArray([ 'error' => $data['error'][$key], 'name' => $name, 'type' => $data['type'][$key], 'tmp_name' => $data['tmp_name'][$key], 'size' => $data['size'][$key], - )); + ]); } return $files; diff --git a/vendor/symfony/http-foundation/HeaderBag.php b/vendor/symfony/http-foundation/HeaderBag.php index 8f51ef9d..fa9d1731 100644 --- a/vendor/symfony/http-foundation/HeaderBag.php +++ b/vendor/symfony/http-foundation/HeaderBag.php @@ -18,13 +18,13 @@ namespace Symfony\Component\HttpFoundation; */ class HeaderBag implements \IteratorAggregate, \Countable { - protected $headers = array(); - protected $cacheControl = array(); + protected $headers = []; + protected $cacheControl = []; /** * @param array $headers An array of HTTP headers */ - public function __construct(array $headers = array()) + public function __construct(array $headers = []) { foreach ($headers as $key => $values) { $this->set($key, $values); @@ -80,9 +80,9 @@ class HeaderBag implements \IteratorAggregate, \Countable * * @param array $headers An array of HTTP headers */ - public function replace(array $headers = array()) + public function replace(array $headers = []) { - $this->headers = array(); + $this->headers = []; $this->add($headers); } @@ -112,12 +112,12 @@ class HeaderBag implements \IteratorAggregate, \Countable $key = str_replace('_', '-', strtolower($key)); $headers = $this->all(); - if (!array_key_exists($key, $headers)) { + if (!\array_key_exists($key, $headers)) { if (null === $default) { - return $first ? null : array(); + return $first ? null : []; } - return $first ? $default : array($default); + return $first ? $default : [$default]; } if ($first) { @@ -148,7 +148,7 @@ class HeaderBag implements \IteratorAggregate, \Countable } } else { if (true === $replace || !isset($this->headers[$key])) { - $this->headers[$key] = array($values); + $this->headers[$key] = [$values]; } else { $this->headers[$key][] = $values; } @@ -168,7 +168,7 @@ class HeaderBag implements \IteratorAggregate, \Countable */ public function has($key) { - return array_key_exists(str_replace('_', '-', strtolower($key)), $this->all()); + return \array_key_exists(str_replace('_', '-', strtolower($key)), $this->all()); } /** @@ -196,7 +196,7 @@ class HeaderBag implements \IteratorAggregate, \Countable unset($this->headers[$key]); if ('cache-control' === $key) { - $this->cacheControl = array(); + $this->cacheControl = []; } } @@ -245,7 +245,7 @@ class HeaderBag implements \IteratorAggregate, \Countable */ public function hasCacheControlDirective($key) { - return array_key_exists($key, $this->cacheControl); + return \array_key_exists($key, $this->cacheControl); } /** @@ -257,7 +257,7 @@ class HeaderBag implements \IteratorAggregate, \Countable */ public function getCacheControlDirective($key) { - return array_key_exists($key, $this->cacheControl) ? $this->cacheControl[$key] : null; + return \array_key_exists($key, $this->cacheControl) ? $this->cacheControl[$key] : null; } /** diff --git a/vendor/symfony/http-foundation/HeaderUtils.php b/vendor/symfony/http-foundation/HeaderUtils.php index 637bc5be..31db1bd0 100644 --- a/vendor/symfony/http-foundation/HeaderUtils.php +++ b/vendor/symfony/http-foundation/HeaderUtils.php @@ -34,7 +34,7 @@ class HeaderUtils * Example: * * HeaderUtils::split("da, en-gb;q=0.8", ",;") - * // => array(array('da'), array('en-gb', 'q=0.8')) + * // => ['da'], ['en-gb', 'q=0.8']] * * @param string $header HTTP header value * @param string $separators List of characters to split on, ordered by @@ -78,12 +78,12 @@ class HeaderUtils * * Example: * - * HeaderUtils::combine(array(array("foo", "abc"), array("bar"))) - * // => array("foo" => "abc", "bar" => true) + * HeaderUtils::combine([["foo", "abc"], ["bar"]]) + * // => ["foo" => "abc", "bar" => true] */ public static function combine(array $parts): array { - $assoc = array(); + $assoc = []; foreach ($parts as $part) { $name = strtolower($part[0]); $value = $part[1] ?? true; @@ -102,12 +102,12 @@ class HeaderUtils * * Example: * - * HeaderUtils::toString(array("foo" => "abc", "bar" => true, "baz" => "a b c"), ",") + * HeaderUtils::toString(["foo" => "abc", "bar" => true, "baz" => "a b c"], ",") * // => 'foo=abc, bar, baz="a b c"' */ public static function toString(array $assoc, string $separator): string { - $parts = array(); + $parts = []; foreach ($assoc as $name => $value) { if (true === $value) { $parts[] = $name; @@ -163,7 +163,7 @@ class HeaderUtils */ public static function makeDisposition(string $disposition, string $filename, string $filenameFallback = ''): string { - if (!\in_array($disposition, array(self::DISPOSITION_ATTACHMENT, self::DISPOSITION_INLINE))) { + if (!\in_array($disposition, [self::DISPOSITION_ATTACHMENT, self::DISPOSITION_INLINE])) { throw new \InvalidArgumentException(sprintf('The disposition must be either "%s" or "%s".', self::DISPOSITION_ATTACHMENT, self::DISPOSITION_INLINE)); } @@ -186,7 +186,7 @@ class HeaderUtils throw new \InvalidArgumentException('The filename and the fallback cannot contain the "/" and "\\" characters.'); } - $params = array('filename' => $filenameFallback); + $params = ['filename' => $filenameFallback]; if ($filename !== $filenameFallback) { $params['filename*'] = "utf-8''".rawurlencode($filename); } @@ -200,7 +200,7 @@ class HeaderUtils $partSeparators = substr($separators, 1); $i = 0; - $partMatches = array(); + $partMatches = []; foreach ($matches as $match) { if (isset($match['separator']) && $match['separator'] === $separator) { ++$i; @@ -209,7 +209,7 @@ class HeaderUtils } } - $parts = array(); + $parts = []; if ($partSeparators) { foreach ($partMatches as $matches) { $parts[] = self::groupParts($matches, $partSeparators); diff --git a/vendor/symfony/http-foundation/IpUtils.php b/vendor/symfony/http-foundation/IpUtils.php index a1bfa908..67d13e57 100644 --- a/vendor/symfony/http-foundation/IpUtils.php +++ b/vendor/symfony/http-foundation/IpUtils.php @@ -18,7 +18,7 @@ namespace Symfony\Component\HttpFoundation; */ class IpUtils { - private static $checkedIps = array(); + private static $checkedIps = []; /** * This class should not be instantiated. @@ -38,7 +38,7 @@ class IpUtils public static function checkIp($requestIp, $ips) { if (!\is_array($ips)) { - $ips = array($ips); + $ips = [$ips]; } $method = substr_count($requestIp, ':') > 1 ? 'checkIp6' : 'checkIp4'; diff --git a/vendor/symfony/http-foundation/JsonResponse.php b/vendor/symfony/http-foundation/JsonResponse.php index f10262e8..4dae091f 100644 --- a/vendor/symfony/http-foundation/JsonResponse.php +++ b/vendor/symfony/http-foundation/JsonResponse.php @@ -39,7 +39,7 @@ class JsonResponse extends Response * @param array $headers An array of response headers * @param bool $json If the data is already a JSON string */ - public function __construct($data = null, int $status = 200, array $headers = array(), bool $json = false) + public function __construct($data = null, int $status = 200, array $headers = [], bool $json = false) { parent::__construct('', $status, $headers); @@ -64,7 +64,7 @@ class JsonResponse extends Response * * @return static */ - public static function create($data = null, $status = 200, $headers = array()) + public static function create($data = null, $status = 200, $headers = []) { return new static($data, $status, $headers); } @@ -72,7 +72,7 @@ class JsonResponse extends Response /** * Make easier the creation of JsonResponse from raw json. */ - public static function fromJsonString($data = null, $status = 200, $headers = array()) + public static function fromJsonString($data = null, $status = 200, $headers = []) { return new static($data, $status, $headers, true); } @@ -94,11 +94,11 @@ class JsonResponse extends Response // JsonpCallbackValidator is released under the MIT License. See https://github.com/willdurand/JsonpCallbackValidator/blob/v1.1.0/LICENSE for details. // (c) William Durand $pattern = '/^[$_\p{L}][$_\p{L}\p{Mn}\p{Mc}\p{Nd}\p{Pc}\x{200C}\x{200D}]*(?:\[(?:"(?:\\\.|[^"\\\])*"|\'(?:\\\.|[^\'\\\])*\'|\d+)\])*?$/u'; - $reserved = array( + $reserved = [ 'break', 'do', 'instanceof', 'typeof', 'case', 'else', 'new', 'var', 'catch', 'finally', 'return', 'void', 'continue', 'for', 'switch', 'while', 'debugger', 'function', 'this', 'with', 'default', 'if', 'throw', 'delete', 'in', 'try', 'class', 'enum', 'extends', 'super', 'const', 'export', 'import', 'implements', 'let', 'private', 'public', 'yield', 'interface', 'package', 'protected', 'static', 'null', 'true', 'false', - ); + ]; $parts = explode('.', $callback); foreach ($parts as $part) { if (!preg_match($pattern, $part) || \in_array($part, $reserved, true)) { @@ -137,7 +137,7 @@ class JsonResponse extends Response * * @throws \InvalidArgumentException */ - public function setData($data = array()) + public function setData($data = []) { try { $data = json_encode($data, $this->encodingOptions); @@ -148,6 +148,10 @@ class JsonResponse extends Response throw $e; } + if (\PHP_VERSION_ID >= 70300 && (JSON_THROW_ON_ERROR & $this->encodingOptions)) { + return $this->setJson($data); + } + if (JSON_ERROR_NONE !== json_last_error()) { throw new \InvalidArgumentException(json_last_error_msg()); } diff --git a/vendor/symfony/http-foundation/ParameterBag.php b/vendor/symfony/http-foundation/ParameterBag.php index 19d7ee91..f05e4a21 100644 --- a/vendor/symfony/http-foundation/ParameterBag.php +++ b/vendor/symfony/http-foundation/ParameterBag.php @@ -26,7 +26,7 @@ class ParameterBag implements \IteratorAggregate, \Countable /** * @param array $parameters An array of parameters */ - public function __construct(array $parameters = array()) + public function __construct(array $parameters = []) { $this->parameters = $parameters; } @@ -56,7 +56,7 @@ class ParameterBag implements \IteratorAggregate, \Countable * * @param array $parameters An array of parameters */ - public function replace(array $parameters = array()) + public function replace(array $parameters = []) { $this->parameters = $parameters; } @@ -66,7 +66,7 @@ class ParameterBag implements \IteratorAggregate, \Countable * * @param array $parameters An array of parameters */ - public function add(array $parameters = array()) + public function add(array $parameters = []) { $this->parameters = array_replace($this->parameters, $parameters); } @@ -81,7 +81,7 @@ class ParameterBag implements \IteratorAggregate, \Countable */ public function get($key, $default = null) { - return array_key_exists($key, $this->parameters) ? $this->parameters[$key] : $default; + return \array_key_exists($key, $this->parameters) ? $this->parameters[$key] : $default; } /** @@ -104,7 +104,7 @@ class ParameterBag implements \IteratorAggregate, \Countable */ public function has($key) { - return array_key_exists($key, $this->parameters); + return \array_key_exists($key, $this->parameters); } /** @@ -154,7 +154,7 @@ class ParameterBag implements \IteratorAggregate, \Countable public function getDigits($key, $default = '') { // we need to remove - and + because they're allowed in the filter - return str_replace(array('-', '+'), '', $this->filter($key, $default, FILTER_SANITIZE_NUMBER_INT)); + return str_replace(['-', '+'], '', $this->filter($key, $default, FILTER_SANITIZE_NUMBER_INT)); } /** @@ -195,13 +195,13 @@ class ParameterBag implements \IteratorAggregate, \Countable * * @return mixed */ - public function filter($key, $default = null, $filter = FILTER_DEFAULT, $options = array()) + public function filter($key, $default = null, $filter = FILTER_DEFAULT, $options = []) { $value = $this->get($key, $default); // Always turn $options into an array - this allows filter_var option shortcuts. if (!\is_array($options) && $options) { - $options = array('flags' => $options); + $options = ['flags' => $options]; } // Add a convenience check for arrays. diff --git a/vendor/symfony/http-foundation/RedirectResponse.php b/vendor/symfony/http-foundation/RedirectResponse.php index 11f71a03..8d04aa42 100644 --- a/vendor/symfony/http-foundation/RedirectResponse.php +++ b/vendor/symfony/http-foundation/RedirectResponse.php @@ -32,7 +32,7 @@ class RedirectResponse extends Response * * @see http://tools.ietf.org/html/rfc2616#section-10.3 */ - public function __construct(?string $url, int $status = 302, array $headers = array()) + public function __construct(?string $url, int $status = 302, array $headers = []) { parent::__construct('', $status, $headers); @@ -42,7 +42,7 @@ class RedirectResponse extends Response throw new \InvalidArgumentException(sprintf('The HTTP status code is not a redirect ("%s" given).', $status)); } - if (301 == $status && !array_key_exists('cache-control', $headers)) { + if (301 == $status && !\array_key_exists('cache-control', array_change_key_case($headers, \CASE_LOWER))) { $this->headers->remove('cache-control'); } } @@ -56,7 +56,7 @@ class RedirectResponse extends Response * * @return static */ - public static function create($url = '', $status = 302, $headers = array()) + public static function create($url = '', $status = 302, $headers = []) { return new static($url, $status, $headers); } diff --git a/vendor/symfony/http-foundation/Request.php b/vendor/symfony/http-foundation/Request.php index c13016e5..fffe2ab8 100644 --- a/vendor/symfony/http-foundation/Request.php +++ b/vendor/symfony/http-foundation/Request.php @@ -52,17 +52,17 @@ class Request /** * @var string[] */ - protected static $trustedProxies = array(); + protected static $trustedProxies = []; /** * @var string[] */ - protected static $trustedHostPatterns = array(); + protected static $trustedHostPatterns = []; /** * @var string[] */ - protected static $trustedHosts = array(); + protected static $trustedHosts = []; protected static $httpMethodParameterOverride = false; @@ -197,12 +197,12 @@ class Request private static $trustedHeaderSet = -1; - private static $forwardedParams = array( + private static $forwardedParams = [ self::HEADER_X_FORWARDED_FOR => 'for', self::HEADER_X_FORWARDED_HOST => 'host', self::HEADER_X_FORWARDED_PROTO => 'proto', self::HEADER_X_FORWARDED_PORT => 'host', - ); + ]; /** * Names for headers that can be trusted when @@ -213,13 +213,13 @@ class Request * The other headers are non-standard, but widely used * by popular reverse proxies (like Apache mod_proxy or Amazon EC2). */ - private static $trustedHeaders = array( + private static $trustedHeaders = [ self::HEADER_FORWARDED => 'FORWARDED', self::HEADER_X_FORWARDED_FOR => 'X_FORWARDED_FOR', self::HEADER_X_FORWARDED_HOST => 'X_FORWARDED_HOST', self::HEADER_X_FORWARDED_PROTO => 'X_FORWARDED_PROTO', self::HEADER_X_FORWARDED_PORT => 'X_FORWARDED_PORT', - ); + ]; /** * @param array $query The GET parameters @@ -230,7 +230,7 @@ class Request * @param array $server The SERVER parameters * @param string|resource|null $content The raw body data */ - public function __construct(array $query = array(), array $request = array(), array $attributes = array(), array $cookies = array(), array $files = array(), array $server = array(), $content = null) + public function __construct(array $query = [], array $request = [], array $attributes = [], array $cookies = [], array $files = [], array $server = [], $content = null) { $this->initialize($query, $request, $attributes, $cookies, $files, $server, $content); } @@ -248,7 +248,7 @@ class Request * @param array $server The SERVER parameters * @param string|resource|null $content The raw body data */ - public function initialize(array $query = array(), array $request = array(), array $attributes = array(), array $cookies = array(), array $files = array(), array $server = array(), $content = null) + public function initialize(array $query = [], array $request = [], array $attributes = [], array $cookies = [], array $files = [], array $server = [], $content = null) { $this->request = new ParameterBag($request); $this->query = new ParameterBag($query); @@ -278,10 +278,10 @@ class Request */ public static function createFromGlobals() { - $request = self::createRequestFromFactory($_GET, $_POST, array(), $_COOKIE, $_FILES, $_SERVER); + $request = self::createRequestFromFactory($_GET, $_POST, [], $_COOKIE, $_FILES, $_SERVER); if (0 === strpos($request->headers->get('CONTENT_TYPE'), 'application/x-www-form-urlencoded') - && \in_array(strtoupper($request->server->get('REQUEST_METHOD', 'GET')), array('PUT', 'DELETE', 'PATCH')) + && \in_array(strtoupper($request->server->get('REQUEST_METHOD', 'GET')), ['PUT', 'DELETE', 'PATCH']) ) { parse_str($request->getContent(), $data); $request->request = new ParameterBag($data); @@ -306,9 +306,9 @@ class Request * * @return static */ - public static function create($uri, $method = 'GET', $parameters = array(), $cookies = array(), $files = array(), $server = array(), $content = null) + public static function create($uri, $method = 'GET', $parameters = [], $cookies = [], $files = [], $server = [], $content = null) { - $server = array_replace(array( + $server = array_replace([ 'SERVER_NAME' => 'localhost', 'SERVER_PORT' => 80, 'HTTP_HOST' => 'localhost', @@ -321,7 +321,7 @@ class Request 'SCRIPT_FILENAME' => '', 'SERVER_PROTOCOL' => 'HTTP/1.1', 'REQUEST_TIME' => time(), - ), $server); + ], $server); $server['PATH_INFO'] = ''; $server['REQUEST_METHOD'] = strtoupper($method); @@ -369,10 +369,10 @@ class Request // no break case 'PATCH': $request = $parameters; - $query = array(); + $query = []; break; default: - $request = array(); + $request = []; $query = $parameters; break; } @@ -395,7 +395,7 @@ class Request $server['REQUEST_URI'] = $components['path'].('' !== $queryString ? '?'.$queryString : ''); $server['QUERY_STRING'] = $queryString; - return self::createRequestFromFactory($query, $request, array(), $cookies, $files, $server, $content); + return self::createRequestFromFactory($query, $request, [], $cookies, $files, $server, $content); } /** @@ -499,7 +499,7 @@ class Request } $cookieHeader = ''; - $cookies = array(); + $cookies = []; foreach ($this->cookies as $k => $v) { $cookies[] = $k.'='.$v; @@ -533,19 +533,19 @@ class Request foreach ($this->headers->all() as $key => $value) { $key = strtoupper(str_replace('-', '_', $key)); - if (\in_array($key, array('CONTENT_TYPE', 'CONTENT_LENGTH'))) { + if (\in_array($key, ['CONTENT_TYPE', 'CONTENT_LENGTH'])) { $_SERVER[$key] = implode(', ', $value); } else { $_SERVER['HTTP_'.$key] = implode(', ', $value); } } - $request = array('g' => $_GET, 'p' => $_POST, 'c' => $_COOKIE); + $request = ['g' => $_GET, 'p' => $_POST, 'c' => $_COOKIE]; $requestOrder = ini_get('request_order') ?: ini_get('variables_order'); $requestOrder = preg_replace('#[^cgp]#', '', strtolower($requestOrder)) ?: 'gp'; - $_REQUEST = array(array()); + $_REQUEST = [[]]; foreach (str_split($requestOrder) as $order) { $_REQUEST[] = $request[$order]; @@ -603,7 +603,7 @@ class Request return sprintf('{%s}i', $hostPattern); }, $hostPatterns); // we need to reset trusted hosts on trusted host patterns change - self::$trustedHosts = array(); + self::$trustedHosts = []; } /** @@ -777,10 +777,10 @@ class Request $ip = $this->server->get('REMOTE_ADDR'); if (!$this->isFromTrustedProxy()) { - return array($ip); + return [$ip]; } - return $this->getTrustedValues(self::HEADER_X_FORWARDED_FOR, $ip) ?: array($ip); + return $this->getTrustedValues(self::HEADER_X_FORWARDED_FOR, $ip) ?: [$ip]; } /** @@ -1114,7 +1114,7 @@ class Request public function isSecure() { if ($this->isFromTrustedProxy() && $proto = $this->getTrustedValues(self::HEADER_X_FORWARDED_PROTO)) { - return \in_array(strtolower($proto[0]), array('https', 'on', 'ssl', '1'), true); + return \in_array(strtolower($proto[0]), ['https', 'on', 'ssl', '1'], true); } $https = $this->server->get('HTTPS'); @@ -1214,22 +1214,37 @@ class Request */ public function getMethod() { - if (null === $this->method) { - $this->method = strtoupper($this->server->get('REQUEST_METHOD', 'GET')); - - if ('POST' === $this->method) { - if ($method = $this->headers->get('X-HTTP-METHOD-OVERRIDE')) { - $this->method = strtoupper($method); - } elseif (self::$httpMethodParameterOverride) { - $method = $this->request->get('_method', $this->query->get('_method', 'POST')); - if (\is_string($method)) { - $this->method = strtoupper($method); - } - } - } + if (null !== $this->method) { + return $this->method; } - return $this->method; + $this->method = strtoupper($this->server->get('REQUEST_METHOD', 'GET')); + + if ('POST' !== $this->method) { + return $this->method; + } + + $method = $this->headers->get('X-HTTP-METHOD-OVERRIDE'); + + if (!$method && self::$httpMethodParameterOverride) { + $method = $this->request->get('_method', $this->query->get('_method', 'POST')); + } + + if (!\is_string($method)) { + return $this->method; + } + + $method = strtoupper($method); + + if (\in_array($method, ['GET', 'HEAD', 'POST', 'PUT', 'DELETE', 'CONNECT', 'OPTIONS', 'PATCH', 'PURGE', 'TRACE'], true)) { + return $this->method = $method; + } + + if (!preg_match('/^[A-Z]++$/D', $method)) { + throw new SuspiciousOperationException(sprintf('Invalid method override "%s".', $method)); + } + + return $this->method = $method; } /** @@ -1273,7 +1288,7 @@ class Request static::initializeFormats(); } - return isset(static::$formats[$format]) ? static::$formats[$format] : array(); + return isset(static::$formats[$format]) ? static::$formats[$format] : []; } /** @@ -1316,7 +1331,7 @@ class Request static::initializeFormats(); } - static::$formats[$format] = \is_array($mimeTypes) ? $mimeTypes : array($mimeTypes); + static::$formats[$format] = \is_array($mimeTypes) ? $mimeTypes : [$mimeTypes]; } /** @@ -1330,7 +1345,7 @@ class Request * * @param string|null $default The default format * - * @return string The request format + * @return string|null The request format */ public function getRequestFormat($default = 'html') { @@ -1433,7 +1448,7 @@ class Request throw new \BadMethodCallException('Checking only for cacheable HTTP methods with Symfony\Component\HttpFoundation\Request::isMethodSafe() is not supported.'); } - return \in_array($this->getMethod(), array('GET', 'HEAD', 'OPTIONS', 'TRACE')); + return \in_array($this->getMethod(), ['GET', 'HEAD', 'OPTIONS', 'TRACE']); } /** @@ -1443,7 +1458,7 @@ class Request */ public function isMethodIdempotent() { - return \in_array($this->getMethod(), array('HEAD', 'GET', 'PUT', 'DELETE', 'TRACE', 'OPTIONS', 'PURGE')); + return \in_array($this->getMethod(), ['HEAD', 'GET', 'PUT', 'DELETE', 'TRACE', 'OPTIONS', 'PURGE']); } /** @@ -1455,7 +1470,7 @@ class Request */ public function isMethodCacheable() { - return \in_array($this->getMethod(), array('GET', 'HEAD')); + return \in_array($this->getMethod(), ['GET', 'HEAD']); } /** @@ -1566,7 +1581,7 @@ class Request return $locales[0]; } - $extendedPreferredLanguages = array(); + $extendedPreferredLanguages = []; foreach ($preferredLanguages as $language) { $extendedPreferredLanguages[] = $language; if (false !== $position = strpos($language, '_')) { @@ -1594,7 +1609,7 @@ class Request } $languages = AcceptHeader::fromString($this->headers->get('Accept-Language'))->all(); - $this->languages = array(); + $this->languages = []; foreach ($languages as $lang => $acceptHeaderItem) { if (false !== strpos($lang, '-')) { $codes = explode('-', $lang); @@ -1864,19 +1879,19 @@ class Request */ protected static function initializeFormats() { - static::$formats = array( - 'html' => array('text/html', 'application/xhtml+xml'), - 'txt' => array('text/plain'), - 'js' => array('application/javascript', 'application/x-javascript', 'text/javascript'), - 'css' => array('text/css'), - 'json' => array('application/json', 'application/x-json'), - 'jsonld' => array('application/ld+json'), - 'xml' => array('text/xml', 'application/xml', 'application/x-xml'), - 'rdf' => array('application/rdf+xml'), - 'atom' => array('application/atom+xml'), - 'rss' => array('application/rss+xml'), - 'form' => array('application/x-www-form-urlencoded'), - ); + static::$formats = [ + 'html' => ['text/html', 'application/xhtml+xml'], + 'txt' => ['text/plain'], + 'js' => ['application/javascript', 'application/x-javascript', 'text/javascript'], + 'css' => ['text/css'], + 'json' => ['application/json', 'application/x-json'], + 'jsonld' => ['application/ld+json'], + 'xml' => ['text/xml', 'application/xml', 'application/x-xml'], + 'rdf' => ['application/rdf+xml'], + 'atom' => ['application/atom+xml'], + 'rss' => ['application/rss+xml'], + 'form' => ['application/x-www-form-urlencoded'], + ]; } private function setPhpDefaultLocale(string $locale) @@ -1892,7 +1907,7 @@ class Request } } - /* + /** * Returns the prefix as encoded in the string when the string starts with * the given prefix, false otherwise. * @@ -1913,7 +1928,7 @@ class Request return false; } - private static function createRequestFromFactory(array $query = array(), array $request = array(), array $attributes = array(), array $cookies = array(), array $files = array(), array $server = array(), $content = null) + private static function createRequestFromFactory(array $query = [], array $request = [], array $attributes = [], array $cookies = [], array $files = [], array $server = [], $content = null) { if (self::$requestFactory) { $request = (self::$requestFactory)($query, $request, $attributes, $cookies, $files, $server, $content); @@ -1943,8 +1958,8 @@ class Request private function getTrustedValues($type, $ip = null) { - $clientValues = array(); - $forwardedValues = array(); + $clientValues = []; + $forwardedValues = []; if ((self::$trustedHeaderSet & $type) && $this->headers->has(self::$trustedHeaders[$type])) { foreach (explode(',', $this->headers->get(self::$trustedHeaders[$type])) as $v) { @@ -1955,7 +1970,7 @@ class Request if ((self::$trustedHeaderSet & self::HEADER_FORWARDED) && $this->headers->has(self::$trustedHeaders[self::HEADER_FORWARDED])) { $forwarded = $this->headers->get(self::$trustedHeaders[self::HEADER_FORWARDED]); $parts = HeaderUtils::split($forwarded, ',;='); - $forwardedValues = array(); + $forwardedValues = []; $param = self::$forwardedParams[$type]; foreach ($parts as $subParts) { if (null === $v = HeaderUtils::combine($subParts)[$param] ?? null) { @@ -1985,7 +2000,7 @@ class Request } if (!$this->isForwardedValid) { - return null !== $ip ? array('0.0.0.0', $ip) : array(); + return null !== $ip ? ['0.0.0.0', $ip] : []; } $this->isForwardedValid = false; @@ -1995,7 +2010,7 @@ class Request private function normalizeAndFilterClientIps(array $clientIps, $ip) { if (!$clientIps) { - return array(); + return []; } $clientIps[] = $ip; // Complete the IP chain with the IP the request actually came from $firstTrustedIp = null; @@ -2031,6 +2046,6 @@ class Request } // Now the IP chain contains only untrusted proxies and the client IP - return $clientIps ? array_reverse($clientIps) : array($firstTrustedIp); + return $clientIps ? array_reverse($clientIps) : [$firstTrustedIp]; } } diff --git a/vendor/symfony/http-foundation/RequestMatcher.php b/vendor/symfony/http-foundation/RequestMatcher.php index ab9434f4..d79c7f2e 100644 --- a/vendor/symfony/http-foundation/RequestMatcher.php +++ b/vendor/symfony/http-foundation/RequestMatcher.php @@ -36,22 +36,22 @@ class RequestMatcher implements RequestMatcherInterface /** * @var string[] */ - private $methods = array(); + private $methods = []; /** * @var string[] */ - private $ips = array(); + private $ips = []; /** * @var array */ - private $attributes = array(); + private $attributes = []; /** * @var string[] */ - private $schemes = array(); + private $schemes = []; /** * @param string|null $path @@ -61,7 +61,7 @@ class RequestMatcher implements RequestMatcherInterface * @param array $attributes * @param string|string[]|null $schemes */ - public function __construct(string $path = null, string $host = null, $methods = null, $ips = null, array $attributes = array(), $schemes = null, int $port = null) + public function __construct(string $path = null, string $host = null, $methods = null, $ips = null, array $attributes = [], $schemes = null, int $port = null) { $this->matchPath($path); $this->matchHost($host); @@ -82,7 +82,7 @@ class RequestMatcher implements RequestMatcherInterface */ public function matchScheme($scheme) { - $this->schemes = null !== $scheme ? array_map('strtolower', (array) $scheme) : array(); + $this->schemes = null !== $scheme ? array_map('strtolower', (array) $scheme) : []; } /** @@ -132,7 +132,7 @@ class RequestMatcher implements RequestMatcherInterface */ public function matchIps($ips) { - $this->ips = null !== $ips ? (array) $ips : array(); + $this->ips = null !== $ips ? (array) $ips : []; } /** @@ -142,7 +142,7 @@ class RequestMatcher implements RequestMatcherInterface */ public function matchMethod($method) { - $this->methods = null !== $method ? array_map('strtoupper', (array) $method) : array(); + $this->methods = null !== $method ? array_map('strtoupper', (array) $method) : []; } /** diff --git a/vendor/symfony/http-foundation/RequestStack.php b/vendor/symfony/http-foundation/RequestStack.php index 40123f66..885d78a5 100644 --- a/vendor/symfony/http-foundation/RequestStack.php +++ b/vendor/symfony/http-foundation/RequestStack.php @@ -21,7 +21,7 @@ class RequestStack /** * @var Request[] */ - private $requests = array(); + private $requests = []; /** * Pushes a Request on the stack. diff --git a/vendor/symfony/http-foundation/Response.php b/vendor/symfony/http-foundation/Response.php index 7c962126..c3ac19d4 100644 --- a/vendor/symfony/http-foundation/Response.php +++ b/vendor/symfony/http-foundation/Response.php @@ -128,7 +128,7 @@ class Response * * @var array */ - public static $statusTexts = array( + public static $statusTexts = [ 100 => 'Continue', 101 => 'Switching Protocols', 102 => 'Processing', // RFC2518 @@ -191,12 +191,12 @@ class Response 508 => 'Loop Detected', // RFC5842 510 => 'Not Extended', // RFC2774 511 => 'Network Authentication Required', // RFC6585 - ); + ]; /** * @throws \InvalidArgumentException When the HTTP status code is not valid */ - public function __construct($content = '', int $status = 200, array $headers = array()) + public function __construct($content = '', int $status = 200, array $headers = []) { $this->headers = new ResponseHeaderBag($headers); $this->setContent($content); @@ -218,7 +218,7 @@ class Response * * @return static */ - public static function create($content = '', $status = 200, $headers = array()) + public static function create($content = '', $status = 200, $headers = []) { return new static($content, $status, $headers); } @@ -306,9 +306,9 @@ class Response } // Check if we need to send extra expire info headers - if ('1.0' == $this->getProtocolVersion() && false !== strpos($this->headers->get('Cache-Control'), 'no-cache')) { - $this->headers->set('pragma', 'no-cache'); - $this->headers->set('expires', -1); + if ('1.0' == $this->getProtocolVersion() && false !== strpos($headers->get('Cache-Control'), 'no-cache')) { + $headers->set('pragma', 'no-cache'); + $headers->set('expires', -1); } $this->ensureIEOverSSLCompatibility($request); @@ -377,7 +377,7 @@ class Response if (\function_exists('fastcgi_finish_request')) { fastcgi_finish_request(); - } elseif (!\in_array(\PHP_SAPI, array('cli', 'phpdbg'), true)) { + } elseif (!\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true)) { static::closeOutputBuffers(0, true); } @@ -397,7 +397,7 @@ class Response */ public function setContent($content) { - if (null !== $content && !\is_string($content) && !is_numeric($content) && !\is_callable(array($content, '__toString'))) { + if (null !== $content && !\is_string($content) && !is_numeric($content) && !\is_callable([$content, '__toString'])) { throw new \UnexpectedValueException(sprintf('The Response content must be a string or object implementing __toString(), "%s" given.', \gettype($content))); } @@ -529,7 +529,7 @@ class Response */ public function isCacheable(): bool { - if (!\in_array($this->statusCode, array(200, 203, 300, 301, 302, 404, 410))) { + if (!\in_array($this->statusCode, [200, 203, 300, 301, 302, 404, 410])) { return false; } @@ -939,7 +939,7 @@ class Response */ public function setCache(array $options) { - if ($diff = array_diff(array_keys($options), array('etag', 'last_modified', 'max_age', 's_maxage', 'private', 'public', 'immutable'))) { + if ($diff = array_diff(array_keys($options), ['etag', 'last_modified', 'max_age', 's_maxage', 'private', 'public', 'immutable'])) { throw new \InvalidArgumentException(sprintf('Response does not support the following options: "%s".', implode('", "', $diff))); } @@ -1000,7 +1000,7 @@ class Response $this->setContent(null); // remove headers that MUST NOT be included with 304 Not Modified responses - foreach (array('Allow', 'Content-Encoding', 'Content-Language', 'Content-Length', 'Content-MD5', 'Content-Type', 'Last-Modified') as $header) { + foreach (['Allow', 'Content-Encoding', 'Content-Language', 'Content-Length', 'Content-MD5', 'Content-Type', 'Last-Modified'] as $header) { $this->headers->remove($header); } @@ -1025,10 +1025,10 @@ class Response public function getVary(): array { if (!$vary = $this->headers->get('Vary', null, false)) { - return array(); + return []; } - $ret = array(); + $ret = []; foreach ($vary as $item) { $ret = array_merge($ret, preg_split('/[\s,]+/', $item)); } @@ -1188,7 +1188,7 @@ class Response */ public function isRedirect(string $location = null): bool { - return \in_array($this->statusCode, array(201, 301, 302, 303, 307, 308)) && (null === $location ?: $location == $this->headers->get('Location')); + return \in_array($this->statusCode, [201, 301, 302, 303, 307, 308]) && (null === $location ?: $location == $this->headers->get('Location')); } /** @@ -1198,7 +1198,7 @@ class Response */ public function isEmpty(): bool { - return \in_array($this->statusCode, array(204, 304)); + return \in_array($this->statusCode, [204, 304]); } /** diff --git a/vendor/symfony/http-foundation/ResponseHeaderBag.php b/vendor/symfony/http-foundation/ResponseHeaderBag.php index 1141e8d9..cf44d0ec 100644 --- a/vendor/symfony/http-foundation/ResponseHeaderBag.php +++ b/vendor/symfony/http-foundation/ResponseHeaderBag.php @@ -24,11 +24,11 @@ class ResponseHeaderBag extends HeaderBag const DISPOSITION_ATTACHMENT = 'attachment'; const DISPOSITION_INLINE = 'inline'; - protected $computedCacheControl = array(); - protected $cookies = array(); - protected $headerNames = array(); + protected $computedCacheControl = []; + protected $cookies = []; + protected $headerNames = []; - public function __construct(array $headers = array()) + public function __construct(array $headers = []) { parent::__construct($headers); @@ -49,7 +49,7 @@ class ResponseHeaderBag extends HeaderBag */ public function allPreserveCase() { - $headers = array(); + $headers = []; foreach ($this->all() as $name => $value) { $headers[isset($this->headerNames[$name]) ? $this->headerNames[$name] : $name] = $value; } @@ -70,9 +70,9 @@ class ResponseHeaderBag extends HeaderBag /** * {@inheritdoc} */ - public function replace(array $headers = array()) + public function replace(array $headers = []) { - $this->headerNames = array(); + $this->headerNames = []; parent::replace($headers); @@ -107,7 +107,7 @@ class ResponseHeaderBag extends HeaderBag if ('set-cookie' === $uniqueKey) { if ($replace) { - $this->cookies = array(); + $this->cookies = []; } foreach ((array) $values as $cookie) { $this->setCookie(Cookie::fromString($cookie)); @@ -122,9 +122,8 @@ class ResponseHeaderBag extends HeaderBag parent::set($key, $values, $replace); // ensure the cache-control header has sensible defaults - if (\in_array($uniqueKey, array('cache-control', 'etag', 'last-modified', 'expires'), true)) { - $computed = $this->computeCacheControlValue(); - $this->headers['cache-control'] = array($computed); + if (\in_array($uniqueKey, ['cache-control', 'etag', 'last-modified', 'expires'], true) && '' !== $computed = $this->computeCacheControlValue()) { + $this->headers['cache-control'] = [$computed]; $this->headerNames['cache-control'] = 'Cache-Control'; $this->computedCacheControl = $this->parseCacheControl($computed); } @@ -139,7 +138,7 @@ class ResponseHeaderBag extends HeaderBag unset($this->headerNames[$uniqueKey]); if ('set-cookie' === $uniqueKey) { - $this->cookies = array(); + $this->cookies = []; return; } @@ -147,7 +146,7 @@ class ResponseHeaderBag extends HeaderBag parent::remove($key); if ('cache-control' === $uniqueKey) { - $this->computedCacheControl = array(); + $this->computedCacheControl = []; } if ('date' === $uniqueKey) { @@ -160,7 +159,7 @@ class ResponseHeaderBag extends HeaderBag */ public function hasCacheControlDirective($key) { - return array_key_exists($key, $this->computedCacheControl); + return \array_key_exists($key, $this->computedCacheControl); } /** @@ -168,7 +167,7 @@ class ResponseHeaderBag extends HeaderBag */ public function getCacheControlDirective($key) { - return array_key_exists($key, $this->computedCacheControl) ? $this->computedCacheControl[$key] : null; + return \array_key_exists($key, $this->computedCacheControl) ? $this->computedCacheControl[$key] : null; } public function setCookie(Cookie $cookie) @@ -216,15 +215,15 @@ class ResponseHeaderBag extends HeaderBag */ public function getCookies($format = self::COOKIES_FLAT) { - if (!\in_array($format, array(self::COOKIES_FLAT, self::COOKIES_ARRAY))) { - throw new \InvalidArgumentException(sprintf('Format "%s" invalid (%s).', $format, implode(', ', array(self::COOKIES_FLAT, self::COOKIES_ARRAY)))); + if (!\in_array($format, [self::COOKIES_FLAT, self::COOKIES_ARRAY])) { + throw new \InvalidArgumentException(sprintf('Format "%s" invalid (%s).', $format, implode(', ', [self::COOKIES_FLAT, self::COOKIES_ARRAY]))); } if (self::COOKIES_ARRAY === $format) { return $this->cookies; } - $flattenedCookies = array(); + $flattenedCookies = []; foreach ($this->cookies as $path) { foreach ($path as $cookies) { foreach ($cookies as $cookie) { diff --git a/vendor/symfony/http-foundation/ServerBag.php b/vendor/symfony/http-foundation/ServerBag.php index d8ab561a..90da49fa 100644 --- a/vendor/symfony/http-foundation/ServerBag.php +++ b/vendor/symfony/http-foundation/ServerBag.php @@ -27,8 +27,8 @@ class ServerBag extends ParameterBag */ public function getHeaders() { - $headers = array(); - $contentHeaders = array('CONTENT_LENGTH' => true, 'CONTENT_MD5' => true, 'CONTENT_TYPE' => true); + $headers = []; + $contentHeaders = ['CONTENT_LENGTH' => true, 'CONTENT_MD5' => true, 'CONTENT_TYPE' => true]; foreach ($this->parameters as $key => $value) { if (0 === strpos($key, 'HTTP_')) { $headers[substr($key, 5)] = $value; diff --git a/vendor/symfony/http-foundation/Session/Attribute/AttributeBag.php b/vendor/symfony/http-foundation/Session/Attribute/AttributeBag.php index 82577b80..ee33698c 100644 --- a/vendor/symfony/http-foundation/Session/Attribute/AttributeBag.php +++ b/vendor/symfony/http-foundation/Session/Attribute/AttributeBag.php @@ -19,7 +19,7 @@ class AttributeBag implements AttributeBagInterface, \IteratorAggregate, \Counta private $name = 'attributes'; private $storageKey; - protected $attributes = array(); + protected $attributes = []; /** * @param string $storageKey The key used to store attributes in the session @@ -63,7 +63,7 @@ class AttributeBag implements AttributeBagInterface, \IteratorAggregate, \Counta */ public function has($name) { - return array_key_exists($name, $this->attributes); + return \array_key_exists($name, $this->attributes); } /** @@ -71,7 +71,7 @@ class AttributeBag implements AttributeBagInterface, \IteratorAggregate, \Counta */ public function get($name, $default = null) { - return array_key_exists($name, $this->attributes) ? $this->attributes[$name] : $default; + return \array_key_exists($name, $this->attributes) ? $this->attributes[$name] : $default; } /** @@ -95,7 +95,7 @@ class AttributeBag implements AttributeBagInterface, \IteratorAggregate, \Counta */ public function replace(array $attributes) { - $this->attributes = array(); + $this->attributes = []; foreach ($attributes as $key => $value) { $this->set($key, $value); } @@ -107,7 +107,7 @@ class AttributeBag implements AttributeBagInterface, \IteratorAggregate, \Counta public function remove($name) { $retval = null; - if (array_key_exists($name, $this->attributes)) { + if (\array_key_exists($name, $this->attributes)) { $retval = $this->attributes[$name]; unset($this->attributes[$name]); } @@ -121,7 +121,7 @@ class AttributeBag implements AttributeBagInterface, \IteratorAggregate, \Counta public function clear() { $return = $this->attributes; - $this->attributes = array(); + $this->attributes = []; return $return; } diff --git a/vendor/symfony/http-foundation/Session/Attribute/NamespacedAttributeBag.php b/vendor/symfony/http-foundation/Session/Attribute/NamespacedAttributeBag.php index 50cd740d..162c4b52 100644 --- a/vendor/symfony/http-foundation/Session/Attribute/NamespacedAttributeBag.php +++ b/vendor/symfony/http-foundation/Session/Attribute/NamespacedAttributeBag.php @@ -44,7 +44,7 @@ class NamespacedAttributeBag extends AttributeBag return false; } - return array_key_exists($name, $attributes); + return \array_key_exists($name, $attributes); } /** @@ -60,7 +60,7 @@ class NamespacedAttributeBag extends AttributeBag return $default; } - return array_key_exists($name, $attributes) ? $attributes[$name] : $default; + return \array_key_exists($name, $attributes) ? $attributes[$name] : $default; } /** @@ -81,7 +81,7 @@ class NamespacedAttributeBag extends AttributeBag $retval = null; $attributes = &$this->resolveAttributePath($name); $name = $this->resolveKey($name); - if (null !== $attributes && array_key_exists($name, $attributes)) { + if (null !== $attributes && \array_key_exists($name, $attributes)) { $retval = $attributes[$name]; unset($attributes[$name]); } @@ -115,7 +115,7 @@ class NamespacedAttributeBag extends AttributeBag return $array; } - $array[$parts[0]] = array(); + $array[$parts[0]] = []; return $array; } @@ -123,14 +123,14 @@ class NamespacedAttributeBag extends AttributeBag unset($parts[\count($parts) - 1]); foreach ($parts as $part) { - if (null !== $array && !array_key_exists($part, $array)) { + if (null !== $array && !\array_key_exists($part, $array)) { if (!$writeContext) { $null = null; return $null; } - $array[$part] = array(); + $array[$part] = []; } $array = &$array[$part]; diff --git a/vendor/symfony/http-foundation/Session/Flash/AutoExpireFlashBag.php b/vendor/symfony/http-foundation/Session/Flash/AutoExpireFlashBag.php index ef23457b..6502f3d5 100644 --- a/vendor/symfony/http-foundation/Session/Flash/AutoExpireFlashBag.php +++ b/vendor/symfony/http-foundation/Session/Flash/AutoExpireFlashBag.php @@ -19,7 +19,7 @@ namespace Symfony\Component\HttpFoundation\Session\Flash; class AutoExpireFlashBag implements FlashBagInterface { private $name = 'flashes'; - private $flashes = array('display' => array(), 'new' => array()); + private $flashes = ['display' => [], 'new' => []]; private $storageKey; /** @@ -53,8 +53,8 @@ class AutoExpireFlashBag implements FlashBagInterface // The logic: messages from the last request will be stored in new, so we move them to previous // This request we will show what is in 'display'. What is placed into 'new' this time round will // be moved to display next time round. - $this->flashes['display'] = array_key_exists('new', $this->flashes) ? $this->flashes['new'] : array(); - $this->flashes['new'] = array(); + $this->flashes['display'] = \array_key_exists('new', $this->flashes) ? $this->flashes['new'] : []; + $this->flashes['new'] = []; } /** @@ -68,7 +68,7 @@ class AutoExpireFlashBag implements FlashBagInterface /** * {@inheritdoc} */ - public function peek($type, array $default = array()) + public function peek($type, array $default = []) { return $this->has($type) ? $this->flashes['display'][$type] : $default; } @@ -78,13 +78,13 @@ class AutoExpireFlashBag implements FlashBagInterface */ public function peekAll() { - return array_key_exists('display', $this->flashes) ? (array) $this->flashes['display'] : array(); + return \array_key_exists('display', $this->flashes) ? (array) $this->flashes['display'] : []; } /** * {@inheritdoc} */ - public function get($type, array $default = array()) + public function get($type, array $default = []) { $return = $default; @@ -106,7 +106,7 @@ class AutoExpireFlashBag implements FlashBagInterface public function all() { $return = $this->flashes['display']; - $this->flashes['display'] = array(); + $this->flashes['display'] = []; return $return; } @@ -132,7 +132,7 @@ class AutoExpireFlashBag implements FlashBagInterface */ public function has($type) { - return array_key_exists($type, $this->flashes['display']) && $this->flashes['display'][$type]; + return \array_key_exists($type, $this->flashes['display']) && $this->flashes['display'][$type]; } /** diff --git a/vendor/symfony/http-foundation/Session/Flash/FlashBag.php b/vendor/symfony/http-foundation/Session/Flash/FlashBag.php index 44ddb963..c6b7ce35 100644 --- a/vendor/symfony/http-foundation/Session/Flash/FlashBag.php +++ b/vendor/symfony/http-foundation/Session/Flash/FlashBag.php @@ -19,7 +19,7 @@ namespace Symfony\Component\HttpFoundation\Session\Flash; class FlashBag implements FlashBagInterface { private $name = 'flashes'; - private $flashes = array(); + private $flashes = []; private $storageKey; /** @@ -62,7 +62,7 @@ class FlashBag implements FlashBagInterface /** * {@inheritdoc} */ - public function peek($type, array $default = array()) + public function peek($type, array $default = []) { return $this->has($type) ? $this->flashes[$type] : $default; } @@ -78,7 +78,7 @@ class FlashBag implements FlashBagInterface /** * {@inheritdoc} */ - public function get($type, array $default = array()) + public function get($type, array $default = []) { if (!$this->has($type)) { return $default; @@ -97,7 +97,7 @@ class FlashBag implements FlashBagInterface public function all() { $return = $this->peekAll(); - $this->flashes = array(); + $this->flashes = []; return $return; } @@ -123,7 +123,7 @@ class FlashBag implements FlashBagInterface */ public function has($type) { - return array_key_exists($type, $this->flashes) && $this->flashes[$type]; + return \array_key_exists($type, $this->flashes) && $this->flashes[$type]; } /** diff --git a/vendor/symfony/http-foundation/Session/Flash/FlashBagInterface.php b/vendor/symfony/http-foundation/Session/Flash/FlashBagInterface.php index f53c9dae..99e80742 100644 --- a/vendor/symfony/http-foundation/Session/Flash/FlashBagInterface.php +++ b/vendor/symfony/http-foundation/Session/Flash/FlashBagInterface.php @@ -21,7 +21,7 @@ use Symfony\Component\HttpFoundation\Session\SessionBagInterface; interface FlashBagInterface extends SessionBagInterface { /** - * Adds a flash message for type. + * Adds a flash message for the given type. * * @param string $type * @param mixed $message @@ -29,12 +29,12 @@ interface FlashBagInterface extends SessionBagInterface public function add($type, $message); /** - * Registers a message for a given type. + * Registers one or more messages for a given type. * * @param string $type - * @param string|array $message + * @param string|array $messages */ - public function set($type, $message); + public function set($type, $messages); /** * Gets flash messages for a given type. @@ -44,7 +44,7 @@ interface FlashBagInterface extends SessionBagInterface * * @return array */ - public function peek($type, array $default = array()); + public function peek($type, array $default = []); /** * Gets all flash messages. @@ -61,7 +61,7 @@ interface FlashBagInterface extends SessionBagInterface * * @return array */ - public function get($type, array $default = array()); + public function get($type, array $default = []); /** * Gets and clears flashes from the stack. diff --git a/vendor/symfony/http-foundation/Session/Session.php b/vendor/symfony/http-foundation/Session/Session.php index 33499068..867ceba9 100644 --- a/vendor/symfony/http-foundation/Session/Session.php +++ b/vendor/symfony/http-foundation/Session/Session.php @@ -28,7 +28,7 @@ class Session implements SessionInterface, \IteratorAggregate, \Countable private $flashName; private $attributeName; - private $data = array(); + private $data = []; private $usageIndex = 0; /** diff --git a/vendor/symfony/http-foundation/Session/SessionUtils.php b/vendor/symfony/http-foundation/Session/SessionUtils.php index 91737c39..b5bce4a8 100644 --- a/vendor/symfony/http-foundation/Session/SessionUtils.php +++ b/vendor/symfony/http-foundation/Session/SessionUtils.php @@ -30,7 +30,7 @@ final class SessionUtils $sessionCookie = null; $sessionCookiePrefix = sprintf(' %s=', urlencode($sessionName)); $sessionCookieWithId = sprintf('%s%s;', $sessionCookiePrefix, urlencode($sessionId)); - $otherCookies = array(); + $otherCookies = []; foreach (headers_list() as $h) { if (0 !== stripos($h, 'Set-Cookie:')) { continue; diff --git a/vendor/symfony/http-foundation/Session/Storage/Handler/AbstractSessionHandler.php b/vendor/symfony/http-foundation/Session/Storage/Handler/AbstractSessionHandler.php index 95f11033..defca606 100644 --- a/vendor/symfony/http-foundation/Session/Storage/Handler/AbstractSessionHandler.php +++ b/vendor/symfony/http-foundation/Session/Storage/Handler/AbstractSessionHandler.php @@ -104,7 +104,7 @@ abstract class AbstractSessionHandler implements \SessionHandlerInterface, \Sess { if (null === $this->igbinaryEmptyData) { // see https://github.com/igbinary/igbinary/issues/146 - $this->igbinaryEmptyData = \function_exists('igbinary_serialize') ? igbinary_serialize(array()) : ''; + $this->igbinaryEmptyData = \function_exists('igbinary_serialize') ? igbinary_serialize([]) : ''; } if ('' === $data || $this->igbinaryEmptyData === $data) { return $this->destroy($sessionId); diff --git a/vendor/symfony/http-foundation/Session/Storage/Handler/MemcachedSessionHandler.php b/vendor/symfony/http-foundation/Session/Storage/Handler/MemcachedSessionHandler.php index 61a7afd9..1db590b3 100644 --- a/vendor/symfony/http-foundation/Session/Storage/Handler/MemcachedSessionHandler.php +++ b/vendor/symfony/http-foundation/Session/Storage/Handler/MemcachedSessionHandler.php @@ -45,11 +45,11 @@ class MemcachedSessionHandler extends AbstractSessionHandler * * @throws \InvalidArgumentException When unsupported options are passed */ - public function __construct(\Memcached $memcached, array $options = array()) + public function __construct(\Memcached $memcached, array $options = []) { $this->memcached = $memcached; - if ($diff = array_diff(array_keys($options), array('prefix', 'expiretime'))) { + if ($diff = array_diff(array_keys($options), ['prefix', 'expiretime'])) { throw new \InvalidArgumentException(sprintf('The following options are not supported "%s"', implode(', ', $diff))); } @@ -62,7 +62,7 @@ class MemcachedSessionHandler extends AbstractSessionHandler */ public function close() { - return true; + return $this->memcached->quit(); } /** diff --git a/vendor/symfony/http-foundation/Session/Storage/Handler/MongoDbSessionHandler.php b/vendor/symfony/http-foundation/Session/Storage/Handler/MongoDbSessionHandler.php index 853b0bc7..904dc1b5 100644 --- a/vendor/symfony/http-foundation/Session/Storage/Handler/MongoDbSessionHandler.php +++ b/vendor/symfony/http-foundation/Session/Storage/Handler/MongoDbSessionHandler.php @@ -74,12 +74,12 @@ class MongoDbSessionHandler extends AbstractSessionHandler $this->mongo = $mongo; - $this->options = array_merge(array( + $this->options = array_merge([ 'id_field' => '_id', 'data_field' => 'data', 'time_field' => 'time', 'expiry_field' => 'expires_at', - ), $options); + ], $options); } /** @@ -95,9 +95,9 @@ class MongoDbSessionHandler extends AbstractSessionHandler */ protected function doDestroy($sessionId) { - $this->getCollection()->deleteOne(array( + $this->getCollection()->deleteOne([ $this->options['id_field'] => $sessionId, - )); + ]); return true; } @@ -107,9 +107,9 @@ class MongoDbSessionHandler extends AbstractSessionHandler */ public function gc($maxlifetime) { - $this->getCollection()->deleteMany(array( - $this->options['expiry_field'] => array('$lt' => new \MongoDB\BSON\UTCDateTime()), - )); + $this->getCollection()->deleteMany([ + $this->options['expiry_field'] => ['$lt' => new \MongoDB\BSON\UTCDateTime()], + ]); return true; } @@ -121,16 +121,16 @@ class MongoDbSessionHandler extends AbstractSessionHandler { $expiry = new \MongoDB\BSON\UTCDateTime((time() + (int) ini_get('session.gc_maxlifetime')) * 1000); - $fields = array( + $fields = [ $this->options['time_field'] => new \MongoDB\BSON\UTCDateTime(), $this->options['expiry_field'] => $expiry, $this->options['data_field'] => new \MongoDB\BSON\Binary($data, \MongoDB\BSON\Binary::TYPE_OLD_BINARY), - ); + ]; $this->getCollection()->updateOne( - array($this->options['id_field'] => $sessionId), - array('$set' => $fields), - array('upsert' => true) + [$this->options['id_field'] => $sessionId], + ['$set' => $fields], + ['upsert' => true] ); return true; @@ -144,11 +144,11 @@ class MongoDbSessionHandler extends AbstractSessionHandler $expiry = new \MongoDB\BSON\UTCDateTime((time() + (int) ini_get('session.gc_maxlifetime')) * 1000); $this->getCollection()->updateOne( - array($this->options['id_field'] => $sessionId), - array('$set' => array( + [$this->options['id_field'] => $sessionId], + ['$set' => [ $this->options['time_field'] => new \MongoDB\BSON\UTCDateTime(), $this->options['expiry_field'] => $expiry, - )) + ]] ); return true; @@ -159,10 +159,10 @@ class MongoDbSessionHandler extends AbstractSessionHandler */ protected function doRead($sessionId) { - $dbData = $this->getCollection()->findOne(array( + $dbData = $this->getCollection()->findOne([ $this->options['id_field'] => $sessionId, - $this->options['expiry_field'] => array('$gte' => new \MongoDB\BSON\UTCDateTime()), - )); + $this->options['expiry_field'] => ['$gte' => new \MongoDB\BSON\UTCDateTime()], + ]); if (null === $dbData) { return ''; diff --git a/vendor/symfony/http-foundation/Session/Storage/Handler/PdoSessionHandler.php b/vendor/symfony/http-foundation/Session/Storage/Handler/PdoSessionHandler.php index 1bb647ef..0623318d 100644 --- a/vendor/symfony/http-foundation/Session/Storage/Handler/PdoSessionHandler.php +++ b/vendor/symfony/http-foundation/Session/Storage/Handler/PdoSessionHandler.php @@ -118,7 +118,7 @@ class PdoSessionHandler extends AbstractSessionHandler /** * @var array Connection options when lazy-connect */ - private $connectionOptions = array(); + private $connectionOptions = []; /** * @var int The strategy for locking, see constants @@ -130,7 +130,7 @@ class PdoSessionHandler extends AbstractSessionHandler * * @var \PDOStatement[] An array of statements to release advisory locks */ - private $unlockStatements = array(); + private $unlockStatements = []; /** * @var bool True when the current session exists but expired according to session.gc_maxlifetime @@ -161,7 +161,7 @@ class PdoSessionHandler extends AbstractSessionHandler * * db_time_col: The column where to store the timestamp [default: sess_time] * * db_username: The username when lazy-connect [default: ''] * * db_password: The password when lazy-connect [default: ''] - * * db_connection_options: An array of driver-specific connection options [default: array()] + * * db_connection_options: An array of driver-specific connection options [default: []] * * lock_mode: The strategy for locking, see constants [default: LOCK_TRANSACTIONAL] * * @param \PDO|string|null $pdoOrDsn A \PDO instance or DSN string or URL string or null @@ -169,7 +169,7 @@ class PdoSessionHandler extends AbstractSessionHandler * * @throws \InvalidArgumentException When PDO error mode is not PDO::ERRMODE_EXCEPTION */ - public function __construct($pdoOrDsn = null, array $options = array()) + public function __construct($pdoOrDsn = null, array $options = []) { if ($pdoOrDsn instanceof \PDO) { if (\PDO::ERRMODE_EXCEPTION !== $pdoOrDsn->getAttribute(\PDO::ATTR_ERRMODE)) { @@ -468,13 +468,13 @@ class PdoSessionHandler extends AbstractSessionHandler throw new \InvalidArgumentException('URLs without scheme are not supported to configure the PdoSessionHandler'); } - $driverAliasMap = array( + $driverAliasMap = [ 'mssql' => 'sqlsrv', 'mysql2' => 'mysql', // Amazon RDS, for some weird reason 'postgres' => 'pgsql', 'postgresql' => 'pgsql', 'sqlite3' => 'sqlite', - ); + ]; $driver = isset($driverAliasMap[$params['scheme']]) ? $driverAliasMap[$params['scheme']] : $params['scheme']; diff --git a/vendor/symfony/http-foundation/Session/Storage/Handler/RedisSessionHandler.php b/vendor/symfony/http-foundation/Session/Storage/Handler/RedisSessionHandler.php index 9c08ddcc..a6498b88 100644 --- a/vendor/symfony/http-foundation/Session/Storage/Handler/RedisSessionHandler.php +++ b/vendor/symfony/http-foundation/Session/Storage/Handler/RedisSessionHandler.php @@ -39,7 +39,7 @@ class RedisSessionHandler extends AbstractSessionHandler * * @throws \InvalidArgumentException When unsupported client or options are passed */ - public function __construct($redis, array $options = array()) + public function __construct($redis, array $options = []) { if ( !$redis instanceof \Redis && @@ -52,7 +52,7 @@ class RedisSessionHandler extends AbstractSessionHandler throw new \InvalidArgumentException(sprintf('%s() expects parameter 1 to be Redis, RedisArray, RedisCluster or Predis\Client, %s given', __METHOD__, \is_object($redis) ? \get_class($redis) : \gettype($redis))); } - if ($diff = array_diff(array_keys($options), array('prefix'))) { + if ($diff = array_diff(array_keys($options), ['prefix'])) { throw new \InvalidArgumentException(sprintf('The following options are not supported "%s"', implode(', ', $diff))); } diff --git a/vendor/symfony/http-foundation/Session/Storage/MetadataBag.php b/vendor/symfony/http-foundation/Session/Storage/MetadataBag.php index ea0d5ecb..2eff4109 100644 --- a/vendor/symfony/http-foundation/Session/Storage/MetadataBag.php +++ b/vendor/symfony/http-foundation/Session/Storage/MetadataBag.php @@ -39,7 +39,7 @@ class MetadataBag implements SessionBagInterface /** * @var array */ - protected $meta = array(self::CREATED => 0, self::UPDATED => 0, self::LIFETIME => 0); + protected $meta = [self::CREATED => 0, self::UPDATED => 0, self::LIFETIME => 0]; /** * Unix timestamp. diff --git a/vendor/symfony/http-foundation/Session/Storage/MockArraySessionStorage.php b/vendor/symfony/http-foundation/Session/Storage/MockArraySessionStorage.php index 47cac398..37b6f145 100644 --- a/vendor/symfony/http-foundation/Session/Storage/MockArraySessionStorage.php +++ b/vendor/symfony/http-foundation/Session/Storage/MockArraySessionStorage.php @@ -50,7 +50,7 @@ class MockArraySessionStorage implements SessionStorageInterface /** * @var array */ - protected $data = array(); + protected $data = []; /** * @var MetadataBag @@ -60,7 +60,7 @@ class MockArraySessionStorage implements SessionStorageInterface /** * @var array|SessionBagInterface[] */ - protected $bags = array(); + protected $bags = []; public function __construct(string $name = 'MOCKSESSID', MetadataBag $metaBag = null) { @@ -166,7 +166,7 @@ class MockArraySessionStorage implements SessionStorageInterface } // clear out the session - $this->data = array(); + $this->data = []; // reconnect the bags to the session $this->loadSession(); @@ -238,11 +238,11 @@ class MockArraySessionStorage implements SessionStorageInterface protected function loadSession() { - $bags = array_merge($this->bags, array($this->metadataBag)); + $bags = array_merge($this->bags, [$this->metadataBag]); foreach ($bags as $bag) { $key = $bag->getStorageKey(); - $this->data[$key] = isset($this->data[$key]) ? $this->data[$key] : array(); + $this->data[$key] = isset($this->data[$key]) ? $this->data[$key] : []; $bag->initialize($this->data[$key]); } diff --git a/vendor/symfony/http-foundation/Session/Storage/MockFileSessionStorage.php b/vendor/symfony/http-foundation/Session/Storage/MockFileSessionStorage.php index 732f92ab..c0316c2c 100644 --- a/vendor/symfony/http-foundation/Session/Storage/MockFileSessionStorage.php +++ b/vendor/symfony/http-foundation/Session/Storage/MockFileSessionStorage.php @@ -98,7 +98,7 @@ class MockFileSessionStorage extends MockArraySessionStorage unset($data[$key]); } } - if (array($key = $this->metadataBag->getStorageKey()) === array_keys($data)) { + if ([$key = $this->metadataBag->getStorageKey()] === array_keys($data)) { unset($data[$key]); } @@ -145,7 +145,7 @@ class MockFileSessionStorage extends MockArraySessionStorage private function read() { $filePath = $this->getFilePath(); - $this->data = is_readable($filePath) && is_file($filePath) ? unserialize(file_get_contents($filePath)) : array(); + $this->data = is_readable($filePath) && is_file($filePath) ? unserialize(file_get_contents($filePath)) : []; $this->loadSession(); } diff --git a/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php b/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php index 232eb64c..ce702795 100644 --- a/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php +++ b/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php @@ -27,7 +27,7 @@ class NativeSessionStorage implements SessionStorageInterface /** * @var SessionBagInterface[] */ - protected $bags = array(); + protected $bags = []; /** * @var bool @@ -101,15 +101,15 @@ class NativeSessionStorage implements SessionStorageInterface * @param \SessionHandlerInterface|null $handler * @param MetadataBag $metaBag MetadataBag */ - public function __construct(array $options = array(), $handler = null, MetadataBag $metaBag = null) + public function __construct(array $options = [], $handler = null, MetadataBag $metaBag = null) { - $options += array( + $options += [ 'cache_limiter' => '', 'cache_expire' => 0, 'use_cookies' => 1, 'lazy_write' => 1, 'use_strict_mode' => 1, - ); + ]; session_register_shutdown(); @@ -244,7 +244,7 @@ class NativeSessionStorage implements SessionStorageInterface unset($_SESSION[$key]); } } - if (array($key = $this->metadataBag->getStorageKey()) === array_keys($_SESSION)) { + if ([$key = $this->metadataBag->getStorageKey()] === array_keys($_SESSION)) { unset($_SESSION[$key]); } @@ -280,7 +280,7 @@ class NativeSessionStorage implements SessionStorageInterface } // clear out the session - $_SESSION = array(); + $_SESSION = []; // reconnect the bags to the session $this->loadSession(); @@ -349,7 +349,7 @@ class NativeSessionStorage implements SessionStorageInterface * For convenience we omit 'session.' from the beginning of the keys. * Explicitly ignores other ini keys. * - * @param array $options Session ini directives array(key => value) + * @param array $options Session ini directives [key => value] * * @see http://php.net/session.configuration */ @@ -359,7 +359,7 @@ class NativeSessionStorage implements SessionStorageInterface return; } - $validOptions = array_flip(array( + $validOptions = array_flip([ 'cache_expire', 'cache_limiter', 'cookie_domain', 'cookie_httponly', 'cookie_lifetime', 'cookie_path', 'cookie_secure', 'cookie_samesite', 'gc_divisor', 'gc_maxlifetime', 'gc_probability', @@ -369,7 +369,7 @@ class NativeSessionStorage implements SessionStorageInterface 'upload_progress.cleanup', 'upload_progress.prefix', 'upload_progress.name', 'upload_progress.freq', 'upload_progress.min_freq', 'url_rewriter.tags', 'sid_length', 'sid_bits_per_character', 'trans_sid_hosts', 'trans_sid_tags', - )); + ]); foreach ($options as $key => $value) { if (isset($validOptions[$key])) { @@ -445,11 +445,11 @@ class NativeSessionStorage implements SessionStorageInterface $session = &$_SESSION; } - $bags = array_merge($this->bags, array($this->metadataBag)); + $bags = array_merge($this->bags, [$this->metadataBag]); foreach ($bags as $bag) { $key = $bag->getStorageKey(); - $session[$key] = isset($session[$key]) ? $session[$key] : array(); + $session[$key] = isset($session[$key]) ? $session[$key] : []; $bag->initialize($session[$key]); } diff --git a/vendor/symfony/http-foundation/StreamedResponse.php b/vendor/symfony/http-foundation/StreamedResponse.php index d3bcbb79..8310ea72 100644 --- a/vendor/symfony/http-foundation/StreamedResponse.php +++ b/vendor/symfony/http-foundation/StreamedResponse.php @@ -35,7 +35,7 @@ class StreamedResponse extends Response * @param int $status The response status code * @param array $headers An array of response headers */ - public function __construct(callable $callback = null, int $status = 200, array $headers = array()) + public function __construct(callable $callback = null, int $status = 200, array $headers = []) { parent::__construct(null, $status, $headers); @@ -55,7 +55,7 @@ class StreamedResponse extends Response * * @return static */ - public static function create($callback = null, $status = 200, $headers = array()) + public static function create($callback = null, $status = 200, $headers = []) { return new static($callback, $status, $headers); } diff --git a/vendor/symfony/http-foundation/Test/Constraint/RequestAttributeValueSame.php b/vendor/symfony/http-foundation/Test/Constraint/RequestAttributeValueSame.php new file mode 100644 index 00000000..2d105627 --- /dev/null +++ b/vendor/symfony/http-foundation/Test/Constraint/RequestAttributeValueSame.php @@ -0,0 +1,54 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\Test\Constraint; + +use PHPUnit\Framework\Constraint\Constraint; + +final class RequestAttributeValueSame extends Constraint +{ + private $name; + private $value; + + public function __construct(string $name, string $value) + { + $this->name = $name; + $this->value = $value; + } + + /** + * {@inheritdoc} + */ + public function toString(): string + { + return sprintf('has attribute "%s" with value "%s"', $this->name, $this->value); + } + + /** + * @param Request $request + * + * {@inheritdoc} + */ + protected function matches($request): bool + { + return $this->value === $request->attributes->get($this->name); + } + + /** + * @param Request $request + * + * {@inheritdoc} + */ + protected function failureDescription($request): string + { + return 'the Request '.$this->toString(); + } +} diff --git a/vendor/symfony/http-foundation/Test/Constraint/ResponseCookieValueSame.php b/vendor/symfony/http-foundation/Test/Constraint/ResponseCookieValueSame.php new file mode 100644 index 00000000..554e1a16 --- /dev/null +++ b/vendor/symfony/http-foundation/Test/Constraint/ResponseCookieValueSame.php @@ -0,0 +1,85 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\Test\Constraint; + +use PHPUnit\Framework\Constraint\Constraint; +use Symfony\Component\HttpFoundation\Cookie; +use Symfony\Component\HttpFoundation\Response; + +final class ResponseCookieValueSame extends Constraint +{ + private $name; + private $value; + private $path; + private $domain; + + public function __construct(string $name, string $value, string $path = '/', string $domain = null) + { + $this->name = $name; + $this->value = $value; + $this->path = $path; + $this->domain = $domain; + } + + /** + * {@inheritdoc} + */ + public function toString(): string + { + $str = sprintf('has cookie "%s"', $this->name); + if ('/' !== $this->path) { + $str .= sprintf(' with path "%s"', $this->path); + } + if ($this->domain) { + $str .= sprintf(' for domain "%s"', $this->domain); + } + $str .= sprintf(' with value "%s"', $this->value); + + return $str; + } + + /** + * @param Response $response + * + * {@inheritdoc} + */ + protected function matches($response): bool + { + $cookie = $this->getCookie($response); + if (!$cookie) { + return false; + } + + return $this->value === $cookie->getValue(); + } + + /** + * @param Response $response + * + * {@inheritdoc} + */ + protected function failureDescription($response): string + { + return 'the Response '.$this->toString(); + } + + protected function getCookie(Response $response): ?Cookie + { + $cookies = $response->headers->getCookies(); + + $filteredCookies = array_filter($cookies, function (Cookie $cookie) { + return $cookie->getName() === $this->name && $cookie->getPath() === $this->path && $cookie->getDomain() === $this->domain; + }); + + return reset($filteredCookies) ?: null; + } +} diff --git a/vendor/symfony/http-foundation/Test/Constraint/ResponseHasCookie.php b/vendor/symfony/http-foundation/Test/Constraint/ResponseHasCookie.php new file mode 100644 index 00000000..bd792b0d --- /dev/null +++ b/vendor/symfony/http-foundation/Test/Constraint/ResponseHasCookie.php @@ -0,0 +1,77 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\Test\Constraint; + +use PHPUnit\Framework\Constraint\Constraint; +use Symfony\Component\HttpFoundation\Cookie; +use Symfony\Component\HttpFoundation\Response; + +final class ResponseHasCookie extends Constraint +{ + private $name; + private $path; + private $domain; + + public function __construct(string $name, string $path = '/', string $domain = null) + { + $this->name = $name; + $this->path = $path; + $this->domain = $domain; + } + + /** + * {@inheritdoc} + */ + public function toString(): string + { + $str = sprintf('has cookie "%s"', $this->name); + if ('/' !== $this->path) { + $str .= sprintf(' with path "%s"', $this->path); + } + if ($this->domain) { + $str .= sprintf(' for domain "%s"', $this->domain); + } + + return $str; + } + + /** + * @param Response $response + * + * {@inheritdoc} + */ + protected function matches($response): bool + { + return null !== $this->getCookie($response); + } + + /** + * @param Response $response + * + * {@inheritdoc} + */ + protected function failureDescription($response): string + { + return 'the Response '.$this->toString(); + } + + protected function getCookie(Response $response): ?Cookie + { + $cookies = $response->headers->getCookies(); + + $filteredCookies = array_filter($cookies, function (Cookie $cookie) { + return $cookie->getName() === $this->name && $cookie->getPath() === $this->path && $cookie->getDomain() === $this->domain; + }); + + return reset($filteredCookies) ?: null; + } +} diff --git a/vendor/symfony/http-foundation/Test/Constraint/ResponseHasHeader.php b/vendor/symfony/http-foundation/Test/Constraint/ResponseHasHeader.php new file mode 100644 index 00000000..68ad8273 --- /dev/null +++ b/vendor/symfony/http-foundation/Test/Constraint/ResponseHasHeader.php @@ -0,0 +1,53 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\Test\Constraint; + +use PHPUnit\Framework\Constraint\Constraint; +use Symfony\Component\HttpFoundation\Response; + +final class ResponseHasHeader extends Constraint +{ + private $headerName; + + public function __construct(string $headerName) + { + $this->headerName = $headerName; + } + + /** + * {@inheritdoc} + */ + public function toString(): string + { + return sprintf('has header "%s"', $this->headerName); + } + + /** + * @param Response $response + * + * {@inheritdoc} + */ + protected function matches($response): bool + { + return $response->headers->has($this->headerName); + } + + /** + * @param Response $response + * + * {@inheritdoc} + */ + protected function failureDescription($response): string + { + return 'the Response '.$this->toString(); + } +} diff --git a/vendor/symfony/http-foundation/Test/Constraint/ResponseHeaderSame.php b/vendor/symfony/http-foundation/Test/Constraint/ResponseHeaderSame.php new file mode 100644 index 00000000..acdea71d --- /dev/null +++ b/vendor/symfony/http-foundation/Test/Constraint/ResponseHeaderSame.php @@ -0,0 +1,55 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\Test\Constraint; + +use PHPUnit\Framework\Constraint\Constraint; +use Symfony\Component\HttpFoundation\Response; + +final class ResponseHeaderSame extends Constraint +{ + private $headerName; + private $expectedValue; + + public function __construct(string $headerName, string $expectedValue) + { + $this->headerName = $headerName; + $this->expectedValue = $expectedValue; + } + + /** + * {@inheritdoc} + */ + public function toString(): string + { + return sprintf('has header "%s" with value "%s"', $this->headerName, $this->expectedValue); + } + + /** + * @param Response $response + * + * {@inheritdoc} + */ + protected function matches($response): bool + { + return $this->expectedValue === $response->headers->get($this->headerName, null, true); + } + + /** + * @param Response $response + * + * {@inheritdoc} + */ + protected function failureDescription($response): string + { + return 'the Response '.$this->toString(); + } +} diff --git a/vendor/symfony/http-foundation/Test/Constraint/ResponseIsRedirected.php b/vendor/symfony/http-foundation/Test/Constraint/ResponseIsRedirected.php new file mode 100644 index 00000000..8c4b883f --- /dev/null +++ b/vendor/symfony/http-foundation/Test/Constraint/ResponseIsRedirected.php @@ -0,0 +1,56 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\Test\Constraint; + +use PHPUnit\Framework\Constraint\Constraint; +use Symfony\Component\HttpFoundation\Response; + +final class ResponseIsRedirected extends Constraint +{ + /** + * {@inheritdoc} + */ + public function toString(): string + { + return 'is redirected'; + } + + /** + * @param Response $response + * + * {@inheritdoc} + */ + protected function matches($response): bool + { + return $response->isRedirect(); + } + + /** + * @param Response $response + * + * {@inheritdoc} + */ + protected function failureDescription($response): string + { + return 'the Response '.$this->toString(); + } + + /** + * @param Response $response + * + * {@inheritdoc} + */ + protected function additionalFailureDescription($response): string + { + return (string) $response; + } +} diff --git a/vendor/symfony/http-foundation/Test/Constraint/ResponseIsSuccessful.php b/vendor/symfony/http-foundation/Test/Constraint/ResponseIsSuccessful.php new file mode 100644 index 00000000..9c665589 --- /dev/null +++ b/vendor/symfony/http-foundation/Test/Constraint/ResponseIsSuccessful.php @@ -0,0 +1,56 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\Test\Constraint; + +use PHPUnit\Framework\Constraint\Constraint; +use Symfony\Component\HttpFoundation\Response; + +final class ResponseIsSuccessful extends Constraint +{ + /** + * {@inheritdoc} + */ + public function toString(): string + { + return 'is successful'; + } + + /** + * @param Response $response + * + * {@inheritdoc} + */ + protected function matches($response): bool + { + return $response->isSuccessful(); + } + + /** + * @param Response $response + * + * {@inheritdoc} + */ + protected function failureDescription($response): string + { + return 'the Response '.$this->toString(); + } + + /** + * @param Response $response + * + * {@inheritdoc} + */ + protected function additionalFailureDescription($response): string + { + return (string) $response; + } +} diff --git a/vendor/symfony/http-foundation/Test/Constraint/ResponseStatusCodeSame.php b/vendor/symfony/http-foundation/Test/Constraint/ResponseStatusCodeSame.php new file mode 100644 index 00000000..72bb000b --- /dev/null +++ b/vendor/symfony/http-foundation/Test/Constraint/ResponseStatusCodeSame.php @@ -0,0 +1,63 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\Test\Constraint; + +use PHPUnit\Framework\Constraint\Constraint; +use Symfony\Component\HttpFoundation\Response; + +final class ResponseStatusCodeSame extends Constraint +{ + private $statusCode; + + public function __construct(int $statusCode) + { + $this->statusCode = $statusCode; + } + + /** + * {@inheritdoc} + */ + public function toString(): string + { + return 'status code is '.$this->statusCode; + } + + /** + * @param Response $response + * + * {@inheritdoc} + */ + protected function matches($response): bool + { + return $this->statusCode === $response->getStatusCode(); + } + + /** + * @param Response $response + * + * {@inheritdoc} + */ + protected function failureDescription($response): string + { + return 'the Response '.$this->toString(); + } + + /** + * @param Response $response + * + * {@inheritdoc} + */ + protected function additionalFailureDescription($response): string + { + return (string) $response; + } +} diff --git a/vendor/symfony/http-foundation/Tests/AcceptHeaderItemTest.php b/vendor/symfony/http-foundation/Tests/AcceptHeaderItemTest.php index 1a660247..516bd555 100644 --- a/vendor/symfony/http-foundation/Tests/AcceptHeaderItemTest.php +++ b/vendor/symfony/http-foundation/Tests/AcceptHeaderItemTest.php @@ -28,24 +28,24 @@ class AcceptHeaderItemTest extends TestCase public function provideFromStringData() { - return array( - array( + return [ + [ 'text/html', - 'text/html', array(), - ), - array( + 'text/html', [], + ], + [ '"this;should,not=matter"', - 'this;should,not=matter', array(), - ), - array( + 'this;should,not=matter', [], + ], + [ "text/plain; charset=utf-8;param=\"this;should,not=matter\";\tfootnotes=true", - 'text/plain', array('charset' => 'utf-8', 'param' => 'this;should,not=matter', 'footnotes' => 'true'), - ), - array( + 'text/plain', ['charset' => 'utf-8', 'param' => 'this;should,not=matter', 'footnotes' => 'true'], + ], + [ '"this;should,not=matter";charset=utf-8', - 'this;should,not=matter', array('charset' => 'utf-8'), - ), - ); + 'this;should,not=matter', ['charset' => 'utf-8'], + ], + ]; } /** @@ -59,21 +59,21 @@ class AcceptHeaderItemTest extends TestCase public function provideToStringData() { - return array( - array( - 'text/html', array(), + return [ + [ + 'text/html', [], 'text/html', - ), - array( - 'text/plain', array('charset' => 'utf-8', 'param' => 'this;should,not=matter', 'footnotes' => 'true'), + ], + [ + 'text/plain', ['charset' => 'utf-8', 'param' => 'this;should,not=matter', 'footnotes' => 'true'], 'text/plain; charset=utf-8; param="this;should,not=matter"; footnotes=true', - ), - ); + ], + ]; } public function testValue() { - $item = new AcceptHeaderItem('value', array()); + $item = new AcceptHeaderItem('value', []); $this->assertEquals('value', $item->getValue()); $item->setValue('new value'); @@ -85,7 +85,7 @@ class AcceptHeaderItemTest extends TestCase public function testQuality() { - $item = new AcceptHeaderItem('value', array()); + $item = new AcceptHeaderItem('value', []); $this->assertEquals(1.0, $item->getQuality()); $item->setQuality(0.5); @@ -98,14 +98,14 @@ class AcceptHeaderItemTest extends TestCase public function testAttribute() { - $item = new AcceptHeaderItem('value', array()); - $this->assertEquals(array(), $item->getAttributes()); + $item = new AcceptHeaderItem('value', []); + $this->assertEquals([], $item->getAttributes()); $this->assertFalse($item->hasAttribute('test')); $this->assertNull($item->getAttribute('test')); $this->assertEquals('default', $item->getAttribute('test', 'default')); $item->setAttribute('test', 'value'); - $this->assertEquals(array('test' => 'value'), $item->getAttributes()); + $this->assertEquals(['test' => 'value'], $item->getAttributes()); $this->assertTrue($item->hasAttribute('test')); $this->assertEquals('value', $item->getAttribute('test')); $this->assertEquals('value', $item->getAttribute('test', 'default')); diff --git a/vendor/symfony/http-foundation/Tests/AcceptHeaderTest.php b/vendor/symfony/http-foundation/Tests/AcceptHeaderTest.php index 1ac6103e..1987e97f 100644 --- a/vendor/symfony/http-foundation/Tests/AcceptHeaderTest.php +++ b/vendor/symfony/http-foundation/Tests/AcceptHeaderTest.php @@ -39,13 +39,13 @@ class AcceptHeaderTest extends TestCase public function provideFromStringData() { - return array( - array('', array()), - array('gzip', array(new AcceptHeaderItem('gzip'))), - array('gzip,deflate,sdch', array(new AcceptHeaderItem('gzip'), new AcceptHeaderItem('deflate'), new AcceptHeaderItem('sdch'))), - array("gzip, deflate\t,sdch", array(new AcceptHeaderItem('gzip'), new AcceptHeaderItem('deflate'), new AcceptHeaderItem('sdch'))), - array('"this;should,not=matter"', array(new AcceptHeaderItem('this;should,not=matter'))), - ); + return [ + ['', []], + ['gzip', [new AcceptHeaderItem('gzip')]], + ['gzip,deflate,sdch', [new AcceptHeaderItem('gzip'), new AcceptHeaderItem('deflate'), new AcceptHeaderItem('sdch')]], + ["gzip, deflate\t,sdch", [new AcceptHeaderItem('gzip'), new AcceptHeaderItem('deflate'), new AcceptHeaderItem('sdch')]], + ['"this;should,not=matter"', [new AcceptHeaderItem('this;should,not=matter')]], + ]; } /** @@ -59,12 +59,12 @@ class AcceptHeaderTest extends TestCase public function provideToStringData() { - return array( - array(array(), ''), - array(array(new AcceptHeaderItem('gzip')), 'gzip'), - array(array(new AcceptHeaderItem('gzip'), new AcceptHeaderItem('deflate'), new AcceptHeaderItem('sdch')), 'gzip,deflate,sdch'), - array(array(new AcceptHeaderItem('this;should,not=matter')), 'this;should,not=matter'), - ); + return [ + [[], ''], + [[new AcceptHeaderItem('gzip')], 'gzip'], + [[new AcceptHeaderItem('gzip'), new AcceptHeaderItem('deflate'), new AcceptHeaderItem('sdch')], 'gzip,deflate,sdch'], + [[new AcceptHeaderItem('this;should,not=matter')], 'this;should,not=matter'], + ]; } /** @@ -78,9 +78,9 @@ class AcceptHeaderTest extends TestCase public function provideFilterData() { - return array( - array('fr-FR,fr;q=0.8,en-US;q=0.6,en;q=0.4', '/fr.*/', array('fr-FR', 'fr')), - ); + return [ + ['fr-FR,fr;q=0.8,en-US;q=0.6,en;q=0.4', '/fr.*/', ['fr-FR', 'fr']], + ]; } /** @@ -94,11 +94,11 @@ class AcceptHeaderTest extends TestCase public function provideSortingData() { - return array( - 'quality has priority' => array('*;q=0.3,ISO-8859-1,utf-8;q=0.7', array('ISO-8859-1', 'utf-8', '*')), - 'order matters when q is equal' => array('*;q=0.3,ISO-8859-1;q=0.7,utf-8;q=0.7', array('ISO-8859-1', 'utf-8', '*')), - 'order matters when q is equal2' => array('*;q=0.3,utf-8;q=0.7,ISO-8859-1;q=0.7', array('utf-8', 'ISO-8859-1', '*')), - ); + return [ + 'quality has priority' => ['*;q=0.3,ISO-8859-1,utf-8;q=0.7', ['ISO-8859-1', 'utf-8', '*']], + 'order matters when q is equal' => ['*;q=0.3,ISO-8859-1;q=0.7,utf-8;q=0.7', ['ISO-8859-1', 'utf-8', '*']], + 'order matters when q is equal2' => ['*;q=0.3,utf-8;q=0.7,ISO-8859-1;q=0.7', ['utf-8', 'ISO-8859-1', '*']], + ]; } /** @@ -112,19 +112,19 @@ class AcceptHeaderTest extends TestCase public function provideDefaultValueData() { - yield array('text/plain;q=0.5, text/html, text/x-dvi;q=0.8, *;q=0.3', 'text/xml', 0.3); - yield array('text/plain;q=0.5, text/html, text/x-dvi;q=0.8, */*;q=0.3', 'text/xml', 0.3); - yield array('text/plain;q=0.5, text/html, text/x-dvi;q=0.8, */*;q=0.3', 'text/html', 1.0); - yield array('text/plain;q=0.5, text/html, text/x-dvi;q=0.8, */*;q=0.3', 'text/plain', 0.5); - yield array('text/plain;q=0.5, text/html, text/x-dvi;q=0.8, */*;q=0.3', '*', 0.3); - yield array('text/plain;q=0.5, text/html, text/x-dvi;q=0.8, */*', '*', 1.0); - yield array('text/plain;q=0.5, text/html, text/x-dvi;q=0.8, */*', 'text/xml', 1.0); - yield array('text/plain;q=0.5, text/html, text/x-dvi;q=0.8, */*', 'text/*', 1.0); - yield array('text/plain;q=0.5, text/html, text/*;q=0.8, */*', 'text/*', 0.8); - yield array('text/plain;q=0.5, text/html, text/*;q=0.8, */*', 'text/html', 1.0); - yield array('text/plain;q=0.5, text/html, text/*;q=0.8, */*', 'text/x-dvi', 0.8); - yield array('*;q=0.3, ISO-8859-1;q=0.7, utf-8;q=0.7', '*', 0.3); - yield array('*;q=0.3, ISO-8859-1;q=0.7, utf-8;q=0.7', 'utf-8', 0.7); - yield array('*;q=0.3, ISO-8859-1;q=0.7, utf-8;q=0.7', 'SHIFT_JIS', 0.3); + yield ['text/plain;q=0.5, text/html, text/x-dvi;q=0.8, *;q=0.3', 'text/xml', 0.3]; + yield ['text/plain;q=0.5, text/html, text/x-dvi;q=0.8, */*;q=0.3', 'text/xml', 0.3]; + yield ['text/plain;q=0.5, text/html, text/x-dvi;q=0.8, */*;q=0.3', 'text/html', 1.0]; + yield ['text/plain;q=0.5, text/html, text/x-dvi;q=0.8, */*;q=0.3', 'text/plain', 0.5]; + yield ['text/plain;q=0.5, text/html, text/x-dvi;q=0.8, */*;q=0.3', '*', 0.3]; + yield ['text/plain;q=0.5, text/html, text/x-dvi;q=0.8, */*', '*', 1.0]; + yield ['text/plain;q=0.5, text/html, text/x-dvi;q=0.8, */*', 'text/xml', 1.0]; + yield ['text/plain;q=0.5, text/html, text/x-dvi;q=0.8, */*', 'text/*', 1.0]; + yield ['text/plain;q=0.5, text/html, text/*;q=0.8, */*', 'text/*', 0.8]; + yield ['text/plain;q=0.5, text/html, text/*;q=0.8, */*', 'text/html', 1.0]; + yield ['text/plain;q=0.5, text/html, text/*;q=0.8, */*', 'text/x-dvi', 0.8]; + yield ['*;q=0.3, ISO-8859-1;q=0.7, utf-8;q=0.7', '*', 0.3]; + yield ['*;q=0.3, ISO-8859-1;q=0.7, utf-8;q=0.7', 'utf-8', 0.7]; + yield ['*;q=0.3, ISO-8859-1;q=0.7, utf-8;q=0.7', 'SHIFT_JIS', 0.3]; } } diff --git a/vendor/symfony/http-foundation/Tests/ApacheRequestTest.php b/vendor/symfony/http-foundation/Tests/ApacheRequestTest.php index 157ab90e..6fa3b889 100644 --- a/vendor/symfony/http-foundation/Tests/ApacheRequestTest.php +++ b/vendor/symfony/http-foundation/Tests/ApacheRequestTest.php @@ -31,63 +31,63 @@ class ApacheRequestTest extends TestCase public function provideServerVars() { - return array( - array( - array( + return [ + [ + [ 'REQUEST_URI' => '/foo/app_dev.php/bar', 'SCRIPT_NAME' => '/foo/app_dev.php', 'PATH_INFO' => '/bar', - ), + ], '/foo/app_dev.php/bar', '/foo/app_dev.php', '/bar', - ), - array( - array( + ], + [ + [ 'REQUEST_URI' => '/foo/bar', 'SCRIPT_NAME' => '/foo/app_dev.php', - ), + ], '/foo/bar', '/foo', '/bar', - ), - array( - array( + ], + [ + [ 'REQUEST_URI' => '/app_dev.php/foo/bar', 'SCRIPT_NAME' => '/app_dev.php', 'PATH_INFO' => '/foo/bar', - ), + ], '/app_dev.php/foo/bar', '/app_dev.php', '/foo/bar', - ), - array( - array( + ], + [ + [ 'REQUEST_URI' => '/foo/bar', 'SCRIPT_NAME' => '/app_dev.php', - ), + ], '/foo/bar', '', '/foo/bar', - ), - array( - array( + ], + [ + [ 'REQUEST_URI' => '/app_dev.php', 'SCRIPT_NAME' => '/app_dev.php', - ), + ], '/app_dev.php', '/app_dev.php', '/', - ), - array( - array( + ], + [ + [ 'REQUEST_URI' => '/', 'SCRIPT_NAME' => '/app_dev.php', - ), + ], '/', '', '/', - ), - ); + ], + ]; } } diff --git a/vendor/symfony/http-foundation/Tests/BinaryFileResponseTest.php b/vendor/symfony/http-foundation/Tests/BinaryFileResponseTest.php index 6bf04e16..effffe92 100644 --- a/vendor/symfony/http-foundation/Tests/BinaryFileResponseTest.php +++ b/vendor/symfony/http-foundation/Tests/BinaryFileResponseTest.php @@ -22,14 +22,14 @@ class BinaryFileResponseTest extends ResponseTestCase public function testConstruction() { $file = __DIR__.'/../README.md'; - $response = new BinaryFileResponse($file, 404, array('X-Header' => 'Foo'), true, null, true, true); + $response = new BinaryFileResponse($file, 404, ['X-Header' => 'Foo'], true, null, true, true); $this->assertEquals(404, $response->getStatusCode()); $this->assertEquals('Foo', $response->headers->get('X-Header')); $this->assertTrue($response->headers->has('ETag')); $this->assertTrue($response->headers->has('Last-Modified')); $this->assertFalse($response->headers->has('Content-Disposition')); - $response = BinaryFileResponse::create($file, 404, array(), true, ResponseHeaderBag::DISPOSITION_INLINE); + $response = BinaryFileResponse::create($file, 404, [], true, ResponseHeaderBag::DISPOSITION_INLINE); $this->assertEquals(404, $response->getStatusCode()); $this->assertFalse($response->headers->has('ETag')); $this->assertEquals('inline; filename=README.md', $response->headers->get('Content-Disposition')); @@ -39,7 +39,7 @@ class BinaryFileResponseTest extends ResponseTestCase { touch(sys_get_temp_dir().'/fööö.html'); - $response = new BinaryFileResponse(sys_get_temp_dir().'/fööö.html', 200, array(), true, 'attachment'); + $response = new BinaryFileResponse(sys_get_temp_dir().'/fööö.html', 200, [], true, 'attachment'); @unlink(sys_get_temp_dir().'/fööö.html'); @@ -85,7 +85,7 @@ class BinaryFileResponseTest extends ResponseTestCase */ public function testRequests($requestRange, $offset, $length, $responseRange) { - $response = BinaryFileResponse::create(__DIR__.'/File/Fixtures/test.gif', 200, array('Content-Type' => 'application/octet-stream'))->setAutoEtag(); + $response = BinaryFileResponse::create(__DIR__.'/File/Fixtures/test.gif', 200, ['Content-Type' => 'application/octet-stream'])->setAutoEtag(); // do a request to get the ETag $request = Request::create('/'); @@ -117,7 +117,7 @@ class BinaryFileResponseTest extends ResponseTestCase */ public function testRequestsWithoutEtag($requestRange, $offset, $length, $responseRange) { - $response = BinaryFileResponse::create(__DIR__.'/File/Fixtures/test.gif', 200, array('Content-Type' => 'application/octet-stream')); + $response = BinaryFileResponse::create(__DIR__.'/File/Fixtures/test.gif', 200, ['Content-Type' => 'application/octet-stream']); // do a request to get the LastModified $request = Request::create('/'); @@ -145,19 +145,19 @@ class BinaryFileResponseTest extends ResponseTestCase public function provideRanges() { - return array( - array('bytes=1-4', 1, 4, 'bytes 1-4/35'), - array('bytes=-5', 30, 5, 'bytes 30-34/35'), - array('bytes=30-', 30, 5, 'bytes 30-34/35'), - array('bytes=30-30', 30, 1, 'bytes 30-30/35'), - array('bytes=30-34', 30, 5, 'bytes 30-34/35'), - ); + return [ + ['bytes=1-4', 1, 4, 'bytes 1-4/35'], + ['bytes=-5', 30, 5, 'bytes 30-34/35'], + ['bytes=30-', 30, 5, 'bytes 30-34/35'], + ['bytes=30-30', 30, 1, 'bytes 30-30/35'], + ['bytes=30-34', 30, 5, 'bytes 30-34/35'], + ]; } public function testRangeRequestsWithoutLastModifiedDate() { // prevent auto last modified - $response = BinaryFileResponse::create(__DIR__.'/File/Fixtures/test.gif', 200, array('Content-Type' => 'application/octet-stream'), true, null, false, false); + $response = BinaryFileResponse::create(__DIR__.'/File/Fixtures/test.gif', 200, ['Content-Type' => 'application/octet-stream'], true, null, false, false); // prepare a request for a range of the testing file $request = Request::create('/'); @@ -178,7 +178,7 @@ class BinaryFileResponseTest extends ResponseTestCase */ public function testFullFileRequests($requestRange) { - $response = BinaryFileResponse::create(__DIR__.'/File/Fixtures/test.gif', 200, array('Content-Type' => 'application/octet-stream'))->setAutoEtag(); + $response = BinaryFileResponse::create(__DIR__.'/File/Fixtures/test.gif', 200, ['Content-Type' => 'application/octet-stream'])->setAutoEtag(); // prepare a request for a range of the testing file $request = Request::create('/'); @@ -198,14 +198,14 @@ class BinaryFileResponseTest extends ResponseTestCase public function provideFullFileRanges() { - return array( - array('bytes=0-'), - array('bytes=0-34'), - array('bytes=-35'), + return [ + ['bytes=0-'], + ['bytes=0-34'], + ['bytes=-35'], // Syntactical invalid range-request should also return the full resource - array('bytes=20-10'), - array('bytes=50-40'), - ); + ['bytes=20-10'], + ['bytes=50-40'], + ]; } public function testUnpreparedResponseSendsFullFile() @@ -226,7 +226,7 @@ class BinaryFileResponseTest extends ResponseTestCase */ public function testInvalidRequests($requestRange) { - $response = BinaryFileResponse::create(__DIR__.'/File/Fixtures/test.gif', 200, array('Content-Type' => 'application/octet-stream'))->setAutoEtag(); + $response = BinaryFileResponse::create(__DIR__.'/File/Fixtures/test.gif', 200, ['Content-Type' => 'application/octet-stream'])->setAutoEtag(); // prepare a request for a range of the testing file $request = Request::create('/'); @@ -242,10 +242,10 @@ class BinaryFileResponseTest extends ResponseTestCase public function provideInvalidRanges() { - return array( - array('bytes=-40'), - array('bytes=30-40'), - ); + return [ + ['bytes=-40'], + ['bytes=30-40'], + ]; } /** @@ -257,7 +257,7 @@ class BinaryFileResponseTest extends ResponseTestCase $request->headers->set('X-Sendfile-Type', 'X-Sendfile'); BinaryFileResponse::trustXSendfileTypeHeader(); - $response = BinaryFileResponse::create($file, 200, array('Content-Type' => 'application/octet-stream')); + $response = BinaryFileResponse::create($file, 200, ['Content-Type' => 'application/octet-stream']); $response->prepare($request); $this->expectOutputString(''); @@ -268,10 +268,10 @@ class BinaryFileResponseTest extends ResponseTestCase public function provideXSendfileFiles() { - return array( - array(__DIR__.'/../README.md'), - array('file://'.__DIR__.'/../README.md'), - ); + return [ + [__DIR__.'/../README.md'], + ['file://'.__DIR__.'/../README.md'], + ]; } /** @@ -286,7 +286,7 @@ class BinaryFileResponseTest extends ResponseTestCase $file = new FakeFile($realpath, __DIR__.'/File/Fixtures/test'); BinaryFileResponse::trustXSendfileTypeHeader(); - $response = new BinaryFileResponse($file, 200, array('Content-Type' => 'application/octet-stream')); + $response = new BinaryFileResponse($file, 200, ['Content-Type' => 'application/octet-stream']); $reflection = new \ReflectionObject($response); $property = $reflection->getProperty('file'); $property->setAccessible(true); @@ -305,7 +305,7 @@ class BinaryFileResponseTest extends ResponseTestCase $realPath = realpath($path); $this->assertFileExists($realPath); - $response = new BinaryFileResponse($realPath, 200, array('Content-Type' => 'application/octet-stream')); + $response = new BinaryFileResponse($realPath, 200, ['Content-Type' => 'application/octet-stream']); $response->deleteFileAfterSend(true); $response->prepare($request); @@ -317,7 +317,7 @@ class BinaryFileResponseTest extends ResponseTestCase public function testAcceptRangeOnUnsafeMethods() { $request = Request::create('/', 'POST'); - $response = BinaryFileResponse::create(__DIR__.'/File/Fixtures/test.gif', 200, array('Content-Type' => 'application/octet-stream')); + $response = BinaryFileResponse::create(__DIR__.'/File/Fixtures/test.gif', 200, ['Content-Type' => 'application/octet-stream']); $response->prepare($request); $this->assertEquals('none', $response->headers->get('Accept-Ranges')); @@ -326,7 +326,7 @@ class BinaryFileResponseTest extends ResponseTestCase public function testAcceptRangeNotOverriden() { $request = Request::create('/', 'POST'); - $response = BinaryFileResponse::create(__DIR__.'/File/Fixtures/test.gif', 200, array('Content-Type' => 'application/octet-stream')); + $response = BinaryFileResponse::create(__DIR__.'/File/Fixtures/test.gif', 200, ['Content-Type' => 'application/octet-stream']); $response->headers->set('Accept-Ranges', 'foo'); $response->prepare($request); @@ -335,17 +335,18 @@ class BinaryFileResponseTest extends ResponseTestCase public function getSampleXAccelMappings() { - return array( - array('/var/www/var/www/files/foo.txt', '/var/www/=/files/', '/files/var/www/files/foo.txt'), - array('/home/Foo/bar.txt', '/var/www/=/files/,/home/Foo/=/baz/', '/baz/bar.txt'), - array('/home/Foo/bar.txt', '"/var/www/"="/files/", "/home/Foo/"="/baz/"', '/baz/bar.txt'), - ); + return [ + ['/var/www/var/www/files/foo.txt', '/var/www/=/files/', '/files/var/www/files/foo.txt'], + ['/home/Foo/bar.txt', '/var/www/=/files/,/home/Foo/=/baz/', '/baz/bar.txt'], + ['/home/Foo/bar.txt', '"/var/www/"="/files/", "/home/Foo/"="/baz/"', '/baz/bar.txt'], + ['/tmp/bar.txt', '"/var/www/"="/files/", "/home/Foo/"="/baz/"', null], + ]; } public function testStream() { $request = Request::create('/'); - $response = new BinaryFileResponse(new Stream(__DIR__.'/../README.md'), 200, array('Content-Type' => 'text/plain')); + $response = new BinaryFileResponse(new Stream(__DIR__.'/../README.md'), 200, ['Content-Type' => 'text/plain']); $response->prepare($request); $this->assertNull($response->headers->get('Content-Length')); @@ -353,7 +354,7 @@ class BinaryFileResponseTest extends ResponseTestCase protected function provideResponse() { - return new BinaryFileResponse(__DIR__.'/../README.md', 200, array('Content-Type' => 'application/octet-stream')); + return new BinaryFileResponse(__DIR__.'/../README.md', 200, ['Content-Type' => 'application/octet-stream']); } public static function tearDownAfterClass() diff --git a/vendor/symfony/http-foundation/Tests/CookieTest.php b/vendor/symfony/http-foundation/Tests/CookieTest.php index 44981dff..4aa32eea 100644 --- a/vendor/symfony/http-foundation/Tests/CookieTest.php +++ b/vendor/symfony/http-foundation/Tests/CookieTest.php @@ -26,17 +26,17 @@ class CookieTest extends TestCase { public function invalidNames() { - return array( - array(''), - array(',MyName'), - array(';MyName'), - array(' MyName'), - array("\tMyName"), - array("\rMyName"), - array("\nMyName"), - array("\013MyName"), - array("\014MyName"), - ); + return [ + [''], + [',MyName'], + [';MyName'], + [' MyName'], + ["\tMyName"], + ["\rMyName"], + ["\nMyName"], + ["\013MyName"], + ["\014MyName"], + ]; } /** diff --git a/vendor/symfony/http-foundation/Tests/ExpressionRequestMatcherTest.php b/vendor/symfony/http-foundation/Tests/ExpressionRequestMatcherTest.php index 1152e46c..2afdade6 100644 --- a/vendor/symfony/http-foundation/Tests/ExpressionRequestMatcherTest.php +++ b/vendor/symfony/http-foundation/Tests/ExpressionRequestMatcherTest.php @@ -55,15 +55,15 @@ class ExpressionRequestMatcherTest extends TestCase public function provideExpressions() { - return array( - array('request.getMethod() == method', true), - array('request.getPathInfo() == path', true), - array('request.getHost() == host', true), - array('request.getClientIp() == ip', true), - array('request.attributes.all() == attributes', true), - array('request.getMethod() == method && request.getPathInfo() == path && request.getHost() == host && request.getClientIp() == ip && request.attributes.all() == attributes', true), - array('request.getMethod() != method', false), - array('request.getMethod() != method && request.getPathInfo() == path && request.getHost() == host && request.getClientIp() == ip && request.attributes.all() == attributes', false), - ); + return [ + ['request.getMethod() == method', true], + ['request.getPathInfo() == path', true], + ['request.getHost() == host', true], + ['request.getClientIp() == ip', true], + ['request.attributes.all() == attributes', true], + ['request.getMethod() == method && request.getPathInfo() == path && request.getHost() == host && request.getClientIp() == ip && request.attributes.all() == attributes', true], + ['request.getMethod() != method', false], + ['request.getMethod() != method && request.getPathInfo() == path && request.getHost() == host && request.getClientIp() == ip && request.attributes.all() == attributes', false], + ]; } } diff --git a/vendor/symfony/http-foundation/Tests/File/FileTest.php b/vendor/symfony/http-foundation/Tests/File/FileTest.php index dbd9c44b..9c1854d9 100644 --- a/vendor/symfony/http-foundation/Tests/File/FileTest.php +++ b/vendor/symfony/http-foundation/Tests/File/FileTest.php @@ -13,8 +13,10 @@ namespace Symfony\Component\HttpFoundation\Tests\File; use PHPUnit\Framework\TestCase; use Symfony\Component\HttpFoundation\File\File; -use Symfony\Component\HttpFoundation\File\MimeType\MimeTypeGuesser; +/** + * @requires extension fileinfo + */ class FileTest extends TestCase { protected $file; @@ -22,50 +24,24 @@ class FileTest extends TestCase public function testGetMimeTypeUsesMimeTypeGuessers() { $file = new File(__DIR__.'/Fixtures/test.gif'); - $guesser = $this->createMockGuesser($file->getPathname(), 'image/gif'); - - MimeTypeGuesser::getInstance()->register($guesser); - $this->assertEquals('image/gif', $file->getMimeType()); } public function testGuessExtensionWithoutGuesser() { $file = new File(__DIR__.'/Fixtures/directory/.empty'); - $this->assertNull($file->guessExtension()); } public function testGuessExtensionIsBasedOnMimeType() { $file = new File(__DIR__.'/Fixtures/test'); - $guesser = $this->createMockGuesser($file->getPathname(), 'image/gif'); - - MimeTypeGuesser::getInstance()->register($guesser); - $this->assertEquals('gif', $file->guessExtension()); } - /** - * @requires extension fileinfo - */ - public function testGuessExtensionWithReset() - { - $file = new File(__DIR__.'/Fixtures/other-file.example'); - $guesser = $this->createMockGuesser($file->getPathname(), 'image/gif'); - MimeTypeGuesser::getInstance()->register($guesser); - - $this->assertEquals('gif', $file->guessExtension()); - - MimeTypeGuesser::reset(); - - $this->assertNull($file->guessExtension()); - } - public function testConstructWhenFileNotExists() { - $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('Symfony\Component\HttpFoundation\File\Exception\FileNotFoundException'); - + $this->expectException('Symfony\Component\HttpFoundation\File\Exception\FileNotFoundException'); new File(__DIR__.'/Fixtures/not_here'); } @@ -110,14 +86,14 @@ class FileTest extends TestCase public function getFilenameFixtures() { - return array( - array('original.gif', 'original.gif'), - array('..\\..\\original.gif', 'original.gif'), - array('../../original.gif', 'original.gif'), - array('файлfile.gif', 'файлfile.gif'), - array('..\\..\\файлfile.gif', 'файлfile.gif'), - array('../../файлfile.gif', 'файлfile.gif'), - ); + return [ + ['original.gif', 'original.gif'], + ['..\\..\\original.gif', 'original.gif'], + ['../../original.gif', 'original.gif'], + ['файлfile.gif', 'файлfile.gif'], + ['..\\..\\файлfile.gif', 'файлfile.gif'], + ['../../файлfile.gif', 'файлfile.gif'], + ]; } /** @@ -164,17 +140,4 @@ class FileTest extends TestCase @unlink($targetPath); @rmdir($targetDir); } - - protected function createMockGuesser($path, $mimeType) - { - $guesser = $this->getMockBuilder('Symfony\Component\HttpFoundation\File\MimeType\MimeTypeGuesserInterface')->getMock(); - $guesser - ->expects($this->once()) - ->method('guess') - ->with($this->equalTo($path)) - ->will($this->returnValue($mimeType)) - ; - - return $guesser; - } } diff --git a/vendor/symfony/http-foundation/Tests/File/Fixtures/case-sensitive-mime-type.xlsm b/vendor/symfony/http-foundation/Tests/File/Fixtures/case-sensitive-mime-type.xlsm new file mode 100644 index 0000000000000000000000000000000000000000..94d85e6132c553225a1628f056151bee22f5b352 GIT binary patch literal 4791 zcmaJ_by$;q7bYA%x^yBTjifNTk=Ou7hct}dMu}1)H4rK35NQxZL_|6iLAsH0l%O;y zAfX`N_Qof#*ZX=ue{9#To%1};ea^YhIX@Vb@EkoJ2?+__b=!Ddyfe6f{eIhB*xC#3 z?k#)^<>h9FLb(auMz{;%etDYEOV%breeK{RS|lKAJR(Z`=4F*yeMPpyQQ{h{u6B*n z*{FQR29E{Tx?QOQv8jFV-bQGgOaY+KlYru-m{AD`ztgML^bI(^ig14+X1YeKyEMF4N~R&w0F@TI(O9KU^{Q%+*e{J|iPM;uBli)XwJwO0^Qg zpu{Bc1O#}^*jG%)$HRmDCkf1dl7M@CZ)Z5%$6NT14^bQsu}1Ip--}QOZJXTQo1M(V z^t9Wi4a!IoX2AS-vfD4dFW)8S5>`7kyDrYUkKt^sNq-Zm@Qb`r0E0;A&D^i#W<*PG1%abL(59t#%7#hGF!MY7$c5 zyJlS;sC)~4;!m<<{IbhE1V{WW5fXKs{D(7yvvfoCi$_GhN$1&B+@^(=-*jCt=?plX+`^<*m; zt6gl=fy3Sl4*Sn8Blp*3C2wfmGa5pQNxQwnOp9;W=%GM9?b^5a+aQOd-9G-09_|HS z>7kkVUQsu<+Q1=UWHY{#a{HThOl)!%)INJ++0qiJ!a2SXESu^Qu))yA!RiZFxkhmC zEf23bf563DU4L<*Tgxos?Rg=sMo`C#WdXrQWUJqJxMTErX0XDpt{=5?v=???!HrOwGfj~uTb1MB*4QnA^KhQQ2nf)zr`cgpc{!Tn&tz6 zbF&CRt2O3SLXDaPycz0}?uRRhHML zc}9J0wy)%1^+Ms(9UJQgGU=j&943G?bLBoEo2kv6nGc2i3Zwqp!$EL+V|K9jT&*8K zqE>b0ZoX!zPX7b#7rO}iyG%6%ugt&cQEQ)Ml6T02*B`M`Sf+ABz8s*E;N4K7(2Q%J zHO_zTUe6m5zFff`FWJvyMYkE=`|zmOWZF6=?Mq;=vwlyUS$7e@wR)sva7wc4fy@Ve zv1jun3pyfO20!i&X=WIrA3j|)d)56TuC`dUX+k}4f~+3%NgaCrs(7TE1V=Q-sfojT z%C&n=HMbsFhx708IacTQX6<&fSgVCF2ztn5#s?SzHZ|2&8NmtDI zVy>CA=XtCxkr+OE`I!AwM+50}GGTzsy_Lvh+na1b1z_+MQ;xnE!H~h(<|xE#b1AwD zf1h^@p}WXLg5IGEg0-``^PT5aTnlA04)=|1-TLJEOqqix?hPAB8za-e;p_bGRwS^yj@bbl_9?u=Vrvb9AcZBbK6vidaWwG4hW31$&2!EG2z&{hm z+sDrx?v2yh&2(i{mI!_4_ILW!ZGnVh7g>Cx_xD`VO3e*iMykUIiOMg4rgTByRu5uG zLk!=gZd4jVglkUaPG{$+ZioV(88c{HH+12?79K{&dYNB8LsU=g(DqSa(<@C7hge%t zE)DYWTaz!5uq^cG_eA}$yKFw;Q2Vv(k4i=pjn#6xGRbZyLXBt$RgG>p7$-YS>z36? zemTi7q2czp7!6M`R4*_TiogdohgU4n zQ(VaXo~G~0ocl(6wHe`l!n_=G!aYgqX-a4Rn3j|RHjyJK(R2>KvCVe6PEn01TKx5r zyGR~_ZCj;`!gs-gSc()LL$6Q$1EwLxV_|@S=6rl%df&6l1&LQ~sy98}HT{Cx-T{#P z^A(^NDV-$G-6X%#Kxac$Xm>ee zwPU_e2S#7RJ4x=h;DZeTQdvG!q^I7t{-vDvSjVtFRwS5YFN^RLCbwNwh zZ!tY(9BvQ~aNEPJC}qVHYk60&O24m?U`jp*!hhr_N_-|;eCMWUe)g&SW?UKl>}{%s ziy;HEM2I+wCJWT=+`~gjT&g#a*k@E?HIkP0cd1T}P4z!#tUu?f#MioSL@3bP0nz*i z5;IC9dBu&|nvLw@mtJuqK`-wWw1@5NtI^R?#8$nD^Sl%M!>(vn8+m0`gd1vg&&cc^ zK{K~~P)U354^KZ~aDV=tw=_~3`Y2U?ulVbby}kwIp27g11PIy6t`2k!6s88W$8!@z=PR99@!RMO7br5b6NG;Zj{t8z=m~bSq`*uOJ3j#}|nrMM= zG@0KlJgB~RZabOsJcWp+4ow>Sr>!o=(b_onljPpj^mMw0`cGaSc6&tqO|;=6PCfxT zmxDC5w{jR*u3AIxn?E}4{X~bODI!xma|=tt0G6u%9>nOd|8PLr!@N))-oo}by?sy! zoG!c^)j@@dFcW|Nt^inNxdAhzu%Q>1-KcC&3owZm536x`0y5j5F+r~kJB+>`O*;jq@oXJeix@R zFGEx$>P3{t&Gq#8rAau_ge=e1eFMgl%S)#2%-!|87^B3RC(5aTP}}T*UR>F6&W->h7uv5GgdZ2>RJ`d}14&iQ zY!F5+PR|Cie{5M#ij~VS<5H~FyC-=mmtBRXN%vYM)2RzpzQRuRe|y4|CYFgetNY)R4rZlnfP#Hx-{MmK%(LP-goS+{JR0xk=l;Ms@gU3sUQa8#G+1R+KLeNrAG{! zl$%6L5-p9^{aTEGg;>^@6A|+WJ+ZhXwma8Xa}KiS*(+}D!=Pvock?n4P2uV!_S~=?z3Th0q2~Ibf;wJ2`MrdcgB$`AO%_Z7(}N z>J^^hN`@JPqw?HXQ8xK#U?4$f*tN7tWZvhaXaXIncj`2g6 zOA02NL$f9(gsOfEi2}gj`YKreVT3&Fg*A1K%x7MM6$0)vDX^Vg? zpuLj?O+!+s=2sj(7BJkiTFfM7m$U;Od&#wY7->8wl)`s)vic6EX=lH;fBEFF&@7o?t$(*L^oJIhY~TL8b3^# zB;Z^+u}_>SaXE1<;^GyqP32%flc;spqbx2FZXz*!y!tk8*b8#gn zl}1+W^nIew@otnu_MaBer;Ele9e#WG^%%RI{f%P6Vv6?g^t~^ctX`}OK40_Pb#q)f z_ogiK3JM9nzLPKWJ7rC8A;6Jed~8E4hb10-4kzmP1oU`64;jvG-nc`Cf8xK79Den4 zb_c=j=|2I$-WluXU$^#Oy__9Lar??osA8Y}FE4*@FTWa}ZSlC7^(O+cixJlN=LGw! z>Dji2n*n~piS!>6!LNpA)f$(*KM_avuRZct2WJ%oC+a^zO>x%2UlRYT`PsU{$;?kQ qV=4H5kN!(^eziWE82^0wPn7>!i7+StOC=s2DfUvpYM%Wc_xvA{ir)|b literal 0 HcmV?d00001 diff --git a/vendor/symfony/http-foundation/Tests/File/MimeType/MimeTypeTest.php b/vendor/symfony/http-foundation/Tests/File/MimeType/MimeTypeTest.php index bb88807a..f990a4f3 100644 --- a/vendor/symfony/http-foundation/Tests/File/MimeType/MimeTypeTest.php +++ b/vendor/symfony/http-foundation/Tests/File/MimeType/MimeTypeTest.php @@ -17,11 +17,10 @@ use Symfony\Component\HttpFoundation\File\MimeType\MimeTypeGuesser; /** * @requires extension fileinfo + * @group legacy */ class MimeTypeTest extends TestCase { - protected $path; - public function testGuessImageWithoutExtension() { $this->assertEquals('image/gif', MimeTypeGuesser::getInstance()->guess(__DIR__.'/../Fixtures/test')); @@ -29,7 +28,7 @@ class MimeTypeTest extends TestCase public function testGuessImageWithDirectory() { - $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('Symfony\Component\HttpFoundation\File\Exception\FileNotFoundException'); + $this->expectException('Symfony\Component\HttpFoundation\File\Exception\FileNotFoundException'); MimeTypeGuesser::getInstance()->guess(__DIR__.'/../Fixtures/directory'); } @@ -53,7 +52,7 @@ class MimeTypeTest extends TestCase public function testGuessWithIncorrectPath() { - $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('Symfony\Component\HttpFoundation\File\Exception\FileNotFoundException'); + $this->expectException('Symfony\Component\HttpFoundation\File\Exception\FileNotFoundException'); MimeTypeGuesser::getInstance()->guess(__DIR__.'/../Fixtures/not_here'); } @@ -72,7 +71,7 @@ class MimeTypeTest extends TestCase @chmod($path, 0333); if ('0333' == substr(sprintf('%o', fileperms($path)), -4)) { - $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('Symfony\Component\HttpFoundation\File\Exception\AccessDeniedException'); + $this->expectException('Symfony\Component\HttpFoundation\File\Exception\AccessDeniedException'); MimeTypeGuesser::getInstance()->guess($path); } else { $this->markTestSkipped('Can not verify chmod operations, change of file permissions failed'); diff --git a/vendor/symfony/http-foundation/Tests/File/UploadedFileTest.php b/vendor/symfony/http-foundation/Tests/File/UploadedFileTest.php index 6a0b550d..8518df26 100644 --- a/vendor/symfony/http-foundation/Tests/File/UploadedFileTest.php +++ b/vendor/symfony/http-foundation/Tests/File/UploadedFileTest.php @@ -33,7 +33,7 @@ class UploadedFileTest extends TestCase public function testConstructWhenFileNotExists() { - $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('Symfony\Component\HttpFoundation\File\Exception\FileNotFoundException'); + $this->expectException('Symfony\Component\HttpFoundation\File\Exception\FileNotFoundException'); new UploadedFile( __DIR__.'/Fixtures/not_here', @@ -94,6 +94,18 @@ class UploadedFileTest extends TestCase $this->assertEquals('jpeg', $file->guessClientExtension()); } + public function testCaseSensitiveMimeType() + { + $file = new UploadedFile( + __DIR__.'/Fixtures/case-sensitive-mime-type.xlsm', + 'test.xlsm', + 'application/vnd.ms-excel.sheet.macroEnabled.12', + null + ); + + $this->assertEquals('xlsm', $file->guessClientExtension()); + } + public function testErrorIsOkByDefault() { $file = new UploadedFile( @@ -147,13 +159,13 @@ class UploadedFileTest extends TestCase public function failedUploadedFile() { - foreach (array(UPLOAD_ERR_INI_SIZE, UPLOAD_ERR_FORM_SIZE, UPLOAD_ERR_PARTIAL, UPLOAD_ERR_NO_FILE, UPLOAD_ERR_CANT_WRITE, UPLOAD_ERR_NO_TMP_DIR, UPLOAD_ERR_EXTENSION, -1) as $error) { - yield array(new UploadedFile( + foreach ([UPLOAD_ERR_INI_SIZE, UPLOAD_ERR_FORM_SIZE, UPLOAD_ERR_PARTIAL, UPLOAD_ERR_NO_FILE, UPLOAD_ERR_CANT_WRITE, UPLOAD_ERR_NO_TMP_DIR, UPLOAD_ERR_EXTENSION, -1] as $error) { + yield [new UploadedFile( __DIR__.'/Fixtures/test.gif', 'original.gif', 'image/gif', $error - )); + )]; } } @@ -323,13 +335,13 @@ class UploadedFileTest extends TestCase public function uploadedFileErrorProvider() { - return array( - array(UPLOAD_ERR_INI_SIZE), - array(UPLOAD_ERR_FORM_SIZE), - array(UPLOAD_ERR_PARTIAL), - array(UPLOAD_ERR_NO_TMP_DIR), - array(UPLOAD_ERR_EXTENSION), - ); + return [ + [UPLOAD_ERR_INI_SIZE], + [UPLOAD_ERR_FORM_SIZE], + [UPLOAD_ERR_PARTIAL], + [UPLOAD_ERR_NO_TMP_DIR], + [UPLOAD_ERR_EXTENSION], + ]; } public function testIsInvalidIfNotHttpUpload() diff --git a/vendor/symfony/http-foundation/Tests/FileBagTest.php b/vendor/symfony/http-foundation/Tests/FileBagTest.php index 06136e20..5eaf64f8 100644 --- a/vendor/symfony/http-foundation/Tests/FileBagTest.php +++ b/vendor/symfony/http-foundation/Tests/FileBagTest.php @@ -28,7 +28,7 @@ class FileBagTest extends TestCase */ public function testFileMustBeAnArrayOrUploadedFile() { - new FileBag(array('file' => 'foo')); + new FileBag(['file' => 'foo']); } public function testShouldConvertsUploadedFiles() @@ -36,54 +36,54 @@ class FileBagTest extends TestCase $tmpFile = $this->createTempFile(); $file = new UploadedFile($tmpFile, basename($tmpFile), 'text/plain'); - $bag = new FileBag(array('file' => array( + $bag = new FileBag(['file' => [ 'name' => basename($tmpFile), 'type' => 'text/plain', 'tmp_name' => $tmpFile, 'error' => 0, 'size' => null, - ))); + ]]); $this->assertEquals($file, $bag->get('file')); } public function testShouldSetEmptyUploadedFilesToNull() { - $bag = new FileBag(array('file' => array( + $bag = new FileBag(['file' => [ 'name' => '', 'type' => '', 'tmp_name' => '', 'error' => UPLOAD_ERR_NO_FILE, 'size' => 0, - ))); + ]]); $this->assertNull($bag->get('file')); } public function testShouldRemoveEmptyUploadedFilesForMultiUpload() { - $bag = new FileBag(array('files' => array( - 'name' => array(''), - 'type' => array(''), - 'tmp_name' => array(''), - 'error' => array(UPLOAD_ERR_NO_FILE), - 'size' => array(0), - ))); + $bag = new FileBag(['files' => [ + 'name' => [''], + 'type' => [''], + 'tmp_name' => [''], + 'error' => [UPLOAD_ERR_NO_FILE], + 'size' => [0], + ]]); - $this->assertSame(array(), $bag->get('files')); + $this->assertSame([], $bag->get('files')); } public function testShouldNotRemoveEmptyUploadedFilesForAssociativeArray() { - $bag = new FileBag(array('files' => array( - 'name' => array('file1' => ''), - 'type' => array('file1' => ''), - 'tmp_name' => array('file1' => ''), - 'error' => array('file1' => UPLOAD_ERR_NO_FILE), - 'size' => array('file1' => 0), - ))); + $bag = new FileBag(['files' => [ + 'name' => ['file1' => ''], + 'type' => ['file1' => ''], + 'tmp_name' => ['file1' => ''], + 'error' => ['file1' => UPLOAD_ERR_NO_FILE], + 'size' => ['file1' => 0], + ]]); - $this->assertSame(array('file1' => null), $bag->get('files')); + $this->assertSame(['file1' => null], $bag->get('files')); } public function testShouldConvertUploadedFilesWithPhpBug() @@ -91,25 +91,25 @@ class FileBagTest extends TestCase $tmpFile = $this->createTempFile(); $file = new UploadedFile($tmpFile, basename($tmpFile), 'text/plain'); - $bag = new FileBag(array( - 'child' => array( - 'name' => array( + $bag = new FileBag([ + 'child' => [ + 'name' => [ 'file' => basename($tmpFile), - ), - 'type' => array( + ], + 'type' => [ 'file' => 'text/plain', - ), - 'tmp_name' => array( + ], + 'tmp_name' => [ 'file' => $tmpFile, - ), - 'error' => array( + ], + 'error' => [ 'file' => 0, - ), - 'size' => array( + ], + 'size' => [ 'file' => null, - ), - ), - )); + ], + ], + ]); $files = $bag->all(); $this->assertEquals($file, $files['child']['file']); @@ -120,25 +120,25 @@ class FileBagTest extends TestCase $tmpFile = $this->createTempFile(); $file = new UploadedFile($tmpFile, basename($tmpFile), 'text/plain'); - $bag = new FileBag(array( - 'child' => array( - 'name' => array( - 'sub' => array('file' => basename($tmpFile)), - ), - 'type' => array( - 'sub' => array('file' => 'text/plain'), - ), - 'tmp_name' => array( - 'sub' => array('file' => $tmpFile), - ), - 'error' => array( - 'sub' => array('file' => 0), - ), - 'size' => array( - 'sub' => array('file' => null), - ), - ), - )); + $bag = new FileBag([ + 'child' => [ + 'name' => [ + 'sub' => ['file' => basename($tmpFile)], + ], + 'type' => [ + 'sub' => ['file' => 'text/plain'], + ], + 'tmp_name' => [ + 'sub' => ['file' => $tmpFile], + ], + 'error' => [ + 'sub' => ['file' => 0], + ], + 'size' => [ + 'sub' => ['file' => null], + ], + ], + ]); $files = $bag->all(); $this->assertEquals($file, $files['child']['sub']['file']); @@ -148,7 +148,7 @@ class FileBagTest extends TestCase { $tmpFile = $this->createTempFile(); $file = new UploadedFile($tmpFile, basename($tmpFile), 'text/plain'); - $bag = new FileBag(array('image' => array('file' => $file))); + $bag = new FileBag(['image' => ['file' => $file]]); $files = $bag->all(); $this->assertEquals($file, $files['image']['file']); diff --git a/vendor/symfony/http-foundation/Tests/HeaderBagTest.php b/vendor/symfony/http-foundation/Tests/HeaderBagTest.php index c5a437f9..6c4915f2 100644 --- a/vendor/symfony/http-foundation/Tests/HeaderBagTest.php +++ b/vendor/symfony/http-foundation/Tests/HeaderBagTest.php @@ -18,7 +18,7 @@ class HeaderBagTest extends TestCase { public function testConstructor() { - $bag = new HeaderBag(array('foo' => 'bar')); + $bag = new HeaderBag(['foo' => 'bar']); $this->assertTrue($bag->has('foo')); } @@ -30,20 +30,20 @@ class HeaderBagTest extends TestCase public function testToStringNotNull() { - $bag = new HeaderBag(array('foo' => 'bar')); + $bag = new HeaderBag(['foo' => 'bar']); $this->assertEquals("Foo: bar\r\n", $bag->__toString()); } public function testKeys() { - $bag = new HeaderBag(array('foo' => 'bar')); + $bag = new HeaderBag(['foo' => 'bar']); $keys = $bag->keys(); $this->assertEquals('foo', $keys[0]); } public function testGetDate() { - $bag = new HeaderBag(array('foo' => 'Tue, 4 Sep 2012 20:00:00 +0200')); + $bag = new HeaderBag(['foo' => 'Tue, 4 Sep 2012 20:00:00 +0200']); $headerDate = $bag->getDate('foo'); $this->assertInstanceOf('DateTime', $headerDate); } @@ -53,7 +53,7 @@ class HeaderBagTest extends TestCase */ public function testGetDateException() { - $bag = new HeaderBag(array('foo' => 'Tue')); + $bag = new HeaderBag(['foo' => 'Tue']); $headerDate = $bag->getDate('foo'); } @@ -67,50 +67,50 @@ class HeaderBagTest extends TestCase public function testAll() { - $bag = new HeaderBag(array('foo' => 'bar')); - $this->assertEquals(array('foo' => array('bar')), $bag->all(), '->all() gets all the input'); + $bag = new HeaderBag(['foo' => 'bar']); + $this->assertEquals(['foo' => ['bar']], $bag->all(), '->all() gets all the input'); - $bag = new HeaderBag(array('FOO' => 'BAR')); - $this->assertEquals(array('foo' => array('BAR')), $bag->all(), '->all() gets all the input key are lower case'); + $bag = new HeaderBag(['FOO' => 'BAR']); + $this->assertEquals(['foo' => ['BAR']], $bag->all(), '->all() gets all the input key are lower case'); } public function testReplace() { - $bag = new HeaderBag(array('foo' => 'bar')); + $bag = new HeaderBag(['foo' => 'bar']); - $bag->replace(array('NOPE' => 'BAR')); - $this->assertEquals(array('nope' => array('BAR')), $bag->all(), '->replace() replaces the input with the argument'); + $bag->replace(['NOPE' => 'BAR']); + $this->assertEquals(['nope' => ['BAR']], $bag->all(), '->replace() replaces the input with the argument'); $this->assertFalse($bag->has('foo'), '->replace() overrides previously set the input'); } public function testGet() { - $bag = new HeaderBag(array('foo' => 'bar', 'fuzz' => 'bizz')); + $bag = new HeaderBag(['foo' => 'bar', 'fuzz' => 'bizz']); $this->assertEquals('bar', $bag->get('foo'), '->get return current value'); $this->assertEquals('bar', $bag->get('FoO'), '->get key in case insensitive'); - $this->assertEquals(array('bar'), $bag->get('foo', 'nope', false), '->get return the value as array'); + $this->assertEquals(['bar'], $bag->get('foo', 'nope', false), '->get return the value as array'); // defaults $this->assertNull($bag->get('none'), '->get unknown values returns null'); $this->assertEquals('default', $bag->get('none', 'default'), '->get unknown values returns default'); - $this->assertEquals(array('default'), $bag->get('none', 'default', false), '->get unknown values returns default as array'); + $this->assertEquals(['default'], $bag->get('none', 'default', false), '->get unknown values returns default as array'); $bag->set('foo', 'bor', false); $this->assertEquals('bar', $bag->get('foo'), '->get return first value'); - $this->assertEquals(array('bar', 'bor'), $bag->get('foo', 'nope', false), '->get return all values as array'); + $this->assertEquals(['bar', 'bor'], $bag->get('foo', 'nope', false), '->get return all values as array'); } public function testSetAssociativeArray() { $bag = new HeaderBag(); - $bag->set('foo', array('bad-assoc-index' => 'value')); + $bag->set('foo', ['bad-assoc-index' => 'value']); $this->assertSame('value', $bag->get('foo')); - $this->assertEquals(array('value'), $bag->get('foo', 'nope', false), 'assoc indices of multi-valued headers are ignored'); + $this->assertEquals(['value'], $bag->get('foo', 'nope', false), 'assoc indices of multi-valued headers are ignored'); } public function testContains() { - $bag = new HeaderBag(array('foo' => 'bar', 'fuzz' => 'bizz')); + $bag = new HeaderBag(['foo' => 'bar', 'fuzz' => 'bizz']); $this->assertTrue($bag->contains('foo', 'bar'), '->contains first value'); $this->assertTrue($bag->contains('fuzz', 'bizz'), '->contains second value'); $this->assertFalse($bag->contains('nope', 'nope'), '->contains unknown value'); @@ -143,7 +143,7 @@ class HeaderBagTest extends TestCase public function testCacheControlDirectiveParsing() { - $bag = new HeaderBag(array('cache-control' => 'public, max-age=10')); + $bag = new HeaderBag(['cache-control' => 'public, max-age=10']); $this->assertTrue($bag->hasCacheControlDirective('public')); $this->assertTrue($bag->getCacheControlDirective('public')); @@ -156,15 +156,15 @@ class HeaderBagTest extends TestCase public function testCacheControlDirectiveParsingQuotedZero() { - $bag = new HeaderBag(array('cache-control' => 'max-age="0"')); + $bag = new HeaderBag(['cache-control' => 'max-age="0"']); $this->assertTrue($bag->hasCacheControlDirective('max-age')); $this->assertEquals(0, $bag->getCacheControlDirective('max-age')); } public function testCacheControlDirectiveOverrideWithReplace() { - $bag = new HeaderBag(array('cache-control' => 'private, max-age=100')); - $bag->replace(array('cache-control' => 'public, max-age=10')); + $bag = new HeaderBag(['cache-control' => 'private, max-age=100']); + $bag->replace(['cache-control' => 'public, max-age=10']); $this->assertTrue($bag->hasCacheControlDirective('public')); $this->assertTrue($bag->getCacheControlDirective('public')); @@ -174,7 +174,7 @@ class HeaderBagTest extends TestCase public function testCacheControlClone() { - $headers = array('foo' => 'bar'); + $headers = ['foo' => 'bar']; $bag1 = new HeaderBag($headers); $bag2 = new HeaderBag($bag1->all()); @@ -183,13 +183,13 @@ class HeaderBagTest extends TestCase public function testGetIterator() { - $headers = array('foo' => 'bar', 'hello' => 'world', 'third' => 'charm'); + $headers = ['foo' => 'bar', 'hello' => 'world', 'third' => 'charm']; $headerBag = new HeaderBag($headers); $i = 0; foreach ($headerBag as $key => $val) { ++$i; - $this->assertEquals(array($headers[$key]), $val); + $this->assertEquals([$headers[$key]], $val); } $this->assertEquals(\count($headers), $i); @@ -197,7 +197,7 @@ class HeaderBagTest extends TestCase public function testCount() { - $headers = array('foo' => 'bar', 'HELLO' => 'WORLD'); + $headers = ['foo' => 'bar', 'HELLO' => 'WORLD']; $headerBag = new HeaderBag($headers); $this->assertCount(\count($headers), $headerBag); diff --git a/vendor/symfony/http-foundation/Tests/HeaderUtilsTest.php b/vendor/symfony/http-foundation/Tests/HeaderUtilsTest.php index 15efdf92..2f82dc4e 100644 --- a/vendor/symfony/http-foundation/Tests/HeaderUtilsTest.php +++ b/vendor/symfony/http-foundation/Tests/HeaderUtilsTest.php @@ -18,48 +18,48 @@ class HeaderUtilsTest extends TestCase { public function testSplit() { - $this->assertSame(array('foo=123', 'bar'), HeaderUtils::split('foo=123,bar', ',')); - $this->assertSame(array('foo=123', 'bar'), HeaderUtils::split('foo=123, bar', ',')); - $this->assertSame(array(array('foo=123', 'bar')), HeaderUtils::split('foo=123; bar', ',;')); - $this->assertSame(array(array('foo=123'), array('bar')), HeaderUtils::split('foo=123, bar', ',;')); - $this->assertSame(array('foo', '123, bar'), HeaderUtils::split('foo=123, bar', '=')); - $this->assertSame(array('foo', '123, bar'), HeaderUtils::split(' foo = 123, bar ', '=')); - $this->assertSame(array(array('foo', '123'), array('bar')), HeaderUtils::split('foo=123, bar', ',=')); - $this->assertSame(array(array(array('foo', '123')), array(array('bar'), array('foo', '456'))), HeaderUtils::split('foo=123, bar; foo=456', ',;=')); - $this->assertSame(array(array(array('foo', 'a,b;c=d'))), HeaderUtils::split('foo="a,b;c=d"', ',;=')); + $this->assertSame(['foo=123', 'bar'], HeaderUtils::split('foo=123,bar', ',')); + $this->assertSame(['foo=123', 'bar'], HeaderUtils::split('foo=123, bar', ',')); + $this->assertSame([['foo=123', 'bar']], HeaderUtils::split('foo=123; bar', ',;')); + $this->assertSame([['foo=123'], ['bar']], HeaderUtils::split('foo=123, bar', ',;')); + $this->assertSame(['foo', '123, bar'], HeaderUtils::split('foo=123, bar', '=')); + $this->assertSame(['foo', '123, bar'], HeaderUtils::split(' foo = 123, bar ', '=')); + $this->assertSame([['foo', '123'], ['bar']], HeaderUtils::split('foo=123, bar', ',=')); + $this->assertSame([[['foo', '123']], [['bar'], ['foo', '456']]], HeaderUtils::split('foo=123, bar; foo=456', ',;=')); + $this->assertSame([[['foo', 'a,b;c=d']]], HeaderUtils::split('foo="a,b;c=d"', ',;=')); - $this->assertSame(array('foo', 'bar'), HeaderUtils::split('foo,,,, bar', ',')); - $this->assertSame(array('foo', 'bar'), HeaderUtils::split(',foo, bar,', ',')); - $this->assertSame(array('foo', 'bar'), HeaderUtils::split(' , foo, bar, ', ',')); - $this->assertSame(array('foo bar'), HeaderUtils::split('foo "bar"', ',')); - $this->assertSame(array('foo bar'), HeaderUtils::split('"foo" bar', ',')); - $this->assertSame(array('foo bar'), HeaderUtils::split('"foo" "bar"', ',')); + $this->assertSame(['foo', 'bar'], HeaderUtils::split('foo,,,, bar', ',')); + $this->assertSame(['foo', 'bar'], HeaderUtils::split(',foo, bar,', ',')); + $this->assertSame(['foo', 'bar'], HeaderUtils::split(' , foo, bar, ', ',')); + $this->assertSame(['foo bar'], HeaderUtils::split('foo "bar"', ',')); + $this->assertSame(['foo bar'], HeaderUtils::split('"foo" bar', ',')); + $this->assertSame(['foo bar'], HeaderUtils::split('"foo" "bar"', ',')); // These are not a valid header values. We test that they parse anyway, // and that both the valid and invalid parts are returned. - $this->assertSame(array(), HeaderUtils::split('', ',')); - $this->assertSame(array(), HeaderUtils::split(',,,', ',')); - $this->assertSame(array('foo', 'bar', 'baz'), HeaderUtils::split('foo, "bar", "baz', ',')); - $this->assertSame(array('foo', 'bar, baz'), HeaderUtils::split('foo, "bar, baz', ',')); - $this->assertSame(array('foo', 'bar, baz\\'), HeaderUtils::split('foo, "bar, baz\\', ',')); - $this->assertSame(array('foo', 'bar, baz\\'), HeaderUtils::split('foo, "bar, baz\\\\', ',')); + $this->assertSame([], HeaderUtils::split('', ',')); + $this->assertSame([], HeaderUtils::split(',,,', ',')); + $this->assertSame(['foo', 'bar', 'baz'], HeaderUtils::split('foo, "bar", "baz', ',')); + $this->assertSame(['foo', 'bar, baz'], HeaderUtils::split('foo, "bar, baz', ',')); + $this->assertSame(['foo', 'bar, baz\\'], HeaderUtils::split('foo, "bar, baz\\', ',')); + $this->assertSame(['foo', 'bar, baz\\'], HeaderUtils::split('foo, "bar, baz\\\\', ',')); } public function testCombine() { - $this->assertSame(array('foo' => '123'), HeaderUtils::combine(array(array('foo', '123')))); - $this->assertSame(array('foo' => true), HeaderUtils::combine(array(array('foo')))); - $this->assertSame(array('foo' => true), HeaderUtils::combine(array(array('Foo')))); - $this->assertSame(array('foo' => '123', 'bar' => true), HeaderUtils::combine(array(array('foo', '123'), array('bar')))); + $this->assertSame(['foo' => '123'], HeaderUtils::combine([['foo', '123']])); + $this->assertSame(['foo' => true], HeaderUtils::combine([['foo']])); + $this->assertSame(['foo' => true], HeaderUtils::combine([['Foo']])); + $this->assertSame(['foo' => '123', 'bar' => true], HeaderUtils::combine([['foo', '123'], ['bar']])); } public function testToString() { - $this->assertSame('foo', HeaderUtils::toString(array('foo' => true), ',')); - $this->assertSame('foo; bar', HeaderUtils::toString(array('foo' => true, 'bar' => true), ';')); - $this->assertSame('foo=123', HeaderUtils::toString(array('foo' => '123'), ',')); - $this->assertSame('foo="1 2 3"', HeaderUtils::toString(array('foo' => '1 2 3'), ',')); - $this->assertSame('foo="1 2 3", bar', HeaderUtils::toString(array('foo' => '1 2 3', 'bar' => true), ',')); + $this->assertSame('foo', HeaderUtils::toString(['foo' => true], ',')); + $this->assertSame('foo; bar', HeaderUtils::toString(['foo' => true, 'bar' => true], ';')); + $this->assertSame('foo=123', HeaderUtils::toString(['foo' => '123'], ',')); + $this->assertSame('foo="1 2 3"', HeaderUtils::toString(['foo' => '1 2 3'], ',')); + $this->assertSame('foo="1 2 3", bar', HeaderUtils::toString(['foo' => '1 2 3', 'bar' => true], ',')); } public function testQuote() @@ -101,14 +101,14 @@ class HeaderUtilsTest extends TestCase public function provideMakeDisposition() { - return array( - array('attachment', 'foo.html', 'foo.html', 'attachment; filename=foo.html'), - array('attachment', 'foo.html', '', 'attachment; filename=foo.html'), - array('attachment', 'foo bar.html', '', 'attachment; filename="foo bar.html"'), - array('attachment', 'foo "bar".html', '', 'attachment; filename="foo \\"bar\\".html"'), - array('attachment', 'foo%20bar.html', 'foo bar.html', 'attachment; filename="foo bar.html"; filename*=utf-8\'\'foo%2520bar.html'), - array('attachment', 'föö.html', 'foo.html', 'attachment; filename=foo.html; filename*=utf-8\'\'f%C3%B6%C3%B6.html'), - ); + return [ + ['attachment', 'foo.html', 'foo.html', 'attachment; filename=foo.html'], + ['attachment', 'foo.html', '', 'attachment; filename=foo.html'], + ['attachment', 'foo bar.html', '', 'attachment; filename="foo bar.html"'], + ['attachment', 'foo "bar".html', '', 'attachment; filename="foo \\"bar\\".html"'], + ['attachment', 'foo%20bar.html', 'foo bar.html', 'attachment; filename="foo bar.html"; filename*=utf-8\'\'foo%2520bar.html'], + ['attachment', 'föö.html', 'foo.html', 'attachment; filename=foo.html; filename*=utf-8\'\'f%C3%B6%C3%B6.html'], + ]; } /** @@ -122,13 +122,13 @@ class HeaderUtilsTest extends TestCase public function provideMakeDispositionFail() { - return array( - array('attachment', 'foo%20bar.html'), - array('attachment', 'foo/bar.html'), - array('attachment', '/foo.html'), - array('attachment', 'foo\bar.html'), - array('attachment', '\foo.html'), - array('attachment', 'föö.html'), - ); + return [ + ['attachment', 'foo%20bar.html'], + ['attachment', 'foo/bar.html'], + ['attachment', '/foo.html'], + ['attachment', 'foo\bar.html'], + ['attachment', '\foo.html'], + ['attachment', 'föö.html'], + ]; } } diff --git a/vendor/symfony/http-foundation/Tests/IpUtilsTest.php b/vendor/symfony/http-foundation/Tests/IpUtilsTest.php index 232a2040..c7f76b5d 100644 --- a/vendor/symfony/http-foundation/Tests/IpUtilsTest.php +++ b/vendor/symfony/http-foundation/Tests/IpUtilsTest.php @@ -26,20 +26,20 @@ class IpUtilsTest extends TestCase public function getIpv4Data() { - return array( - array(true, '192.168.1.1', '192.168.1.1'), - array(true, '192.168.1.1', '192.168.1.1/1'), - array(true, '192.168.1.1', '192.168.1.0/24'), - array(false, '192.168.1.1', '1.2.3.4/1'), - array(false, '192.168.1.1', '192.168.1.1/33'), // invalid subnet - array(true, '192.168.1.1', array('1.2.3.4/1', '192.168.1.0/24')), - array(true, '192.168.1.1', array('192.168.1.0/24', '1.2.3.4/1')), - array(false, '192.168.1.1', array('1.2.3.4/1', '4.3.2.1/1')), - array(true, '1.2.3.4', '0.0.0.0/0'), - array(true, '1.2.3.4', '192.168.1.0/0'), - array(false, '1.2.3.4', '256.256.256/0'), // invalid CIDR notation - array(false, 'an_invalid_ip', '192.168.1.0/24'), - ); + return [ + [true, '192.168.1.1', '192.168.1.1'], + [true, '192.168.1.1', '192.168.1.1/1'], + [true, '192.168.1.1', '192.168.1.0/24'], + [false, '192.168.1.1', '1.2.3.4/1'], + [false, '192.168.1.1', '192.168.1.1/33'], // invalid subnet + [true, '192.168.1.1', ['1.2.3.4/1', '192.168.1.0/24']], + [true, '192.168.1.1', ['192.168.1.0/24', '1.2.3.4/1']], + [false, '192.168.1.1', ['1.2.3.4/1', '4.3.2.1/1']], + [true, '1.2.3.4', '0.0.0.0/0'], + [true, '1.2.3.4', '192.168.1.0/0'], + [false, '1.2.3.4', '256.256.256/0'], // invalid CIDR notation + [false, 'an_invalid_ip', '192.168.1.0/24'], + ]; } /** @@ -56,20 +56,20 @@ class IpUtilsTest extends TestCase public function getIpv6Data() { - return array( - array(true, '2a01:198:603:0:396e:4789:8e99:890f', '2a01:198:603:0::/65'), - array(false, '2a00:198:603:0:396e:4789:8e99:890f', '2a01:198:603:0::/65'), - array(false, '2a01:198:603:0:396e:4789:8e99:890f', '::1'), - array(true, '0:0:0:0:0:0:0:1', '::1'), - array(false, '0:0:603:0:396e:4789:8e99:0001', '::1'), - array(true, '0:0:603:0:396e:4789:8e99:0001', '::/0'), - array(true, '0:0:603:0:396e:4789:8e99:0001', '2a01:198:603:0::/0'), - array(true, '2a01:198:603:0:396e:4789:8e99:890f', array('::1', '2a01:198:603:0::/65')), - array(true, '2a01:198:603:0:396e:4789:8e99:890f', array('2a01:198:603:0::/65', '::1')), - array(false, '2a01:198:603:0:396e:4789:8e99:890f', array('::1', '1a01:198:603:0::/65')), - array(false, '}__test|O:21:"JDatabaseDriverMysqli":3:{s:2', '::1'), - array(false, '2a01:198:603:0:396e:4789:8e99:890f', 'unknown'), - ); + return [ + [true, '2a01:198:603:0:396e:4789:8e99:890f', '2a01:198:603:0::/65'], + [false, '2a00:198:603:0:396e:4789:8e99:890f', '2a01:198:603:0::/65'], + [false, '2a01:198:603:0:396e:4789:8e99:890f', '::1'], + [true, '0:0:0:0:0:0:0:1', '::1'], + [false, '0:0:603:0:396e:4789:8e99:0001', '::1'], + [true, '0:0:603:0:396e:4789:8e99:0001', '::/0'], + [true, '0:0:603:0:396e:4789:8e99:0001', '2a01:198:603:0::/0'], + [true, '2a01:198:603:0:396e:4789:8e99:890f', ['::1', '2a01:198:603:0::/65']], + [true, '2a01:198:603:0:396e:4789:8e99:890f', ['2a01:198:603:0::/65', '::1']], + [false, '2a01:198:603:0:396e:4789:8e99:890f', ['::1', '1a01:198:603:0::/65']], + [false, '}__test|O:21:"JDatabaseDriverMysqli":3:{s:2', '::1'], + [false, '2a01:198:603:0:396e:4789:8e99:890f', 'unknown'], + ]; } /** @@ -95,10 +95,10 @@ class IpUtilsTest extends TestCase public function invalidIpAddressData() { - return array( - 'invalid proxy wildcard' => array('192.168.20.13', '*'), - 'invalid proxy missing netmask' => array('192.168.20.13', '0.0.0.0'), - 'invalid request IP with invalid proxy wildcard' => array('0.0.0.0', '*'), - ); + return [ + 'invalid proxy wildcard' => ['192.168.20.13', '*'], + 'invalid proxy missing netmask' => ['192.168.20.13', '0.0.0.0'], + 'invalid request IP with invalid proxy wildcard' => ['0.0.0.0', '*'], + ]; } } diff --git a/vendor/symfony/http-foundation/Tests/JsonResponseTest.php b/vendor/symfony/http-foundation/Tests/JsonResponseTest.php index 201839f8..261c9d3e 100644 --- a/vendor/symfony/http-foundation/Tests/JsonResponseTest.php +++ b/vendor/symfony/http-foundation/Tests/JsonResponseTest.php @@ -24,13 +24,13 @@ class JsonResponseTest extends TestCase public function testConstructorWithArrayCreatesJsonArray() { - $response = new JsonResponse(array(0, 1, 2, 3)); + $response = new JsonResponse([0, 1, 2, 3]); $this->assertSame('[0,1,2,3]', $response->getContent()); } public function testConstructorWithAssocArrayCreatesJsonObject() { - $response = new JsonResponse(array('foo' => 'bar')); + $response = new JsonResponse(['foo' => 'bar']); $this->assertSame('{"foo":"bar"}', $response->getContent()); } @@ -43,7 +43,8 @@ class JsonResponseTest extends TestCase $this->assertSame('0', $response->getContent()); $response = new JsonResponse(0.1); - $this->assertSame('0.1', $response->getContent()); + $this->assertEquals('0.1', $response->getContent()); + $this->assertInternalType('string', $response->getContent()); $response = new JsonResponse(true); $this->assertSame('true', $response->getContent()); @@ -51,7 +52,7 @@ class JsonResponseTest extends TestCase public function testConstructorWithCustomStatus() { - $response = new JsonResponse(array(), 202); + $response = new JsonResponse([], 202); $this->assertSame(202, $response->getStatusCode()); } @@ -63,35 +64,35 @@ class JsonResponseTest extends TestCase public function testConstructorWithCustomHeaders() { - $response = new JsonResponse(array(), 200, array('ETag' => 'foo')); + $response = new JsonResponse([], 200, ['ETag' => 'foo']); $this->assertSame('application/json', $response->headers->get('Content-Type')); $this->assertSame('foo', $response->headers->get('ETag')); } public function testConstructorWithCustomContentType() { - $headers = array('Content-Type' => 'application/vnd.acme.blog-v1+json'); + $headers = ['Content-Type' => 'application/vnd.acme.blog-v1+json']; - $response = new JsonResponse(array(), 200, $headers); + $response = new JsonResponse([], 200, $headers); $this->assertSame('application/vnd.acme.blog-v1+json', $response->headers->get('Content-Type')); } public function testSetJson() { - $response = new JsonResponse('1', 200, array(), true); + $response = new JsonResponse('1', 200, [], true); $this->assertEquals('1', $response->getContent()); - $response = new JsonResponse('[1]', 200, array(), true); + $response = new JsonResponse('[1]', 200, [], true); $this->assertEquals('[1]', $response->getContent()); - $response = new JsonResponse(null, 200, array()); + $response = new JsonResponse(null, 200, []); $response->setJson('true'); $this->assertEquals('true', $response->getContent()); } public function testCreate() { - $response = JsonResponse::create(array('foo' => 'bar'), 204); + $response = JsonResponse::create(['foo' => 'bar'], 204); $this->assertInstanceOf('Symfony\Component\HttpFoundation\JsonResponse', $response); $this->assertEquals('{"foo":"bar"}', $response->getContent()); @@ -107,14 +108,14 @@ class JsonResponseTest extends TestCase public function testStaticCreateJsonArray() { - $response = JsonResponse::create(array(0, 1, 2, 3)); + $response = JsonResponse::create([0, 1, 2, 3]); $this->assertInstanceOf('Symfony\Component\HttpFoundation\JsonResponse', $response); $this->assertSame('[0,1,2,3]', $response->getContent()); } public function testStaticCreateJsonObject() { - $response = JsonResponse::create(array('foo' => 'bar')); + $response = JsonResponse::create(['foo' => 'bar']); $this->assertInstanceOf('Symfony\Component\HttpFoundation\JsonResponse', $response); $this->assertSame('{"foo":"bar"}', $response->getContent()); } @@ -131,7 +132,8 @@ class JsonResponseTest extends TestCase $response = JsonResponse::create(0.1); $this->assertInstanceOf('Symfony\Component\HttpFoundation\JsonResponse', $response); - $this->assertSame('0.1', $response->getContent()); + $this->assertEquals('0.1', $response->getContent()); + $this->assertInternalType('string', $response->getContent()); $response = JsonResponse::create(true); $this->assertInstanceOf('Symfony\Component\HttpFoundation\JsonResponse', $response); @@ -140,7 +142,7 @@ class JsonResponseTest extends TestCase public function testStaticCreateWithCustomStatus() { - $response = JsonResponse::create(array(), 202); + $response = JsonResponse::create([], 202); $this->assertSame(202, $response->getStatusCode()); } @@ -152,22 +154,22 @@ class JsonResponseTest extends TestCase public function testStaticCreateWithCustomHeaders() { - $response = JsonResponse::create(array(), 200, array('ETag' => 'foo')); + $response = JsonResponse::create([], 200, ['ETag' => 'foo']); $this->assertSame('application/json', $response->headers->get('Content-Type')); $this->assertSame('foo', $response->headers->get('ETag')); } public function testStaticCreateWithCustomContentType() { - $headers = array('Content-Type' => 'application/vnd.acme.blog-v1+json'); + $headers = ['Content-Type' => 'application/vnd.acme.blog-v1+json']; - $response = JsonResponse::create(array(), 200, $headers); + $response = JsonResponse::create([], 200, $headers); $this->assertSame('application/vnd.acme.blog-v1+json', $response->headers->get('Content-Type')); } public function testSetCallback() { - $response = JsonResponse::create(array('foo' => 'bar'))->setCallback('callback'); + $response = JsonResponse::create(['foo' => 'bar'])->setCallback('callback'); $this->assertEquals('/**/callback({"foo":"bar"});', $response->getContent()); $this->assertEquals('text/javascript', $response->headers->get('Content-Type')); @@ -190,7 +192,7 @@ class JsonResponseTest extends TestCase public function testSetEncodingOptions() { $response = new JsonResponse(); - $response->setData(array(array(1, 2, 3))); + $response->setData([[1, 2, 3]]); $this->assertEquals('[[1,2,3]]', $response->getContent()); @@ -239,7 +241,7 @@ class JsonResponseTest extends TestCase public function testSetComplexCallback() { - $response = JsonResponse::create(array('foo' => 'bar')); + $response = JsonResponse::create(['foo' => 'bar']); $response->setCallback('ಠ_ಠ["foo"].bar[0]'); $this->assertEquals('/**/ಠ_ಠ["foo"].bar[0]({"foo":"bar"});', $response->getContent()); diff --git a/vendor/symfony/http-foundation/Tests/ParameterBagTest.php b/vendor/symfony/http-foundation/Tests/ParameterBagTest.php index dccfd4f3..d2a5c991 100644 --- a/vendor/symfony/http-foundation/Tests/ParameterBagTest.php +++ b/vendor/symfony/http-foundation/Tests/ParameterBagTest.php @@ -23,44 +23,44 @@ class ParameterBagTest extends TestCase public function testAll() { - $bag = new ParameterBag(array('foo' => 'bar')); - $this->assertEquals(array('foo' => 'bar'), $bag->all(), '->all() gets all the input'); + $bag = new ParameterBag(['foo' => 'bar']); + $this->assertEquals(['foo' => 'bar'], $bag->all(), '->all() gets all the input'); } public function testKeys() { - $bag = new ParameterBag(array('foo' => 'bar')); - $this->assertEquals(array('foo'), $bag->keys()); + $bag = new ParameterBag(['foo' => 'bar']); + $this->assertEquals(['foo'], $bag->keys()); } public function testAdd() { - $bag = new ParameterBag(array('foo' => 'bar')); - $bag->add(array('bar' => 'bas')); - $this->assertEquals(array('foo' => 'bar', 'bar' => 'bas'), $bag->all()); + $bag = new ParameterBag(['foo' => 'bar']); + $bag->add(['bar' => 'bas']); + $this->assertEquals(['foo' => 'bar', 'bar' => 'bas'], $bag->all()); } public function testRemove() { - $bag = new ParameterBag(array('foo' => 'bar')); - $bag->add(array('bar' => 'bas')); - $this->assertEquals(array('foo' => 'bar', 'bar' => 'bas'), $bag->all()); + $bag = new ParameterBag(['foo' => 'bar']); + $bag->add(['bar' => 'bas']); + $this->assertEquals(['foo' => 'bar', 'bar' => 'bas'], $bag->all()); $bag->remove('bar'); - $this->assertEquals(array('foo' => 'bar'), $bag->all()); + $this->assertEquals(['foo' => 'bar'], $bag->all()); } public function testReplace() { - $bag = new ParameterBag(array('foo' => 'bar')); + $bag = new ParameterBag(['foo' => 'bar']); - $bag->replace(array('FOO' => 'BAR')); - $this->assertEquals(array('FOO' => 'BAR'), $bag->all(), '->replace() replaces the input with the argument'); + $bag->replace(['FOO' => 'BAR']); + $this->assertEquals(['FOO' => 'BAR'], $bag->all(), '->replace() replaces the input with the argument'); $this->assertFalse($bag->has('foo'), '->replace() overrides previously set the input'); } public function testGet() { - $bag = new ParameterBag(array('foo' => 'bar', 'null' => null)); + $bag = new ParameterBag(['foo' => 'bar', 'null' => null]); $this->assertEquals('bar', $bag->get('foo'), '->get() gets the value of a parameter'); $this->assertEquals('default', $bag->get('unknown', 'default'), '->get() returns second argument as default if a parameter is not defined'); @@ -69,14 +69,14 @@ class ParameterBagTest extends TestCase public function testGetDoesNotUseDeepByDefault() { - $bag = new ParameterBag(array('foo' => array('bar' => 'moo'))); + $bag = new ParameterBag(['foo' => ['bar' => 'moo']]); $this->assertNull($bag->get('foo[bar]')); } public function testSet() { - $bag = new ParameterBag(array()); + $bag = new ParameterBag([]); $bag->set('foo', 'bar'); $this->assertEquals('bar', $bag->get('foo'), '->set() sets the value of parameter'); @@ -87,7 +87,7 @@ class ParameterBagTest extends TestCase public function testHas() { - $bag = new ParameterBag(array('foo' => 'bar')); + $bag = new ParameterBag(['foo' => 'bar']); $this->assertTrue($bag->has('foo'), '->has() returns true if a parameter is defined'); $this->assertFalse($bag->has('unknown'), '->has() return false if a parameter is not defined'); @@ -95,7 +95,7 @@ class ParameterBagTest extends TestCase public function testGetAlpha() { - $bag = new ParameterBag(array('word' => 'foo_BAR_012')); + $bag = new ParameterBag(['word' => 'foo_BAR_012']); $this->assertEquals('fooBAR', $bag->getAlpha('word'), '->getAlpha() gets only alphabetic characters'); $this->assertEquals('', $bag->getAlpha('unknown'), '->getAlpha() returns empty string if a parameter is not defined'); @@ -103,7 +103,7 @@ class ParameterBagTest extends TestCase public function testGetAlnum() { - $bag = new ParameterBag(array('word' => 'foo_BAR_012')); + $bag = new ParameterBag(['word' => 'foo_BAR_012']); $this->assertEquals('fooBAR012', $bag->getAlnum('word'), '->getAlnum() gets only alphanumeric characters'); $this->assertEquals('', $bag->getAlnum('unknown'), '->getAlnum() returns empty string if a parameter is not defined'); @@ -111,7 +111,7 @@ class ParameterBagTest extends TestCase public function testGetDigits() { - $bag = new ParameterBag(array('word' => 'foo_BAR_012')); + $bag = new ParameterBag(['word' => 'foo_BAR_012']); $this->assertEquals('012', $bag->getDigits('word'), '->getDigits() gets only digits as string'); $this->assertEquals('', $bag->getDigits('unknown'), '->getDigits() returns empty string if a parameter is not defined'); @@ -119,7 +119,7 @@ class ParameterBagTest extends TestCase public function testGetInt() { - $bag = new ParameterBag(array('digits' => '0123')); + $bag = new ParameterBag(['digits' => '0123']); $this->assertEquals(123, $bag->getInt('digits'), '->getInt() gets a value of parameter as integer'); $this->assertEquals(0, $bag->getInt('unknown'), '->getInt() returns zero if a parameter is not defined'); @@ -127,14 +127,14 @@ class ParameterBagTest extends TestCase public function testFilter() { - $bag = new ParameterBag(array( + $bag = new ParameterBag([ 'digits' => '0123ab', 'email' => 'example@example.com', 'url' => 'http://example.com/foo', 'dec' => '256', 'hex' => '0x100', - 'array' => array('bang'), - )); + 'array' => ['bang'], + ]); $this->assertEmpty($bag->filter('nokey'), '->filter() should return empty by default if no key is found'); @@ -142,27 +142,27 @@ class ParameterBagTest extends TestCase $this->assertEquals('example@example.com', $bag->filter('email', '', FILTER_VALIDATE_EMAIL), '->filter() gets a value of parameter as email'); - $this->assertEquals('http://example.com/foo', $bag->filter('url', '', FILTER_VALIDATE_URL, array('flags' => FILTER_FLAG_PATH_REQUIRED)), '->filter() gets a value of parameter as URL with a path'); + $this->assertEquals('http://example.com/foo', $bag->filter('url', '', FILTER_VALIDATE_URL, ['flags' => FILTER_FLAG_PATH_REQUIRED]), '->filter() gets a value of parameter as URL with a path'); // This test is repeated for code-coverage $this->assertEquals('http://example.com/foo', $bag->filter('url', '', FILTER_VALIDATE_URL, FILTER_FLAG_PATH_REQUIRED), '->filter() gets a value of parameter as URL with a path'); - $this->assertFalse($bag->filter('dec', '', FILTER_VALIDATE_INT, array( + $this->assertFalse($bag->filter('dec', '', FILTER_VALIDATE_INT, [ 'flags' => FILTER_FLAG_ALLOW_HEX, - 'options' => array('min_range' => 1, 'max_range' => 0xff), - )), '->filter() gets a value of parameter as integer between boundaries'); + 'options' => ['min_range' => 1, 'max_range' => 0xff], + ]), '->filter() gets a value of parameter as integer between boundaries'); - $this->assertFalse($bag->filter('hex', '', FILTER_VALIDATE_INT, array( + $this->assertFalse($bag->filter('hex', '', FILTER_VALIDATE_INT, [ 'flags' => FILTER_FLAG_ALLOW_HEX, - 'options' => array('min_range' => 1, 'max_range' => 0xff), - )), '->filter() gets a value of parameter as integer between boundaries'); + 'options' => ['min_range' => 1, 'max_range' => 0xff], + ]), '->filter() gets a value of parameter as integer between boundaries'); - $this->assertEquals(array('bang'), $bag->filter('array', ''), '->filter() gets a value of parameter as an array'); + $this->assertEquals(['bang'], $bag->filter('array', ''), '->filter() gets a value of parameter as an array'); } public function testGetIterator() { - $parameters = array('foo' => 'bar', 'hello' => 'world'); + $parameters = ['foo' => 'bar', 'hello' => 'world']; $bag = new ParameterBag($parameters); $i = 0; @@ -176,7 +176,7 @@ class ParameterBagTest extends TestCase public function testCount() { - $parameters = array('foo' => 'bar', 'hello' => 'world'); + $parameters = ['foo' => 'bar', 'hello' => 'world']; $bag = new ParameterBag($parameters); $this->assertCount(\count($parameters), $bag); @@ -184,7 +184,7 @@ class ParameterBagTest extends TestCase public function testGetBoolean() { - $parameters = array('string_true' => 'true', 'string_false' => 'false'); + $parameters = ['string_true' => 'true', 'string_false' => 'false']; $bag = new ParameterBag($parameters); $this->assertTrue($bag->getBoolean('string_true'), '->getBoolean() gets the string true as boolean true'); diff --git a/vendor/symfony/http-foundation/Tests/RedirectResponseTest.php b/vendor/symfony/http-foundation/Tests/RedirectResponseTest.php index d389e83d..5f6a8ac0 100644 --- a/vendor/symfony/http-foundation/Tests/RedirectResponseTest.php +++ b/vendor/symfony/http-foundation/Tests/RedirectResponseTest.php @@ -22,7 +22,7 @@ class RedirectResponseTest extends TestCase $this->assertEquals(1, preg_match( '##', - preg_replace(array('/\s+/', '/\'/'), array(' ', '"'), $response->getContent()) + preg_replace(['/\s+/', '/\'/'], [' ', '"'], $response->getContent()) )); } @@ -87,7 +87,11 @@ class RedirectResponseTest extends TestCase $response = new RedirectResponse('foo.bar', 301); $this->assertFalse($response->headers->hasCacheControlDirective('no-cache')); - $response = new RedirectResponse('foo.bar', 301, array('cache-control' => 'max-age=86400')); + $response = new RedirectResponse('foo.bar', 301, ['cache-control' => 'max-age=86400']); + $this->assertFalse($response->headers->hasCacheControlDirective('no-cache')); + $this->assertTrue($response->headers->hasCacheControlDirective('max-age')); + + $response = new RedirectResponse('foo.bar', 301, ['Cache-Control' => 'max-age=86400']); $this->assertFalse($response->headers->hasCacheControlDirective('no-cache')); $this->assertTrue($response->headers->hasCacheControlDirective('max-age')); diff --git a/vendor/symfony/http-foundation/Tests/RequestMatcherTest.php b/vendor/symfony/http-foundation/Tests/RequestMatcherTest.php index cc35ad63..57e9c3d3 100644 --- a/vendor/symfony/http-foundation/Tests/RequestMatcherTest.php +++ b/vendor/symfony/http-foundation/Tests/RequestMatcherTest.php @@ -34,20 +34,20 @@ class RequestMatcherTest extends TestCase public function getMethodData() { - return array( - array('get', 'get', true), - array('get', array('get', 'post'), true), - array('get', 'post', false), - array('get', 'GET', true), - array('get', array('GET', 'POST'), true), - array('get', 'POST', false), - ); + return [ + ['get', 'get', true], + ['get', ['get', 'post'], true], + ['get', 'post', false], + ['get', 'GET', true], + ['get', ['GET', 'POST'], true], + ['get', 'POST', false], + ]; } public function testScheme() { $httpRequest = $request = $request = Request::create(''); - $httpsRequest = $request = $request = Request::create('', 'get', array(), array(), array(), array('HTTPS' => 'on')); + $httpsRequest = $request = $request = Request::create('', 'get', [], [], [], ['HTTPS' => 'on']); $matcher = new RequestMatcher(); $matcher->matchScheme('https'); @@ -69,7 +69,7 @@ class RequestMatcherTest extends TestCase public function testHost($pattern, $isMatch) { $matcher = new RequestMatcher(); - $request = Request::create('', 'get', array(), array(), array(), array('HTTP_HOST' => 'foo.example.com')); + $request = Request::create('', 'get', [], [], [], ['HTTP_HOST' => 'foo.example.com']); $matcher->matchHost($pattern); $this->assertSame($isMatch, $matcher->matches($request)); @@ -81,7 +81,7 @@ class RequestMatcherTest extends TestCase public function testPort() { $matcher = new RequestMatcher(); - $request = Request::create('', 'get', array(), array(), array(), array('HTTP_HOST' => null, 'SERVER_PORT' => 8000)); + $request = Request::create('', 'get', [], [], [], ['HTTP_HOST' => null, 'SERVER_PORT' => 8000]); $matcher->matchPort(8000); $this->assertTrue($matcher->matches($request)); @@ -89,22 +89,22 @@ class RequestMatcherTest extends TestCase $matcher->matchPort(9000); $this->assertFalse($matcher->matches($request)); - $matcher = new RequestMatcher(null, null, null, null, array(), null, 8000); + $matcher = new RequestMatcher(null, null, null, null, [], null, 8000); $this->assertTrue($matcher->matches($request)); } public function getHostData() { - return array( - array('.*\.example\.com', true), - array('\.example\.com$', true), - array('^.*\.example\.com$', true), - array('.*\.sensio\.com', false), - array('.*\.example\.COM', true), - array('\.example\.COM$', true), - array('^.*\.example\.COM$', true), - array('.*\.sensio\.COM', false), - ); + return [ + ['.*\.example\.com', true], + ['\.example\.com$', true], + ['^.*\.example\.com$', true], + ['.*\.sensio\.com', false], + ['.*\.example\.COM', true], + ['\.example\.COM$', true], + ['^.*\.example\.COM$', true], + ['.*\.sensio\.COM', false], + ]; } public function testPath() diff --git a/vendor/symfony/http-foundation/Tests/RequestTest.php b/vendor/symfony/http-foundation/Tests/RequestTest.php index 36a94913..ab0dcf68 100644 --- a/vendor/symfony/http-foundation/Tests/RequestTest.php +++ b/vendor/symfony/http-foundation/Tests/RequestTest.php @@ -21,24 +21,24 @@ class RequestTest extends TestCase { protected function tearDown() { - Request::setTrustedProxies(array(), -1); - Request::setTrustedHosts(array()); + Request::setTrustedProxies([], -1); + Request::setTrustedHosts([]); } public function testInitialize() { $request = new Request(); - $request->initialize(array('foo' => 'bar')); + $request->initialize(['foo' => 'bar']); $this->assertEquals('bar', $request->query->get('foo'), '->initialize() takes an array of query parameters as its first argument'); - $request->initialize(array(), array('foo' => 'bar')); + $request->initialize([], ['foo' => 'bar']); $this->assertEquals('bar', $request->request->get('foo'), '->initialize() takes an array of request parameters as its second argument'); - $request->initialize(array(), array(), array('foo' => 'bar')); + $request->initialize([], [], ['foo' => 'bar']); $this->assertEquals('bar', $request->attributes->get('foo'), '->initialize() takes an array of attributes as its third argument'); - $request->initialize(array(), array(), array(), array(), array(), array('HTTP_FOO' => 'bar')); + $request->initialize([], [], [], [], [], ['HTTP_FOO' => 'bar']); $this->assertEquals('bar', $request->headers->get('FOO'), '->initialize() takes an array of HTTP headers as its sixth argument'); } @@ -101,7 +101,7 @@ class RequestTest extends TestCase $this->assertEquals('test.com', $request->getHttpHost()); $this->assertFalse($request->isSecure()); - $request = Request::create('http://test.com/foo', 'GET', array('bar' => 'baz')); + $request = Request::create('http://test.com/foo', 'GET', ['bar' => 'baz']); $this->assertEquals('http://test.com/foo?bar=baz', $request->getUri()); $this->assertEquals('/foo', $request->getPathInfo()); $this->assertEquals('bar=baz', $request->getQueryString()); @@ -109,7 +109,7 @@ class RequestTest extends TestCase $this->assertEquals('test.com', $request->getHttpHost()); $this->assertFalse($request->isSecure()); - $request = Request::create('http://test.com/foo?bar=foo', 'GET', array('bar' => 'baz')); + $request = Request::create('http://test.com/foo?bar=foo', 'GET', ['bar' => 'baz']); $this->assertEquals('http://test.com/foo?bar=baz', $request->getUri()); $this->assertEquals('/foo', $request->getPathInfo()); $this->assertEquals('bar=baz', $request->getQueryString()); @@ -166,7 +166,7 @@ class RequestTest extends TestCase $this->assertTrue($request->isSecure()); $json = '{"jsonrpc":"2.0","method":"echo","id":7,"params":["Hello World"]}'; - $request = Request::create('http://example.com/jsonrpc', 'POST', array(), array(), array(), array(), $json); + $request = Request::create('http://example.com/jsonrpc', 'POST', [], [], [], [], $json); $this->assertEquals($json, $request->getContent()); $this->assertFalse($request->isSecure()); @@ -216,16 +216,16 @@ class RequestTest extends TestCase $request = Request::create('http://test.com/?foo'); $this->assertEquals('/?foo', $request->getRequestUri()); - $this->assertEquals(array('foo' => ''), $request->query->all()); + $this->assertEquals(['foo' => ''], $request->query->all()); // 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( + $request = Request::create('http://test.com/apparthotel-1234', 'GET', [], [], [], + [ 'DOCUMENT_ROOT' => '/var/www/www.test.com', 'SCRIPT_FILENAME' => '/var/www/www.test.com/app/app.php', 'SCRIPT_NAME' => '/app/app.php', 'PHP_SELF' => '/app/app.php/apparthotel-1234', - )); + ]); $this->assertEquals('http://test.com/apparthotel-1234', $request->getUri()); $this->assertEquals('/apparthotel-1234', $request->getPathInfo()); $this->assertEquals('', $request->getQueryString()); @@ -258,7 +258,7 @@ class RequestTest extends TestCase $this->assertEquals(8080, $request->getPort()); $this->assertFalse($request->isSecure()); - $request = Request::create('http://test.com/foo?bar=foo', 'GET', array('bar' => 'baz')); + $request = Request::create('http://test.com/foo?bar=foo', 'GET', ['bar' => 'baz']); $request->server->set('REQUEST_URI', 'http://test.com/foo?bar=foo'); $this->assertEquals('http://test.com/foo?bar=baz', $request->getUri()); $this->assertEquals('/foo', $request->getPathInfo()); @@ -289,13 +289,13 @@ class RequestTest extends TestCase public function testGetRequestUri($serverRequestUri, $expected, $message) { $request = new Request(); - $request->server->add(array( + $request->server->add([ 'REQUEST_URI' => $serverRequestUri, // For having http://test.com 'SERVER_NAME' => 'test.com', 'SERVER_PORT' => 80, - )); + ]); $this->assertSame($expected, $request->getRequestUri(), $message); $this->assertSame($expected, $request->server->get('REQUEST_URI'), 'Normalize the request URI.'); @@ -304,21 +304,21 @@ class RequestTest extends TestCase public function getRequestUriData() { $message = 'Do not modify the path.'; - yield array('/foo', '/foo', $message); - yield array('//bar/foo', '//bar/foo', $message); - yield array('///bar/foo', '///bar/foo', $message); + yield ['/foo', '/foo', $message]; + yield ['//bar/foo', '//bar/foo', $message]; + yield ['///bar/foo', '///bar/foo', $message]; $message = 'Handle when the scheme, host are on REQUEST_URI.'; - yield array('http://test.com/foo?bar=baz', '/foo?bar=baz', $message); + yield ['http://test.com/foo?bar=baz', '/foo?bar=baz', $message]; $message = 'Handle when the scheme, host and port are on REQUEST_URI.'; - yield array('http://test.com:80/foo', '/foo', $message); - yield array('https://test.com:8080/foo', '/foo', $message); - yield array('https://test.com:443/foo', '/foo', $message); + yield ['http://test.com:80/foo', '/foo', $message]; + yield ['https://test.com:8080/foo', '/foo', $message]; + yield ['https://test.com:443/foo', '/foo', $message]; $message = 'Fragment should not be included in the URI'; - yield array('http://test.com/foo#bar', '/foo', $message); - yield array('/foo#bar', '/foo', $message); + yield ['http://test.com/foo#bar', '/foo', $message]; + yield ['/foo#bar', '/foo', $message]; } public function testGetRequestUriWithoutRequiredHeader() @@ -335,7 +335,7 @@ class RequestTest extends TestCase public function testCreateCheckPrecedence() { // server is used by default - $request = Request::create('/', 'DELETE', array(), array(), array(), array( + $request = Request::create('/', 'DELETE', [], [], [], [ 'HTTP_HOST' => 'example.com', 'HTTPS' => 'on', 'SERVER_PORT' => 443, @@ -343,7 +343,7 @@ class RequestTest extends TestCase 'PHP_AUTH_PW' => 'pa$$', 'QUERY_STRING' => 'foo=bar', 'CONTENT_TYPE' => 'application/json', - )); + ]); $this->assertEquals('example.com', $request->getHost()); $this->assertEquals(443, $request->getPort()); $this->assertTrue($request->isSecure()); @@ -353,11 +353,11 @@ class RequestTest extends TestCase $this->assertEquals('application/json', $request->headers->get('CONTENT_TYPE')); // URI has precedence over server - $request = Request::create('http://thomas:pokemon@example.net:8080/?foo=bar', 'GET', array(), array(), array(), array( + $request = Request::create('http://thomas:pokemon@example.net:8080/?foo=bar', 'GET', [], [], [], [ 'HTTP_HOST' => 'example.com', 'HTTPS' => 'on', 'SERVER_PORT' => 443, - )); + ]); $this->assertEquals('example.net', $request->getHost()); $this->assertEquals(8080, $request->getPort()); $this->assertFalse($request->isSecure()); @@ -368,7 +368,7 @@ class RequestTest extends TestCase public function testDuplicate() { - $request = new Request(array('foo' => 'bar'), array('foo' => 'bar'), array('foo' => 'bar'), array(), array(), array('HTTP_FOO' => 'bar')); + $request = new Request(['foo' => 'bar'], ['foo' => 'bar'], ['foo' => 'bar'], [], [], ['HTTP_FOO' => 'bar']); $dup = $request->duplicate(); $this->assertEquals($request->query->all(), $dup->query->all(), '->duplicate() duplicates a request an copy the current query parameters'); @@ -376,17 +376,17 @@ class RequestTest extends TestCase $this->assertEquals($request->attributes->all(), $dup->attributes->all(), '->duplicate() duplicates a request an copy the current attributes'); $this->assertEquals($request->headers->all(), $dup->headers->all(), '->duplicate() duplicates a request an copy the current HTTP headers'); - $dup = $request->duplicate(array('foo' => 'foobar'), array('foo' => 'foobar'), array('foo' => 'foobar'), array(), array(), array('HTTP_FOO' => 'foobar')); + $dup = $request->duplicate(['foo' => 'foobar'], ['foo' => 'foobar'], ['foo' => 'foobar'], [], [], ['HTTP_FOO' => 'foobar']); - $this->assertEquals(array('foo' => 'foobar'), $dup->query->all(), '->duplicate() overrides the query parameters if provided'); - $this->assertEquals(array('foo' => 'foobar'), $dup->request->all(), '->duplicate() overrides the request parameters if provided'); - $this->assertEquals(array('foo' => 'foobar'), $dup->attributes->all(), '->duplicate() overrides the attributes if provided'); - $this->assertEquals(array('foo' => array('foobar')), $dup->headers->all(), '->duplicate() overrides the HTTP header if provided'); + $this->assertEquals(['foo' => 'foobar'], $dup->query->all(), '->duplicate() overrides the query parameters if provided'); + $this->assertEquals(['foo' => 'foobar'], $dup->request->all(), '->duplicate() overrides the request parameters if provided'); + $this->assertEquals(['foo' => 'foobar'], $dup->attributes->all(), '->duplicate() overrides the attributes if provided'); + $this->assertEquals(['foo' => ['foobar']], $dup->headers->all(), '->duplicate() overrides the HTTP header if provided'); } public function testDuplicateWithFormat() { - $request = new Request(array(), array(), array('_format' => 'json')); + $request = new Request([], [], ['_format' => 'json']); $dup = $request->duplicate(); $this->assertEquals('json', $dup->getRequestFormat()); @@ -421,7 +421,7 @@ class RequestTest extends TestCase public function getFormatToMimeTypeMapProviderWithAdditionalNullFormat() { return array_merge( - array(array(null, array(null, 'unexistent-mime-type'))), + [[null, [null, 'unexistent-mime-type']]], $this->getFormatToMimeTypeMapProvider() ); } @@ -456,7 +456,7 @@ class RequestTest extends TestCase { $request = new Request(); $this->assertNull($request->getMimeType('foo')); - $this->assertEquals(array(), Request::getMimeTypes('foo')); + $this->assertEquals([], Request::getMimeTypes('foo')); } public function testGetFormatWithCustomMimeType() @@ -468,21 +468,21 @@ class RequestTest extends TestCase public function getFormatToMimeTypeMapProvider() { - return array( - array('txt', array('text/plain')), - array('js', array('application/javascript', 'application/x-javascript', 'text/javascript')), - array('css', array('text/css')), - array('json', array('application/json', 'application/x-json')), - array('jsonld', array('application/ld+json')), - array('xml', array('text/xml', 'application/xml', 'application/x-xml')), - array('rdf', array('application/rdf+xml')), - array('atom', array('application/atom+xml')), - ); + return [ + ['txt', ['text/plain']], + ['js', ['application/javascript', 'application/x-javascript', 'text/javascript']], + ['css', ['text/css']], + ['json', ['application/json', 'application/x-json']], + ['jsonld', ['application/ld+json']], + ['xml', ['text/xml', 'application/xml', 'application/x-xml']], + ['rdf', ['application/rdf+xml']], + ['atom', ['application/atom+xml']], + ]; } public function testGetUri() { - $server = array(); + $server = []; // Standard Request on non default PORT // http://host:8080/index.php/path/info?query=string @@ -501,7 +501,7 @@ class RequestTest extends TestCase $request = new Request(); - $request->initialize(array(), array(), array(), array(), array(), $server); + $request->initialize([], [], [], [], [], $server); $this->assertEquals('http://host:8080/index.php/path/info?query=string', $request->getUri(), '->getUri() with non default port'); @@ -510,7 +510,7 @@ class RequestTest extends TestCase $server['SERVER_NAME'] = 'servername'; $server['SERVER_PORT'] = '80'; - $request->initialize(array(), array(), array(), array(), array(), $server); + $request->initialize([], [], [], [], [], $server); $this->assertEquals('http://host/index.php/path/info?query=string', $request->getUri(), '->getUri() with default port'); @@ -519,7 +519,7 @@ class RequestTest extends TestCase $server['SERVER_NAME'] = 'servername'; $server['SERVER_PORT'] = '80'; - $request->initialize(array(), array(), array(), array(), array(), $server); + $request->initialize([], [], [], [], [], $server); $this->assertEquals('http://servername/index.php/path/info?query=string', $request->getUri(), '->getUri() with default port without HOST_HEADER'); @@ -527,7 +527,7 @@ class RequestTest extends TestCase // RewriteCond %{REQUEST_FILENAME} !-f // RewriteRule ^(.*)$ index.php [QSA,L] // http://host:8080/path/info?query=string - $server = array(); + $server = []; $server['HTTP_HOST'] = 'host:8080'; $server['SERVER_NAME'] = 'servername'; $server['SERVER_PORT'] = '8080'; @@ -541,7 +541,7 @@ class RequestTest extends TestCase $server['PHP_SELF'] = '/index.php'; $server['SCRIPT_FILENAME'] = '/some/where/index.php'; - $request->initialize(array(), array(), array(), array(), array(), $server); + $request->initialize([], [], [], [], [], $server); $this->assertEquals('http://host:8080/path/info?query=string', $request->getUri(), '->getUri() with rewrite'); // Use std port number @@ -550,7 +550,7 @@ class RequestTest extends TestCase $server['SERVER_NAME'] = 'servername'; $server['SERVER_PORT'] = '80'; - $request->initialize(array(), array(), array(), array(), array(), $server); + $request->initialize([], [], [], [], [], $server); $this->assertEquals('http://host/path/info?query=string', $request->getUri(), '->getUri() with rewrite and default port'); @@ -559,13 +559,13 @@ class RequestTest extends TestCase $server['SERVER_NAME'] = 'servername'; $server['SERVER_PORT'] = '80'; - $request->initialize(array(), array(), array(), array(), array(), $server); + $request->initialize([], [], [], [], [], $server); $this->assertEquals('http://servername/path/info?query=string', $request->getUri(), '->getUri() with rewrite, default port without HOST_HEADER'); // With encoded characters - $server = array( + $server = [ 'HTTP_HOST' => 'host:8080', 'SERVER_NAME' => 'servername', 'SERVER_PORT' => '8080', @@ -575,9 +575,9 @@ class RequestTest extends TestCase 'PATH_TRANSLATED' => 'redirect:/index.php/foo bar/in+fo', 'PHP_SELF' => '/ba se/index_dev.php/path/info', 'SCRIPT_FILENAME' => '/some/where/ba se/index_dev.php', - ); + ]; - $request->initialize(array(), array(), array(), array(), array(), $server); + $request->initialize([], [], [], [], [], $server); $this->assertEquals( 'http://host:8080/ba%20se/index_dev.php/foo%20bar/in+fo?query=string', @@ -587,11 +587,11 @@ class RequestTest extends TestCase // with user info $server['PHP_AUTH_USER'] = 'fabien'; - $request->initialize(array(), array(), array(), array(), array(), $server); + $request->initialize([], [], [], [], [], $server); $this->assertEquals('http://host:8080/ba%20se/index_dev.php/foo%20bar/in+fo?query=string', $request->getUri()); $server['PHP_AUTH_PW'] = 'symfony'; - $request->initialize(array(), array(), array(), array(), array(), $server); + $request->initialize([], [], [], [], [], $server); $this->assertEquals('http://host:8080/ba%20se/index_dev.php/foo%20bar/in+fo?query=string', $request->getUri()); } @@ -609,7 +609,7 @@ class RequestTest extends TestCase $request = Request::create('https://test.com:90/foo?bar=baz'); $this->assertEquals('https://test.com:90/some/path', $request->getUriForPath('/some/path')); - $server = array(); + $server = []; // Standard Request on non default PORT // http://host:8080/index.php/path/info?query=string @@ -628,7 +628,7 @@ class RequestTest extends TestCase $request = new Request(); - $request->initialize(array(), array(), array(), array(), array(), $server); + $request->initialize([], [], [], [], [], $server); $this->assertEquals('http://host:8080/index.php/some/path', $request->getUriForPath('/some/path'), '->getUriForPath() with non default port'); @@ -637,7 +637,7 @@ class RequestTest extends TestCase $server['SERVER_NAME'] = 'servername'; $server['SERVER_PORT'] = '80'; - $request->initialize(array(), array(), array(), array(), array(), $server); + $request->initialize([], [], [], [], [], $server); $this->assertEquals('http://host/index.php/some/path', $request->getUriForPath('/some/path'), '->getUriForPath() with default port'); @@ -646,7 +646,7 @@ class RequestTest extends TestCase $server['SERVER_NAME'] = 'servername'; $server['SERVER_PORT'] = '80'; - $request->initialize(array(), array(), array(), array(), array(), $server); + $request->initialize([], [], [], [], [], $server); $this->assertEquals('http://servername/index.php/some/path', $request->getUriForPath('/some/path'), '->getUriForPath() with default port without HOST_HEADER'); @@ -654,7 +654,7 @@ class RequestTest extends TestCase // RewriteCond %{REQUEST_FILENAME} !-f // RewriteRule ^(.*)$ index.php [QSA,L] // http://host:8080/path/info?query=string - $server = array(); + $server = []; $server['HTTP_HOST'] = 'host:8080'; $server['SERVER_NAME'] = 'servername'; $server['SERVER_PORT'] = '8080'; @@ -668,7 +668,7 @@ class RequestTest extends TestCase $server['PHP_SELF'] = '/index.php'; $server['SCRIPT_FILENAME'] = '/some/where/index.php'; - $request->initialize(array(), array(), array(), array(), array(), $server); + $request->initialize([], [], [], [], [], $server); $this->assertEquals('http://host:8080/some/path', $request->getUriForPath('/some/path'), '->getUri() with rewrite'); // Use std port number @@ -677,7 +677,7 @@ class RequestTest extends TestCase $server['SERVER_NAME'] = 'servername'; $server['SERVER_PORT'] = '80'; - $request->initialize(array(), array(), array(), array(), array(), $server); + $request->initialize([], [], [], [], [], $server); $this->assertEquals('http://host/some/path', $request->getUriForPath('/some/path'), '->getUriForPath() with rewrite and default port'); @@ -686,7 +686,7 @@ class RequestTest extends TestCase $server['SERVER_NAME'] = 'servername'; $server['SERVER_PORT'] = '80'; - $request->initialize(array(), array(), array(), array(), array(), $server); + $request->initialize([], [], [], [], [], $server); $this->assertEquals('http://servername/some/path', $request->getUriForPath('/some/path'), '->getUriForPath() with rewrite, default port without HOST_HEADER'); $this->assertEquals('servername', $request->getHttpHost()); @@ -694,11 +694,11 @@ class RequestTest extends TestCase // with user info $server['PHP_AUTH_USER'] = 'fabien'; - $request->initialize(array(), array(), array(), array(), array(), $server); + $request->initialize([], [], [], [], [], $server); $this->assertEquals('http://servername/some/path', $request->getUriForPath('/some/path')); $server['PHP_AUTH_PW'] = 'symfony'; - $request->initialize(array(), array(), array(), array(), array(), $server); + $request->initialize([], [], [], [], [], $server); $this->assertEquals('http://servername/some/path', $request->getUriForPath('/some/path')); } @@ -712,30 +712,30 @@ class RequestTest extends TestCase public function getRelativeUriForPathData() { - return array( - array('me.png', '/foo', '/me.png'), - array('../me.png', '/foo/bar', '/me.png'), - array('me.png', '/foo/bar', '/foo/me.png'), - array('../baz/me.png', '/foo/bar/b', '/foo/baz/me.png'), - array('../../fooz/baz/me.png', '/foo/bar/b', '/fooz/baz/me.png'), - array('baz/me.png', '/foo/bar/b', 'baz/me.png'), - ); + return [ + ['me.png', '/foo', '/me.png'], + ['../me.png', '/foo/bar', '/me.png'], + ['me.png', '/foo/bar', '/foo/me.png'], + ['../baz/me.png', '/foo/bar/b', '/foo/baz/me.png'], + ['../../fooz/baz/me.png', '/foo/bar/b', '/fooz/baz/me.png'], + ['baz/me.png', '/foo/bar/b', 'baz/me.png'], + ]; } public function testGetUserInfo() { $request = new Request(); - $server = array('PHP_AUTH_USER' => 'fabien'); - $request->initialize(array(), array(), array(), array(), array(), $server); + $server = ['PHP_AUTH_USER' => 'fabien']; + $request->initialize([], [], [], [], [], $server); $this->assertEquals('fabien', $request->getUserInfo()); $server['PHP_AUTH_USER'] = '0'; - $request->initialize(array(), array(), array(), array(), array(), $server); + $request->initialize([], [], [], [], [], $server); $this->assertEquals('0', $request->getUserInfo()); $server['PHP_AUTH_PW'] = '0'; - $request->initialize(array(), array(), array(), array(), array(), $server); + $request->initialize([], [], [], [], [], $server); $this->assertEquals('0:0', $request->getUserInfo()); } @@ -743,22 +743,22 @@ class RequestTest extends TestCase { $request = new Request(); - $server = array(); + $server = []; $server['SERVER_NAME'] = 'servername'; $server['SERVER_PORT'] = '90'; - $request->initialize(array(), array(), array(), array(), array(), $server); + $request->initialize([], [], [], [], [], $server); $this->assertEquals('http://servername:90', $request->getSchemeAndHttpHost()); $server['PHP_AUTH_USER'] = 'fabien'; - $request->initialize(array(), array(), array(), array(), array(), $server); + $request->initialize([], [], [], [], [], $server); $this->assertEquals('http://servername:90', $request->getSchemeAndHttpHost()); $server['PHP_AUTH_USER'] = '0'; - $request->initialize(array(), array(), array(), array(), array(), $server); + $request->initialize([], [], [], [], [], $server); $this->assertEquals('http://servername:90', $request->getSchemeAndHttpHost()); $server['PHP_AUTH_PW'] = '0'; - $request->initialize(array(), array(), array(), array(), array(), $server); + $request->initialize([], [], [], [], [], $server); $this->assertEquals('http://servername:90', $request->getSchemeAndHttpHost()); } @@ -775,35 +775,35 @@ class RequestTest extends TestCase public function getQueryStringNormalizationData() { - return array( - array('foo', 'foo=', 'works with valueless parameters'), - array('foo=', 'foo=', 'includes a dangling equal sign'), - array('bar=&foo=bar', 'bar=&foo=bar', '->works with empty parameters'), - array('foo=bar&bar=', 'bar=&foo=bar', 'sorts keys alphabetically'), + return [ + ['foo', 'foo=', 'works with valueless parameters'], + ['foo=', 'foo=', 'includes a dangling equal sign'], + ['bar=&foo=bar', 'bar=&foo=bar', '->works with empty parameters'], + ['foo=bar&bar=', 'bar=&foo=bar', 'sorts keys alphabetically'], // GET parameters, that are submitted from a HTML form, encode spaces as "+" by default (as defined in enctype application/x-www-form-urlencoded). // PHP also converts "+" to spaces when filling the global _GET or when using the function parse_str. - array('him=John%20Doe&her=Jane+Doe', 'her=Jane%20Doe&him=John%20Doe', 'normalizes spaces in both encodings "%20" and "+"'), + ['baz=Foo%20Baz&bar=Foo+Bar', 'bar=Foo%20Bar&baz=Foo%20Baz', 'normalizes spaces in both encodings "%20" and "+"'], - array('foo[]=1&foo[]=2', 'foo%5B0%5D=1&foo%5B1%5D=2', 'allows array notation'), - array('foo=1&foo=2', 'foo=2', 'merges repeated parameters'), - array('pa%3Dram=foo%26bar%3Dbaz&test=test', 'pa%3Dram=foo%26bar%3Dbaz&test=test', 'works with encoded delimiters'), - array('0', '0=', 'allows "0"'), - array('Jane Doe&John%20Doe', 'Jane_Doe=&John_Doe=', 'normalizes encoding in keys'), - array('her=Jane Doe&him=John%20Doe', 'her=Jane%20Doe&him=John%20Doe', 'normalizes encoding in values'), - array('foo=bar&&&test&&', 'foo=bar&test=', 'removes unneeded delimiters'), - array('formula=e=m*c^2', 'formula=e%3Dm%2Ac%5E2', 'correctly treats only the first "=" as delimiter and the next as value'), + ['foo[]=1&foo[]=2', 'foo%5B0%5D=1&foo%5B1%5D=2', 'allows array notation'], + ['foo=1&foo=2', 'foo=2', 'merges repeated parameters'], + ['pa%3Dram=foo%26bar%3Dbaz&test=test', 'pa%3Dram=foo%26bar%3Dbaz&test=test', 'works with encoded delimiters'], + ['0', '0=', 'allows "0"'], + ['Foo Bar&Foo%20Baz', 'Foo_Bar=&Foo_Baz=', 'normalizes encoding in keys'], + ['bar=Foo Bar&baz=Foo%20Baz', 'bar=Foo%20Bar&baz=Foo%20Baz', 'normalizes encoding in values'], + ['foo=bar&&&test&&', 'foo=bar&test=', 'removes unneeded delimiters'], + ['formula=e=m*c^2', 'formula=e%3Dm%2Ac%5E2', 'correctly treats only the first "=" as delimiter and the next as value'], // Ignore pairs with empty key, even if there was a value, e.g. "=value", as such nameless values cannot be retrieved anyway. // PHP also does not include them when building _GET. - array('foo=bar&=a=b&=x=y', 'foo=bar', 'removes params with empty key'), + ['foo=bar&=a=b&=x=y', 'foo=bar', 'removes params with empty key'], // Don't reorder nested query string keys - array('foo[]=Z&foo[]=A', 'foo%5B0%5D=Z&foo%5B1%5D=A', 'keeps order of values'), - array('foo[Z]=B&foo[A]=B', 'foo%5BZ%5D=B&foo%5BA%5D=B', 'keeps order of keys'), + ['foo[]=Z&foo[]=A', 'foo%5B0%5D=Z&foo%5B1%5D=A', 'keeps order of values'], + ['foo[Z]=B&foo[A]=B', 'foo%5BZ%5D=B&foo%5BA%5D=B', 'keeps order of keys'], - array('utf8=✓', 'utf8=%E2%9C%93', 'encodes UTF-8'), - ); + ['utf8=✓', 'utf8=%E2%9C%93', 'encodes UTF-8'], + ]; } public function testGetQueryStringReturnsNull() @@ -820,74 +820,74 @@ class RequestTest extends TestCase { $request = new Request(); - $request->initialize(array('foo' => 'bar')); + $request->initialize(['foo' => 'bar']); $this->assertEquals('', $request->getHost(), '->getHost() return empty string if not initialized'); - $request->initialize(array(), array(), array(), array(), array(), array('HTTP_HOST' => 'www.example.com')); + $request->initialize([], [], [], [], [], ['HTTP_HOST' => 'www.example.com']); $this->assertEquals('www.example.com', $request->getHost(), '->getHost() from Host Header'); // Host header with port number - $request->initialize(array(), array(), array(), array(), array(), array('HTTP_HOST' => 'www.example.com:8080')); + $request->initialize([], [], [], [], [], ['HTTP_HOST' => 'www.example.com:8080']); $this->assertEquals('www.example.com', $request->getHost(), '->getHost() from Host Header with port number'); // Server values - $request->initialize(array(), array(), array(), array(), array(), array('SERVER_NAME' => 'www.example.com')); + $request->initialize([], [], [], [], [], ['SERVER_NAME' => 'www.example.com']); $this->assertEquals('www.example.com', $request->getHost(), '->getHost() from server name'); - $request->initialize(array(), array(), array(), array(), array(), array('SERVER_NAME' => 'www.example.com', 'HTTP_HOST' => 'www.host.com')); + $request->initialize([], [], [], [], [], ['SERVER_NAME' => 'www.example.com', 'HTTP_HOST' => 'www.host.com']); $this->assertEquals('www.host.com', $request->getHost(), '->getHost() value from Host header has priority over SERVER_NAME '); } public function testGetPort() { - $request = Request::create('http://example.com', 'GET', array(), array(), array(), array( + $request = Request::create('http://example.com', 'GET', [], [], [], [ 'HTTP_X_FORWARDED_PROTO' => 'https', 'HTTP_X_FORWARDED_PORT' => '443', - )); + ]); $port = $request->getPort(); $this->assertEquals(80, $port, 'Without trusted proxies FORWARDED_PROTO and FORWARDED_PORT are ignored.'); - Request::setTrustedProxies(array('1.1.1.1'), Request::HEADER_X_FORWARDED_ALL); - $request = Request::create('http://example.com', 'GET', array(), array(), array(), array( + Request::setTrustedProxies(['1.1.1.1'], Request::HEADER_X_FORWARDED_ALL); + $request = Request::create('http://example.com', 'GET', [], [], [], [ 'HTTP_X_FORWARDED_PROTO' => 'https', 'HTTP_X_FORWARDED_PORT' => '8443', - )); + ]); $this->assertEquals(80, $request->getPort(), 'With PROTO and PORT on untrusted connection server value takes precedence.'); $request->server->set('REMOTE_ADDR', '1.1.1.1'); $this->assertEquals(8443, $request->getPort(), 'With PROTO and PORT set PORT takes precedence.'); - $request = Request::create('http://example.com', 'GET', array(), array(), array(), array( + $request = Request::create('http://example.com', 'GET', [], [], [], [ 'HTTP_X_FORWARDED_PROTO' => 'https', - )); + ]); $this->assertEquals(80, $request->getPort(), 'With only PROTO set getPort() ignores trusted headers on untrusted connection.'); $request->server->set('REMOTE_ADDR', '1.1.1.1'); $this->assertEquals(443, $request->getPort(), 'With only PROTO set getPort() defaults to 443.'); - $request = Request::create('http://example.com', 'GET', array(), array(), array(), array( + $request = Request::create('http://example.com', 'GET', [], [], [], [ 'HTTP_X_FORWARDED_PROTO' => 'http', - )); + ]); $this->assertEquals(80, $request->getPort(), 'If X_FORWARDED_PROTO is set to HTTP getPort() ignores trusted headers on untrusted connection.'); $request->server->set('REMOTE_ADDR', '1.1.1.1'); $this->assertEquals(80, $request->getPort(), 'If X_FORWARDED_PROTO is set to HTTP getPort() returns port of the original request.'); - $request = Request::create('http://example.com', 'GET', array(), array(), array(), array( + $request = Request::create('http://example.com', 'GET', [], [], [], [ 'HTTP_X_FORWARDED_PROTO' => 'On', - )); + ]); $this->assertEquals(80, $request->getPort(), 'With only PROTO set and value is On, getPort() ignores trusted headers on untrusted connection.'); $request->server->set('REMOTE_ADDR', '1.1.1.1'); $this->assertEquals(443, $request->getPort(), 'With only PROTO set and value is On, getPort() defaults to 443.'); - $request = Request::create('http://example.com', 'GET', array(), array(), array(), array( + $request = Request::create('http://example.com', 'GET', [], [], [], [ 'HTTP_X_FORWARDED_PROTO' => '1', - )); + ]); $this->assertEquals(80, $request->getPort(), 'With only PROTO set and value is 1, getPort() ignores trusted headers on untrusted connection.'); $request->server->set('REMOTE_ADDR', '1.1.1.1'); $this->assertEquals(443, $request->getPort(), 'With only PROTO set and value is 1, getPort() defaults to 443.'); - $request = Request::create('http://example.com', 'GET', array(), array(), array(), array( + $request = Request::create('http://example.com', 'GET', [], [], [], [ 'HTTP_X_FORWARDED_PROTO' => 'something-else', - )); + ]); $port = $request->getPort(); $this->assertEquals(80, $port, 'With only PROTO set and value is not recognized, getPort() defaults to 80.'); } @@ -898,7 +898,7 @@ class RequestTest extends TestCase public function testGetHostWithFakeHttpHostValue() { $request = new Request(); - $request->initialize(array(), array(), array(), array(), array(), array('HTTP_HOST' => 'www.host.com?query=string')); + $request->initialize([], [], [], [], [], ['HTTP_HOST' => 'www.host.com?query=string']); $request->getHost(); } @@ -958,7 +958,7 @@ class RequestTest extends TestCase $request = new Request(); $request->setMethod('POST'); - $request->query->set('_method', array('delete', 'patch')); + $request->query->set('_method', ['delete', 'patch']); $this->assertSame('POST', $request->getMethod(), '->getMethod() returns the request method if invalid type is defined in query'); } @@ -995,69 +995,69 @@ class RequestTest extends TestCase public function getClientIpsForwardedProvider() { // $expected $remoteAddr $httpForwarded $trustedProxies - return array( - array(array('127.0.0.1'), '127.0.0.1', 'for="_gazonk"', null), - array(array('127.0.0.1'), '127.0.0.1', 'for="_gazonk"', array('127.0.0.1')), - array(array('88.88.88.88'), '127.0.0.1', 'for="88.88.88.88:80"', array('127.0.0.1')), - array(array('192.0.2.60'), '::1', 'for=192.0.2.60;proto=http;by=203.0.113.43', array('::1')), - array(array('2620:0:1cfe:face:b00c::3', '192.0.2.43'), '::1', 'for=192.0.2.43, for="[2620:0:1cfe:face:b00c::3]"', array('::1')), - array(array('2001:db8:cafe::17'), '::1', 'for="[2001:db8:cafe::17]:4711', array('::1')), - ); + return [ + [['127.0.0.1'], '127.0.0.1', 'for="_gazonk"', null], + [['127.0.0.1'], '127.0.0.1', 'for="_gazonk"', ['127.0.0.1']], + [['88.88.88.88'], '127.0.0.1', 'for="88.88.88.88:80"', ['127.0.0.1']], + [['192.0.2.60'], '::1', 'for=192.0.2.60;proto=http;by=203.0.113.43', ['::1']], + [['2620:0:1cfe:face:b00c::3', '192.0.2.43'], '::1', 'for=192.0.2.43, for="[2620:0:1cfe:face:b00c::3]"', ['::1']], + [['2001:db8:cafe::17'], '::1', 'for="[2001:db8:cafe::17]:4711', ['::1']], + ]; } public function getClientIpsProvider() { // $expected $remoteAddr $httpForwardedFor $trustedProxies - return array( + return [ // simple IPv4 - array(array('88.88.88.88'), '88.88.88.88', null, null), + [['88.88.88.88'], '88.88.88.88', null, null], // trust the IPv4 remote addr - array(array('88.88.88.88'), '88.88.88.88', null, array('88.88.88.88')), + [['88.88.88.88'], '88.88.88.88', null, ['88.88.88.88']], // simple IPv6 - array(array('::1'), '::1', null, null), + [['::1'], '::1', null, null], // trust the IPv6 remote addr - array(array('::1'), '::1', null, array('::1')), + [['::1'], '::1', null, ['::1']], // forwarded for with remote IPv4 addr not trusted - array(array('127.0.0.1'), '127.0.0.1', '88.88.88.88', null), + [['127.0.0.1'], '127.0.0.1', '88.88.88.88', null], // forwarded for with remote IPv4 addr trusted + comma - array(array('88.88.88.88'), '127.0.0.1', '88.88.88.88,', array('127.0.0.1')), + [['88.88.88.88'], '127.0.0.1', '88.88.88.88,', ['127.0.0.1']], // forwarded for with remote IPv4 and all FF addrs trusted - array(array('88.88.88.88'), '127.0.0.1', '88.88.88.88', array('127.0.0.1', '88.88.88.88')), + [['88.88.88.88'], '127.0.0.1', '88.88.88.88', ['127.0.0.1', '88.88.88.88']], // forwarded for with remote IPv4 range trusted - array(array('88.88.88.88'), '123.45.67.89', '88.88.88.88', array('123.45.67.0/24')), + [['88.88.88.88'], '123.45.67.89', '88.88.88.88', ['123.45.67.0/24']], // forwarded for with remote IPv6 addr not trusted - array(array('1620:0:1cfe:face:b00c::3'), '1620:0:1cfe:face:b00c::3', '2620:0:1cfe:face:b00c::3', null), + [['1620:0:1cfe:face:b00c::3'], '1620:0:1cfe:face:b00c::3', '2620:0:1cfe:face:b00c::3', null], // forwarded for with remote IPv6 addr trusted - array(array('2620:0:1cfe:face:b00c::3'), '1620:0:1cfe:face:b00c::3', '2620:0:1cfe:face:b00c::3', array('1620:0:1cfe:face:b00c::3')), + [['2620:0:1cfe:face:b00c::3'], '1620:0:1cfe:face:b00c::3', '2620:0:1cfe:face:b00c::3', ['1620:0:1cfe:face:b00c::3']], // forwarded for with remote IPv6 range trusted - array(array('88.88.88.88'), '2a01:198:603:0:396e:4789:8e99:890f', '88.88.88.88', array('2a01:198:603:0::/65')), + [['88.88.88.88'], '2a01:198:603:0:396e:4789:8e99:890f', '88.88.88.88', ['2a01:198:603:0::/65']], // multiple forwarded for with remote IPv4 addr trusted - array(array('88.88.88.88', '87.65.43.21', '127.0.0.1'), '123.45.67.89', '127.0.0.1, 87.65.43.21, 88.88.88.88', array('123.45.67.89')), + [['88.88.88.88', '87.65.43.21', '127.0.0.1'], '123.45.67.89', '127.0.0.1, 87.65.43.21, 88.88.88.88', ['123.45.67.89']], // multiple forwarded for with remote IPv4 addr and some reverse proxies trusted - array(array('87.65.43.21', '127.0.0.1'), '123.45.67.89', '127.0.0.1, 87.65.43.21, 88.88.88.88', array('123.45.67.89', '88.88.88.88')), + [['87.65.43.21', '127.0.0.1'], '123.45.67.89', '127.0.0.1, 87.65.43.21, 88.88.88.88', ['123.45.67.89', '88.88.88.88']], // multiple forwarded for with remote IPv4 addr and some reverse proxies trusted but in the middle - array(array('88.88.88.88', '127.0.0.1'), '123.45.67.89', '127.0.0.1, 87.65.43.21, 88.88.88.88', array('123.45.67.89', '87.65.43.21')), + [['88.88.88.88', '127.0.0.1'], '123.45.67.89', '127.0.0.1, 87.65.43.21, 88.88.88.88', ['123.45.67.89', '87.65.43.21']], // multiple forwarded for with remote IPv4 addr and all reverse proxies trusted - array(array('127.0.0.1'), '123.45.67.89', '127.0.0.1, 87.65.43.21, 88.88.88.88', array('123.45.67.89', '87.65.43.21', '88.88.88.88', '127.0.0.1')), + [['127.0.0.1'], '123.45.67.89', '127.0.0.1, 87.65.43.21, 88.88.88.88', ['123.45.67.89', '87.65.43.21', '88.88.88.88', '127.0.0.1']], // multiple forwarded for with remote IPv6 addr trusted - array(array('2620:0:1cfe:face:b00c::3', '3620:0:1cfe:face:b00c::3'), '1620:0:1cfe:face:b00c::3', '3620:0:1cfe:face:b00c::3,2620:0:1cfe:face:b00c::3', array('1620:0:1cfe:face:b00c::3')), + [['2620:0:1cfe:face:b00c::3', '3620:0:1cfe:face:b00c::3'], '1620:0:1cfe:face:b00c::3', '3620:0:1cfe:face:b00c::3,2620:0:1cfe:face:b00c::3', ['1620:0:1cfe:face:b00c::3']], // multiple forwarded for with remote IPv6 addr and some reverse proxies trusted - array(array('3620:0:1cfe:face:b00c::3'), '1620:0:1cfe:face:b00c::3', '3620:0:1cfe:face:b00c::3,2620:0:1cfe:face:b00c::3', array('1620:0:1cfe:face:b00c::3', '2620:0:1cfe:face:b00c::3')), + [['3620:0:1cfe:face:b00c::3'], '1620:0:1cfe:face:b00c::3', '3620:0:1cfe:face:b00c::3,2620:0:1cfe:face:b00c::3', ['1620:0:1cfe:face:b00c::3', '2620:0:1cfe:face:b00c::3']], // multiple forwarded for with remote IPv4 addr and some reverse proxies trusted but in the middle - array(array('2620:0:1cfe:face:b00c::3', '4620:0:1cfe:face:b00c::3'), '1620:0:1cfe:face:b00c::3', '4620:0:1cfe:face:b00c::3,3620:0:1cfe:face:b00c::3,2620:0:1cfe:face:b00c::3', array('1620:0:1cfe:face:b00c::3', '3620:0:1cfe:face:b00c::3')), + [['2620:0:1cfe:face:b00c::3', '4620:0:1cfe:face:b00c::3'], '1620:0:1cfe:face:b00c::3', '4620:0:1cfe:face:b00c::3,3620:0:1cfe:face:b00c::3,2620:0:1cfe:face:b00c::3', ['1620:0:1cfe:face:b00c::3', '3620:0:1cfe:face:b00c::3']], // client IP with port - array(array('88.88.88.88'), '127.0.0.1', '88.88.88.88:12345, 127.0.0.1', array('127.0.0.1')), + [['88.88.88.88'], '127.0.0.1', '88.88.88.88:12345, 127.0.0.1', ['127.0.0.1']], // invalid forwarded IP is ignored - array(array('88.88.88.88'), '127.0.0.1', 'unknown,88.88.88.88', array('127.0.0.1')), - array(array('88.88.88.88'), '127.0.0.1', '}__test|O:21:"JDatabaseDriverMysqli":3:{s:2,88.88.88.88', array('127.0.0.1')), - ); + [['88.88.88.88'], '127.0.0.1', 'unknown,88.88.88.88', ['127.0.0.1']], + [['88.88.88.88'], '127.0.0.1', '}__test|O:21:"JDatabaseDriverMysqli":3:{s:2,88.88.88.88', ['127.0.0.1']], + ]; } /** @@ -1068,15 +1068,15 @@ class RequestTest extends TestCase { $request = new Request(); - $server = array( + $server = [ 'REMOTE_ADDR' => '88.88.88.88', 'HTTP_FORWARDED' => $httpForwarded, 'HTTP_X_FORWARDED_FOR' => $httpXForwardedFor, - ); + ]; - Request::setTrustedProxies(array('88.88.88.88'), Request::HEADER_X_FORWARDED_ALL | Request::HEADER_FORWARDED); + Request::setTrustedProxies(['88.88.88.88'], Request::HEADER_X_FORWARDED_ALL | Request::HEADER_FORWARDED); - $request->initialize(array(), array(), array(), array(), array(), $server); + $request->initialize([], [], [], [], [], $server); $request->getClientIps(); } @@ -1088,15 +1088,15 @@ class RequestTest extends TestCase { $request = new Request(); - $server = array( + $server = [ 'REMOTE_ADDR' => '88.88.88.88', 'HTTP_FORWARDED' => $httpForwarded, 'HTTP_X_FORWARDED_FOR' => $httpXForwardedFor, - ); + ]; - Request::setTrustedProxies(array('88.88.88.88'), Request::HEADER_X_FORWARDED_FOR); + Request::setTrustedProxies(['88.88.88.88'], Request::HEADER_X_FORWARDED_FOR); - $request->initialize(array(), array(), array(), array(), array(), $server); + $request->initialize([], [], [], [], [], $server); $this->assertSame(array_reverse(explode(',', $httpXForwardedFor)), $request->getClientIps()); } @@ -1104,13 +1104,13 @@ class RequestTest extends TestCase public function getClientIpsWithConflictingHeadersProvider() { // $httpForwarded $httpXForwardedFor - return array( - array('for=87.65.43.21', '192.0.2.60'), - array('for=87.65.43.21, for=192.0.2.60', '192.0.2.60'), - array('for=192.0.2.60', '192.0.2.60,87.65.43.21'), - array('for="::face", for=192.0.2.60', '192.0.2.60,192.0.2.43'), - array('for=87.65.43.21, for=192.0.2.60', '192.0.2.60,87.65.43.21'), - ); + return [ + ['for=87.65.43.21', '192.0.2.60'], + ['for=87.65.43.21, for=192.0.2.60', '192.0.2.60'], + ['for=192.0.2.60', '192.0.2.60,87.65.43.21'], + ['for="::face", for=192.0.2.60', '192.0.2.60,192.0.2.43'], + ['for=87.65.43.21, for=192.0.2.60', '192.0.2.60,87.65.43.21'], + ]; } /** @@ -1120,15 +1120,15 @@ class RequestTest extends TestCase { $request = new Request(); - $server = array( + $server = [ 'REMOTE_ADDR' => '88.88.88.88', 'HTTP_FORWARDED' => $httpForwarded, 'HTTP_X_FORWARDED_FOR' => $httpXForwardedFor, - ); + ]; - Request::setTrustedProxies(array('88.88.88.88'), -1); + Request::setTrustedProxies(['88.88.88.88'], -1); - $request->initialize(array(), array(), array(), array(), array(), $server); + $request->initialize([], [], [], [], [], $server); $clientIps = $request->getClientIps(); @@ -1138,14 +1138,14 @@ class RequestTest extends TestCase public function getClientIpsWithAgreeingHeadersProvider() { // $httpForwarded $httpXForwardedFor - return array( - array('for="192.0.2.60"', '192.0.2.60', array('192.0.2.60')), - array('for=192.0.2.60, for=87.65.43.21', '192.0.2.60,87.65.43.21', array('87.65.43.21', '192.0.2.60')), - array('for="[::face]", for=192.0.2.60', '::face,192.0.2.60', array('192.0.2.60', '::face')), - array('for="192.0.2.60:80"', '192.0.2.60', array('192.0.2.60')), - array('for=192.0.2.60;proto=http;by=203.0.113.43', '192.0.2.60', array('192.0.2.60')), - array('for="[2001:db8:cafe::17]:4711"', '2001:db8:cafe::17', array('2001:db8:cafe::17')), - ); + return [ + ['for="192.0.2.60"', '192.0.2.60', ['192.0.2.60']], + ['for=192.0.2.60, for=87.65.43.21', '192.0.2.60,87.65.43.21', ['87.65.43.21', '192.0.2.60']], + ['for="[::face]", for=192.0.2.60', '::face,192.0.2.60', ['192.0.2.60', '::face']], + ['for="192.0.2.60:80"', '192.0.2.60', ['192.0.2.60']], + ['for=192.0.2.60;proto=http;by=203.0.113.43', '192.0.2.60', ['192.0.2.60']], + ['for="[2001:db8:cafe::17]:4711"', '2001:db8:cafe::17', ['2001:db8:cafe::17']], + ]; } public function testGetContentWorksTwiceInDefaultMode() @@ -1166,7 +1166,7 @@ class RequestTest extends TestCase public function testGetContentReturnsResourceWhenContentSetInConstructor() { - $req = new Request(array(), array(), array(), array(), array(), array(), 'MyContent'); + $req = new Request([], [], [], [], [], [], 'MyContent'); $resource = $req->getContent(true); $this->assertInternalType('resource', $resource); @@ -1179,17 +1179,17 @@ class RequestTest extends TestCase fwrite($resource, 'My other content'); rewind($resource); - $req = new Request(array(), array(), array(), array(), array(), array(), $resource); + $req = new Request([], [], [], [], [], [], $resource); $this->assertEquals('My other content', stream_get_contents($req->getContent(true))); $this->assertEquals('My other content', $req->getContent()); } public function getContentCantBeCalledTwiceWithResourcesProvider() { - return array( - 'Resource then fetch' => array(true, false), - 'Resource then resource' => array(true, true), - ); + return [ + 'Resource then fetch' => [true, false], + 'Resource then resource' => [true, true], + ]; } /** @@ -1214,24 +1214,24 @@ class RequestTest extends TestCase public function getContentCanBeCalledTwiceWithResourcesProvider() { - return array( - 'Fetch then fetch' => array(false, false), - 'Fetch then resource' => array(false, true), - 'Resource then fetch' => array(true, false), - 'Resource then resource' => array(true, true), - ); + return [ + 'Fetch then fetch' => [false, false], + 'Fetch then resource' => [false, true], + 'Resource then fetch' => [true, false], + 'Resource then resource' => [true, true], + ]; } public function provideOverloadedMethods() { - return array( - array('PUT'), - array('DELETE'), - array('PATCH'), - array('put'), - array('delete'), - array('patch'), - ); + return [ + ['PUT'], + ['DELETE'], + ['PATCH'], + ['put'], + ['delete'], + ['patch'], + ]; } /** @@ -1244,14 +1244,14 @@ class RequestTest extends TestCase $_GET['foo1'] = 'bar1'; $_POST['foo2'] = 'bar2'; $_COOKIE['foo3'] = 'bar3'; - $_FILES['foo4'] = array('bar4'); + $_FILES['foo4'] = ['bar4']; $_SERVER['foo5'] = 'bar5'; $request = Request::createFromGlobals(); $this->assertEquals('bar1', $request->query->get('foo1'), '::fromGlobals() uses values from $_GET'); $this->assertEquals('bar2', $request->request->get('foo2'), '::fromGlobals() uses values from $_POST'); $this->assertEquals('bar3', $request->cookies->get('foo3'), '::fromGlobals() uses values from $_COOKIE'); - $this->assertEquals(array('bar4'), $request->files->get('foo4'), '::fromGlobals() uses values from $_FILES'); + $this->assertEquals(['bar4'], $request->files->get('foo4'), '::fromGlobals() uses values from $_FILES'); $this->assertEquals('bar5', $request->server->get('foo5'), '::fromGlobals() uses values from $_SERVER'); unset($_GET['foo1'], $_POST['foo2'], $_COOKIE['foo3'], $_FILES['foo4'], $_SERVER['foo5']); @@ -1281,25 +1281,25 @@ class RequestTest extends TestCase public function testOverrideGlobals() { $request = new Request(); - $request->initialize(array('foo' => 'bar')); + $request->initialize(['foo' => 'bar']); // as the Request::overrideGlobals really work, it erase $_SERVER, so we must backup it $server = $_SERVER; $request->overrideGlobals(); - $this->assertEquals(array('foo' => 'bar'), $_GET); + $this->assertEquals(['foo' => 'bar'], $_GET); - $request->initialize(array(), array('foo' => 'bar')); + $request->initialize([], ['foo' => 'bar']); $request->overrideGlobals(); - $this->assertEquals(array('foo' => 'bar'), $_POST); + $this->assertEquals(['foo' => 'bar'], $_POST); $this->assertArrayNotHasKey('HTTP_X_FORWARDED_PROTO', $_SERVER); $request->headers->set('X_FORWARDED_PROTO', 'https'); - Request::setTrustedProxies(array('1.1.1.1'), Request::HEADER_X_FORWARDED_ALL); + Request::setTrustedProxies(['1.1.1.1'], Request::HEADER_X_FORWARDED_ALL); $this->assertFalse($request->isSecure()); $request->server->set('REMOTE_ADDR', '1.1.1.1'); $this->assertTrue($request->isSecure()); @@ -1316,12 +1316,12 @@ class RequestTest extends TestCase $this->assertArrayHasKey('CONTENT_TYPE', $_SERVER); $this->assertArrayHasKey('CONTENT_LENGTH', $_SERVER); - $request->initialize(array('foo' => 'bar', 'baz' => 'foo')); + $request->initialize(['foo' => 'bar', 'baz' => 'foo']); $request->query->remove('baz'); $request->overrideGlobals(); - $this->assertEquals(array('foo' => 'bar'), $_GET); + $this->assertEquals(['foo' => 'bar'], $_GET); $this->assertEquals('foo=bar', $_SERVER['QUERY_STRING']); $this->assertEquals('foo=bar', $request->server->get('QUERY_STRING')); @@ -1334,23 +1334,23 @@ class RequestTest extends TestCase $request = new Request(); $this->assertEquals('', $request->getScriptName()); - $server = array(); + $server = []; $server['SCRIPT_NAME'] = '/index.php'; - $request->initialize(array(), array(), array(), array(), array(), $server); + $request->initialize([], [], [], [], [], $server); $this->assertEquals('/index.php', $request->getScriptName()); - $server = array(); + $server = []; $server['ORIG_SCRIPT_NAME'] = '/frontend.php'; - $request->initialize(array(), array(), array(), array(), array(), $server); + $request->initialize([], [], [], [], [], $server); $this->assertEquals('/frontend.php', $request->getScriptName()); - $server = array(); + $server = []; $server['SCRIPT_NAME'] = '/index.php'; $server['ORIG_SCRIPT_NAME'] = '/frontend.php'; - $request->initialize(array(), array(), array(), array(), array(), $server); + $request->initialize([], [], [], [], [], $server); $this->assertEquals('/index.php', $request->getScriptName()); } @@ -1360,29 +1360,29 @@ class RequestTest extends TestCase $request = new Request(); $this->assertEquals('', $request->getBasePath()); - $server = array(); + $server = []; $server['SCRIPT_FILENAME'] = '/some/where/index.php'; - $request->initialize(array(), array(), array(), array(), array(), $server); + $request->initialize([], [], [], [], [], $server); $this->assertEquals('', $request->getBasePath()); - $server = array(); + $server = []; $server['SCRIPT_FILENAME'] = '/some/where/index.php'; $server['SCRIPT_NAME'] = '/index.php'; - $request->initialize(array(), array(), array(), array(), array(), $server); + $request->initialize([], [], [], [], [], $server); $this->assertEquals('', $request->getBasePath()); - $server = array(); + $server = []; $server['SCRIPT_FILENAME'] = '/some/where/index.php'; $server['PHP_SELF'] = '/index.php'; - $request->initialize(array(), array(), array(), array(), array(), $server); + $request->initialize([], [], [], [], [], $server); $this->assertEquals('', $request->getBasePath()); - $server = array(); + $server = []; $server['SCRIPT_FILENAME'] = '/some/where/index.php'; $server['ORIG_SCRIPT_NAME'] = '/index.php'; - $request->initialize(array(), array(), array(), array(), array(), $server); + $request->initialize([], [], [], [], [], $server); $this->assertEquals('', $request->getBasePath()); } @@ -1392,21 +1392,21 @@ class RequestTest extends TestCase $request = new Request(); $this->assertEquals('/', $request->getPathInfo()); - $server = array(); + $server = []; $server['REQUEST_URI'] = '/path/info'; - $request->initialize(array(), array(), array(), array(), array(), $server); + $request->initialize([], [], [], [], [], $server); $this->assertEquals('/path/info', $request->getPathInfo()); - $server = array(); + $server = []; $server['REQUEST_URI'] = '/path%20test/info'; - $request->initialize(array(), array(), array(), array(), array(), $server); + $request->initialize([], [], [], [], [], $server); $this->assertEquals('/path%20test/info', $request->getPathInfo()); - $server = array(); + $server = []; $server['REQUEST_URI'] = '?a=b'; - $request->initialize(array(), array(), array(), array(), array(), $server); + $request->initialize([], [], [], [], [], $server); $this->assertEquals('/', $request->getPathInfo()); } @@ -1434,27 +1434,27 @@ class RequestTest extends TestCase { $request = new Request(); $this->assertNull($request->getPreferredLanguage()); - $this->assertNull($request->getPreferredLanguage(array())); - $this->assertEquals('fr', $request->getPreferredLanguage(array('fr'))); - $this->assertEquals('fr', $request->getPreferredLanguage(array('fr', 'en'))); - $this->assertEquals('en', $request->getPreferredLanguage(array('en', 'fr'))); - $this->assertEquals('fr-ch', $request->getPreferredLanguage(array('fr-ch', 'fr-fr'))); + $this->assertNull($request->getPreferredLanguage([])); + $this->assertEquals('fr', $request->getPreferredLanguage(['fr'])); + $this->assertEquals('fr', $request->getPreferredLanguage(['fr', 'en'])); + $this->assertEquals('en', $request->getPreferredLanguage(['en', 'fr'])); + $this->assertEquals('fr-ch', $request->getPreferredLanguage(['fr-ch', 'fr-fr'])); $request = new Request(); $request->headers->set('Accept-language', 'zh, en-us; q=0.8, en; q=0.6'); - $this->assertEquals('en', $request->getPreferredLanguage(array('en', 'en-us'))); + $this->assertEquals('en', $request->getPreferredLanguage(['en', 'en-us'])); $request = new Request(); $request->headers->set('Accept-language', 'zh, en-us; q=0.8, en; q=0.6'); - $this->assertEquals('en', $request->getPreferredLanguage(array('fr', 'en'))); + $this->assertEquals('en', $request->getPreferredLanguage(['fr', 'en'])); $request = new Request(); $request->headers->set('Accept-language', 'zh, en-us; q=0.8'); - $this->assertEquals('en', $request->getPreferredLanguage(array('fr', 'en'))); + $this->assertEquals('en', $request->getPreferredLanguage(['fr', 'en'])); $request = new Request(); $request->headers->set('Accept-language', 'zh, en-us; q=0.8, fr-fr; q=0.6, fr; q=0.5'); - $this->assertEquals('en', $request->getPreferredLanguage(array('fr', 'en'))); + $this->assertEquals('en', $request->getPreferredLanguage(['fr', 'en'])); } public function testIsXmlHttpRequest() @@ -1492,72 +1492,72 @@ class RequestTest extends TestCase public function testGetCharsets() { $request = new Request(); - $this->assertEquals(array(), $request->getCharsets()); + $this->assertEquals([], $request->getCharsets()); $request->headers->set('Accept-Charset', 'ISO-8859-1, US-ASCII, UTF-8; q=0.8, ISO-10646-UCS-2; q=0.6'); - $this->assertEquals(array(), $request->getCharsets()); // testing caching + $this->assertEquals([], $request->getCharsets()); // testing caching $request = new Request(); $request->headers->set('Accept-Charset', 'ISO-8859-1, US-ASCII, UTF-8; q=0.8, ISO-10646-UCS-2; q=0.6'); - $this->assertEquals(array('ISO-8859-1', 'US-ASCII', 'UTF-8', 'ISO-10646-UCS-2'), $request->getCharsets()); + $this->assertEquals(['ISO-8859-1', 'US-ASCII', 'UTF-8', 'ISO-10646-UCS-2'], $request->getCharsets()); $request = new Request(); $request->headers->set('Accept-Charset', 'ISO-8859-1,utf-8;q=0.7,*;q=0.7'); - $this->assertEquals(array('ISO-8859-1', 'utf-8', '*'), $request->getCharsets()); + $this->assertEquals(['ISO-8859-1', 'utf-8', '*'], $request->getCharsets()); } public function testGetEncodings() { $request = new Request(); - $this->assertEquals(array(), $request->getEncodings()); + $this->assertEquals([], $request->getEncodings()); $request->headers->set('Accept-Encoding', 'gzip,deflate,sdch'); - $this->assertEquals(array(), $request->getEncodings()); // testing caching + $this->assertEquals([], $request->getEncodings()); // testing caching $request = new Request(); $request->headers->set('Accept-Encoding', 'gzip,deflate,sdch'); - $this->assertEquals(array('gzip', 'deflate', 'sdch'), $request->getEncodings()); + $this->assertEquals(['gzip', 'deflate', 'sdch'], $request->getEncodings()); $request = new Request(); $request->headers->set('Accept-Encoding', 'gzip;q=0.4,deflate;q=0.9,compress;q=0.7'); - $this->assertEquals(array('deflate', 'compress', 'gzip'), $request->getEncodings()); + $this->assertEquals(['deflate', 'compress', 'gzip'], $request->getEncodings()); } public function testGetAcceptableContentTypes() { $request = new Request(); - $this->assertEquals(array(), $request->getAcceptableContentTypes()); + $this->assertEquals([], $request->getAcceptableContentTypes()); $request->headers->set('Accept', 'application/vnd.wap.wmlscriptc, text/vnd.wap.wml, application/vnd.wap.xhtml+xml, application/xhtml+xml, text/html, multipart/mixed, */*'); - $this->assertEquals(array(), $request->getAcceptableContentTypes()); // testing caching + $this->assertEquals([], $request->getAcceptableContentTypes()); // testing caching $request = new Request(); $request->headers->set('Accept', 'application/vnd.wap.wmlscriptc, text/vnd.wap.wml, application/vnd.wap.xhtml+xml, application/xhtml+xml, text/html, multipart/mixed, */*'); - $this->assertEquals(array('application/vnd.wap.wmlscriptc', 'text/vnd.wap.wml', 'application/vnd.wap.xhtml+xml', 'application/xhtml+xml', 'text/html', 'multipart/mixed', '*/*'), $request->getAcceptableContentTypes()); + $this->assertEquals(['application/vnd.wap.wmlscriptc', 'text/vnd.wap.wml', 'application/vnd.wap.xhtml+xml', 'application/xhtml+xml', 'text/html', 'multipart/mixed', '*/*'], $request->getAcceptableContentTypes()); } public function testGetLanguages() { $request = new Request(); - $this->assertEquals(array(), $request->getLanguages()); + $this->assertEquals([], $request->getLanguages()); $request = new Request(); $request->headers->set('Accept-language', 'zh, en-us; q=0.8, en; q=0.6'); - $this->assertEquals(array('zh', 'en_US', 'en'), $request->getLanguages()); - $this->assertEquals(array('zh', 'en_US', 'en'), $request->getLanguages()); + $this->assertEquals(['zh', 'en_US', 'en'], $request->getLanguages()); + $this->assertEquals(['zh', 'en_US', 'en'], $request->getLanguages()); $request = new Request(); $request->headers->set('Accept-language', 'zh, en-us; q=0.6, en; q=0.8'); - $this->assertEquals(array('zh', 'en', 'en_US'), $request->getLanguages()); // Test out of order qvalues + $this->assertEquals(['zh', 'en', 'en_US'], $request->getLanguages()); // Test out of order qvalues $request = new Request(); $request->headers->set('Accept-language', 'zh, en, en-us'); - $this->assertEquals(array('zh', 'en', 'en_US'), $request->getLanguages()); // Test equal weighting without qvalues + $this->assertEquals(['zh', 'en', 'en_US'], $request->getLanguages()); // Test equal weighting without qvalues $request = new Request(); $request->headers->set('Accept-language', 'zh; q=0.6, en, en-us; q=0.6'); - $this->assertEquals(array('en', 'zh', 'en_US'), $request->getLanguages()); // Test equal weighting with qvalues + $this->assertEquals(['en', 'zh', 'en_US'], $request->getLanguages()); // Test equal weighting with qvalues $request = new Request(); $request->headers->set('Accept-language', 'zh, i-cherokee; q=0.6'); - $this->assertEquals(array('zh', 'cherokee'), $request->getLanguages()); + $this->assertEquals(['zh', 'cherokee'], $request->getLanguages()); } public function testGetRequestFormat() @@ -1577,7 +1577,7 @@ class RequestTest extends TestCase $this->assertNull($request->setRequestFormat('foo')); $this->assertEquals('foo', $request->getRequestFormat(null)); - $request = new Request(array('_format' => 'foo')); + $request = new Request(['_format' => 'foo']); $this->assertEquals('html', $request->getRequestFormat()); } @@ -1663,7 +1663,7 @@ class RequestTest extends TestCase */ public function testGetBaseUrl($uri, $server, $expectedBaseUrl, $expectedPathInfo) { - $request = Request::create($uri, 'GET', array(), array(), array(), $server); + $request = Request::create($uri, 'GET', [], [], [], $server); $this->assertSame($expectedBaseUrl, $request->getBaseUrl(), 'baseUrl'); $this->assertSame($expectedPathInfo, $request->getPathInfo(), 'pathInfo'); @@ -1671,78 +1671,78 @@ class RequestTest extends TestCase public function getBaseUrlData() { - return array( - array( + return [ + [ '/fruit/strawberry/1234index.php/blah', - array( + [ 'SCRIPT_FILENAME' => 'E:/Sites/cc-new/public_html/fruit/index.php', 'SCRIPT_NAME' => '/fruit/index.php', 'PHP_SELF' => '/fruit/index.php', - ), + ], '/fruit', '/strawberry/1234index.php/blah', - ), - array( + ], + [ '/fruit/strawberry/1234index.php/blah', - array( + [ 'SCRIPT_FILENAME' => 'E:/Sites/cc-new/public_html/index.php', 'SCRIPT_NAME' => '/index.php', 'PHP_SELF' => '/index.php', - ), + ], '', '/fruit/strawberry/1234index.php/blah', - ), - array( + ], + [ '/foo%20bar/', - array( + [ 'SCRIPT_FILENAME' => '/home/John Doe/public_html/foo bar/app.php', 'SCRIPT_NAME' => '/foo bar/app.php', 'PHP_SELF' => '/foo bar/app.php', - ), + ], '/foo%20bar', '/', - ), - array( + ], + [ '/foo%20bar/home', - array( + [ 'SCRIPT_FILENAME' => '/home/John Doe/public_html/foo bar/app.php', 'SCRIPT_NAME' => '/foo bar/app.php', 'PHP_SELF' => '/foo bar/app.php', - ), + ], '/foo%20bar', '/home', - ), - array( + ], + [ '/foo%20bar/app.php/home', - array( + [ 'SCRIPT_FILENAME' => '/home/John Doe/public_html/foo bar/app.php', 'SCRIPT_NAME' => '/foo bar/app.php', 'PHP_SELF' => '/foo bar/app.php', - ), + ], '/foo%20bar/app.php', '/home', - ), - array( + ], + [ '/foo%20bar/app.php/home%3Dbaz', - array( + [ 'SCRIPT_FILENAME' => '/home/John Doe/public_html/foo bar/app.php', 'SCRIPT_NAME' => '/foo bar/app.php', 'PHP_SELF' => '/foo bar/app.php', - ), + ], '/foo%20bar/app.php', '/home%3Dbaz', - ), - array( + ], + [ '/foo/bar+baz', - array( + [ 'SCRIPT_FILENAME' => '/home/John Doe/public_html/foo/app.php', 'SCRIPT_NAME' => '/foo/app.php', 'PHP_SELF' => '/foo/app.php', - ), + ], '/foo', '/bar+baz', - ), - ); + ], + ]; } /** @@ -1760,16 +1760,16 @@ class RequestTest extends TestCase public function urlencodedStringPrefixData() { - return array( - array('foo', 'foo', 'foo'), - array('fo%6f', 'foo', 'fo%6f'), - array('foo/bar', 'foo', 'foo'), - array('fo%6f/bar', 'foo', 'fo%6f'), - array('f%6f%6f/bar', 'foo', 'f%6f%6f'), - array('%66%6F%6F/bar', 'foo', '%66%6F%6F'), - array('fo+o/bar', 'fo+o', 'fo+o'), - array('fo%2Bo/bar', 'fo+o', 'fo%2Bo'), - ); + return [ + ['foo', 'foo', 'foo'], + ['fo%6f', 'foo', 'fo%6f'], + ['foo/bar', 'foo', 'foo'], + ['fo%6f/bar', 'foo', 'fo%6f'], + ['f%6f%6f/bar', 'foo', 'f%6f%6f'], + ['%66%6F%6F/bar', 'foo', '%66%6F%6F'], + ['fo+o/bar', 'fo+o', 'fo+o'], + ['fo%2Bo/bar', 'fo+o', 'fo%2Bo'], + ]; } private function disableHttpMethodParameterOverride() @@ -1784,7 +1784,7 @@ class RequestTest extends TestCase { $request = new Request(); - $server = array('REMOTE_ADDR' => $remoteAddr); + $server = ['REMOTE_ADDR' => $remoteAddr]; if (null !== $httpForwardedFor) { $server['HTTP_X_FORWARDED_FOR'] = $httpForwardedFor; } @@ -1793,7 +1793,7 @@ class RequestTest extends TestCase Request::setTrustedProxies($trustedProxies, Request::HEADER_X_FORWARDED_ALL); } - $request->initialize(array(), array(), array(), array(), array(), $server); + $request->initialize([], [], [], [], [], $server); return $request; } @@ -1802,7 +1802,7 @@ class RequestTest extends TestCase { $request = new Request(); - $server = array('REMOTE_ADDR' => $remoteAddr); + $server = ['REMOTE_ADDR' => $remoteAddr]; if (null !== $httpForwarded) { $server['HTTP_FORWARDED'] = $httpForwarded; @@ -1812,7 +1812,7 @@ class RequestTest extends TestCase Request::setTrustedProxies($trustedProxies, Request::HEADER_FORWARDED); } - $request->initialize(array(), array(), array(), array(), array(), $server); + $request->initialize([], [], [], [], [], $server); return $request; } @@ -1833,35 +1833,35 @@ class RequestTest extends TestCase $this->assertFalse($request->isSecure()); // disabling proxy trusting - Request::setTrustedProxies(array(), Request::HEADER_X_FORWARDED_ALL); + Request::setTrustedProxies([], Request::HEADER_X_FORWARDED_ALL); $this->assertEquals('3.3.3.3', $request->getClientIp()); $this->assertEquals('example.com', $request->getHost()); $this->assertEquals(80, $request->getPort()); $this->assertFalse($request->isSecure()); // request is forwarded by a non-trusted proxy - Request::setTrustedProxies(array('2.2.2.2'), Request::HEADER_X_FORWARDED_ALL); + Request::setTrustedProxies(['2.2.2.2'], Request::HEADER_X_FORWARDED_ALL); $this->assertEquals('3.3.3.3', $request->getClientIp()); $this->assertEquals('example.com', $request->getHost()); $this->assertEquals(80, $request->getPort()); $this->assertFalse($request->isSecure()); // trusted proxy via setTrustedProxies() - Request::setTrustedProxies(array('3.3.3.3', '2.2.2.2'), Request::HEADER_X_FORWARDED_ALL); + Request::setTrustedProxies(['3.3.3.3', '2.2.2.2'], Request::HEADER_X_FORWARDED_ALL); $this->assertEquals('1.1.1.1', $request->getClientIp()); $this->assertEquals('foo.example.com', $request->getHost()); $this->assertEquals(443, $request->getPort()); $this->assertTrue($request->isSecure()); // trusted proxy via setTrustedProxies() - Request::setTrustedProxies(array('3.3.3.4', '2.2.2.2'), Request::HEADER_X_FORWARDED_ALL); + Request::setTrustedProxies(['3.3.3.4', '2.2.2.2'], Request::HEADER_X_FORWARDED_ALL); $this->assertEquals('3.3.3.3', $request->getClientIp()); $this->assertEquals('example.com', $request->getHost()); $this->assertEquals(80, $request->getPort()); $this->assertFalse($request->isSecure()); // check various X_FORWARDED_PROTO header values - Request::setTrustedProxies(array('3.3.3.3', '2.2.2.2'), Request::HEADER_X_FORWARDED_ALL); + Request::setTrustedProxies(['3.3.3.3', '2.2.2.2'], Request::HEADER_X_FORWARDED_ALL); $request->headers->set('X_FORWARDED_PROTO', 'ssl'); $this->assertTrue($request->isSecure()); @@ -1882,35 +1882,35 @@ class RequestTest extends TestCase $this->assertFalse($request->isSecure()); // disabling proxy trusting - Request::setTrustedProxies(array(), Request::HEADER_FORWARDED); + Request::setTrustedProxies([], Request::HEADER_FORWARDED); $this->assertEquals('3.3.3.3', $request->getClientIp()); $this->assertEquals('example.com', $request->getHost()); $this->assertEquals(80, $request->getPort()); $this->assertFalse($request->isSecure()); // request is forwarded by a non-trusted proxy - Request::setTrustedProxies(array('2.2.2.2'), Request::HEADER_FORWARDED); + Request::setTrustedProxies(['2.2.2.2'], Request::HEADER_FORWARDED); $this->assertEquals('3.3.3.3', $request->getClientIp()); $this->assertEquals('example.com', $request->getHost()); $this->assertEquals(80, $request->getPort()); $this->assertFalse($request->isSecure()); // trusted proxy via setTrustedProxies() - Request::setTrustedProxies(array('3.3.3.3', '2.2.2.2'), Request::HEADER_FORWARDED); + Request::setTrustedProxies(['3.3.3.3', '2.2.2.2'], Request::HEADER_FORWARDED); $this->assertEquals('1.1.1.1', $request->getClientIp()); $this->assertEquals('foo.example.com', $request->getHost()); $this->assertEquals(8080, $request->getPort()); $this->assertTrue($request->isSecure()); // trusted proxy via setTrustedProxies() - Request::setTrustedProxies(array('3.3.3.4', '2.2.2.2'), Request::HEADER_FORWARDED); + Request::setTrustedProxies(['3.3.3.4', '2.2.2.2'], Request::HEADER_FORWARDED); $this->assertEquals('3.3.3.3', $request->getClientIp()); $this->assertEquals('example.com', $request->getHost()); $this->assertEquals(80, $request->getPort()); $this->assertFalse($request->isSecure()); // check various X_FORWARDED_PROTO header values - Request::setTrustedProxies(array('3.3.3.3', '2.2.2.2'), Request::HEADER_FORWARDED); + Request::setTrustedProxies(['3.3.3.3', '2.2.2.2'], Request::HEADER_FORWARDED); $request->headers->set('FORWARDED', 'proto=ssl'); $this->assertTrue($request->isSecure()); @@ -1930,37 +1930,37 @@ class RequestTest extends TestCase $this->assertEquals($expectedRequestUri, $request->getRequestUri(), '->getRequestUri() is correct'); $subRequestUri = '/bar/foo'; - $subRequest = Request::create($subRequestUri, 'get', array(), array(), array(), $request->server->all()); + $subRequest = Request::create($subRequestUri, 'get', [], [], [], $request->server->all()); $this->assertEquals($subRequestUri, $subRequest->getRequestUri(), '->getRequestUri() is correct in sub request'); } public function iisRequestUriProvider() { - return array( - array( - array(), - array( + return [ + [ + [], + [ 'IIS_WasUrlRewritten' => '1', 'UNENCODED_URL' => '/foo/bar', - ), + ], '/foo/bar', - ), - array( - array(), - array( + ], + [ + [], + [ 'ORIG_PATH_INFO' => '/foo/bar', - ), + ], '/foo/bar', - ), - array( - array(), - array( + ], + [ + [], + [ 'ORIG_PATH_INFO' => '/foo/bar', 'QUERY_STRING' => 'foo=bar', - ), + ], '/foo/bar?foo=bar', - ), - ); + ], + ]; } public function testTrustedHosts() @@ -1973,7 +1973,7 @@ class RequestTest extends TestCase $this->assertEquals('evil.com', $request->getHost()); // add a trusted domain and all its subdomains - Request::setTrustedHosts(array('^([a-z]{9}\.)?trusted\.com$')); + Request::setTrustedHosts(['^([a-z]{9}\.)?trusted\.com$']); // untrusted host $request->headers->set('host', 'evil.com'); @@ -2005,7 +2005,7 @@ class RequestTest extends TestCase public function testSetTrustedHostsDoesNotBreakOnSpecialCharacters() { - Request::setTrustedHosts(array('localhost(\.local){0,1}#,example.com', 'localhost')); + Request::setTrustedHosts(['localhost(\.local){0,1}#,example.com', 'localhost']); $request = Request::create('/'); $request->headers->set('host', 'localhost'); @@ -2014,7 +2014,7 @@ class RequestTest extends TestCase public function testFactory() { - Request::setFactory(function (array $query = array(), array $request = array(), array $attributes = array(), array $cookies = array(), array $files = array(), array $server = array(), $content = null) { + Request::setFactory(function (array $query = [], array $request = [], array $attributes = [], array $cookies = [], array $files = [], array $server = [], $content = null) { return new NewRequest(); }); @@ -2063,23 +2063,23 @@ class RequestTest extends TestCase public function getHostValidities() { - return array( - array('.a', false), - array('a..', false), - array('a.', true), - array("\xE9", false), - array('[::1]', true), - array('[::1]:80', true, '[::1]', 80), - array(str_repeat('.', 101), false), - ); + return [ + ['.a', false], + ['a..', false], + ['a.', true], + ["\xE9", false], + ['[::1]', true], + ['[::1]:80', true, '[::1]', 80], + [str_repeat('.', 101), false], + ]; } public function getLongHostNames() { - return array( - array('a'.str_repeat('.a', 40000)), - array(str_repeat(':', 101)), - ); + return [ + ['a'.str_repeat('.a', 40000)], + [str_repeat(':', 101)], + ]; } /** @@ -2094,18 +2094,18 @@ class RequestTest extends TestCase public function methodIdempotentProvider() { - return array( - array('HEAD', true), - array('GET', true), - array('POST', false), - array('PUT', true), - array('PATCH', false), - array('DELETE', true), - array('PURGE', true), - array('OPTIONS', true), - array('TRACE', true), - array('CONNECT', false), - ); + return [ + ['HEAD', true], + ['GET', true], + ['POST', false], + ['PUT', true], + ['PATCH', false], + ['DELETE', true], + ['PURGE', true], + ['OPTIONS', true], + ['TRACE', true], + ['CONNECT', false], + ]; } /** @@ -2120,18 +2120,18 @@ class RequestTest extends TestCase public function methodSafeProvider() { - return array( - array('HEAD', true), - array('GET', true), - array('POST', false), - array('PUT', false), - array('PATCH', false), - array('DELETE', false), - array('PURGE', false), - array('OPTIONS', true), - array('TRACE', true), - array('CONNECT', false), - ); + return [ + ['HEAD', true], + ['GET', true], + ['POST', false], + ['PUT', false], + ['PATCH', false], + ['DELETE', false], + ['PURGE', false], + ['OPTIONS', true], + ['TRACE', true], + ['CONNECT', false], + ]; } /** @@ -2156,18 +2156,18 @@ class RequestTest extends TestCase public function methodCacheableProvider() { - return array( - array('HEAD', true), - array('GET', true), - array('POST', false), - array('PUT', false), - array('PATCH', false), - array('DELETE', false), - array('PURGE', false), - array('OPTIONS', false), - array('TRACE', false), - array('CONNECT', false), - ); + return [ + ['HEAD', true], + ['GET', true], + ['POST', false], + ['PUT', false], + ['PATCH', false], + ['DELETE', false], + ['PURGE', false], + ['OPTIONS', false], + ['TRACE', false], + ['CONNECT', false], + ]; } /** @@ -2176,7 +2176,7 @@ class RequestTest extends TestCase public function testProtocolVersion($serverProtocol, $trustedProxy, $via, $expected) { if ($trustedProxy) { - Request::setTrustedProxies(array('1.1.1.1'), -1); + Request::setTrustedProxies(['1.1.1.1'], -1); } $request = new Request(); @@ -2189,41 +2189,41 @@ class RequestTest extends TestCase public function protocolVersionProvider() { - return array( - 'untrusted without via' => array('HTTP/2.0', false, '', 'HTTP/2.0'), - 'untrusted with via' => array('HTTP/2.0', false, '1.0 fred, 1.1 nowhere.com (Apache/1.1)', 'HTTP/2.0'), - 'trusted without via' => array('HTTP/2.0', true, '', 'HTTP/2.0'), - 'trusted with via' => array('HTTP/2.0', true, '1.0 fred, 1.1 nowhere.com (Apache/1.1)', 'HTTP/1.0'), - 'trusted with via and protocol name' => array('HTTP/2.0', true, 'HTTP/1.0 fred, HTTP/1.1 nowhere.com (Apache/1.1)', 'HTTP/1.0'), - 'trusted with broken via' => array('HTTP/2.0', true, 'HTTP/1^0 foo', 'HTTP/2.0'), - 'trusted with partially-broken via' => array('HTTP/2.0', true, '1.0 fred, foo', 'HTTP/1.0'), - ); + return [ + 'untrusted without via' => ['HTTP/2.0', false, '', 'HTTP/2.0'], + 'untrusted with via' => ['HTTP/2.0', false, '1.0 fred, 1.1 nowhere.com (Apache/1.1)', 'HTTP/2.0'], + 'trusted without via' => ['HTTP/2.0', true, '', 'HTTP/2.0'], + 'trusted with via' => ['HTTP/2.0', true, '1.0 fred, 1.1 nowhere.com (Apache/1.1)', 'HTTP/1.0'], + 'trusted with via and protocol name' => ['HTTP/2.0', true, 'HTTP/1.0 fred, HTTP/1.1 nowhere.com (Apache/1.1)', 'HTTP/1.0'], + 'trusted with broken via' => ['HTTP/2.0', true, 'HTTP/1^0 foo', 'HTTP/2.0'], + 'trusted with partially-broken via' => ['HTTP/2.0', true, '1.0 fred, foo', 'HTTP/1.0'], + ]; } public function nonstandardRequestsData() { - return array( - array('', '', '/', 'http://host:8080/', ''), - array('/', '', '/', 'http://host:8080/', ''), + return [ + ['', '', '/', 'http://host:8080/', ''], + ['/', '', '/', 'http://host:8080/', ''], - array('hello/app.php/x', '', '/x', 'http://host:8080/hello/app.php/x', '/hello', '/hello/app.php'), - array('/hello/app.php/x', '', '/x', 'http://host:8080/hello/app.php/x', '/hello', '/hello/app.php'), + ['hello/app.php/x', '', '/x', 'http://host:8080/hello/app.php/x', '/hello', '/hello/app.php'], + ['/hello/app.php/x', '', '/x', 'http://host:8080/hello/app.php/x', '/hello', '/hello/app.php'], - array('', 'a=b', '/', 'http://host:8080/?a=b'), - array('?a=b', 'a=b', '/', 'http://host:8080/?a=b'), - array('/?a=b', 'a=b', '/', 'http://host:8080/?a=b'), + ['', 'a=b', '/', 'http://host:8080/?a=b'], + ['?a=b', 'a=b', '/', 'http://host:8080/?a=b'], + ['/?a=b', 'a=b', '/', 'http://host:8080/?a=b'], - array('x', 'a=b', '/x', 'http://host:8080/x?a=b'), - array('x?a=b', 'a=b', '/x', 'http://host:8080/x?a=b'), - array('/x?a=b', 'a=b', '/x', 'http://host:8080/x?a=b'), + ['x', 'a=b', '/x', 'http://host:8080/x?a=b'], + ['x?a=b', 'a=b', '/x', 'http://host:8080/x?a=b'], + ['/x?a=b', 'a=b', '/x', 'http://host:8080/x?a=b'], - array('hello/x', '', '/x', 'http://host:8080/hello/x', '/hello'), - array('/hello/x', '', '/x', 'http://host:8080/hello/x', '/hello'), + ['hello/x', '', '/x', 'http://host:8080/hello/x', '/hello'], + ['/hello/x', '', '/x', 'http://host:8080/hello/x', '/hello'], - array('hello/app.php/x', 'a=b', '/x', 'http://host:8080/hello/app.php/x?a=b', '/hello', '/hello/app.php'), - array('hello/app.php/x?a=b', 'a=b', '/x', 'http://host:8080/hello/app.php/x?a=b', '/hello', '/hello/app.php'), - array('/hello/app.php/x?a=b', 'a=b', '/x', 'http://host:8080/hello/app.php/x?a=b', '/hello', '/hello/app.php'), - ); + ['hello/app.php/x', 'a=b', '/x', 'http://host:8080/hello/app.php/x?a=b', '/hello', '/hello/app.php'], + ['hello/app.php/x?a=b', 'a=b', '/x', 'http://host:8080/hello/app.php/x?a=b', '/hello', '/hello/app.php'], + ['/hello/app.php/x?a=b', 'a=b', '/x', 'http://host:8080/hello/app.php/x?a=b', '/hello', '/hello/app.php'], + ]; } /** @@ -2235,16 +2235,16 @@ class RequestTest extends TestCase $expectedBaseUrl = $expectedBasePath; } - $server = array( + $server = [ 'HTTP_HOST' => 'host:8080', 'SERVER_PORT' => '8080', 'QUERY_STRING' => $queryString, 'PHP_SELF' => '/hello/app.php', 'SCRIPT_FILENAME' => '/some/path/app.php', 'REQUEST_URI' => $requestUri, - ); + ]; - $request = new Request(array(), array(), array(), array(), array(), $server); + $request = new Request([], [], [], [], [], $server); $this->assertEquals($expectedPathInfo, $request->getPathInfo()); $this->assertEquals($expectedUri, $request->getUri()); @@ -2257,7 +2257,7 @@ class RequestTest extends TestCase public function testTrustedHost() { - Request::setTrustedProxies(array('1.1.1.1'), -1); + Request::setTrustedProxies(['1.1.1.1'], -1); $request = Request::create('/'); $request->server->set('REMOTE_ADDR', '1.1.1.1'); @@ -2279,7 +2279,7 @@ class RequestTest extends TestCase public function testTrustedPort() { - Request::setTrustedProxies(array('1.1.1.1'), -1); + Request::setTrustedProxies(['1.1.1.1'], -1); $request = Request::create('/'); $request->server->set('REMOTE_ADDR', '1.1.1.1'); @@ -2309,7 +2309,7 @@ class RequestContentProxy extends Request { public function getContent($asResource = false) { - return http_build_query(array('_method' => 'PUT', 'content' => 'mycontent'), '', '&'); + return http_build_query(['_method' => 'PUT', 'content' => 'mycontent'], '', '&'); } } diff --git a/vendor/symfony/http-foundation/Tests/ResponseFunctionalTest.php b/vendor/symfony/http-foundation/Tests/ResponseFunctionalTest.php index 22f25e97..3d3e696c 100644 --- a/vendor/symfony/http-foundation/Tests/ResponseFunctionalTest.php +++ b/vendor/symfony/http-foundation/Tests/ResponseFunctionalTest.php @@ -22,10 +22,10 @@ class ResponseFunctionalTest extends TestCase public static function setUpBeforeClass() { - $spec = array( - 1 => array('file', '/dev/null', 'w'), - 2 => array('file', '/dev/null', 'w'), - ); + $spec = [ + 1 => ['file', '/dev/null', 'w'], + 2 => ['file', '/dev/null', 'w'], + ]; if (!self::$server = @proc_open('exec php -S localhost:8054', $spec, $pipes, __DIR__.'/Fixtures/response-functional')) { self::markTestSkipped('PHP server unable to start.'); } @@ -52,7 +52,7 @@ class ResponseFunctionalTest extends TestCase public function provideCookie() { foreach (glob(__DIR__.'/Fixtures/response-functional/*.php') as $file) { - yield array(pathinfo($file, PATHINFO_FILENAME)); + yield [pathinfo($file, PATHINFO_FILENAME)]; } } } diff --git a/vendor/symfony/http-foundation/Tests/ResponseHeaderBagTest.php b/vendor/symfony/http-foundation/Tests/ResponseHeaderBagTest.php index f6ddb98e..35df36c1 100644 --- a/vendor/symfony/http-foundation/Tests/ResponseHeaderBagTest.php +++ b/vendor/symfony/http-foundation/Tests/ResponseHeaderBagTest.php @@ -22,7 +22,7 @@ class ResponseHeaderBagTest extends TestCase { public function testAllPreserveCase() { - $headers = array( + $headers = [ 'fOo' => 'BAR', 'ETag' => 'xyzzy', 'Content-MD5' => 'Q2hlY2sgSW50ZWdyaXR5IQ==', @@ -30,7 +30,7 @@ class ResponseHeaderBagTest extends TestCase 'WWW-Authenticate' => 'Basic realm="WallyWorld"', 'X-UA-Compatible' => 'IE=edge,chrome=1', 'X-XSS-Protection' => '1; mode=block', - ); + ]; $bag = new ResponseHeaderBag($headers); $allPreservedCase = $bag->allPreserveCase(); @@ -42,45 +42,45 @@ class ResponseHeaderBagTest extends TestCase public function testCacheControlHeader() { - $bag = new ResponseHeaderBag(array()); + $bag = new ResponseHeaderBag([]); $this->assertEquals('no-cache, private', $bag->get('Cache-Control')); $this->assertTrue($bag->hasCacheControlDirective('no-cache')); - $bag = new ResponseHeaderBag(array('Cache-Control' => 'public')); + $bag = new ResponseHeaderBag(['Cache-Control' => 'public']); $this->assertEquals('public', $bag->get('Cache-Control')); $this->assertTrue($bag->hasCacheControlDirective('public')); - $bag = new ResponseHeaderBag(array('ETag' => 'abcde')); + $bag = new ResponseHeaderBag(['ETag' => 'abcde']); $this->assertEquals('private, must-revalidate', $bag->get('Cache-Control')); $this->assertTrue($bag->hasCacheControlDirective('private')); $this->assertTrue($bag->hasCacheControlDirective('must-revalidate')); $this->assertFalse($bag->hasCacheControlDirective('max-age')); - $bag = new ResponseHeaderBag(array('Expires' => 'Wed, 16 Feb 2011 14:17:43 GMT')); + $bag = new ResponseHeaderBag(['Expires' => 'Wed, 16 Feb 2011 14:17:43 GMT']); $this->assertEquals('private, must-revalidate', $bag->get('Cache-Control')); - $bag = new ResponseHeaderBag(array( + $bag = new ResponseHeaderBag([ 'Expires' => 'Wed, 16 Feb 2011 14:17:43 GMT', 'Cache-Control' => 'max-age=3600', - )); + ]); $this->assertEquals('max-age=3600, private', $bag->get('Cache-Control')); - $bag = new ResponseHeaderBag(array('Last-Modified' => 'abcde')); + $bag = new ResponseHeaderBag(['Last-Modified' => 'abcde']); $this->assertEquals('private, must-revalidate', $bag->get('Cache-Control')); - $bag = new ResponseHeaderBag(array('Etag' => 'abcde', 'Last-Modified' => 'abcde')); + $bag = new ResponseHeaderBag(['Etag' => 'abcde', 'Last-Modified' => 'abcde']); $this->assertEquals('private, must-revalidate', $bag->get('Cache-Control')); - $bag = new ResponseHeaderBag(array('cache-control' => 'max-age=100')); + $bag = new ResponseHeaderBag(['cache-control' => 'max-age=100']); $this->assertEquals('max-age=100, private', $bag->get('Cache-Control')); - $bag = new ResponseHeaderBag(array('cache-control' => 's-maxage=100')); + $bag = new ResponseHeaderBag(['cache-control' => 's-maxage=100']); $this->assertEquals('s-maxage=100', $bag->get('Cache-Control')); - $bag = new ResponseHeaderBag(array('cache-control' => 'private, max-age=100')); + $bag = new ResponseHeaderBag(['cache-control' => 'private, max-age=100']); $this->assertEquals('max-age=100, private', $bag->get('Cache-Control')); - $bag = new ResponseHeaderBag(array('cache-control' => 'public, max-age=100')); + $bag = new ResponseHeaderBag(['cache-control' => 'public, max-age=100']); $this->assertEquals('max-age=100, public', $bag->get('Cache-Control')); $bag = new ResponseHeaderBag(); @@ -88,7 +88,7 @@ class ResponseHeaderBagTest extends TestCase $this->assertEquals('private, must-revalidate', $bag->get('Cache-Control')); $bag = new ResponseHeaderBag(); - $bag->set('Cache-Control', array('public', 'must-revalidate')); + $bag->set('Cache-Control', ['public', 'must-revalidate']); $this->assertCount(1, $bag->get('Cache-Control', null, false)); $this->assertEquals('must-revalidate, public', $bag->get('Cache-Control')); @@ -101,7 +101,7 @@ class ResponseHeaderBagTest extends TestCase public function testCacheControlClone() { - $headers = array('foo' => 'bar'); + $headers = ['foo' => 'bar']; $bag1 = new ResponseHeaderBag($headers); $bag2 = new ResponseHeaderBag($bag1->allPreserveCase()); $this->assertEquals($bag1->allPreserveCase(), $bag2->allPreserveCase()); @@ -109,7 +109,7 @@ class ResponseHeaderBagTest extends TestCase public function testToStringIncludesCookieHeaders() { - $bag = new ResponseHeaderBag(array()); + $bag = new ResponseHeaderBag([]); $bag->setCookie(Cookie::create('foo', 'bar')); $this->assertSetCookieHeader('foo=bar; path=/; httponly; samesite=lax', $bag); @@ -121,7 +121,7 @@ class ResponseHeaderBagTest extends TestCase public function testClearCookieSecureNotHttpOnly() { - $bag = new ResponseHeaderBag(array()); + $bag = new ResponseHeaderBag([]); $bag->clearCookie('foo', '/', null, true, false); @@ -130,23 +130,23 @@ class ResponseHeaderBagTest extends TestCase public function testReplace() { - $bag = new ResponseHeaderBag(array()); + $bag = new ResponseHeaderBag([]); $this->assertEquals('no-cache, private', $bag->get('Cache-Control')); $this->assertTrue($bag->hasCacheControlDirective('no-cache')); - $bag->replace(array('Cache-Control' => 'public')); + $bag->replace(['Cache-Control' => 'public']); $this->assertEquals('public', $bag->get('Cache-Control')); $this->assertTrue($bag->hasCacheControlDirective('public')); } public function testReplaceWithRemove() { - $bag = new ResponseHeaderBag(array()); + $bag = new ResponseHeaderBag([]); $this->assertEquals('no-cache, private', $bag->get('Cache-Control')); $this->assertTrue($bag->hasCacheControlDirective('no-cache')); $bag->remove('Cache-Control'); - $bag->replace(array()); + $bag->replace([]); $this->assertEquals('no-cache, private', $bag->get('Cache-Control')); $this->assertTrue($bag->hasCacheControlDirective('no-cache')); } @@ -161,12 +161,12 @@ class ResponseHeaderBagTest extends TestCase $this->assertCount(4, $bag->getCookies()); $this->assertEquals('foo=bar; path=/path/foo; domain=foo.bar; httponly; samesite=lax', $bag->get('set-cookie')); - $this->assertEquals(array( + $this->assertEquals([ 'foo=bar; path=/path/foo; domain=foo.bar; httponly; samesite=lax', 'foo=bar; path=/path/bar; domain=foo.bar; httponly; samesite=lax', 'foo=bar; path=/path/bar; domain=bar.foo; httponly; samesite=lax', 'foo=bar; path=/; httponly; samesite=lax', - ), $bag->get('set-cookie', null, false)); + ], $bag->get('set-cookie', null, false)); $this->assertSetCookieHeader('foo=bar; path=/path/foo; domain=foo.bar; httponly; samesite=lax', $bag); $this->assertSetCookieHeader('foo=bar; path=/path/bar; domain=foo.bar; httponly; samesite=lax', $bag); @@ -228,16 +228,16 @@ class ResponseHeaderBagTest extends TestCase { $bag = new ResponseHeaderBag(); $bag->set('set-cookie', 'foo=bar'); - $this->assertEquals(array(Cookie::create('foo', 'bar', 0, '/', null, false, false, true, null)), $bag->getCookies()); + $this->assertEquals([Cookie::create('foo', 'bar', 0, '/', null, false, false, true, null)], $bag->getCookies()); $bag->set('set-cookie', 'foo2=bar2', false); - $this->assertEquals(array( + $this->assertEquals([ Cookie::create('foo', 'bar', 0, '/', null, false, false, true, null), Cookie::create('foo2', 'bar2', 0, '/', null, false, false, true, null), - ), $bag->getCookies()); + ], $bag->getCookies()); $bag->remove('set-cookie'); - $this->assertEquals(array(), $bag->getCookies()); + $this->assertEquals([], $bag->getCookies()); } /** @@ -260,8 +260,8 @@ class ResponseHeaderBagTest extends TestCase (string) $headers; $allHeaders = $headers->allPreserveCase(); - $this->assertEquals(array('http://www.symfony.com'), $allHeaders['Location']); - $this->assertEquals(array('text/html'), $allHeaders['Content-type']); + $this->assertEquals(['http://www.symfony.com'], $allHeaders['Location']); + $this->assertEquals(['text/html'], $allHeaders['Content-type']); } public function testDateHeaderAddedOnCreation() @@ -277,7 +277,7 @@ class ResponseHeaderBagTest extends TestCase public function testDateHeaderCanBeSetOnCreation() { $someDate = 'Thu, 23 Mar 2017 09:15:12 GMT'; - $bag = new ResponseHeaderBag(array('Date' => $someDate)); + $bag = new ResponseHeaderBag(['Date' => $someDate]); $this->assertEquals($someDate, $bag->get('Date')); } @@ -285,7 +285,7 @@ class ResponseHeaderBagTest extends TestCase public function testDateHeaderWillBeRecreatedWhenRemoved() { $someDate = 'Thu, 23 Mar 2017 09:15:12 GMT'; - $bag = new ResponseHeaderBag(array('Date' => $someDate)); + $bag = new ResponseHeaderBag(['Date' => $someDate]); $bag->remove('Date'); // a (new) Date header is still present @@ -296,7 +296,7 @@ class ResponseHeaderBagTest extends TestCase public function testDateHeaderWillBeRecreatedWhenHeadersAreReplaced() { $bag = new ResponseHeaderBag(); - $bag->replace(array()); + $bag->replace([]); $this->assertTrue($bag->has('Date')); } diff --git a/vendor/symfony/http-foundation/Tests/ResponseTest.php b/vendor/symfony/http-foundation/Tests/ResponseTest.php index 03dcc11a..7856a77c 100644 --- a/vendor/symfony/http-foundation/Tests/ResponseTest.php +++ b/vendor/symfony/http-foundation/Tests/ResponseTest.php @@ -22,7 +22,7 @@ class ResponseTest extends ResponseTestCase { public function testCreate() { - $response = Response::create('foo', 301, array('Foo' => 'bar')); + $response = Response::create('foo', 301, ['Foo' => 'bar']); $this->assertInstanceOf('Symfony\Component\HttpFoundation\Response', $response); $this->assertEquals(301, $response->getStatusCode()); @@ -254,10 +254,10 @@ class ResponseTest extends ResponseTestCase public function testIsValidateable() { - $response = new Response('', 200, array('Last-Modified' => $this->createDateTimeOneHourAgo()->format(DATE_RFC2822))); + $response = new Response('', 200, ['Last-Modified' => $this->createDateTimeOneHourAgo()->format(DATE_RFC2822)]); $this->assertTrue($response->isValidateable(), '->isValidateable() returns true if Last-Modified is present'); - $response = new Response('', 200, array('ETag' => '"12345"')); + $response = new Response('', 200, ['ETag' => '"12345"']); $this->assertTrue($response->isValidateable(), '->isValidateable() returns true if ETag is present'); $response = new Response(); @@ -267,7 +267,7 @@ class ResponseTest extends ResponseTestCase public function testGetDate() { $oneHourAgo = $this->createDateTimeOneHourAgo(); - $response = new Response('', 200, array('Date' => $oneHourAgo->format(DATE_RFC2822))); + $response = new Response('', 200, ['Date' => $oneHourAgo->format(DATE_RFC2822)]); $date = $response->getDate(); $this->assertEquals($oneHourAgo->getTimestamp(), $date->getTimestamp(), '->getDate() returns the Date header if present'); @@ -275,7 +275,7 @@ class ResponseTest extends ResponseTestCase $date = $response->getDate(); $this->assertEquals(time(), $date->getTimestamp(), '->getDate() returns the current Date if no Date header present'); - $response = new Response('', 200, array('Date' => $this->createDateTimeOneHourAgo()->format(DATE_RFC2822))); + $response = new Response('', 200, ['Date' => $this->createDateTimeOneHourAgo()->format(DATE_RFC2822)]); $now = $this->createDateTimeNow(); $response->headers->set('Date', $now->format(DATE_RFC2822)); $date = $response->getDate(); @@ -415,21 +415,21 @@ class ResponseTest extends ResponseTestCase public function testGetVary() { $response = new Response(); - $this->assertEquals(array(), $response->getVary(), '->getVary() returns an empty array if no Vary header is present'); + $this->assertEquals([], $response->getVary(), '->getVary() returns an empty array if no Vary header is present'); $response = new Response(); $response->headers->set('Vary', 'Accept-Language'); - $this->assertEquals(array('Accept-Language'), $response->getVary(), '->getVary() parses a single header name value'); + $this->assertEquals(['Accept-Language'], $response->getVary(), '->getVary() parses a single header name value'); $response = new Response(); $response->headers->set('Vary', 'Accept-Language User-Agent X-Foo'); - $this->assertEquals(array('Accept-Language', 'User-Agent', 'X-Foo'), $response->getVary(), '->getVary() parses multiple header name values separated by spaces'); + $this->assertEquals(['Accept-Language', 'User-Agent', 'X-Foo'], $response->getVary(), '->getVary() parses multiple header name values separated by spaces'); $response = new Response(); $response->headers->set('Vary', 'Accept-Language,User-Agent, X-Foo'); - $this->assertEquals(array('Accept-Language', 'User-Agent', 'X-Foo'), $response->getVary(), '->getVary() parses multiple header name values separated by commas'); + $this->assertEquals(['Accept-Language', 'User-Agent', 'X-Foo'], $response->getVary(), '->getVary() parses multiple header name values separated by commas'); - $vary = array('Accept-Language', 'User-Agent', 'X-foo'); + $vary = ['Accept-Language', 'User-Agent', 'X-foo']; $response = new Response(); $response->headers->set('Vary', $vary); @@ -444,18 +444,18 @@ class ResponseTest extends ResponseTestCase { $response = new Response(); $response->setVary('Accept-Language'); - $this->assertEquals(array('Accept-Language'), $response->getVary()); + $this->assertEquals(['Accept-Language'], $response->getVary()); $response->setVary('Accept-Language, User-Agent'); - $this->assertEquals(array('Accept-Language', 'User-Agent'), $response->getVary(), '->setVary() replace the vary header by default'); + $this->assertEquals(['Accept-Language', 'User-Agent'], $response->getVary(), '->setVary() replace the vary header by default'); $response->setVary('X-Foo', false); - $this->assertEquals(array('Accept-Language', 'User-Agent', 'X-Foo'), $response->getVary(), '->setVary() doesn\'t wipe out earlier Vary headers if replace is set to false'); + $this->assertEquals(['Accept-Language', 'User-Agent', 'X-Foo'], $response->getVary(), '->setVary() doesn\'t wipe out earlier Vary headers if replace is set to false'); } public function testDefaultContentType() { - $headerMock = $this->getMockBuilder('Symfony\Component\HttpFoundation\ResponseHeaderBag')->setMethods(array('set'))->getMock(); + $headerMock = $this->getMockBuilder('Symfony\Component\HttpFoundation\ResponseHeaderBag')->setMethods(['set'])->getMock(); $headerMock->expects($this->at(0)) ->method('set') ->with('Content-Type', 'text/html'); @@ -595,55 +595,55 @@ class ResponseTest extends ResponseTestCase public function testSetCache() { $response = new Response(); - //array('etag', 'last_modified', 'max_age', 's_maxage', 'private', 'public') + // ['etag', 'last_modified', 'max_age', 's_maxage', 'private', 'public'] try { - $response->setCache(array('wrong option' => 'value')); + $response->setCache(['wrong option' => 'value']); $this->fail('->setCache() throws an InvalidArgumentException if an option is not supported'); } catch (\Exception $e) { $this->assertInstanceOf('InvalidArgumentException', $e, '->setCache() throws an InvalidArgumentException if an option is not supported'); $this->assertContains('"wrong option"', $e->getMessage()); } - $options = array('etag' => '"whatever"'); + $options = ['etag' => '"whatever"']; $response->setCache($options); $this->assertEquals($response->getEtag(), '"whatever"'); $now = $this->createDateTimeNow(); - $options = array('last_modified' => $now); + $options = ['last_modified' => $now]; $response->setCache($options); $this->assertEquals($response->getLastModified()->getTimestamp(), $now->getTimestamp()); - $options = array('max_age' => 100); + $options = ['max_age' => 100]; $response->setCache($options); $this->assertEquals($response->getMaxAge(), 100); - $options = array('s_maxage' => 200); + $options = ['s_maxage' => 200]; $response->setCache($options); $this->assertEquals($response->getMaxAge(), 200); $this->assertTrue($response->headers->hasCacheControlDirective('public')); $this->assertFalse($response->headers->hasCacheControlDirective('private')); - $response->setCache(array('public' => true)); + $response->setCache(['public' => true]); $this->assertTrue($response->headers->hasCacheControlDirective('public')); $this->assertFalse($response->headers->hasCacheControlDirective('private')); - $response->setCache(array('public' => false)); + $response->setCache(['public' => false]); $this->assertFalse($response->headers->hasCacheControlDirective('public')); $this->assertTrue($response->headers->hasCacheControlDirective('private')); - $response->setCache(array('private' => true)); + $response->setCache(['private' => true]); $this->assertFalse($response->headers->hasCacheControlDirective('public')); $this->assertTrue($response->headers->hasCacheControlDirective('private')); - $response->setCache(array('private' => false)); + $response->setCache(['private' => false]); $this->assertTrue($response->headers->hasCacheControlDirective('public')); $this->assertFalse($response->headers->hasCacheControlDirective('private')); - $response->setCache(array('immutable' => true)); + $response->setCache(['immutable' => true]); $this->assertTrue($response->headers->hasCacheControlDirective('immutable')); - $response->setCache(array('immutable' => false)); + $response->setCache(['immutable' => false]); $this->assertFalse($response->headers->hasCacheControlDirective('immutable')); } @@ -780,14 +780,14 @@ class ResponseTest extends ResponseTestCase public function getStatusCodeFixtures() { - return array( - array('200', null, 'OK'), - array('200', false, ''), - array('200', 'foo', 'foo'), - array('199', null, 'unknown status'), - array('199', false, ''), - array('199', 'foo', 'foo'), - ); + return [ + ['200', null, 'OK'], + ['200', false, ''], + ['200', 'foo', 'foo'], + ['199', null, 'unknown status'], + ['199', false, ''], + ['199', 'foo', 'foo'], + ]; } public function testIsInformational() @@ -801,7 +801,7 @@ class ResponseTest extends ResponseTestCase public function testIsRedirectRedirection() { - foreach (array(301, 302, 303, 307) as $code) { + foreach ([301, 302, 303, 307] as $code) { $response = new Response('', $code); $this->assertTrue($response->isRedirection()); $this->assertTrue($response->isRedirect()); @@ -819,7 +819,7 @@ class ResponseTest extends ResponseTestCase $this->assertFalse($response->isRedirection()); $this->assertFalse($response->isRedirect()); - $response = new Response('', 301, array('Location' => '/good-uri')); + $response = new Response('', 301, ['Location' => '/good-uri']); $this->assertFalse($response->isRedirect('/bad-uri')); $this->assertTrue($response->isRedirect('/good-uri')); } @@ -835,7 +835,7 @@ class ResponseTest extends ResponseTestCase public function testIsEmpty() { - foreach (array(204, 304) as $code) { + foreach ([204, 304] as $code) { $response = new Response('', $code); $this->assertTrue($response->isEmpty()); } @@ -884,7 +884,7 @@ class ResponseTest extends ResponseTestCase public function testSetEtag() { - $response = new Response('', 200, array('ETag' => '"12345"')); + $response = new Response('', 200, ['ETag' => '"12345"']); $response->setEtag(); $this->assertNull($response->headers->get('Etag'), '->setEtag() removes Etags when call with null'); @@ -914,7 +914,7 @@ class ResponseTest extends ResponseTestCase { $response = new Response(); - $setters = array( + $setters = [ 'setProtocolVersion' => '1.0', 'setCharset' => 'UTF-8', 'setPublic' => null, @@ -925,7 +925,7 @@ class ResponseTest extends ResponseTestCase 'setSharedMaxAge' => 1, 'setTtl' => 1, 'setClientTtl' => 1, - ); + ]; foreach ($setters as $setter => $arg) { $this->assertEquals($response, $response->{$setter}($arg)); @@ -944,20 +944,20 @@ class ResponseTest extends ResponseTestCase public function validContentProvider() { - return array( - 'obj' => array(new StringableObject()), - 'string' => array('Foo'), - 'int' => array(2), - ); + return [ + 'obj' => [new StringableObject()], + 'string' => ['Foo'], + 'int' => [2], + ]; } public function invalidContentProvider() { - return array( - 'obj' => array(new \stdClass()), - 'array' => array(array()), - 'bool' => array(true, '1'), - ); + return [ + 'obj' => [new \stdClass()], + 'array' => [[]], + 'bool' => [true, '1'], + ]; } protected function createDateTimeOneHourAgo() @@ -1004,19 +1004,20 @@ class ResponseTest extends ResponseTestCase $ianaHttpStatusCodes = new \DOMDocument(); - libxml_set_streams_context(stream_context_create(array( - 'http' => array( + $context = stream_context_create([ + 'http' => [ 'method' => 'GET', 'timeout' => 30, - ), - ))); + 'user_agent' => __METHOD__, + ], + ]); - $ianaHttpStatusCodes->load('https://www.iana.org/assignments/http-status-codes/http-status-codes.xml'); + $ianaHttpStatusCodes->loadXML(file_get_contents('https://www.iana.org/assignments/http-status-codes/http-status-codes.xml', false, $context)); if (!$ianaHttpStatusCodes->relaxNGValidate(__DIR__.'/schema/http-status-codes.rng')) { self::fail('Invalid IANA\'s HTTP status code list.'); } - $ianaCodesReasonPhrases = array(); + $ianaCodesReasonPhrases = []; $xpath = new \DOMXPath($ianaHttpStatusCodes); $xpath->registerNamespace('ns', 'http://www.iana.org/assignments'); @@ -1026,16 +1027,16 @@ class ResponseTest extends ResponseTestCase $value = $xpath->query('.//ns:value', $record)->item(0)->nodeValue; $description = $xpath->query('.//ns:description', $record)->item(0)->nodeValue; - if (\in_array($description, array('Unassigned', '(Unused)'), true)) { + if (\in_array($description, ['Unassigned', '(Unused)'], true)) { continue; } if (preg_match('/^([0-9]+)\s*\-\s*([0-9]+)$/', $value, $matches)) { for ($value = $matches[1]; $value <= $matches[2]; ++$value) { - $ianaCodesReasonPhrases[] = array($value, $description); + $ianaCodesReasonPhrases[] = [$value, $description]; } } else { - $ianaCodesReasonPhrases[] = array($value, $description); + $ianaCodesReasonPhrases[] = [$value, $description]; } } diff --git a/vendor/symfony/http-foundation/Tests/ServerBagTest.php b/vendor/symfony/http-foundation/Tests/ServerBagTest.php index f8becec5..0663b118 100644 --- a/vendor/symfony/http-foundation/Tests/ServerBagTest.php +++ b/vendor/symfony/http-foundation/Tests/ServerBagTest.php @@ -23,7 +23,7 @@ class ServerBagTest extends TestCase { public function testShouldExtractHeadersFromServerArray() { - $server = array( + $server = [ 'SOME_SERVER_VARIABLE' => 'value', 'SOME_SERVER_VARIABLE2' => 'value', 'ROOT' => 'value', @@ -32,45 +32,45 @@ class ServerBagTest extends TestCase 'HTTP_ETAG' => 'asdf', 'PHP_AUTH_USER' => 'foo', 'PHP_AUTH_PW' => 'bar', - ); + ]; $bag = new ServerBag($server); - $this->assertEquals(array( + $this->assertEquals([ 'CONTENT_TYPE' => 'text/html', 'CONTENT_LENGTH' => '0', 'ETAG' => 'asdf', 'AUTHORIZATION' => 'Basic '.base64_encode('foo:bar'), 'PHP_AUTH_USER' => 'foo', 'PHP_AUTH_PW' => 'bar', - ), $bag->getHeaders()); + ], $bag->getHeaders()); } public function testHttpPasswordIsOptional() { - $bag = new ServerBag(array('PHP_AUTH_USER' => 'foo')); + $bag = new ServerBag(['PHP_AUTH_USER' => 'foo']); - $this->assertEquals(array( + $this->assertEquals([ 'AUTHORIZATION' => 'Basic '.base64_encode('foo:'), 'PHP_AUTH_USER' => 'foo', 'PHP_AUTH_PW' => '', - ), $bag->getHeaders()); + ], $bag->getHeaders()); } public function testHttpBasicAuthWithPhpCgi() { - $bag = new ServerBag(array('HTTP_AUTHORIZATION' => 'Basic '.base64_encode('foo:bar'))); + $bag = new ServerBag(['HTTP_AUTHORIZATION' => 'Basic '.base64_encode('foo:bar')]); - $this->assertEquals(array( + $this->assertEquals([ 'AUTHORIZATION' => 'Basic '.base64_encode('foo:bar'), 'PHP_AUTH_USER' => 'foo', 'PHP_AUTH_PW' => 'bar', - ), $bag->getHeaders()); + ], $bag->getHeaders()); } public function testHttpBasicAuthWithPhpCgiBogus() { - $bag = new ServerBag(array('HTTP_AUTHORIZATION' => 'Basic_'.base64_encode('foo:bar'))); + $bag = new ServerBag(['HTTP_AUTHORIZATION' => 'Basic_'.base64_encode('foo:bar')]); // Username and passwords should not be set as the header is bogus $headers = $bag->getHeaders(); @@ -80,41 +80,41 @@ class ServerBagTest extends TestCase public function testHttpBasicAuthWithPhpCgiRedirect() { - $bag = new ServerBag(array('REDIRECT_HTTP_AUTHORIZATION' => 'Basic '.base64_encode('username:pass:word'))); + $bag = new ServerBag(['REDIRECT_HTTP_AUTHORIZATION' => 'Basic '.base64_encode('username:pass:word')]); - $this->assertEquals(array( + $this->assertEquals([ 'AUTHORIZATION' => 'Basic '.base64_encode('username:pass:word'), 'PHP_AUTH_USER' => 'username', 'PHP_AUTH_PW' => 'pass:word', - ), $bag->getHeaders()); + ], $bag->getHeaders()); } public function testHttpBasicAuthWithPhpCgiEmptyPassword() { - $bag = new ServerBag(array('HTTP_AUTHORIZATION' => 'Basic '.base64_encode('foo:'))); + $bag = new ServerBag(['HTTP_AUTHORIZATION' => 'Basic '.base64_encode('foo:')]); - $this->assertEquals(array( + $this->assertEquals([ 'AUTHORIZATION' => 'Basic '.base64_encode('foo:'), 'PHP_AUTH_USER' => 'foo', 'PHP_AUTH_PW' => '', - ), $bag->getHeaders()); + ], $bag->getHeaders()); } public function testHttpDigestAuthWithPhpCgi() { $digest = 'Digest username="foo", realm="acme", nonce="'.md5('secret').'", uri="/protected, qop="auth"'; - $bag = new ServerBag(array('HTTP_AUTHORIZATION' => $digest)); + $bag = new ServerBag(['HTTP_AUTHORIZATION' => $digest]); - $this->assertEquals(array( + $this->assertEquals([ 'AUTHORIZATION' => $digest, 'PHP_AUTH_DIGEST' => $digest, - ), $bag->getHeaders()); + ], $bag->getHeaders()); } public function testHttpDigestAuthWithPhpCgiBogus() { $digest = 'Digest_username="foo", realm="acme", nonce="'.md5('secret').'", uri="/protected, qop="auth"'; - $bag = new ServerBag(array('HTTP_AUTHORIZATION' => $digest)); + $bag = new ServerBag(['HTTP_AUTHORIZATION' => $digest]); // Username and passwords should not be set as the header is bogus $headers = $bag->getHeaders(); @@ -125,32 +125,32 @@ class ServerBagTest extends TestCase public function testHttpDigestAuthWithPhpCgiRedirect() { $digest = 'Digest username="foo", realm="acme", nonce="'.md5('secret').'", uri="/protected, qop="auth"'; - $bag = new ServerBag(array('REDIRECT_HTTP_AUTHORIZATION' => $digest)); + $bag = new ServerBag(['REDIRECT_HTTP_AUTHORIZATION' => $digest]); - $this->assertEquals(array( + $this->assertEquals([ 'AUTHORIZATION' => $digest, 'PHP_AUTH_DIGEST' => $digest, - ), $bag->getHeaders()); + ], $bag->getHeaders()); } public function testOAuthBearerAuth() { $headerContent = 'Bearer L-yLEOr9zhmUYRkzN1jwwxwQ-PBNiKDc8dgfB4hTfvo'; - $bag = new ServerBag(array('HTTP_AUTHORIZATION' => $headerContent)); + $bag = new ServerBag(['HTTP_AUTHORIZATION' => $headerContent]); - $this->assertEquals(array( + $this->assertEquals([ 'AUTHORIZATION' => $headerContent, - ), $bag->getHeaders()); + ], $bag->getHeaders()); } public function testOAuthBearerAuthWithRedirect() { $headerContent = 'Bearer L-yLEOr9zhmUYRkzN1jwwxwQ-PBNiKDc8dgfB4hTfvo'; - $bag = new ServerBag(array('REDIRECT_HTTP_AUTHORIZATION' => $headerContent)); + $bag = new ServerBag(['REDIRECT_HTTP_AUTHORIZATION' => $headerContent]); - $this->assertEquals(array( + $this->assertEquals([ 'AUTHORIZATION' => $headerContent, - ), $bag->getHeaders()); + ], $bag->getHeaders()); } /** @@ -159,12 +159,12 @@ class ServerBagTest extends TestCase public function testItDoesNotOverwriteTheAuthorizationHeaderIfItIsAlreadySet() { $headerContent = 'Bearer L-yLEOr9zhmUYRkzN1jwwxwQ-PBNiKDc8dgfB4hTfvo'; - $bag = new ServerBag(array('PHP_AUTH_USER' => 'foo', 'HTTP_AUTHORIZATION' => $headerContent)); + $bag = new ServerBag(['PHP_AUTH_USER' => 'foo', 'HTTP_AUTHORIZATION' => $headerContent]); - $this->assertEquals(array( + $this->assertEquals([ 'AUTHORIZATION' => $headerContent, 'PHP_AUTH_USER' => 'foo', 'PHP_AUTH_PW' => '', - ), $bag->getHeaders()); + ], $bag->getHeaders()); } } diff --git a/vendor/symfony/http-foundation/Tests/Session/Attribute/AttributeBagTest.php b/vendor/symfony/http-foundation/Tests/Session/Attribute/AttributeBagTest.php index 8c41e475..44c8174e 100644 --- a/vendor/symfony/http-foundation/Tests/Session/Attribute/AttributeBagTest.php +++ b/vendor/symfony/http-foundation/Tests/Session/Attribute/AttributeBagTest.php @@ -21,7 +21,7 @@ use Symfony\Component\HttpFoundation\Session\Attribute\AttributeBag; */ class AttributeBagTest extends TestCase { - private $array = array(); + private $array = []; /** * @var AttributeBag @@ -30,21 +30,21 @@ class AttributeBagTest extends TestCase protected function setUp() { - $this->array = array( + $this->array = [ 'hello' => 'world', 'always' => 'be happy', 'user.login' => 'drak', - 'csrf.token' => array( + 'csrf.token' => [ 'a' => '1234', 'b' => '4321', - ), - 'category' => array( - 'fishing' => array( + ], + 'category' => [ + 'fishing' => [ 'first' => 'cod', 'second' => 'sole', - ), - ), - ); + ], + ], + ]; $this->bag = new AttributeBag('_sf'); $this->bag->initialize($this->array); } @@ -52,7 +52,7 @@ class AttributeBagTest extends TestCase protected function tearDown() { $this->bag = null; - $this->array = array(); + $this->array = []; } public function testInitialize() @@ -60,7 +60,7 @@ class AttributeBagTest extends TestCase $bag = new AttributeBag(); $bag->initialize($this->array); $this->assertEquals($this->array, $bag->all()); - $array = array('should' => 'change'); + $array = ['should' => 'change']; $bag->initialize($array); $this->assertEquals($array, $bag->all()); } @@ -122,7 +122,7 @@ class AttributeBagTest extends TestCase public function testReplace() { - $array = array(); + $array = []; $array['name'] = 'jack'; $array['foo.bar'] = 'beep'; $this->bag->replace($array); @@ -150,22 +150,22 @@ class AttributeBagTest extends TestCase public function testClear() { $this->bag->clear(); - $this->assertEquals(array(), $this->bag->all()); + $this->assertEquals([], $this->bag->all()); } public function attributesProvider() { - return array( - array('hello', 'world', true), - array('always', 'be happy', true), - array('user.login', 'drak', true), - array('csrf.token', array('a' => '1234', 'b' => '4321'), true), - array('category', array('fishing' => array('first' => 'cod', 'second' => 'sole')), true), - array('user2.login', null, false), - array('never', null, false), - array('bye', null, false), - array('bye/for/now', null, false), - ); + return [ + ['hello', 'world', true], + ['always', 'be happy', true], + ['user.login', 'drak', true], + ['csrf.token', ['a' => '1234', 'b' => '4321'], true], + ['category', ['fishing' => ['first' => 'cod', 'second' => 'sole']], true], + ['user2.login', null, false], + ['never', null, false], + ['bye', null, false], + ['bye/for/now', null, false], + ]; } public function testGetIterator() diff --git a/vendor/symfony/http-foundation/Tests/Session/Attribute/NamespacedAttributeBagTest.php b/vendor/symfony/http-foundation/Tests/Session/Attribute/NamespacedAttributeBagTest.php index ec4cd5ad..6b4bb17d 100644 --- a/vendor/symfony/http-foundation/Tests/Session/Attribute/NamespacedAttributeBagTest.php +++ b/vendor/symfony/http-foundation/Tests/Session/Attribute/NamespacedAttributeBagTest.php @@ -21,7 +21,7 @@ use Symfony\Component\HttpFoundation\Session\Attribute\NamespacedAttributeBag; */ class NamespacedAttributeBagTest extends TestCase { - private $array = array(); + private $array = []; /** * @var NamespacedAttributeBag @@ -30,21 +30,21 @@ class NamespacedAttributeBagTest extends TestCase protected function setUp() { - $this->array = array( + $this->array = [ 'hello' => 'world', 'always' => 'be happy', 'user.login' => 'drak', - 'csrf.token' => array( + 'csrf.token' => [ 'a' => '1234', 'b' => '4321', - ), - 'category' => array( - 'fishing' => array( + ], + 'category' => [ + 'fishing' => [ 'first' => 'cod', 'second' => 'sole', - ), - ), - ); + ], + ], + ]; $this->bag = new NamespacedAttributeBag('_sf2', '/'); $this->bag->initialize($this->array); } @@ -52,7 +52,7 @@ class NamespacedAttributeBagTest extends TestCase protected function tearDown() { $this->bag = null; - $this->array = array(); + $this->array = []; } public function testInitialize() @@ -60,7 +60,7 @@ class NamespacedAttributeBagTest extends TestCase $bag = new NamespacedAttributeBag(); $bag->initialize($this->array); $this->assertEquals($this->array, $this->bag->all()); - $array = array('should' => 'not stick'); + $array = ['should' => 'not stick']; $bag->initialize($array); // should have remained the same @@ -139,7 +139,7 @@ class NamespacedAttributeBagTest extends TestCase public function testReplace() { - $array = array(); + $array = []; $array['name'] = 'jack'; $array['foo.bar'] = 'beep'; $this->bag->replace($array); @@ -177,28 +177,28 @@ class NamespacedAttributeBagTest extends TestCase public function testClear() { $this->bag->clear(); - $this->assertEquals(array(), $this->bag->all()); + $this->assertEquals([], $this->bag->all()); } public function attributesProvider() { - return array( - array('hello', 'world', true), - array('always', 'be happy', true), - array('user.login', 'drak', true), - array('csrf.token', array('a' => '1234', 'b' => '4321'), true), - array('csrf.token/a', '1234', true), - array('csrf.token/b', '4321', true), - array('category', array('fishing' => array('first' => 'cod', 'second' => 'sole')), true), - array('category/fishing', array('first' => 'cod', 'second' => 'sole'), true), - array('category/fishing/missing/first', null, false), - array('category/fishing/first', 'cod', true), - array('category/fishing/second', 'sole', true), - array('category/fishing/missing/second', null, false), - array('user2.login', null, false), - array('never', null, false), - array('bye', null, false), - array('bye/for/now', null, false), - ); + return [ + ['hello', 'world', true], + ['always', 'be happy', true], + ['user.login', 'drak', true], + ['csrf.token', ['a' => '1234', 'b' => '4321'], true], + ['csrf.token/a', '1234', true], + ['csrf.token/b', '4321', true], + ['category', ['fishing' => ['first' => 'cod', 'second' => 'sole']], true], + ['category/fishing', ['first' => 'cod', 'second' => 'sole'], true], + ['category/fishing/missing/first', null, false], + ['category/fishing/first', 'cod', true], + ['category/fishing/second', 'sole', true], + ['category/fishing/missing/second', null, false], + ['user2.login', null, false], + ['never', null, false], + ['bye', null, false], + ['bye/for/now', null, false], + ]; } } diff --git a/vendor/symfony/http-foundation/Tests/Session/Flash/AutoExpireFlashBagTest.php b/vendor/symfony/http-foundation/Tests/Session/Flash/AutoExpireFlashBagTest.php index fa8626ab..b4e2c3a5 100644 --- a/vendor/symfony/http-foundation/Tests/Session/Flash/AutoExpireFlashBagTest.php +++ b/vendor/symfony/http-foundation/Tests/Session/Flash/AutoExpireFlashBagTest.php @@ -26,13 +26,13 @@ class AutoExpireFlashBagTest extends TestCase */ private $bag; - protected $array = array(); + protected $array = []; protected function setUp() { parent::setUp(); $this->bag = new FlashBag(); - $this->array = array('new' => array('notice' => array('A previous flash message'))); + $this->array = ['new' => ['notice' => ['A previous flash message']]]; $this->bag->initialize($this->array); } @@ -45,16 +45,16 @@ class AutoExpireFlashBagTest extends TestCase public function testInitialize() { $bag = new FlashBag(); - $array = array('new' => array('notice' => array('A previous flash message'))); + $array = ['new' => ['notice' => ['A previous flash message']]]; $bag->initialize($array); - $this->assertEquals(array('A previous flash message'), $bag->peek('notice')); - $array = array('new' => array( - 'notice' => array('Something else'), - 'error' => array('a'), - )); + $this->assertEquals(['A previous flash message'], $bag->peek('notice')); + $array = ['new' => [ + 'notice' => ['Something else'], + 'error' => ['a'], + ]]; $bag->initialize($array); - $this->assertEquals(array('Something else'), $bag->peek('notice')); - $this->assertEquals(array('a'), $bag->peek('error')); + $this->assertEquals(['Something else'], $bag->peek('notice')); + $this->assertEquals(['a'], $bag->peek('error')); } public function testGetStorageKey() @@ -73,16 +73,16 @@ class AutoExpireFlashBagTest extends TestCase public function testPeek() { - $this->assertEquals(array(), $this->bag->peek('non_existing')); - $this->assertEquals(array('default'), $this->bag->peek('non_existing', array('default'))); - $this->assertEquals(array('A previous flash message'), $this->bag->peek('notice')); - $this->assertEquals(array('A previous flash message'), $this->bag->peek('notice')); + $this->assertEquals([], $this->bag->peek('non_existing')); + $this->assertEquals(['default'], $this->bag->peek('non_existing', ['default'])); + $this->assertEquals(['A previous flash message'], $this->bag->peek('notice')); + $this->assertEquals(['A previous flash message'], $this->bag->peek('notice')); } public function testSet() { $this->bag->set('notice', 'Foo'); - $this->assertEquals(array('A previous flash message'), $this->bag->peek('notice')); + $this->assertEquals(['A previous flash message'], $this->bag->peek('notice')); } public function testHas() @@ -93,43 +93,43 @@ class AutoExpireFlashBagTest extends TestCase public function testKeys() { - $this->assertEquals(array('notice'), $this->bag->keys()); + $this->assertEquals(['notice'], $this->bag->keys()); } public function testPeekAll() { - $array = array( - 'new' => array( + $array = [ + 'new' => [ 'notice' => 'Foo', 'error' => 'Bar', - ), - ); + ], + ]; $this->bag->initialize($array); - $this->assertEquals(array( + $this->assertEquals([ 'notice' => 'Foo', 'error' => 'Bar', - ), $this->bag->peekAll() + ], $this->bag->peekAll() ); - $this->assertEquals(array( + $this->assertEquals([ 'notice' => 'Foo', 'error' => 'Bar', - ), $this->bag->peekAll() + ], $this->bag->peekAll() ); } public function testGet() { - $this->assertEquals(array(), $this->bag->get('non_existing')); - $this->assertEquals(array('default'), $this->bag->get('non_existing', array('default'))); - $this->assertEquals(array('A previous flash message'), $this->bag->get('notice')); - $this->assertEquals(array(), $this->bag->get('notice')); + $this->assertEquals([], $this->bag->get('non_existing')); + $this->assertEquals(['default'], $this->bag->get('non_existing', ['default'])); + $this->assertEquals(['A previous flash message'], $this->bag->get('notice')); + $this->assertEquals([], $this->bag->get('notice')); } public function testSetAll() { - $this->bag->setAll(array('a' => 'first', 'b' => 'second')); + $this->bag->setAll(['a' => 'first', 'b' => 'second']); $this->assertFalse($this->bag->has('a')); $this->assertFalse($this->bag->has('b')); } @@ -138,17 +138,17 @@ class AutoExpireFlashBagTest extends TestCase { $this->bag->set('notice', 'Foo'); $this->bag->set('error', 'Bar'); - $this->assertEquals(array( - 'notice' => array('A previous flash message'), - ), $this->bag->all() + $this->assertEquals([ + 'notice' => ['A previous flash message'], + ], $this->bag->all() ); - $this->assertEquals(array(), $this->bag->all()); + $this->assertEquals([], $this->bag->all()); } public function testClear() { - $this->assertEquals(array('notice' => array('A previous flash message')), $this->bag->clear()); + $this->assertEquals(['notice' => ['A previous flash message']], $this->bag->clear()); } public function testDoNotRemoveTheNewFlashesWhenDisplayingTheExistingOnes() @@ -156,6 +156,6 @@ class AutoExpireFlashBagTest extends TestCase $this->bag->add('success', 'Something'); $this->bag->all(); - $this->assertEquals(array('new' => array('success' => array('Something')), 'display' => array()), $this->array); + $this->assertEquals(['new' => ['success' => ['Something']], 'display' => []], $this->array); } } diff --git a/vendor/symfony/http-foundation/Tests/Session/Flash/FlashBagTest.php b/vendor/symfony/http-foundation/Tests/Session/Flash/FlashBagTest.php index 905a1f75..6d8619e0 100644 --- a/vendor/symfony/http-foundation/Tests/Session/Flash/FlashBagTest.php +++ b/vendor/symfony/http-foundation/Tests/Session/Flash/FlashBagTest.php @@ -26,13 +26,13 @@ class FlashBagTest extends TestCase */ private $bag; - protected $array = array(); + protected $array = []; protected function setUp() { parent::setUp(); $this->bag = new FlashBag(); - $this->array = array('notice' => array('A previous flash message')); + $this->array = ['notice' => ['A previous flash message']]; $this->bag->initialize($this->array); } @@ -47,7 +47,7 @@ class FlashBagTest extends TestCase $bag = new FlashBag(); $bag->initialize($this->array); $this->assertEquals($this->array, $bag->peekAll()); - $array = array('should' => array('change')); + $array = ['should' => ['change']]; $bag->initialize($array); $this->assertEquals($array, $bag->peekAll()); } @@ -68,49 +68,49 @@ class FlashBagTest extends TestCase public function testPeek() { - $this->assertEquals(array(), $this->bag->peek('non_existing')); - $this->assertEquals(array('default'), $this->bag->peek('not_existing', array('default'))); - $this->assertEquals(array('A previous flash message'), $this->bag->peek('notice')); - $this->assertEquals(array('A previous flash message'), $this->bag->peek('notice')); + $this->assertEquals([], $this->bag->peek('non_existing')); + $this->assertEquals(['default'], $this->bag->peek('not_existing', ['default'])); + $this->assertEquals(['A previous flash message'], $this->bag->peek('notice')); + $this->assertEquals(['A previous flash message'], $this->bag->peek('notice')); } public function testAdd() { - $tab = array('bar' => 'baz'); + $tab = ['bar' => 'baz']; $this->bag->add('string_message', 'lorem'); $this->bag->add('object_message', new \stdClass()); $this->bag->add('array_message', $tab); - $this->assertEquals(array('lorem'), $this->bag->get('string_message')); - $this->assertEquals(array(new \stdClass()), $this->bag->get('object_message')); - $this->assertEquals(array($tab), $this->bag->get('array_message')); + $this->assertEquals(['lorem'], $this->bag->get('string_message')); + $this->assertEquals([new \stdClass()], $this->bag->get('object_message')); + $this->assertEquals([$tab], $this->bag->get('array_message')); } public function testGet() { - $this->assertEquals(array(), $this->bag->get('non_existing')); - $this->assertEquals(array('default'), $this->bag->get('not_existing', array('default'))); - $this->assertEquals(array('A previous flash message'), $this->bag->get('notice')); - $this->assertEquals(array(), $this->bag->get('notice')); + $this->assertEquals([], $this->bag->get('non_existing')); + $this->assertEquals(['default'], $this->bag->get('not_existing', ['default'])); + $this->assertEquals(['A previous flash message'], $this->bag->get('notice')); + $this->assertEquals([], $this->bag->get('notice')); } public function testAll() { $this->bag->set('notice', 'Foo'); $this->bag->set('error', 'Bar'); - $this->assertEquals(array( - 'notice' => array('Foo'), - 'error' => array('Bar'), ), $this->bag->all() + $this->assertEquals([ + 'notice' => ['Foo'], + 'error' => ['Bar'], ], $this->bag->all() ); - $this->assertEquals(array(), $this->bag->all()); + $this->assertEquals([], $this->bag->all()); } public function testSet() { $this->bag->set('notice', 'Foo'); $this->bag->set('notice', 'Bar'); - $this->assertEquals(array('Bar'), $this->bag->peek('notice')); + $this->assertEquals(['Bar'], $this->bag->peek('notice')); } public function testHas() @@ -121,7 +121,7 @@ class FlashBagTest extends TestCase public function testKeys() { - $this->assertEquals(array('notice'), $this->bag->keys()); + $this->assertEquals(['notice'], $this->bag->keys()); } public function testSetAll() @@ -130,28 +130,28 @@ class FlashBagTest extends TestCase $this->bag->add('another_flash', 'Bar'); $this->assertTrue($this->bag->has('one_flash')); $this->assertTrue($this->bag->has('another_flash')); - $this->bag->setAll(array('unique_flash' => 'FooBar')); + $this->bag->setAll(['unique_flash' => 'FooBar']); $this->assertFalse($this->bag->has('one_flash')); $this->assertFalse($this->bag->has('another_flash')); - $this->assertSame(array('unique_flash' => 'FooBar'), $this->bag->all()); - $this->assertSame(array(), $this->bag->all()); + $this->assertSame(['unique_flash' => 'FooBar'], $this->bag->all()); + $this->assertSame([], $this->bag->all()); } public function testPeekAll() { $this->bag->set('notice', 'Foo'); $this->bag->set('error', 'Bar'); - $this->assertEquals(array( - 'notice' => array('Foo'), - 'error' => array('Bar'), - ), $this->bag->peekAll() + $this->assertEquals([ + 'notice' => ['Foo'], + 'error' => ['Bar'], + ], $this->bag->peekAll() ); $this->assertTrue($this->bag->has('notice')); $this->assertTrue($this->bag->has('error')); - $this->assertEquals(array( - 'notice' => array('Foo'), - 'error' => array('Bar'), - ), $this->bag->peekAll() + $this->assertEquals([ + 'notice' => ['Foo'], + 'error' => ['Bar'], + ], $this->bag->peekAll() ); } } diff --git a/vendor/symfony/http-foundation/Tests/Session/SessionTest.php b/vendor/symfony/http-foundation/Tests/Session/SessionTest.php index 63351e57..afa00fc7 100644 --- a/vendor/symfony/http-foundation/Tests/Session/SessionTest.php +++ b/vendor/symfony/http-foundation/Tests/Session/SessionTest.php @@ -127,10 +127,10 @@ class SessionTest extends TestCase public function testReplace() { - $this->session->replace(array('happiness' => 'be good', 'symfony' => 'awesome')); - $this->assertEquals(array('happiness' => 'be good', 'symfony' => 'awesome'), $this->session->all()); - $this->session->replace(array()); - $this->assertEquals(array(), $this->session->all()); + $this->session->replace(['happiness' => 'be good', 'symfony' => 'awesome']); + $this->assertEquals(['happiness' => 'be good', 'symfony' => 'awesome'], $this->session->all()); + $this->session->replace([]); + $this->assertEquals([], $this->session->all()); } /** @@ -150,16 +150,16 @@ class SessionTest extends TestCase $this->session->set('hi', 'fabien'); $this->session->set($key, $value); $this->session->clear(); - $this->assertEquals(array(), $this->session->all()); + $this->assertEquals([], $this->session->all()); } public function setProvider() { - return array( - array('foo', 'bar', array('foo' => 'bar')), - array('foo.bar', 'too much beer', array('foo.bar' => 'too much beer')), - array('great', 'symfony is great', array('great' => 'symfony is great')), - ); + return [ + ['foo', 'bar', ['foo' => 'bar']], + ['foo.bar', 'too much beer', ['foo.bar' => 'too much beer']], + ['great', 'symfony is great', ['great' => 'symfony is great']], + ]; } /** @@ -170,14 +170,14 @@ class SessionTest extends TestCase $this->session->set('hi.world', 'have a nice day'); $this->session->set($key, $value); $this->session->remove($key); - $this->assertEquals(array('hi.world' => 'have a nice day'), $this->session->all()); + $this->assertEquals(['hi.world' => 'have a nice day'], $this->session->all()); } public function testInvalidate() { $this->session->set('invalidate', 123); $this->session->invalidate(); - $this->assertEquals(array(), $this->session->all()); + $this->assertEquals([], $this->session->all()); } public function testMigrate() @@ -216,7 +216,7 @@ class SessionTest extends TestCase public function testGetIterator() { - $attributes = array('hello' => 'world', 'symfony' => 'rocks'); + $attributes = ['hello' => 'world', 'symfony' => 'rocks']; foreach ($attributes as $key => $val) { $this->session->set($key, $val); } diff --git a/vendor/symfony/http-foundation/Tests/Session/Storage/Handler/AbstractRedisSessionHandlerTestCase.php b/vendor/symfony/http-foundation/Tests/Session/Storage/Handler/AbstractRedisSessionHandlerTestCase.php index a2bf168d..c0651498 100644 --- a/vendor/symfony/http-foundation/Tests/Session/Storage/Handler/AbstractRedisSessionHandlerTestCase.php +++ b/vendor/symfony/http-foundation/Tests/Session/Storage/Handler/AbstractRedisSessionHandlerTestCase.php @@ -50,7 +50,7 @@ abstract class AbstractRedisSessionHandlerTestCase extends TestCase $this->redisClient = $this->createRedisClient($host); $this->storage = new RedisSessionHandler( $this->redisClient, - array('prefix' => self::PREFIX) + ['prefix' => self::PREFIX] ); } @@ -117,7 +117,7 @@ abstract class AbstractRedisSessionHandlerTestCase extends TestCase $lowTtl = 10; $this->redisClient->setex(self::PREFIX.'id', $lowTtl, 'foo'); - $this->storage->updateTimestamp('id', array()); + $this->storage->updateTimestamp('id', []); $this->assertGreaterThan($lowTtl, $this->redisClient->ttl(self::PREFIX.'id')); } @@ -137,9 +137,9 @@ abstract class AbstractRedisSessionHandlerTestCase extends TestCase public function getOptionFixtures(): array { - return array( - array(array('prefix' => 'session'), true), - array(array('prefix' => 'sfs', 'foo' => 'bar'), false), - ); + return [ + [['prefix' => 'session'], true], + [['prefix' => 'sfs', 'foo' => 'bar'], false], + ]; } } diff --git a/vendor/symfony/http-foundation/Tests/Session/Storage/Handler/AbstractSessionHandlerTest.php b/vendor/symfony/http-foundation/Tests/Session/Storage/Handler/AbstractSessionHandlerTest.php index 6566d6ee..f65e62b5 100644 --- a/vendor/symfony/http-foundation/Tests/Session/Storage/Handler/AbstractSessionHandlerTest.php +++ b/vendor/symfony/http-foundation/Tests/Session/Storage/Handler/AbstractSessionHandlerTest.php @@ -19,10 +19,10 @@ class AbstractSessionHandlerTest extends TestCase public static function setUpBeforeClass() { - $spec = array( - 1 => array('file', '/dev/null', 'w'), - 2 => array('file', '/dev/null', 'w'), - ); + $spec = [ + 1 => ['file', '/dev/null', 'w'], + 2 => ['file', '/dev/null', 'w'], + ]; if (!self::$server = @proc_open('exec php -S localhost:8053', $spec, $pipes, __DIR__.'/Fixtures')) { self::markTestSkipped('PHP server unable to start.'); } @@ -42,7 +42,7 @@ class AbstractSessionHandlerTest extends TestCase */ public function testSession($fixture) { - $context = array('http' => array('header' => "Cookie: sid=123abc\r\n")); + $context = ['http' => ['header' => "Cookie: sid=123abc\r\n"]]; $context = stream_context_create($context); $result = file_get_contents(sprintf('http://localhost:8053/%s.php', $fixture), false, $context); @@ -52,7 +52,7 @@ class AbstractSessionHandlerTest extends TestCase public function provideSession() { foreach (glob(__DIR__.'/Fixtures/*.php') as $file) { - yield array(pathinfo($file, PATHINFO_FILENAME)); + yield [pathinfo($file, PATHINFO_FILENAME)]; } } } diff --git a/vendor/symfony/http-foundation/Tests/Session/Storage/Handler/Fixtures/with_samesite.php b/vendor/symfony/http-foundation/Tests/Session/Storage/Handler/Fixtures/with_samesite.php index 2d32792a..fc2c4182 100644 --- a/vendor/symfony/http-foundation/Tests/Session/Storage/Handler/Fixtures/with_samesite.php +++ b/vendor/symfony/http-foundation/Tests/Session/Storage/Handler/Fixtures/with_samesite.php @@ -4,10 +4,10 @@ require __DIR__.'/common.inc'; use Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage; -$storage = new NativeSessionStorage(array('cookie_samesite' => 'lax')); +$storage = new NativeSessionStorage(['cookie_samesite' => 'lax']); $storage->setSaveHandler(new TestSessionHandler()); $storage->start(); -$_SESSION = array('foo' => 'bar'); +$_SESSION = ['foo' => 'bar']; ob_start(function ($buffer) { return str_replace(session_id(), 'random_session_id', $buffer); }); diff --git a/vendor/symfony/http-foundation/Tests/Session/Storage/Handler/Fixtures/with_samesite_and_migration.php b/vendor/symfony/http-foundation/Tests/Session/Storage/Handler/Fixtures/with_samesite_and_migration.php index e0ff64b9..a28b6fed 100644 --- a/vendor/symfony/http-foundation/Tests/Session/Storage/Handler/Fixtures/with_samesite_and_migration.php +++ b/vendor/symfony/http-foundation/Tests/Session/Storage/Handler/Fixtures/with_samesite_and_migration.php @@ -4,11 +4,11 @@ require __DIR__.'/common.inc'; use Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage; -$storage = new NativeSessionStorage(array('cookie_samesite' => 'lax')); +$storage = new NativeSessionStorage(['cookie_samesite' => 'lax']); $storage->setSaveHandler(new TestSessionHandler()); $storage->start(); -$_SESSION = array('foo' => 'bar'); +$_SESSION = ['foo' => 'bar']; $storage->regenerate(true); diff --git a/vendor/symfony/http-foundation/Tests/Session/Storage/Handler/MemcachedSessionHandlerTest.php b/vendor/symfony/http-foundation/Tests/Session/Storage/Handler/MemcachedSessionHandlerTest.php index 5bb2db06..2393ddf1 100644 --- a/vendor/symfony/http-foundation/Tests/Session/Storage/Handler/MemcachedSessionHandlerTest.php +++ b/vendor/symfony/http-foundation/Tests/Session/Storage/Handler/MemcachedSessionHandlerTest.php @@ -41,7 +41,7 @@ class MemcachedSessionHandlerTest extends TestCase $this->memcached = $this->getMockBuilder('Memcached')->getMock(); $this->storage = new MemcachedSessionHandler( $this->memcached, - array('prefix' => self::PREFIX, 'expiretime' => self::TTL) + ['prefix' => self::PREFIX, 'expiretime' => self::TTL] ); } @@ -59,6 +59,12 @@ class MemcachedSessionHandlerTest extends TestCase public function testCloseSession() { + $this->memcached + ->expects($this->once()) + ->method('quit') + ->willReturn(true) + ; + $this->assertTrue($this->storage->close()); } @@ -79,7 +85,7 @@ class MemcachedSessionHandlerTest extends TestCase ->expects($this->once()) ->method('set') ->with(self::PREFIX.'id', 'data', $this->equalTo(time() + self::TTL, 2)) - ->will($this->returnValue(true)) + ->willReturn(true) ; $this->assertTrue($this->storage->write('id', 'data')); @@ -91,7 +97,7 @@ class MemcachedSessionHandlerTest extends TestCase ->expects($this->once()) ->method('delete') ->with(self::PREFIX.'id') - ->will($this->returnValue(true)) + ->willReturn(true) ; $this->assertTrue($this->storage->destroy('id')); @@ -117,12 +123,12 @@ class MemcachedSessionHandlerTest extends TestCase public function getOptionFixtures() { - return array( - array(array('prefix' => 'session'), true), - array(array('expiretime' => 100), true), - array(array('prefix' => 'session', 'expiretime' => 200), true), - array(array('expiretime' => 100, 'foo' => 'bar'), false), - ); + return [ + [['prefix' => 'session'], true], + [['expiretime' => 100], true], + [['prefix' => 'session', 'expiretime' => 200], true], + [['expiretime' => 100, 'foo' => 'bar'], false], + ]; } public function testGetConnection() diff --git a/vendor/symfony/http-foundation/Tests/Session/Storage/Handler/MigratingSessionHandlerTest.php b/vendor/symfony/http-foundation/Tests/Session/Storage/Handler/MigratingSessionHandlerTest.php index 1c0f3ca6..6dc5b0cb 100644 --- a/vendor/symfony/http-foundation/Tests/Session/Storage/Handler/MigratingSessionHandlerTest.php +++ b/vendor/symfony/http-foundation/Tests/Session/Storage/Handler/MigratingSessionHandlerTest.php @@ -38,11 +38,11 @@ class MigratingSessionHandlerTest extends TestCase { $this->currentHandler->expects($this->once()) ->method('close') - ->will($this->returnValue(true)); + ->willReturn(true); $this->writeOnlyHandler->expects($this->once()) ->method('close') - ->will($this->returnValue(false)); + ->willReturn(false); $result = $this->dualHandler->close(); @@ -56,12 +56,12 @@ class MigratingSessionHandlerTest extends TestCase $this->currentHandler->expects($this->once()) ->method('destroy') ->with($sessionId) - ->will($this->returnValue(true)); + ->willReturn(true); $this->writeOnlyHandler->expects($this->once()) ->method('destroy') ->with($sessionId) - ->will($this->returnValue(false)); + ->willReturn(false); $result = $this->dualHandler->destroy($sessionId); @@ -75,12 +75,12 @@ class MigratingSessionHandlerTest extends TestCase $this->currentHandler->expects($this->once()) ->method('gc') ->with($maxlifetime) - ->will($this->returnValue(true)); + ->willReturn(true); $this->writeOnlyHandler->expects($this->once()) ->method('gc') ->with($maxlifetime) - ->will($this->returnValue(false)); + ->willReturn(false); $result = $this->dualHandler->gc($maxlifetime); $this->assertTrue($result); @@ -94,12 +94,12 @@ class MigratingSessionHandlerTest extends TestCase $this->currentHandler->expects($this->once()) ->method('open') ->with($savePath, $sessionName) - ->will($this->returnValue(true)); + ->willReturn(true); $this->writeOnlyHandler->expects($this->once()) ->method('open') ->with($savePath, $sessionName) - ->will($this->returnValue(false)); + ->willReturn(false); $result = $this->dualHandler->open($savePath, $sessionName); @@ -114,7 +114,7 @@ class MigratingSessionHandlerTest extends TestCase $this->currentHandler->expects($this->once()) ->method('read') ->with($sessionId) - ->will($this->returnValue($readValue)); + ->willReturn($readValue); $this->writeOnlyHandler->expects($this->never()) ->method('read') @@ -133,12 +133,12 @@ class MigratingSessionHandlerTest extends TestCase $this->currentHandler->expects($this->once()) ->method('write') ->with($sessionId, $data) - ->will($this->returnValue(true)); + ->willReturn(true); $this->writeOnlyHandler->expects($this->once()) ->method('write') ->with($sessionId, $data) - ->will($this->returnValue(false)); + ->willReturn(false); $result = $this->dualHandler->write($sessionId, $data); @@ -153,7 +153,7 @@ class MigratingSessionHandlerTest extends TestCase $this->currentHandler->expects($this->once()) ->method('read') ->with($sessionId) - ->will($this->returnValue($readValue)); + ->willReturn($readValue); $this->writeOnlyHandler->expects($this->never()) ->method('read') @@ -172,12 +172,12 @@ class MigratingSessionHandlerTest extends TestCase $this->currentHandler->expects($this->once()) ->method('write') ->with($sessionId, $data) - ->will($this->returnValue(true)); + ->willReturn(true); $this->writeOnlyHandler->expects($this->once()) ->method('write') ->with($sessionId, $data) - ->will($this->returnValue(false)); + ->willReturn(false); $result = $this->dualHandler->updateTimestamp($sessionId, $data); 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 c585fd4f..5fcdad9b 100644 --- a/vendor/symfony/http-foundation/Tests/Session/Storage/Handler/MongoDbSessionHandlerTest.php +++ b/vendor/symfony/http-foundation/Tests/Session/Storage/Handler/MongoDbSessionHandlerTest.php @@ -40,14 +40,14 @@ class MongoDbSessionHandlerTest extends TestCase ->disableOriginalConstructor() ->getMock(); - $this->options = array( + $this->options = [ 'id_field' => '_id', 'data_field' => 'data', 'time_field' => 'time', 'expiry_field' => 'expires_at', 'database' => 'sf-test', 'collection' => 'session-test', - ); + ]; $this->storage = new MongoDbSessionHandler($this->mongo, $this->options); } @@ -57,7 +57,7 @@ class MongoDbSessionHandlerTest extends TestCase */ public function testConstructorShouldThrowExceptionForMissingOptions() { - new MongoDbSessionHandler($this->mongo, array()); + new MongoDbSessionHandler($this->mongo, []); } public function testOpenMethodAlwaysReturnTrue() @@ -77,7 +77,7 @@ class MongoDbSessionHandlerTest extends TestCase $this->mongo->expects($this->once()) ->method('selectCollection') ->with($this->options['database'], $this->options['collection']) - ->will($this->returnValue($collection)); + ->willReturn($collection); // defining the timeout before the actual method call // allows to test for "greater than" values in the $criteria @@ -85,7 +85,7 @@ class MongoDbSessionHandlerTest extends TestCase $collection->expects($this->once()) ->method('findOne') - ->will($this->returnCallback(function ($criteria) use ($testTimeout) { + ->willReturnCallback(function ($criteria) use ($testTimeout) { $this->assertArrayHasKey($this->options['id_field'], $criteria); $this->assertEquals($criteria[$this->options['id_field']], 'foo'); @@ -95,12 +95,12 @@ class MongoDbSessionHandlerTest extends TestCase $this->assertInstanceOf(\MongoDB\BSON\UTCDateTime::class, $criteria[$this->options['expiry_field']]['$gte']); $this->assertGreaterThanOrEqual(round((string) $criteria[$this->options['expiry_field']]['$gte'] / 1000), $testTimeout); - return array( + return [ $this->options['id_field'] => 'foo', $this->options['expiry_field'] => new \MongoDB\BSON\UTCDateTime(), $this->options['data_field'] => new \MongoDB\BSON\Binary('bar', \MongoDB\BSON\Binary::TYPE_OLD_BINARY), - ); - })); + ]; + }); $this->assertEquals('bar', $this->storage->read('foo')); } @@ -112,13 +112,13 @@ class MongoDbSessionHandlerTest extends TestCase $this->mongo->expects($this->once()) ->method('selectCollection') ->with($this->options['database'], $this->options['collection']) - ->will($this->returnValue($collection)); + ->willReturn($collection); $collection->expects($this->once()) ->method('updateOne') - ->will($this->returnCallback(function ($criteria, $updateData, $options) { - $this->assertEquals(array($this->options['id_field'] => 'foo'), $criteria); - $this->assertEquals(array('upsert' => true), $options); + ->willReturnCallback(function ($criteria, $updateData, $options) { + $this->assertEquals([$this->options['id_field'] => 'foo'], $criteria); + $this->assertEquals(['upsert' => true], $options); $data = $updateData['$set']; $expectedExpiry = time() + (int) ini_get('session.gc_maxlifetime'); @@ -127,7 +127,7 @@ class MongoDbSessionHandlerTest extends TestCase $this->assertInstanceOf(\MongoDB\BSON\UTCDateTime::class, $data[$this->options['time_field']]); $this->assertInstanceOf(\MongoDB\BSON\UTCDateTime::class, $data[$this->options['expiry_field']]); $this->assertGreaterThanOrEqual($expectedExpiry, round((string) $data[$this->options['expiry_field']] / 1000)); - })); + }); $this->assertTrue($this->storage->write('foo', 'bar')); } @@ -139,15 +139,15 @@ class MongoDbSessionHandlerTest extends TestCase $this->mongo->expects($this->once()) ->method('selectCollection') ->with($this->options['database'], $this->options['collection']) - ->will($this->returnValue($collection)); + ->willReturn($collection); - $data = array(); + $data = []; $collection->expects($this->exactly(2)) ->method('updateOne') - ->will($this->returnCallback(function ($criteria, $updateData, $options) use (&$data) { + ->willReturnCallback(function ($criteria, $updateData, $options) use (&$data) { $data = $updateData; - })); + }); $this->storage->write('foo', 'bar'); $this->storage->write('foo', 'foobar'); @@ -162,11 +162,11 @@ class MongoDbSessionHandlerTest extends TestCase $this->mongo->expects($this->once()) ->method('selectCollection') ->with($this->options['database'], $this->options['collection']) - ->will($this->returnValue($collection)); + ->willReturn($collection); $collection->expects($this->once()) ->method('deleteOne') - ->with(array($this->options['id_field'] => 'foo')); + ->with([$this->options['id_field'] => 'foo']); $this->assertTrue($this->storage->destroy('foo')); } @@ -178,14 +178,14 @@ class MongoDbSessionHandlerTest extends TestCase $this->mongo->expects($this->once()) ->method('selectCollection') ->with($this->options['database'], $this->options['collection']) - ->will($this->returnValue($collection)); + ->willReturn($collection); $collection->expects($this->once()) ->method('deleteMany') - ->will($this->returnCallback(function ($criteria) { + ->willReturnCallback(function ($criteria) { $this->assertInstanceOf(\MongoDB\BSON\UTCDateTime::class, $criteria[$this->options['expiry_field']]['$lt']); $this->assertGreaterThanOrEqual(time() - 1, round((string) $criteria[$this->options['expiry_field']]['$lt'] / 1000)); - })); + }); $this->assertTrue($this->storage->gc(1)); } diff --git a/vendor/symfony/http-foundation/Tests/Session/Storage/Handler/NativeFileSessionHandlerTest.php b/vendor/symfony/http-foundation/Tests/Session/Storage/Handler/NativeFileSessionHandlerTest.php index 95e725f4..e227bebf 100644 --- a/vendor/symfony/http-foundation/Tests/Session/Storage/Handler/NativeFileSessionHandlerTest.php +++ b/vendor/symfony/http-foundation/Tests/Session/Storage/Handler/NativeFileSessionHandlerTest.php @@ -27,7 +27,7 @@ class NativeFileSessionHandlerTest extends TestCase { public function testConstruct() { - $storage = new NativeSessionStorage(array('name' => 'TESTING'), new NativeFileSessionHandler(sys_get_temp_dir())); + $storage = new NativeSessionStorage(['name' => 'TESTING'], new NativeFileSessionHandler(sys_get_temp_dir())); $this->assertEquals('user', ini_get('session.save_handler')); @@ -51,11 +51,11 @@ class NativeFileSessionHandlerTest extends TestCase { $base = sys_get_temp_dir(); - return array( - array("$base/foo", "$base/foo", "$base/foo"), - array("5;$base/foo", "5;$base/foo", "$base/foo"), - array("5;0600;$base/foo", "5;0600;$base/foo", "$base/foo"), - ); + return [ + ["$base/foo", "$base/foo", "$base/foo"], + ["5;$base/foo", "5;$base/foo", "$base/foo"], + ["5;0600;$base/foo", "5;0600;$base/foo", "$base/foo"], + ]; } /** @@ -69,7 +69,7 @@ class NativeFileSessionHandlerTest extends TestCase public function testConstructDefault() { $path = ini_get('session.save_path'); - $storage = new NativeSessionStorage(array('name' => 'TESTING'), new NativeFileSessionHandler()); + $storage = new NativeSessionStorage(['name' => 'TESTING'], new NativeFileSessionHandler()); $this->assertEquals($path, ini_get('session.save_path')); } diff --git a/vendor/symfony/http-foundation/Tests/Session/Storage/Handler/NullSessionHandlerTest.php b/vendor/symfony/http-foundation/Tests/Session/Storage/Handler/NullSessionHandlerTest.php index 9a2212b8..0d246e1a 100644 --- a/vendor/symfony/http-foundation/Tests/Session/Storage/Handler/NullSessionHandlerTest.php +++ b/vendor/symfony/http-foundation/Tests/Session/Storage/Handler/NullSessionHandlerTest.php @@ -54,6 +54,6 @@ class NullSessionHandlerTest extends TestCase public function getStorage() { - return new NativeSessionStorage(array(), new NullSessionHandler()); + return new NativeSessionStorage([], new NullSessionHandler()); } } diff --git a/vendor/symfony/http-foundation/Tests/Session/Storage/Handler/PdoSessionHandlerTest.php b/vendor/symfony/http-foundation/Tests/Session/Storage/Handler/PdoSessionHandlerTest.php index 0edda00a..380b4d7d 100644 --- a/vendor/symfony/http-foundation/Tests/Session/Storage/Handler/PdoSessionHandlerTest.php +++ b/vendor/symfony/http-foundation/Tests/Session/Storage/Handler/PdoSessionHandlerTest.php @@ -64,7 +64,7 @@ class PdoSessionHandlerTest extends TestCase */ public function testInexistentTable() { - $storage = new PdoSessionHandler($this->getMemorySqlitePdo(), array('db_table' => 'inexistent_table')); + $storage = new PdoSessionHandler($this->getMemorySqlitePdo(), ['db_table' => 'inexistent_table']); $storage->open('', 'sid'); $storage->read('id'); $storage->write('id', 'data'); @@ -143,7 +143,7 @@ class PdoSessionHandlerTest extends TestCase $stream = $this->createStream($content); $pdo->prepareResult->expects($this->once())->method('fetchAll') - ->will($this->returnValue(array(array($stream, 42, time())))); + ->willReturn([[$stream, 42, time()]]); $storage = new PdoSessionHandler($pdo); $result = $storage->read('foo'); @@ -170,14 +170,14 @@ class PdoSessionHandlerTest extends TestCase $exception = null; $selectStmt->expects($this->atLeast(2))->method('fetchAll') - ->will($this->returnCallback(function () use (&$exception, $stream) { - return $exception ? array(array($stream, 42, time())) : array(); - })); + ->willReturnCallback(function () use (&$exception, $stream) { + return $exception ? [[$stream, 42, time()]] : []; + }); $insertStmt->expects($this->once())->method('execute') - ->will($this->returnCallback(function () use (&$exception) { + ->willReturnCallback(function () use (&$exception) { throw $exception = new \PDOException('', '23'); - })); + }); $storage = new PdoSessionHandler($pdo); $result = $storage->read('foo'); @@ -337,19 +337,19 @@ class PdoSessionHandlerTest extends TestCase public function provideUrlDsnPairs() { - yield array('mysql://localhost/test', 'mysql:host=localhost;dbname=test;'); - yield array('mysql://localhost:56/test', 'mysql:host=localhost;port=56;dbname=test;'); - yield array('mysql2://root:pwd@localhost/test', 'mysql:host=localhost;dbname=test;', 'root', 'pwd'); - yield array('postgres://localhost/test', 'pgsql:host=localhost;dbname=test;'); - yield array('postgresql://localhost:5634/test', 'pgsql:host=localhost;port=5634;dbname=test;'); - yield array('postgres://root:pwd@localhost/test', 'pgsql:host=localhost;dbname=test;', 'root', 'pwd'); - yield 'sqlite relative path' => array('sqlite://localhost/tmp/test', 'sqlite:tmp/test'); - yield 'sqlite absolute path' => array('sqlite://localhost//tmp/test', 'sqlite:/tmp/test'); - yield 'sqlite relative path without host' => array('sqlite:///tmp/test', 'sqlite:tmp/test'); - yield 'sqlite absolute path without host' => array('sqlite3:////tmp/test', 'sqlite:/tmp/test'); - yield array('sqlite://localhost/:memory:', 'sqlite::memory:'); - yield array('mssql://localhost/test', 'sqlsrv:server=localhost;Database=test'); - yield array('mssql://localhost:56/test', 'sqlsrv:server=localhost,56;Database=test'); + yield ['mysql://localhost/test', 'mysql:host=localhost;dbname=test;']; + yield ['mysql://localhost:56/test', 'mysql:host=localhost;port=56;dbname=test;']; + yield ['mysql2://root:pwd@localhost/test', 'mysql:host=localhost;dbname=test;', 'root', 'pwd']; + yield ['postgres://localhost/test', 'pgsql:host=localhost;dbname=test;']; + yield ['postgresql://localhost:5634/test', 'pgsql:host=localhost;port=5634;dbname=test;']; + yield ['postgres://root:pwd@localhost/test', 'pgsql:host=localhost;dbname=test;', 'root', 'pwd']; + yield 'sqlite relative path' => ['sqlite://localhost/tmp/test', 'sqlite:tmp/test']; + yield 'sqlite absolute path' => ['sqlite://localhost//tmp/test', 'sqlite:/tmp/test']; + yield 'sqlite relative path without host' => ['sqlite:///tmp/test', 'sqlite:tmp/test']; + yield 'sqlite absolute path without host' => ['sqlite3:////tmp/test', 'sqlite:/tmp/test']; + yield ['sqlite://localhost/:memory:', 'sqlite::memory:']; + yield ['mssql://localhost/test', 'sqlsrv:server=localhost;Database=test']; + yield ['mssql://localhost:56/test', 'sqlsrv:server=localhost,56;Database=test']; } private function createStream($content) @@ -387,7 +387,7 @@ class MockPdo extends \PDO return parent::getAttribute($attribute); } - public function prepare($statement, $driverOptions = array()) + public function prepare($statement, $driverOptions = []) { return \is_callable($this->prepareResult) ? ($this->prepareResult)($statement, $driverOptions) diff --git a/vendor/symfony/http-foundation/Tests/Session/Storage/Handler/PredisClusterSessionHandlerTest.php b/vendor/symfony/http-foundation/Tests/Session/Storage/Handler/PredisClusterSessionHandlerTest.php index 45810010..622b42da 100644 --- a/vendor/symfony/http-foundation/Tests/Session/Storage/Handler/PredisClusterSessionHandlerTest.php +++ b/vendor/symfony/http-foundation/Tests/Session/Storage/Handler/PredisClusterSessionHandlerTest.php @@ -17,6 +17,6 @@ class PredisClusterSessionHandlerTest extends AbstractRedisSessionHandlerTestCas { protected function createRedisClient(string $host): Client { - return new Client(array(array('host' => $host))); + return new Client([['host' => $host]]); } } diff --git a/vendor/symfony/http-foundation/Tests/Session/Storage/Handler/PredisSessionHandlerTest.php b/vendor/symfony/http-foundation/Tests/Session/Storage/Handler/PredisSessionHandlerTest.php index a9db4eb1..5ecab116 100644 --- a/vendor/symfony/http-foundation/Tests/Session/Storage/Handler/PredisSessionHandlerTest.php +++ b/vendor/symfony/http-foundation/Tests/Session/Storage/Handler/PredisSessionHandlerTest.php @@ -17,6 +17,6 @@ class PredisSessionHandlerTest extends AbstractRedisSessionHandlerTestCase { protected function createRedisClient(string $host): Client { - return new Client(array('host' => $host)); + return new Client(['host' => $host]); } } diff --git a/vendor/symfony/http-foundation/Tests/Session/Storage/Handler/RedisArraySessionHandlerTest.php b/vendor/symfony/http-foundation/Tests/Session/Storage/Handler/RedisArraySessionHandlerTest.php index d263e18f..b03a3723 100644 --- a/vendor/symfony/http-foundation/Tests/Session/Storage/Handler/RedisArraySessionHandlerTest.php +++ b/vendor/symfony/http-foundation/Tests/Session/Storage/Handler/RedisArraySessionHandlerTest.php @@ -15,6 +15,6 @@ class RedisArraySessionHandlerTest extends AbstractRedisSessionHandlerTestCase { protected function createRedisClient(string $host): \RedisArray { - return new \RedisArray(array($host)); + return new \RedisArray([$host]); } } diff --git a/vendor/symfony/http-foundation/Tests/Session/Storage/Handler/StrictSessionHandlerTest.php b/vendor/symfony/http-foundation/Tests/Session/Storage/Handler/StrictSessionHandlerTest.php index b02c41ae..6a0d1687 100644 --- a/vendor/symfony/http-foundation/Tests/Session/Storage/Handler/StrictSessionHandlerTest.php +++ b/vendor/symfony/http-foundation/Tests/Session/Storage/Handler/StrictSessionHandlerTest.php @@ -84,7 +84,7 @@ class StrictSessionHandlerTest extends TestCase { $handler = $this->getMockBuilder('SessionHandlerInterface')->getMock(); $handler->expects($this->exactly(2))->method('read') - ->withConsecutive(array('id1'), array('id2')) + ->withConsecutive(['id1'], ['id2']) ->will($this->onConsecutiveCalls('data1', 'data2')); $proxy = new StrictSessionHandler($handler); diff --git a/vendor/symfony/http-foundation/Tests/Session/Storage/MetadataBagTest.php b/vendor/symfony/http-foundation/Tests/Session/Storage/MetadataBagTest.php index 69cf6163..2c4758b9 100644 --- a/vendor/symfony/http-foundation/Tests/Session/Storage/MetadataBagTest.php +++ b/vendor/symfony/http-foundation/Tests/Session/Storage/MetadataBagTest.php @@ -26,26 +26,26 @@ class MetadataBagTest extends TestCase */ protected $bag; - protected $array = array(); + protected $array = []; protected function setUp() { parent::setUp(); $this->bag = new MetadataBag(); - $this->array = array(MetadataBag::CREATED => 1234567, MetadataBag::UPDATED => 12345678, MetadataBag::LIFETIME => 0); + $this->array = [MetadataBag::CREATED => 1234567, MetadataBag::UPDATED => 12345678, MetadataBag::LIFETIME => 0]; $this->bag->initialize($this->array); } protected function tearDown() { - $this->array = array(); + $this->array = []; $this->bag = null; parent::tearDown(); } public function testInitialize() { - $sessionMetadata = array(); + $sessionMetadata = []; $bag1 = new MetadataBag(); $bag1->initialize($sessionMetadata); @@ -82,7 +82,7 @@ class MetadataBagTest extends TestCase public function testGetLifetime() { $bag = new MetadataBag(); - $array = array(MetadataBag::CREATED => 1234567, MetadataBag::UPDATED => 12345678, MetadataBag::LIFETIME => 1000); + $array = [MetadataBag::CREATED => 1234567, MetadataBag::UPDATED => 12345678, MetadataBag::LIFETIME => 1000]; $bag->initialize($array); $this->assertEquals(1000, $bag->getLifetime()); } @@ -111,11 +111,11 @@ class MetadataBagTest extends TestCase $timeStamp = time(); $created = $timeStamp - 15; - $sessionMetadata = array( + $sessionMetadata = [ MetadataBag::CREATED => $created, MetadataBag::UPDATED => $created, MetadataBag::LIFETIME => 1000, - ); + ]; $bag->initialize($sessionMetadata); $this->assertEquals($created, $sessionMetadata[MetadataBag::UPDATED]); @@ -127,11 +127,11 @@ class MetadataBagTest extends TestCase $timeStamp = time(); $created = $timeStamp - 45; - $sessionMetadata = array( + $sessionMetadata = [ MetadataBag::CREATED => $created, MetadataBag::UPDATED => $created, MetadataBag::LIFETIME => 1000, - ); + ]; $bag->initialize($sessionMetadata); $this->assertEquals($timeStamp, $sessionMetadata[MetadataBag::UPDATED]); diff --git a/vendor/symfony/http-foundation/Tests/Session/Storage/MockArraySessionStorageTest.php b/vendor/symfony/http-foundation/Tests/Session/Storage/MockArraySessionStorageTest.php index 893e120c..2e3024ef 100644 --- a/vendor/symfony/http-foundation/Tests/Session/Storage/MockArraySessionStorageTest.php +++ b/vendor/symfony/http-foundation/Tests/Session/Storage/MockArraySessionStorageTest.php @@ -45,10 +45,10 @@ class MockArraySessionStorageTest extends TestCase $this->attributes = new AttributeBag(); $this->flashes = new FlashBag(); - $this->data = array( - $this->attributes->getStorageKey() => array('foo' => 'bar'), - $this->flashes->getStorageKey() => array('notice' => 'hello'), - ); + $this->data = [ + $this->attributes->getStorageKey() => ['foo' => 'bar'], + $this->flashes->getStorageKey() => ['notice' => 'hello'], + ]; $this->storage = new MockArraySessionStorage(); $this->storage->registerBag($this->flashes); @@ -80,14 +80,14 @@ class MockArraySessionStorageTest extends TestCase $id = $this->storage->getId(); $this->storage->regenerate(); $this->assertNotEquals($id, $this->storage->getId()); - $this->assertEquals(array('foo' => 'bar'), $this->storage->getBag('attributes')->all()); - $this->assertEquals(array('notice' => 'hello'), $this->storage->getBag('flashes')->peekAll()); + $this->assertEquals(['foo' => 'bar'], $this->storage->getBag('attributes')->all()); + $this->assertEquals(['notice' => 'hello'], $this->storage->getBag('flashes')->peekAll()); $id = $this->storage->getId(); $this->storage->regenerate(true); $this->assertNotEquals($id, $this->storage->getId()); - $this->assertEquals(array('foo' => 'bar'), $this->storage->getBag('attributes')->all()); - $this->assertEquals(array('notice' => 'hello'), $this->storage->getBag('flashes')->peekAll()); + $this->assertEquals(['foo' => 'bar'], $this->storage->getBag('attributes')->all()); + $this->assertEquals(['notice' => 'hello'], $this->storage->getBag('flashes')->peekAll()); } public function testGetId() @@ -101,8 +101,8 @@ class MockArraySessionStorageTest extends TestCase { $this->storage->clear(); - $this->assertSame(array(), $this->storage->getBag('attributes')->all()); - $this->assertSame(array(), $this->storage->getBag('flashes')->peekAll()); + $this->assertSame([], $this->storage->getBag('attributes')->all()); + $this->assertSame([], $this->storage->getBag('flashes')->peekAll()); } public function testClearStartsSession() diff --git a/vendor/symfony/http-foundation/Tests/Session/Storage/MockFileSessionStorageTest.php b/vendor/symfony/http-foundation/Tests/Session/Storage/MockFileSessionStorageTest.php index f8394d8c..062769e2 100644 --- a/vendor/symfony/http-foundation/Tests/Session/Storage/MockFileSessionStorageTest.php +++ b/vendor/symfony/http-foundation/Tests/Session/Storage/MockFileSessionStorageTest.php @@ -91,7 +91,7 @@ class MockFileSessionStorageTest extends TestCase $storage->start(); $this->assertEquals('108', $storage->getBag('attributes')->get('new')); $this->assertTrue($storage->getBag('flashes')->has('newkey')); - $this->assertEquals(array('test'), $storage->getBag('flashes')->peek('newkey')); + $this->assertEquals(['test'], $storage->getBag('flashes')->peek('newkey')); } public function testMultipleInstances() diff --git a/vendor/symfony/http-foundation/Tests/Session/Storage/NativeSessionStorageTest.php b/vendor/symfony/http-foundation/Tests/Session/Storage/NativeSessionStorageTest.php index 8ce703b3..d97973e2 100644 --- a/vendor/symfony/http-foundation/Tests/Session/Storage/NativeSessionStorageTest.php +++ b/vendor/symfony/http-foundation/Tests/Session/Storage/NativeSessionStorageTest.php @@ -56,7 +56,7 @@ class NativeSessionStorageTest extends TestCase /** * @return NativeSessionStorage */ - protected function getStorage(array $options = array()) + protected function getStorage(array $options = []) { $storage = new NativeSessionStorage($options); $storage->registerBag(new AttributeBag()); @@ -157,19 +157,19 @@ class NativeSessionStorageTest extends TestCase { $this->iniSet('session.cache_limiter', 'nocache'); - $storage = new NativeSessionStorage(array('cache_limiter' => 'public')); + $storage = new NativeSessionStorage(['cache_limiter' => 'public']); $this->assertEquals('public', ini_get('session.cache_limiter')); } public function testCookieOptions() { - $options = array( + $options = [ 'cookie_lifetime' => 123456, 'cookie_path' => '/my/cookie/path', 'cookie_domain' => 'symfony.example.com', 'cookie_secure' => true, 'cookie_httponly' => false, - ); + ]; if (\PHP_VERSION_ID >= 70300) { $options['cookie_samesite'] = 'lax'; @@ -177,7 +177,7 @@ class NativeSessionStorageTest extends TestCase $this->getStorage($options); $temp = session_get_cookie_params(); - $gco = array(); + $gco = []; foreach ($temp as $key => $value) { $gco['cookie_'.$key] = $value; @@ -192,10 +192,10 @@ class NativeSessionStorageTest extends TestCase $this->markTestSkipped('HHVM is not handled in this test case.'); } - $options = array( + $options = [ 'url_rewriter.tags' => 'a=href', 'cache_expire' => '200', - ); + ]; $this->getStorage($options); @@ -276,9 +276,9 @@ class NativeSessionStorageTest extends TestCase public function testSetSessionOptionsOnceSessionStartedIsIgnored() { session_start(); - $this->getStorage(array( + $this->getStorage([ 'name' => 'something-else', - )); + ]); // Assert no exception has been thrown by `getStorage()` $this->addToAssertionCount(1); diff --git a/vendor/symfony/http-foundation/Tests/Session/Storage/PhpBridgeSessionStorageTest.php b/vendor/symfony/http-foundation/Tests/Session/Storage/PhpBridgeSessionStorageTest.php index a5a85614..43324002 100644 --- a/vendor/symfony/http-foundation/Tests/Session/Storage/PhpBridgeSessionStorageTest.php +++ b/vendor/symfony/http-foundation/Tests/Session/Storage/PhpBridgeSessionStorageTest.php @@ -86,10 +86,10 @@ class PhpBridgeSessionStorageTest extends TestCase $_SESSION['drak'] = 'loves symfony'; $storage->getBag('attributes')->set('symfony', 'greatness'); $key = $storage->getBag('attributes')->getStorageKey(); - $this->assertEquals($_SESSION[$key], array('symfony' => 'greatness')); + $this->assertEquals($_SESSION[$key], ['symfony' => 'greatness']); $this->assertEquals($_SESSION['drak'], 'loves symfony'); $storage->clear(); - $this->assertEquals($_SESSION[$key], array()); + $this->assertEquals($_SESSION[$key], []); $this->assertEquals($_SESSION['drak'], 'loves symfony'); } } diff --git a/vendor/symfony/http-foundation/Tests/Session/Storage/Proxy/SessionHandlerProxyTest.php b/vendor/symfony/http-foundation/Tests/Session/Storage/Proxy/SessionHandlerProxyTest.php index 0b48250e..b6e0da99 100644 --- a/vendor/symfony/http-foundation/Tests/Session/Storage/Proxy/SessionHandlerProxyTest.php +++ b/vendor/symfony/http-foundation/Tests/Session/Storage/Proxy/SessionHandlerProxyTest.php @@ -50,7 +50,7 @@ class SessionHandlerProxyTest extends TestCase { $this->mock->expects($this->once()) ->method('open') - ->will($this->returnValue(true)); + ->willReturn(true); $this->assertFalse($this->proxy->isActive()); $this->proxy->open('name', 'id'); @@ -61,7 +61,7 @@ class SessionHandlerProxyTest extends TestCase { $this->mock->expects($this->once()) ->method('open') - ->will($this->returnValue(false)); + ->willReturn(false); $this->assertFalse($this->proxy->isActive()); $this->proxy->open('name', 'id'); @@ -72,7 +72,7 @@ class SessionHandlerProxyTest extends TestCase { $this->mock->expects($this->once()) ->method('close') - ->will($this->returnValue(true)); + ->willReturn(true); $this->assertFalse($this->proxy->isActive()); $this->proxy->close(); @@ -83,7 +83,7 @@ class SessionHandlerProxyTest extends TestCase { $this->mock->expects($this->once()) ->method('close') - ->will($this->returnValue(false)); + ->willReturn(false); $this->assertFalse($this->proxy->isActive()); $this->proxy->close(); @@ -127,7 +127,7 @@ class SessionHandlerProxyTest extends TestCase */ public function testValidateId() { - $mock = $this->getMockBuilder(array('SessionHandlerInterface', 'SessionUpdateTimestampHandlerInterface'))->getMock(); + $mock = $this->getMockBuilder(['SessionHandlerInterface', 'SessionUpdateTimestampHandlerInterface'])->getMock(); $mock->expects($this->once()) ->method('validateId'); @@ -142,7 +142,7 @@ class SessionHandlerProxyTest extends TestCase */ public function testUpdateTimestamp() { - $mock = $this->getMockBuilder(array('SessionHandlerInterface', 'SessionUpdateTimestampHandlerInterface'))->getMock(); + $mock = $this->getMockBuilder(['SessionHandlerInterface', 'SessionUpdateTimestampHandlerInterface'])->getMock(); $mock->expects($this->once()) ->method('updateTimestamp'); diff --git a/vendor/symfony/http-foundation/Tests/StreamedResponseTest.php b/vendor/symfony/http-foundation/Tests/StreamedResponseTest.php index 699222e3..62dfc9bc 100644 --- a/vendor/symfony/http-foundation/Tests/StreamedResponseTest.php +++ b/vendor/symfony/http-foundation/Tests/StreamedResponseTest.php @@ -19,7 +19,7 @@ class StreamedResponseTest extends TestCase { public function testConstructor() { - $response = new StreamedResponse(function () { echo 'foo'; }, 404, array('Content-Type' => 'text/plain')); + $response = new StreamedResponse(function () { echo 'foo'; }, 404, ['Content-Type' => 'text/plain']); $this->assertEquals(404, $response->getStatusCode()); $this->assertEquals('text/plain', $response->headers->get('Content-Type')); @@ -51,7 +51,7 @@ class StreamedResponseTest extends TestCase public function testPrepareWithHeadRequest() { - $response = new StreamedResponse(function () { echo 'foo'; }, 200, array('Content-Length' => '123')); + $response = new StreamedResponse(function () { echo 'foo'; }, 200, ['Content-Length' => '123']); $request = Request::create('/', 'HEAD'); $response->prepare($request); @@ -61,7 +61,7 @@ class StreamedResponseTest extends TestCase public function testPrepareWithCacheHeaders() { - $response = new StreamedResponse(function () { echo 'foo'; }, 200, array('Cache-Control' => 'max-age=600, public')); + $response = new StreamedResponse(function () { echo 'foo'; }, 200, ['Cache-Control' => 'max-age=600, public']); $request = Request::create('/', 'GET'); $response->prepare($request); diff --git a/vendor/symfony/http-foundation/Tests/Test/Constraint/RequestAttributeValueSameTest.php b/vendor/symfony/http-foundation/Tests/Test/Constraint/RequestAttributeValueSameTest.php new file mode 100644 index 00000000..eca8aed2 --- /dev/null +++ b/vendor/symfony/http-foundation/Tests/Test/Constraint/RequestAttributeValueSameTest.php @@ -0,0 +1,41 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\Tests\Test\Constraint; + +use PHPUnit\Framework\ExpectationFailedException; +use PHPUnit\Framework\TestCase; +use PHPUnit\Framework\TestFailure; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Test\Constraint\RequestAttributeValueSame; + +class RequestAttributeValueSameTest extends TestCase +{ + public function testConstraint(): void + { + $request = new Request(); + $request->attributes->set('foo', 'bar'); + $constraint = new RequestAttributeValueSame('foo', 'bar'); + $this->assertTrue($constraint->evaluate($request, '', true)); + $constraint = new RequestAttributeValueSame('bar', 'foo'); + $this->assertFalse($constraint->evaluate($request, '', true)); + + try { + $constraint->evaluate($request); + } catch (ExpectationFailedException $e) { + $this->assertEquals("Failed asserting that the Request has attribute \"bar\" with value \"foo\".\n", TestFailure::exceptionToString($e)); + + return; + } + + $this->fail(); + } +} diff --git a/vendor/symfony/http-foundation/Tests/Test/Constraint/ResponseCookieValueSameTest.php b/vendor/symfony/http-foundation/Tests/Test/Constraint/ResponseCookieValueSameTest.php new file mode 100644 index 00000000..778879c3 --- /dev/null +++ b/vendor/symfony/http-foundation/Tests/Test/Constraint/ResponseCookieValueSameTest.php @@ -0,0 +1,44 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\Tests\Test\Constraint; + +use PHPUnit\Framework\ExpectationFailedException; +use PHPUnit\Framework\TestCase; +use PHPUnit\Framework\TestFailure; +use Symfony\Component\HttpFoundation\Cookie; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpFoundation\Test\Constraint\ResponseCookieValueSame; + +class ResponseCookieValueSameTest extends TestCase +{ + public function testConstraint(): void + { + $response = new Response(); + $response->headers->setCookie(Cookie::create('foo', 'bar', 0, '/path')); + $constraint = new ResponseCookieValueSame('foo', 'bar', '/path'); + $this->assertTrue($constraint->evaluate($response, '', true)); + $constraint = new ResponseCookieValueSame('foo', 'bar', '/path'); + $this->assertTrue($constraint->evaluate($response, '', true)); + $constraint = new ResponseCookieValueSame('foo', 'babar', '/path'); + $this->assertFalse($constraint->evaluate($response, '', true)); + + try { + $constraint->evaluate($response); + } catch (ExpectationFailedException $e) { + $this->assertEquals("Failed asserting that the Response has cookie \"foo\" with path \"/path\" with value \"babar\".\n", TestFailure::exceptionToString($e)); + + return; + } + + $this->fail(); + } +} diff --git a/vendor/symfony/http-foundation/Tests/Test/Constraint/ResponseHasCookieTest.php b/vendor/symfony/http-foundation/Tests/Test/Constraint/ResponseHasCookieTest.php new file mode 100644 index 00000000..05ca95fb --- /dev/null +++ b/vendor/symfony/http-foundation/Tests/Test/Constraint/ResponseHasCookieTest.php @@ -0,0 +1,42 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\Tests\Test\Constraint; + +use PHPUnit\Framework\ExpectationFailedException; +use PHPUnit\Framework\TestCase; +use PHPUnit\Framework\TestFailure; +use Symfony\Component\HttpFoundation\Cookie; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpFoundation\Test\Constraint\ResponseHasCookie; + +class ResponseHasCookieTest extends TestCase +{ + public function testConstraint(): void + { + $response = new Response(); + $response->headers->setCookie(Cookie::create('foo', 'bar')); + $constraint = new ResponseHasCookie('foo'); + $this->assertTrue($constraint->evaluate($response, '', true)); + $constraint = new ResponseHasCookie('bar'); + $this->assertFalse($constraint->evaluate($response, '', true)); + + try { + $constraint->evaluate($response); + } catch (ExpectationFailedException $e) { + $this->assertEquals("Failed asserting that the Response has cookie \"bar\".\n", TestFailure::exceptionToString($e)); + + return; + } + + $this->fail(); + } +} diff --git a/vendor/symfony/http-foundation/Tests/Test/Constraint/ResponseHasHeaderTest.php b/vendor/symfony/http-foundation/Tests/Test/Constraint/ResponseHasHeaderTest.php new file mode 100644 index 00000000..7b811a64 --- /dev/null +++ b/vendor/symfony/http-foundation/Tests/Test/Constraint/ResponseHasHeaderTest.php @@ -0,0 +1,39 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\Tests\Test\Constraint; + +use PHPUnit\Framework\ExpectationFailedException; +use PHPUnit\Framework\TestCase; +use PHPUnit\Framework\TestFailure; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpFoundation\Test\Constraint\ResponseHasHeader; + +class ResponseHasHeaderTest extends TestCase +{ + public function testConstraint(): void + { + $constraint = new ResponseHasHeader('Date'); + $this->assertTrue($constraint->evaluate(new Response(), '', true)); + $constraint = new ResponseHasHeader('X-Date'); + $this->assertFalse($constraint->evaluate(new Response(), '', true)); + + try { + $constraint->evaluate(new Response()); + } catch (ExpectationFailedException $e) { + $this->assertEquals("Failed asserting that the Response has header \"X-Date\".\n", TestFailure::exceptionToString($e)); + + return; + } + + $this->fail(); + } +} diff --git a/vendor/symfony/http-foundation/Tests/Test/Constraint/ResponseHeaderSameTest.php b/vendor/symfony/http-foundation/Tests/Test/Constraint/ResponseHeaderSameTest.php new file mode 100644 index 00000000..d527f35d --- /dev/null +++ b/vendor/symfony/http-foundation/Tests/Test/Constraint/ResponseHeaderSameTest.php @@ -0,0 +1,39 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\Tests\Test\Constraint; + +use PHPUnit\Framework\ExpectationFailedException; +use PHPUnit\Framework\TestCase; +use PHPUnit\Framework\TestFailure; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpFoundation\Test\Constraint\ResponseHeaderSame; + +class ResponseHeaderSameTest extends TestCase +{ + public function testConstraint(): void + { + $constraint = new ResponseHeaderSame('Cache-Control', 'no-cache, private'); + $this->assertTrue($constraint->evaluate(new Response(), '', true)); + $constraint = new ResponseHeaderSame('Cache-Control', 'public'); + $this->assertFalse($constraint->evaluate(new Response(), '', true)); + + try { + $constraint->evaluate(new Response()); + } catch (ExpectationFailedException $e) { + $this->assertEquals("Failed asserting that the Response has header \"Cache-Control\" with value \"public\".\n", TestFailure::exceptionToString($e)); + + return; + } + + $this->fail(); + } +} diff --git a/vendor/symfony/http-foundation/Tests/Test/Constraint/ResponseIsRedirectedTest.php b/vendor/symfony/http-foundation/Tests/Test/Constraint/ResponseIsRedirectedTest.php new file mode 100644 index 00000000..a3a46063 --- /dev/null +++ b/vendor/symfony/http-foundation/Tests/Test/Constraint/ResponseIsRedirectedTest.php @@ -0,0 +1,39 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\Tests\Test\Constraint; + +use PHPUnit\Framework\ExpectationFailedException; +use PHPUnit\Framework\TestCase; +use PHPUnit\Framework\TestFailure; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpFoundation\Test\Constraint\ResponseIsRedirected; + +class ResponseIsRedirectedTest extends TestCase +{ + public function testConstraint(): void + { + $constraint = new ResponseIsRedirected(); + + $this->assertTrue($constraint->evaluate(new Response('', 301), '', true)); + $this->assertFalse($constraint->evaluate(new Response(), '', true)); + + try { + $constraint->evaluate(new Response()); + } catch (ExpectationFailedException $e) { + $this->assertContains("Failed asserting that the Response is redirected.\nHTTP/1.0 200 OK", TestFailure::exceptionToString($e)); + + return; + } + + $this->fail(); + } +} diff --git a/vendor/symfony/http-foundation/Tests/Test/Constraint/ResponseIsSuccessfulTest.php b/vendor/symfony/http-foundation/Tests/Test/Constraint/ResponseIsSuccessfulTest.php new file mode 100644 index 00000000..0c99a5e4 --- /dev/null +++ b/vendor/symfony/http-foundation/Tests/Test/Constraint/ResponseIsSuccessfulTest.php @@ -0,0 +1,39 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\Tests\Test\Constraint; + +use PHPUnit\Framework\ExpectationFailedException; +use PHPUnit\Framework\TestCase; +use PHPUnit\Framework\TestFailure; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpFoundation\Test\Constraint\ResponseIsSuccessful; + +class ResponseIsSuccessfulTest extends TestCase +{ + public function testConstraint(): void + { + $constraint = new ResponseIsSuccessful(); + + $this->assertTrue($constraint->evaluate(new Response(), '', true)); + $this->assertFalse($constraint->evaluate(new Response('', 404), '', true)); + + try { + $constraint->evaluate(new Response('', 404)); + } catch (ExpectationFailedException $e) { + $this->assertContains("Failed asserting that the Response is successful.\nHTTP/1.0 404 Not Found", TestFailure::exceptionToString($e)); + + return; + } + + $this->fail(); + } +} diff --git a/vendor/symfony/http-foundation/Tests/Test/Constraint/ResponseStatusCodeSameTest.php b/vendor/symfony/http-foundation/Tests/Test/Constraint/ResponseStatusCodeSameTest.php new file mode 100644 index 00000000..3e15e906 --- /dev/null +++ b/vendor/symfony/http-foundation/Tests/Test/Constraint/ResponseStatusCodeSameTest.php @@ -0,0 +1,41 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\Tests\Test\Constraint; + +use PHPUnit\Framework\ExpectationFailedException; +use PHPUnit\Framework\TestCase; +use PHPUnit\Framework\TestFailure; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpFoundation\Test\Constraint\ResponseStatusCodeSame; + +class ResponseStatusCodeSameTest extends TestCase +{ + public function testConstraint(): void + { + $constraint = new ResponseStatusCodeSame(200); + $this->assertTrue($constraint->evaluate(new Response(), '', true)); + $this->assertFalse($constraint->evaluate(new Response('', 404), '', true)); + $constraint = new ResponseStatusCodeSame(404); + $this->assertTrue($constraint->evaluate(new Response('', 404), '', true)); + + $constraint = new ResponseStatusCodeSame(200); + try { + $constraint->evaluate(new Response('', 404)); + } catch (ExpectationFailedException $e) { + $this->assertContains("Failed asserting that the Response status code is 200.\nHTTP/1.0 404 Not Found", TestFailure::exceptionToString($e)); + + return; + } + + $this->fail(); + } +} diff --git a/vendor/symfony/http-foundation/Tests/UrlHelperTest.php b/vendor/symfony/http-foundation/Tests/UrlHelperTest.php new file mode 100644 index 00000000..9a750bd8 --- /dev/null +++ b/vendor/symfony/http-foundation/Tests/UrlHelperTest.php @@ -0,0 +1,143 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\RequestStack; +use Symfony\Component\HttpFoundation\UrlHelper; +use Symfony\Component\Routing\RequestContext; + +class UrlHelperTest extends TestCase +{ + /** + * @dataProvider getGenerateAbsoluteUrlData() + */ + public function testGenerateAbsoluteUrl($expected, $path, $pathinfo) + { + $stack = new RequestStack(); + $stack->push(Request::create($pathinfo)); + $helper = new UrlHelper($stack); + + $this->assertEquals($expected, $helper->getAbsoluteUrl($path)); + } + + public function getGenerateAbsoluteUrlData() + { + return [ + ['http://localhost/foo.png', '/foo.png', '/foo/bar.html'], + ['http://localhost/foo/foo.png', 'foo.png', '/foo/bar.html'], + ['http://localhost/foo/foo.png', 'foo.png', '/foo/bar'], + ['http://localhost/foo/bar/foo.png', 'foo.png', '/foo/bar/'], + + ['http://example.com/baz', 'http://example.com/baz', '/'], + ['https://example.com/baz', 'https://example.com/baz', '/'], + ['//example.com/baz', '//example.com/baz', '/'], + + ['http://localhost/foo/bar?baz', '?baz', '/foo/bar'], + ['http://localhost/foo/bar?baz=1', '?baz=1', '/foo/bar?foo=1'], + ['http://localhost/foo/baz?baz=1', 'baz?baz=1', '/foo/bar?foo=1'], + + ['http://localhost/foo/bar#baz', '#baz', '/foo/bar'], + ['http://localhost/foo/bar?0#baz', '#baz', '/foo/bar?0'], + ['http://localhost/foo/bar?baz=1#baz', '?baz=1#baz', '/foo/bar?foo=1'], + ['http://localhost/foo/baz?baz=1#baz', 'baz?baz=1#baz', '/foo/bar?foo=1'], + ]; + } + + /** + * @dataProvider getGenerateAbsoluteUrlRequestContextData + */ + public function testGenerateAbsoluteUrlWithRequestContext($path, $baseUrl, $host, $scheme, $httpPort, $httpsPort, $expected) + { + if (!class_exists('Symfony\Component\Routing\RequestContext')) { + $this->markTestSkipped('The Routing component is needed to run tests that depend on its request context.'); + } + + $requestContext = new RequestContext($baseUrl, 'GET', $host, $scheme, $httpPort, $httpsPort, $path); + $helper = new UrlHelper(new RequestStack(), $requestContext); + + $this->assertEquals($expected, $helper->getAbsoluteUrl($path)); + } + + /** + * @dataProvider getGenerateAbsoluteUrlRequestContextData + */ + public function testGenerateAbsoluteUrlWithoutRequestAndRequestContext($path) + { + if (!class_exists('Symfony\Component\Routing\RequestContext')) { + $this->markTestSkipped('The Routing component is needed to run tests that depend on its request context.'); + } + + $helper = new UrlHelper(new RequestStack()); + + $this->assertEquals($path, $helper->getAbsoluteUrl($path)); + } + + public function getGenerateAbsoluteUrlRequestContextData() + { + return [ + ['/foo.png', '/foo', 'localhost', 'http', 80, 443, 'http://localhost/foo.png'], + ['foo.png', '/foo', 'localhost', 'http', 80, 443, 'http://localhost/foo/foo.png'], + ['foo.png', '/foo/bar/', 'localhost', 'http', 80, 443, 'http://localhost/foo/bar/foo.png'], + ['/foo.png', '/foo', 'localhost', 'https', 80, 443, 'https://localhost/foo.png'], + ['foo.png', '/foo', 'localhost', 'https', 80, 443, 'https://localhost/foo/foo.png'], + ['foo.png', '/foo/bar/', 'localhost', 'https', 80, 443, 'https://localhost/foo/bar/foo.png'], + ['/foo.png', '/foo', 'localhost', 'http', 443, 80, 'http://localhost:443/foo.png'], + ['/foo.png', '/foo', 'localhost', 'https', 443, 80, 'https://localhost:80/foo.png'], + ]; + } + + public function testGenerateAbsoluteUrlWithScriptFileName() + { + $request = Request::create('http://localhost/app/web/app_dev.php'); + $request->server->set('SCRIPT_FILENAME', '/var/www/app/web/app_dev.php'); + + $stack = new RequestStack(); + $stack->push($request); + $helper = new UrlHelper($stack); + + $this->assertEquals( + 'http://localhost/app/web/bundles/framework/css/structure.css', + $helper->getAbsoluteUrl('/app/web/bundles/framework/css/structure.css') + ); + } + + /** + * @dataProvider getGenerateRelativePathData() + */ + public function testGenerateRelativePath($expected, $path, $pathinfo) + { + if (!method_exists('Symfony\Component\HttpFoundation\Request', 'getRelativeUriForPath')) { + $this->markTestSkipped('Your version of Symfony HttpFoundation is too old.'); + } + + $stack = new RequestStack(); + $stack->push(Request::create($pathinfo)); + $urlHelper = new UrlHelper($stack); + + $this->assertEquals($expected, $urlHelper->getRelativePath($path)); + } + + public function getGenerateRelativePathData() + { + return [ + ['../foo.png', '/foo.png', '/foo/bar.html'], + ['../baz/foo.png', '/baz/foo.png', '/foo/bar.html'], + ['baz/foo.png', 'baz/foo.png', '/foo/bar.html'], + + ['http://example.com/baz', 'http://example.com/baz', '/'], + ['https://example.com/baz', 'https://example.com/baz', '/'], + ['//example.com/baz', '//example.com/baz', '/'], + ]; + } +} diff --git a/vendor/symfony/http-foundation/UrlHelper.php b/vendor/symfony/http-foundation/UrlHelper.php new file mode 100644 index 00000000..3c06e932 --- /dev/null +++ b/vendor/symfony/http-foundation/UrlHelper.php @@ -0,0 +1,102 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation; + +use Symfony\Component\Routing\RequestContext; + +/** + * A helper service for manipulating URLs within and outside the request scope. + * + * @author Valentin Udaltsov + */ +final class UrlHelper +{ + private $requestStack; + private $requestContext; + + public function __construct(RequestStack $requestStack, ?RequestContext $requestContext = null) + { + $this->requestStack = $requestStack; + $this->requestContext = $requestContext; + } + + public function getAbsoluteUrl(string $path): string + { + if (false !== strpos($path, '://') || '//' === substr($path, 0, 2)) { + return $path; + } + + if (null === $request = $this->requestStack->getMasterRequest()) { + return $this->getAbsoluteUrlFromContext($path); + } + + if ('#' === $path[0]) { + $path = $request->getRequestUri().$path; + } elseif ('?' === $path[0]) { + $path = $request->getPathInfo().$path; + } + + if (!$path || '/' !== $path[0]) { + $prefix = $request->getPathInfo(); + $last = \strlen($prefix) - 1; + if ($last !== $pos = strrpos($prefix, '/')) { + $prefix = substr($prefix, 0, $pos).'/'; + } + + return $request->getUriForPath($prefix.$path); + } + + return $request->getSchemeAndHttpHost().$path; + } + + public function getRelativePath(string $path): string + { + if (false !== strpos($path, '://') || '//' === substr($path, 0, 2)) { + return $path; + } + + if (null === $request = $this->requestStack->getMasterRequest()) { + return $path; + } + + return $request->getRelativeUriForPath($path); + } + + private function getAbsoluteUrlFromContext(string $path): string + { + if (null === $this->requestContext || '' === $host = $this->requestContext->getHost()) { + return $path; + } + + $scheme = $this->requestContext->getScheme(); + $port = ''; + + if ('http' === $scheme && 80 !== $this->requestContext->getHttpPort()) { + $port = ':'.$this->requestContext->getHttpPort(); + } elseif ('https' === $scheme && 443 !== $this->requestContext->getHttpsPort()) { + $port = ':'.$this->requestContext->getHttpsPort(); + } + + if ('#' === $path[0]) { + $queryString = $this->requestContext->getQueryString(); + $path = $this->requestContext->getPathInfo().($queryString ? '?'.$queryString : '').$path; + } elseif ('?' === $path[0]) { + $path = $this->requestContext->getPathInfo().$path; + } + + if ('/' !== $path[0]) { + $path = rtrim($this->requestContext->getBaseUrl(), '/').'/'.$path; + } + + return $scheme.'://'.$host.$port.$path; + } +} diff --git a/vendor/symfony/http-foundation/composer.json b/vendor/symfony/http-foundation/composer.json index 76381a7c..f3097511 100644 --- a/vendor/symfony/http-foundation/composer.json +++ b/vendor/symfony/http-foundation/composer.json @@ -17,6 +17,7 @@ ], "require": { "php": "^7.1.3", + "symfony/mime": "^4.3", "symfony/polyfill-mbstring": "~1.1" }, "require-dev": { @@ -32,7 +33,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "4.2-dev" + "dev-master": "4.3-dev" } } } diff --git a/vendor/symfony/http-kernel/CHANGELOG.md b/vendor/symfony/http-kernel/CHANGELOG.md index b96b4aef..b1a5f510 100644 --- a/vendor/symfony/http-kernel/CHANGELOG.md +++ b/vendor/symfony/http-kernel/CHANGELOG.md @@ -1,6 +1,31 @@ CHANGELOG ========= +4.3.0 +----- + + * renamed `Client` to `HttpKernelBrowser` + * `KernelInterface` doesn't extend `Serializable` anymore + * deprecated the `Kernel::serialize()` and `unserialize()` methods + * increased the priority of `Symfony\Component\HttpKernel\EventListener\AddRequestFormatsListener` + * made `Symfony\Component\HttpKernel\EventListener\LocaleListener` set the default locale early + * deprecated `TranslatorListener` in favor of `LocaleAwareListener` + * added the registration of all `LocaleAwareInterface` implementations into the `LocaleAwareListener` + * made `FileLinkFormatter` final and not implement `Serializable` anymore + * the base `DataCollector` doesn't implement `Serializable` anymore, you should + store all the serialized state in the data property instead + * `DumpDataCollector` has been marked as `final` + * added an event listener to prevent search engines from indexing applications in debug mode. + * renamed `FilterControllerArgumentsEvent` to `ControllerArgumentsEvent` + * renamed `FilterControllerEvent` to `ControllerEvent` + * renamed `FilterResponseEvent` to `ResponseEvent` + * renamed `GetResponseEvent` to `RequestEvent` + * renamed `GetResponseForControllerResultEvent` to `ViewEvent` + * renamed `GetResponseForExceptionEvent` to `ExceptionEvent` + * renamed `PostResponseEvent` to `TerminateEvent` + * added `HttpClientKernel` for handling requests with an `HttpClientInterface` instance + * added `trace_header` and `trace_level` configuration options to `HttpCache` + 4.2.0 ----- diff --git a/vendor/symfony/http-kernel/CacheClearer/ChainCacheClearer.php b/vendor/symfony/http-kernel/CacheClearer/ChainCacheClearer.php index a646119d..5061a8d1 100644 --- a/vendor/symfony/http-kernel/CacheClearer/ChainCacheClearer.php +++ b/vendor/symfony/http-kernel/CacheClearer/ChainCacheClearer.php @@ -22,7 +22,7 @@ class ChainCacheClearer implements CacheClearerInterface { private $clearers; - public function __construct(iterable $clearers = array()) + public function __construct(iterable $clearers = []) { $this->clearers = $clearers; } diff --git a/vendor/symfony/http-kernel/CacheClearer/Psr6CacheClearer.php b/vendor/symfony/http-kernel/CacheClearer/Psr6CacheClearer.php index d7db0270..47a6ece5 100644 --- a/vendor/symfony/http-kernel/CacheClearer/Psr6CacheClearer.php +++ b/vendor/symfony/http-kernel/CacheClearer/Psr6CacheClearer.php @@ -16,9 +16,9 @@ namespace Symfony\Component\HttpKernel\CacheClearer; */ class Psr6CacheClearer implements CacheClearerInterface { - private $pools = array(); + private $pools = []; - public function __construct(array $pools = array()) + public function __construct(array $pools = []) { $this->pools = $pools; } diff --git a/vendor/symfony/http-kernel/CacheWarmer/CacheWarmerAggregate.php b/vendor/symfony/http-kernel/CacheWarmer/CacheWarmerAggregate.php index 171b3859..dd527708 100644 --- a/vendor/symfony/http-kernel/CacheWarmer/CacheWarmerAggregate.php +++ b/vendor/symfony/http-kernel/CacheWarmer/CacheWarmerAggregate.php @@ -26,7 +26,7 @@ class CacheWarmerAggregate implements CacheWarmerInterface private $optionalsEnabled = false; private $onlyOptionalsEnabled = false; - public function __construct(iterable $warmers = array(), bool $debug = false, string $deprecationLogsFilepath = null) + public function __construct(iterable $warmers = [], bool $debug = false, string $deprecationLogsFilepath = null) { $this->warmers = $warmers; $this->debug = $debug; @@ -51,7 +51,7 @@ class CacheWarmerAggregate implements CacheWarmerInterface public function warmUp($cacheDir) { if ($this->debug) { - $collectedLogs = array(); + $collectedLogs = []; $previousHandler = \defined('PHPUNIT_COMPOSER_INSTALL'); $previousHandler = $previousHandler ?: set_error_handler(function ($type, $message, $file, $line) use (&$collectedLogs, &$previousHandler) { if (E_USER_DEPRECATED !== $type && E_DEPRECATED !== $type) { @@ -73,14 +73,14 @@ class CacheWarmerAggregate implements CacheWarmerInterface } } - $collectedLogs[$message] = array( + $collectedLogs[$message] = [ 'type' => $type, 'message' => $message, 'file' => $file, 'line' => $line, 'trace' => $backtrace, 'count' => 1, - ); + ]; }); } diff --git a/vendor/symfony/http-kernel/Client.php b/vendor/symfony/http-kernel/Client.php index 62555e9a..66ce0649 100644 --- a/vendor/symfony/http-kernel/Client.php +++ b/vendor/symfony/http-kernel/Client.php @@ -11,7 +11,7 @@ namespace Symfony\Component\HttpKernel; -use Symfony\Component\BrowserKit\Client as BaseClient; +use Symfony\Component\BrowserKit\AbstractBrowser; use Symfony\Component\BrowserKit\CookieJar; use Symfony\Component\BrowserKit\History; use Symfony\Component\BrowserKit\Request as DomRequest; @@ -21,14 +21,11 @@ use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; /** - * Client simulates a browser and makes requests to a Kernel object. + * Client simulates a browser and makes requests to an HttpKernel instance. * - * @author Fabien Potencier - * - * @method Request getRequest() A Request instance - * @method Response getResponse() A Response instance + * @deprecated since Symfony 4.3, use HttpKernelBrowser instead. */ -class Client extends BaseClient +class Client extends AbstractBrowser { protected $kernel; private $catchExceptions = true; @@ -39,7 +36,7 @@ class Client extends BaseClient * @param History $history A History instance to store the browser history * @param CookieJar $cookieJar A CookieJar instance to store the cookies */ - public function __construct(HttpKernelInterface $kernel, array $server = array(), History $history = null, CookieJar $cookieJar = null) + public function __construct(HttpKernelInterface $kernel, array $server = [], History $history = null, CookieJar $cookieJar = null) { // These class properties must be set before calling the parent constructor, as it may depend on it. $this->kernel = $kernel; @@ -159,7 +156,7 @@ EOF; */ protected function filterFiles(array $files) { - $filtered = array(); + $filtered = []; foreach ($files as $key => $value) { if (\is_array($value)) { $filtered[$key] = $this->filterFiles($value); diff --git a/vendor/symfony/http-kernel/Config/FileLocator.php b/vendor/symfony/http-kernel/Config/FileLocator.php index 20d91b2f..f88d1684 100644 --- a/vendor/symfony/http-kernel/Config/FileLocator.php +++ b/vendor/symfony/http-kernel/Config/FileLocator.php @@ -29,7 +29,7 @@ class FileLocator extends BaseFileLocator * @param string|null $path The path the global resource directory * @param array $paths An array of paths where to look for resources */ - public function __construct(KernelInterface $kernel, string $path = null, array $paths = array()) + public function __construct(KernelInterface $kernel, string $path = null, array $paths = []) { $this->kernel = $kernel; if (null !== $path) { diff --git a/vendor/symfony/http-kernel/Controller/ArgumentResolver.php b/vendor/symfony/http-kernel/Controller/ArgumentResolver.php index 142a6d54..86ceab2f 100644 --- a/vendor/symfony/http-kernel/Controller/ArgumentResolver.php +++ b/vendor/symfony/http-kernel/Controller/ArgumentResolver.php @@ -34,7 +34,7 @@ final class ArgumentResolver implements ArgumentResolverInterface */ private $argumentValueResolvers; - public function __construct(ArgumentMetadataFactoryInterface $argumentMetadataFactory = null, iterable $argumentValueResolvers = array()) + public function __construct(ArgumentMetadataFactoryInterface $argumentMetadataFactory = null, iterable $argumentValueResolvers = []) { $this->argumentMetadataFactory = $argumentMetadataFactory ?: new ArgumentMetadataFactory(); $this->argumentValueResolvers = $argumentValueResolvers ?: self::getDefaultArgumentValueResolvers(); @@ -45,7 +45,7 @@ final class ArgumentResolver implements ArgumentResolverInterface */ public function getArguments(Request $request, $controller) { - $arguments = array(); + $arguments = []; foreach ($this->argumentMetadataFactory->createArgumentMetadata($controller) as $metadata) { foreach ($this->argumentValueResolvers as $resolver) { @@ -83,12 +83,12 @@ final class ArgumentResolver implements ArgumentResolverInterface public static function getDefaultArgumentValueResolvers(): iterable { - return array( + return [ new RequestAttributeValueResolver(), new RequestValueResolver(), new SessionValueResolver(), new DefaultValueResolver(), new VariadicValueResolver(), - ); + ]; } } diff --git a/vendor/symfony/http-kernel/Controller/ArgumentResolver/NotTaggedControllerValueResolver.php b/vendor/symfony/http-kernel/Controller/ArgumentResolver/NotTaggedControllerValueResolver.php new file mode 100644 index 00000000..19e324dc --- /dev/null +++ b/vendor/symfony/http-kernel/Controller/ArgumentResolver/NotTaggedControllerValueResolver.php @@ -0,0 +1,81 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Controller\ArgumentResolver; + +use Psr\Container\ContainerInterface; +use Symfony\Component\DependencyInjection\Exception\RuntimeException; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpKernel\Controller\ArgumentValueResolverInterface; +use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata; + +/** + * Provides an intuitive error message when controller fails because it is not registered as a service. + * + * @author Simeon Kolev + */ +final class NotTaggedControllerValueResolver implements ArgumentValueResolverInterface +{ + private $container; + + public function __construct(ContainerInterface $container) + { + $this->container = $container; + } + + /** + * {@inheritdoc} + */ + public function supports(Request $request, ArgumentMetadata $argument) + { + $controller = $request->attributes->get('_controller'); + + if (\is_array($controller) && \is_callable($controller, true) && \is_string($controller[0])) { + $controller = $controller[0].'::'.$controller[1]; + } elseif (!\is_string($controller) || '' === $controller) { + return false; + } + + if ('\\' === $controller[0]) { + $controller = ltrim($controller, '\\'); + } + + if (!$this->container->has($controller) && false !== $i = strrpos($controller, ':')) { + $controller = substr($controller, 0, $i).strtolower(substr($controller, $i)); + } + + return false === $this->container->has($controller); + } + + /** + * {@inheritdoc} + */ + public function resolve(Request $request, ArgumentMetadata $argument) + { + if (\is_array($controller = $request->attributes->get('_controller'))) { + $controller = $controller[0].'::'.$controller[1]; + } + + if ('\\' === $controller[0]) { + $controller = ltrim($controller, '\\'); + } + + if (!$this->container->has($controller)) { + $i = strrpos($controller, ':'); + $controller = substr($controller, 0, $i).strtolower(substr($controller, $i)); + } + + $what = sprintf('argument $%s of "%s()"', $argument->getName(), $controller); + $message = sprintf('Could not resolve %s, maybe you forgot to register the controller as a service or missed tagging it with the "controller.service_arguments"?', $what); + + throw new RuntimeException($message); + } +} diff --git a/vendor/symfony/http-kernel/Controller/ControllerReference.php b/vendor/symfony/http-kernel/Controller/ControllerReference.php index f424fdc8..b4fdadd2 100644 --- a/vendor/symfony/http-kernel/Controller/ControllerReference.php +++ b/vendor/symfony/http-kernel/Controller/ControllerReference.php @@ -27,15 +27,15 @@ use Symfony\Component\HttpKernel\Fragment\FragmentRendererInterface; class ControllerReference { public $controller; - public $attributes = array(); - public $query = array(); + public $attributes = []; + public $query = []; /** * @param string $controller The controller name * @param array $attributes An array of parameters to add to the Request attributes * @param array $query An array of parameters to add to the Request query string */ - public function __construct(string $controller, array $attributes = array(), array $query = array()) + public function __construct(string $controller, array $attributes = [], array $query = []) { $this->controller = $controller; $this->attributes = $attributes; diff --git a/vendor/symfony/http-kernel/Controller/ControllerResolver.php b/vendor/symfony/http-kernel/Controller/ControllerResolver.php index 04c5fcf5..3cebfb3e 100644 --- a/vendor/symfony/http-kernel/Controller/ControllerResolver.php +++ b/vendor/symfony/http-kernel/Controller/ControllerResolver.php @@ -107,7 +107,7 @@ class ControllerResolver implements ControllerResolverInterface list($class, $method) = explode('::', $controller, 2); try { - return array($this->instantiateController($class), $method); + return [$this->instantiateController($class), $method]; } catch (\Error | \LogicException $e) { try { if ((new \ReflectionMethod($class, $method))->isStatic()) { @@ -155,7 +155,7 @@ class ControllerResolver implements ControllerResolverInterface } if (!isset($callable[0]) || !isset($callable[1]) || 2 !== \count($callable)) { - return 'Invalid array callable, expected array(controller, method).'; + return 'Invalid array callable, expected [controller, method].'; } list($controller, $method) = $callable; @@ -172,7 +172,7 @@ class ControllerResolver implements ControllerResolverInterface $collection = $this->getClassMethodsWithoutMagicMethods($controller); - $alternatives = array(); + $alternatives = []; foreach ($collection as $item) { $lev = levenshtein($method, $item); diff --git a/vendor/symfony/http-kernel/Controller/ControllerResolverInterface.php b/vendor/symfony/http-kernel/Controller/ControllerResolverInterface.php index a54f8b51..8b70a88f 100644 --- a/vendor/symfony/http-kernel/Controller/ControllerResolverInterface.php +++ b/vendor/symfony/http-kernel/Controller/ControllerResolverInterface.php @@ -29,7 +29,7 @@ interface ControllerResolverInterface * As several resolvers can exist for a single application, a resolver must * return false when it is not able to determine the controller. * - * The resolver must only throw an exception when it should be able to load + * The resolver must only throw an exception when it should be able to load a * controller but cannot because of some errors made by the developer. * * @return callable|false A PHP callable representing the Controller, diff --git a/vendor/symfony/http-kernel/ControllerMetadata/ArgumentMetadataFactory.php b/vendor/symfony/http-kernel/ControllerMetadata/ArgumentMetadataFactory.php index cc2ed9f2..8ee9b0b9 100644 --- a/vendor/symfony/http-kernel/ControllerMetadata/ArgumentMetadataFactory.php +++ b/vendor/symfony/http-kernel/ControllerMetadata/ArgumentMetadataFactory.php @@ -23,7 +23,7 @@ final class ArgumentMetadataFactory implements ArgumentMetadataFactoryInterface */ public function createArgumentMetadata($controller) { - $arguments = array(); + $arguments = []; if (\is_array($controller)) { $reflection = new \ReflectionMethod($controller[0], $controller[1]); diff --git a/vendor/symfony/http-kernel/DataCollector/ConfigDataCollector.php b/vendor/symfony/http-kernel/DataCollector/ConfigDataCollector.php index f07ac89c..c3c3f94e 100644 --- a/vendor/symfony/http-kernel/DataCollector/ConfigDataCollector.php +++ b/vendor/symfony/http-kernel/DataCollector/ConfigDataCollector.php @@ -57,7 +57,7 @@ class ConfigDataCollector extends DataCollector implements LateDataCollectorInte */ public function collect(Request $request, Response $response, \Exception $exception = null) { - $this->data = array( + $this->data = [ 'app_name' => $this->name, 'app_version' => $this->version, 'token' => $response->headers->get('X-Debug-Token'), @@ -72,9 +72,9 @@ class ConfigDataCollector extends DataCollector implements LateDataCollectorInte 'xdebug_enabled' => \extension_loaded('xdebug'), 'apcu_enabled' => \extension_loaded('apcu') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN), 'zend_opcache_enabled' => \extension_loaded('Zend OPcache') && filter_var(ini_get('opcache.enable'), FILTER_VALIDATE_BOOLEAN), - 'bundles' => array(), + 'bundles' => [], 'sapi_name' => \PHP_SAPI, - ); + ]; if (isset($this->kernel)) { foreach ($this->kernel->getBundles() as $name => $bundle) { @@ -100,7 +100,7 @@ class ConfigDataCollector extends DataCollector implements LateDataCollectorInte */ public function reset() { - $this->data = array(); + $this->data = []; } public function lateCollect() diff --git a/vendor/symfony/http-kernel/DataCollector/DataCollector.php b/vendor/symfony/http-kernel/DataCollector/DataCollector.php index a3d8c99d..d3020a31 100644 --- a/vendor/symfony/http-kernel/DataCollector/DataCollector.php +++ b/vendor/symfony/http-kernel/DataCollector/DataCollector.php @@ -12,6 +12,7 @@ namespace Symfony\Component\HttpKernel\DataCollector; use Symfony\Component\VarDumper\Caster\CutStub; +use Symfony\Component\VarDumper\Caster\ReflectionCaster; use Symfony\Component\VarDumper\Cloner\ClonerInterface; use Symfony\Component\VarDumper\Cloner\Data; use Symfony\Component\VarDumper\Cloner\Stub; @@ -25,23 +26,36 @@ use Symfony\Component\VarDumper\Cloner\VarCloner; * @author Fabien Potencier * @author Bernhard Schussek */ -abstract class DataCollector implements DataCollectorInterface, \Serializable +abstract class DataCollector implements DataCollectorInterface { - protected $data = array(); + protected $data = []; /** * @var ClonerInterface */ private $cloner; + /** + * @deprecated since Symfony 4.3, store all the serialized state in the data property instead + */ public function serialize() { - return serialize($this->data); + @trigger_error(sprintf('The "%s" method is deprecated since Symfony 4.3, store all the serialized state in the data property instead.', __METHOD__), E_USER_DEPRECATED); + + $trace = debug_backtrace(DEBUG_BACKTRACE_PROVIDE_OBJECT, 2); + $isCalledFromOverridingMethod = isset($trace[1]['function'], $trace[1]['object']) && 'serialize' === $trace[1]['function'] && $this === $trace[1]['object']; + + return $isCalledFromOverridingMethod ? $this->data : serialize($this->data); } + /** + * @deprecated since Symfony 4.3, store all the serialized state in the data property instead + */ public function unserialize($data) { - $this->data = unserialize($data); + @trigger_error(sprintf('The "%s" method is deprecated since Symfony 4.3, store all the serialized state in the data property instead.', __METHOD__), E_USER_DEPRECATED); + + $this->data = \is_array($data) ? $data : unserialize($data); } /** @@ -76,7 +90,7 @@ abstract class DataCollector implements DataCollectorInterface, \Serializable */ protected function getCasters() { - return array( + $casters = [ '*' => function ($v, array $a, Stub $s, $isNested) { if (!$v instanceof Stub) { foreach ($a as $k => $v) { @@ -88,6 +102,30 @@ abstract class DataCollector implements DataCollectorInterface, \Serializable return $a; }, - ); + ]; + + if (method_exists(ReflectionCaster::class, 'unsetClosureFileInfo')) { + $casters += ReflectionCaster::UNSET_CLOSURE_FILE_INFO; + } + + return $casters; + } + + public function __sleep() + { + if (__CLASS__ !== $c = (new \ReflectionMethod($this, 'serialize'))->getDeclaringClass()->name) { + @trigger_error(sprintf('Implementing the "%s::serialize()" method is deprecated since Symfony 4.3, store all the serialized state in the "data" property instead.', $c), E_USER_DEPRECATED); + $this->data = $this->serialize(); + } + + return ['data']; + } + + public function __wakeup() + { + if (__CLASS__ !== $c = (new \ReflectionMethod($this, 'unserialize'))->getDeclaringClass()->name) { + @trigger_error(sprintf('Implementing the "%s::unserialize()" method is deprecated since Symfony 4.3, store all the serialized state in the "data" property instead.', $c), E_USER_DEPRECATED); + $this->unserialize($this->data); + } } } diff --git a/vendor/symfony/http-kernel/DataCollector/DumpDataCollector.php b/vendor/symfony/http-kernel/DataCollector/DumpDataCollector.php index 13694f5a..577eb2ca 100644 --- a/vendor/symfony/http-kernel/DataCollector/DumpDataCollector.php +++ b/vendor/symfony/http-kernel/DataCollector/DumpDataCollector.php @@ -25,6 +25,8 @@ use Symfony\Component\VarDumper\Server\Connection; /** * @author Nicolas Grekas + * + * @final since Symfony 4.3 */ class DumpDataCollector extends DataCollector implements DataDumperInterface { @@ -52,12 +54,12 @@ class DumpDataCollector extends DataCollector implements DataDumperInterface $this->dumper = $dumper; // All clones share these properties by reference: - $this->rootRefs = array( + $this->rootRefs = [ &$this->data, &$this->dataCount, &$this->isCollected, &$this->clonesCount, - ); + ]; $this->sourceContextProvider = $dumper instanceof Connection && isset($dumper->getContextProviders()['source']) ? $dumper->getContextProviders()['source'] : new SourceContextProvider($this->charset); } @@ -85,6 +87,9 @@ class DumpDataCollector extends DataCollector implements DataDumperInterface $this->isCollected = false; } + if (!$this->dataCount) { + $this->data = []; + } $this->data[] = compact('data', 'name', 'file', 'line', 'fileExcerpt'); ++$this->dataCount; @@ -95,6 +100,10 @@ class DumpDataCollector extends DataCollector implements DataDumperInterface public function collect(Request $request, Response $response, \Exception $exception = null) { + if (!$this->dataCount) { + $this->data = []; + } + // Sub-requests and programmatic calls stay in the collected profile. if ($this->dumper || ($this->requestStack && $this->requestStack->getMasterRequest() !== $request) || $request->isXmlHttpRequest() || $request->headers->has('Origin')) { return; @@ -110,9 +119,12 @@ class DumpDataCollector extends DataCollector implements DataDumperInterface ) { if ($response->headers->has('Content-Type') && false !== strpos($response->headers->get('Content-Type'), 'html')) { $dumper = new HtmlDumper('php://output', $this->charset); - $dumper->setDisplayOptions(array('fileLinkFormat' => $this->fileLinkFormat)); + $dumper->setDisplayOptions(['fileLinkFormat' => $this->fileLinkFormat]); } else { $dumper = new CliDumper('php://output', $this->charset); + if (method_exists($dumper, 'setDisplayOptions')) { + $dumper->setDisplayOptions(['fileLinkFormat' => $this->fileLinkFormat]); + } } foreach ($this->data as $dump) { @@ -126,35 +138,45 @@ class DumpDataCollector extends DataCollector implements DataDumperInterface if ($this->stopwatch) { $this->stopwatch->reset(); } - $this->data = array(); + $this->data = []; $this->dataCount = 0; $this->isCollected = true; $this->clonesCount = 0; $this->clonesIndex = 0; } - public function serialize() + /** + * @internal + */ + public function __sleep() { + if (!$this->dataCount) { + $this->data = []; + } + if ($this->clonesCount !== $this->clonesIndex) { - return 'a:0:{}'; + return []; } $this->data[] = $this->fileLinkFormat; $this->data[] = $this->charset; - $ser = serialize($this->data); - $this->data = array(); $this->dataCount = 0; $this->isCollected = true; - return $ser; + return parent::__sleep(); } - public function unserialize($data) + /** + * @internal + */ + public function __wakeup() { - parent::unserialize($data); + parent::__wakeup(); + $charset = array_pop($this->data); $fileLinkFormat = array_pop($this->data); $this->dataCount = \count($this->data); + self::__construct($this->stopwatch, $fileLinkFormat, $charset); } @@ -169,11 +191,15 @@ class DumpDataCollector extends DataCollector implements DataDumperInterface if ('html' === $format) { $dumper = new HtmlDumper($data, $this->charset); - $dumper->setDisplayOptions(array('fileLinkFormat' => $this->fileLinkFormat)); + $dumper->setDisplayOptions(['fileLinkFormat' => $this->fileLinkFormat]); } else { throw new \InvalidArgumentException(sprintf('Invalid dump format: %s', $format)); } - $dumps = array(); + $dumps = []; + + if (!$this->dataCount) { + return $this->data = []; + } foreach ($this->data as $dump) { $dumper->dump($dump['data']->withMaxDepth($maxDepthLimit)->withMaxItemsPerDepth($maxItemsPerDepth)); @@ -193,7 +219,7 @@ class DumpDataCollector extends DataCollector implements DataDumperInterface public function __destruct() { - if (0 === $this->clonesCount-- && !$this->isCollected && $this->data) { + if (0 === $this->clonesCount-- && !$this->isCollected && $this->dataCount) { $this->clonesCount = 0; $this->isCollected = true; @@ -207,14 +233,17 @@ class DumpDataCollector extends DataCollector implements DataDumperInterface if (isset($_SERVER['VAR_DUMPER_FORMAT'])) { $html = 'html' === $_SERVER['VAR_DUMPER_FORMAT']; } else { - $html = !\in_array(\PHP_SAPI, array('cli', 'phpdbg'), true) && stripos($h[$i], 'html'); + $html = !\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true) && stripos($h[$i], 'html'); } if ($html) { $dumper = new HtmlDumper('php://output', $this->charset); - $dumper->setDisplayOptions(array('fileLinkFormat' => $this->fileLinkFormat)); + $dumper->setDisplayOptions(['fileLinkFormat' => $this->fileLinkFormat]); } else { $dumper = new CliDumper('php://output', $this->charset); + if (method_exists($dumper, 'setDisplayOptions')) { + $dumper->setDisplayOptions(['fileLinkFormat' => $this->fileLinkFormat]); + } } foreach ($this->data as $i => $dump) { @@ -222,7 +251,7 @@ class DumpDataCollector extends DataCollector implements DataDumperInterface $this->doDump($dumper, $dump['data'], $dump['name'], $dump['file'], $dump['line']); } - $this->data = array(); + $this->data = []; $this->dataCount = 0; } } @@ -236,7 +265,7 @@ class DumpDataCollector extends DataCollector implements DataDumperInterface $s = $this->style('meta', '%s'); $f = strip_tags($this->style('', $file)); $name = strip_tags($this->style('', $name)); - if ($fmt && $link = \is_string($fmt) ? strtr($fmt, array('%f' => $file, '%l' => $line)) : $fmt->format($file, $line)) { + if ($fmt && $link = \is_string($fmt) ? strtr($fmt, ['%f' => $file, '%l' => $line]) : $fmt->format($file, $line)) { $name = sprintf(''.$s.'', strip_tags($this->style('', $link)), $f, $name); } else { $name = sprintf(''.$s.'', $f, $name); diff --git a/vendor/symfony/http-kernel/DataCollector/EventDataCollector.php b/vendor/symfony/http-kernel/DataCollector/EventDataCollector.php index 3a7e51bf..d918ddf7 100644 --- a/vendor/symfony/http-kernel/DataCollector/EventDataCollector.php +++ b/vendor/symfony/http-kernel/DataCollector/EventDataCollector.php @@ -13,9 +13,10 @@ namespace Symfony\Component\HttpKernel\DataCollector; use Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher; use Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcherInterface; -use Symfony\Component\EventDispatcher\EventDispatcherInterface; use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\RequestStack; use Symfony\Component\HttpFoundation\Response; +use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; use Symfony\Contracts\Service\ResetInterface; /** @@ -26,10 +27,13 @@ use Symfony\Contracts\Service\ResetInterface; class EventDataCollector extends DataCollector implements LateDataCollectorInterface { protected $dispatcher; + private $requestStack; + private $currentRequest; - public function __construct(EventDispatcherInterface $dispatcher = null) + public function __construct(EventDispatcherInterface $dispatcher = null, RequestStack $requestStack = null) { $this->dispatcher = $dispatcher; + $this->requestStack = $requestStack; } /** @@ -37,16 +41,17 @@ class EventDataCollector extends DataCollector implements LateDataCollectorInter */ public function collect(Request $request, Response $response, \Exception $exception = null) { - $this->data = array( - 'called_listeners' => array(), - 'not_called_listeners' => array(), - 'orphaned_events' => array(), - ); + $this->currentRequest = $this->requestStack && $this->requestStack->getMasterRequest() !== $request ? $request : null; + $this->data = [ + 'called_listeners' => [], + 'not_called_listeners' => [], + 'orphaned_events' => [], + ]; } public function reset() { - $this->data = array(); + $this->data = []; if ($this->dispatcher instanceof ResetInterface) { $this->dispatcher->reset(); @@ -56,12 +61,12 @@ class EventDataCollector extends DataCollector implements LateDataCollectorInter public function lateCollect() { if ($this->dispatcher instanceof TraceableEventDispatcherInterface) { - $this->setCalledListeners($this->dispatcher->getCalledListeners()); - $this->setNotCalledListeners($this->dispatcher->getNotCalledListeners()); + $this->setCalledListeners($this->dispatcher->getCalledListeners($this->currentRequest)); + $this->setNotCalledListeners($this->dispatcher->getNotCalledListeners($this->currentRequest)); } if ($this->dispatcher instanceof TraceableEventDispatcher) { - $this->setOrphanedEvents($this->dispatcher->getOrphanedEvents()); + $this->setOrphanedEvents($this->dispatcher->getOrphanedEvents($this->currentRequest)); } $this->data = $this->cloneVar($this->data); diff --git a/vendor/symfony/http-kernel/DataCollector/ExceptionDataCollector.php b/vendor/symfony/http-kernel/DataCollector/ExceptionDataCollector.php index 7a25f149..c76e7f45 100644 --- a/vendor/symfony/http-kernel/DataCollector/ExceptionDataCollector.php +++ b/vendor/symfony/http-kernel/DataCollector/ExceptionDataCollector.php @@ -28,9 +28,9 @@ class ExceptionDataCollector extends DataCollector public function collect(Request $request, Response $response, \Exception $exception = null) { if (null !== $exception) { - $this->data = array( + $this->data = [ 'exception' => FlattenException::create($exception), - ); + ]; } } @@ -39,7 +39,7 @@ class ExceptionDataCollector extends DataCollector */ public function reset() { - $this->data = array(); + $this->data = []; } /** diff --git a/vendor/symfony/http-kernel/DataCollector/LoggerDataCollector.php b/vendor/symfony/http-kernel/DataCollector/LoggerDataCollector.php index 3081ac7f..4091b676 100644 --- a/vendor/symfony/http-kernel/DataCollector/LoggerDataCollector.php +++ b/vendor/symfony/http-kernel/DataCollector/LoggerDataCollector.php @@ -55,7 +55,7 @@ class LoggerDataCollector extends DataCollector implements LateDataCollectorInte if ($this->logger instanceof DebugLoggerInterface) { $this->logger->clear(); } - $this->data = array(); + $this->data = []; } /** @@ -66,7 +66,9 @@ class LoggerDataCollector extends DataCollector implements LateDataCollectorInte if (null !== $this->logger) { $containerDeprecationLogs = $this->getContainerDeprecationLogs(); $this->data = $this->computeErrorsCount($containerDeprecationLogs); - $this->data['compiler_logs'] = $this->getContainerCompilerLogs(); + // get compiler logs later (only when they are needed) to improve performance + $this->data['compiler_logs'] = []; + $this->data['compiler_logs_filepath'] = $this->containerPathPrefix.'Compiler.log'; $this->data['logs'] = $this->sanitizeLogs(array_merge($this->logger->getLogs($this->currentRequest), $containerDeprecationLogs)); $this->data = $this->cloneVar($this->data); } @@ -80,12 +82,12 @@ class LoggerDataCollector extends DataCollector implements LateDataCollectorInte */ public function getLogs() { - return isset($this->data['logs']) ? $this->data['logs'] : array(); + return isset($this->data['logs']) ? $this->data['logs'] : []; } public function getPriorities() { - return isset($this->data['priorities']) ? $this->data['priorities'] : array(); + return isset($this->data['priorities']) ? $this->data['priorities'] : []; } public function countErrors() @@ -110,7 +112,7 @@ class LoggerDataCollector extends DataCollector implements LateDataCollectorInte public function getCompilerLogs() { - return isset($this->data['compiler_logs']) ? $this->data['compiler_logs'] : array(); + return $this->cloneVar($this->getContainerCompilerLogs($this->data['compiler_logs_filepath'] ?? null)); } /** @@ -124,13 +126,17 @@ class LoggerDataCollector extends DataCollector implements LateDataCollectorInte private function getContainerDeprecationLogs() { if (null === $this->containerPathPrefix || !file_exists($file = $this->containerPathPrefix.'Deprecations.log')) { - return array(); + return []; + } + + if ('' === $logContent = trim(file_get_contents($file))) { + return []; } $bootTime = filemtime($file); - $logs = array(); - foreach (unserialize(file_get_contents($file)) as $log) { - $log['context'] = array('exception' => new SilencedErrorContext($log['type'], $log['file'], $log['line'], $log['trace'], $log['count'])); + $logs = []; + foreach (unserialize($logContent) as $log) { + $log['context'] = ['exception' => new SilencedErrorContext($log['type'], $log['file'], $log['line'], $log['trace'], $log['count'])]; $log['timestamp'] = $bootTime; $log['priority'] = 100; $log['priorityName'] = 'DEBUG'; @@ -143,20 +149,20 @@ class LoggerDataCollector extends DataCollector implements LateDataCollectorInte return $logs; } - private function getContainerCompilerLogs() + private function getContainerCompilerLogs(?string $compilerLogsFilepath = null): array { - if (null === $this->containerPathPrefix || !file_exists($file = $this->containerPathPrefix.'Compiler.log')) { - return array(); + if (!file_exists($compilerLogsFilepath)) { + return []; } - $logs = array(); - foreach (file($file, FILE_IGNORE_NEW_LINES) as $log) { + $logs = []; + foreach (file($compilerLogsFilepath, FILE_IGNORE_NEW_LINES) as $log) { $log = explode(': ', $log, 2); if (!isset($log[1]) || !preg_match('/^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*+(?:\\\\[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*+)++$/', $log[0])) { - $log = array('Unknown Compiler Pass', implode(': ', $log)); + $log = ['Unknown Compiler Pass', implode(': ', $log)]; } - $logs[$log[0]][] = array('message' => $log[1]); + $logs[$log[0]][] = ['message' => $log[1]]; } return $logs; @@ -164,8 +170,8 @@ class LoggerDataCollector extends DataCollector implements LateDataCollectorInte private function sanitizeLogs($logs) { - $sanitizedLogs = array(); - $silencedLogs = array(); + $sanitizedLogs = []; + $silencedLogs = []; foreach ($logs as $log) { if (!$this->isSilencedOrDeprecationErrorLog($log)) { @@ -184,10 +190,10 @@ class LoggerDataCollector extends DataCollector implements LateDataCollectorInte $silencedLogs[$h] = true; if (!isset($sanitizedLogs[$message])) { - $sanitizedLogs[$message] = $log + array( + $sanitizedLogs[$message] = $log + [ 'errorCount' => 0, 'scream' => true, - ); + ]; } $sanitizedLogs[$message]['errorCount'] += $exception->count; @@ -199,10 +205,10 @@ class LoggerDataCollector extends DataCollector implements LateDataCollectorInte if (isset($sanitizedLogs[$errorId])) { ++$sanitizedLogs[$errorId]['errorCount']; } else { - $log += array( + $log += [ 'errorCount' => 1, 'scream' => false, - ); + ]; $sanitizedLogs[$errorId] = $log; } @@ -223,7 +229,7 @@ class LoggerDataCollector extends DataCollector implements LateDataCollectorInte return true; } - if ($exception instanceof \ErrorException && \in_array($exception->getSeverity(), array(E_DEPRECATED, E_USER_DEPRECATED), true)) { + if ($exception instanceof \ErrorException && \in_array($exception->getSeverity(), [E_DEPRECATED, E_USER_DEPRECATED], true)) { return true; } @@ -232,23 +238,23 @@ class LoggerDataCollector extends DataCollector implements LateDataCollectorInte private function computeErrorsCount(array $containerDeprecationLogs) { - $silencedLogs = array(); - $count = array( + $silencedLogs = []; + $count = [ 'error_count' => $this->logger->countErrors($this->currentRequest), 'deprecation_count' => 0, 'warning_count' => 0, 'scream_count' => 0, - 'priorities' => array(), - ); + 'priorities' => [], + ]; foreach ($this->logger->getLogs($this->currentRequest) as $log) { if (isset($count['priorities'][$log['priority']])) { ++$count['priorities'][$log['priority']]['count']; } else { - $count['priorities'][$log['priority']] = array( + $count['priorities'][$log['priority']] = [ 'count' => 1, 'name' => $log['priorityName'], - ); + ]; } if ('WARNING' === $log['priorityName']) { ++$count['warning_count']; diff --git a/vendor/symfony/http-kernel/DataCollector/MemoryDataCollector.php b/vendor/symfony/http-kernel/DataCollector/MemoryDataCollector.php index 310b2f91..7a6e1c06 100644 --- a/vendor/symfony/http-kernel/DataCollector/MemoryDataCollector.php +++ b/vendor/symfony/http-kernel/DataCollector/MemoryDataCollector.php @@ -39,10 +39,10 @@ class MemoryDataCollector extends DataCollector implements LateDataCollectorInte */ public function reset() { - $this->data = array( + $this->data = [ 'memory' => 0, 'memory_limit' => $this->convertToBytes(ini_get('memory_limit')), - ); + ]; } /** diff --git a/vendor/symfony/http-kernel/DataCollector/RequestDataCollector.php b/vendor/symfony/http-kernel/DataCollector/RequestDataCollector.php index ed753826..32624c96 100644 --- a/vendor/symfony/http-kernel/DataCollector/RequestDataCollector.php +++ b/vendor/symfony/http-kernel/DataCollector/RequestDataCollector.php @@ -38,7 +38,7 @@ class RequestDataCollector extends DataCollector implements EventSubscriberInter public function collect(Request $request, Response $response, \Exception $exception = null) { // attributes are serialized and as they can be anything, they need to be converted to strings. - $attributes = array(); + $attributes = []; $route = ''; foreach ($request->attributes->all() as $key => $value) { if ('_route' === $key) { @@ -57,10 +57,10 @@ class RequestDataCollector extends DataCollector implements EventSubscriberInter $content = false; } - $sessionMetadata = array(); - $sessionAttributes = array(); + $sessionMetadata = []; + $sessionAttributes = []; $session = null; - $flashes = array(); + $flashes = []; if ($request->hasSession()) { $session = $request->getSession(); if ($session->isStarted()) { @@ -74,19 +74,19 @@ class RequestDataCollector extends DataCollector implements EventSubscriberInter $statusCode = $response->getStatusCode(); - $responseCookies = array(); + $responseCookies = []; foreach ($response->headers->getCookies() as $cookie) { $responseCookies[$cookie->getName()] = $cookie; } - $dotenvVars = array(); + $dotenvVars = []; foreach (explode(',', getenv('SYMFONY_DOTENV_VARS')) as $name) { if ('' !== $name && false !== $value = getenv($name)) { $dotenvVars[$name] = $value; } } - $this->data = array( + $this->data = [ 'method' => $request->getMethod(), 'format' => $request->getRequestFormat(), 'content' => $content, @@ -110,7 +110,7 @@ class RequestDataCollector extends DataCollector implements EventSubscriberInter 'controller' => 'n/a', 'locale' => $request->getLocale(), 'dotenv_vars' => $dotenvVars, - ); + ]; if (isset($this->data['request_headers']['php-auth-pw'])) { $this->data['request_headers']['php-auth-pw'] = '******'; @@ -147,14 +147,14 @@ class RequestDataCollector extends DataCollector implements EventSubscriberInter if ($response->isRedirect()) { $response->headers->setCookie(new Cookie( 'sf_redirect', - json_encode(array( + json_encode([ 'token' => $response->headers->get('x-debug-token'), 'route' => $request->attributes->get('_route', 'n/a'), 'method' => $request->getMethod(), 'controller' => $this->parseController($request->attributes->get('_controller')), 'status_code' => $statusCode, 'status_text' => Response::$statusTexts[(int) $statusCode], - )), + ]), 0, '/', null, $request->isSecure(), true, false, 'lax' )); } @@ -173,7 +173,7 @@ class RequestDataCollector extends DataCollector implements EventSubscriberInter public function reset() { - $this->data = array(); + $this->data = []; $this->controllers = new \SplObjectStorage(); } @@ -252,6 +252,18 @@ class RequestDataCollector extends DataCollector implements EventSubscriberInter return $this->data['content']; } + public function isJsonRequest() + { + return 1 === preg_match('{^application/(?:\w+\++)*json$}i', $this->data['request_headers']['content-type']); + } + + public function getPrettyJson() + { + $decoded = json_decode($this->getContent()); + + return JSON_ERROR_NONE === json_last_error() ? json_encode($decoded, JSON_PRETTY_PRINT) : null; + } + public function getContentType() { return $this->data['content_type']; @@ -308,7 +320,7 @@ class RequestDataCollector extends DataCollector implements EventSubscriberInter */ public function getRouteParams() { - return isset($this->data['request_attributes']['_route_params']) ? $this->data['request_attributes']['_route_params']->getValue() : array(); + return isset($this->data['request_attributes']['_route_params']) ? $this->data['request_attributes']['_route_params']->getValue() : []; } /** @@ -338,11 +350,17 @@ class RequestDataCollector extends DataCollector implements EventSubscriberInter return isset($this->data['forward_token']) ? $this->data['forward_token'] : null; } + /** + * @final since Symfony 4.3 + */ public function onKernelController(FilterControllerEvent $event) { $this->controllers[$event->getRequest()] = $event->getController(); } + /** + * @final since Symfony 4.3 + */ public function onKernelResponse(FilterResponseEvent $event) { if (!$event->isMasterRequest()) { @@ -356,10 +374,10 @@ class RequestDataCollector extends DataCollector implements EventSubscriberInter public static function getSubscribedEvents() { - return array( + return [ KernelEvents::CONTROLLER => 'onKernelController', KernelEvents::RESPONSE => 'onKernelResponse', - ); + ]; } /** @@ -387,21 +405,21 @@ class RequestDataCollector extends DataCollector implements EventSubscriberInter try { $r = new \ReflectionMethod($controller[0], $controller[1]); - return array( + return [ 'class' => \is_object($controller[0]) ? \get_class($controller[0]) : $controller[0], 'method' => $controller[1], 'file' => $r->getFileName(), 'line' => $r->getStartLine(), - ); + ]; } catch (\ReflectionException $e) { if (\is_callable($controller)) { // using __call or __callStatic - return array( + return [ 'class' => \is_object($controller[0]) ? \get_class($controller[0]) : $controller[0], 'method' => $controller[1], 'file' => 'n/a', 'line' => 'n/a', - ); + ]; } } } @@ -409,12 +427,12 @@ class RequestDataCollector extends DataCollector implements EventSubscriberInter if ($controller instanceof \Closure) { $r = new \ReflectionFunction($controller); - $controller = array( + $controller = [ 'class' => $r->getName(), 'method' => null, 'file' => $r->getFileName(), 'line' => $r->getStartLine(), - ); + ]; if (false !== strpos($r->name, '{closure}')) { return $controller; @@ -433,12 +451,12 @@ class RequestDataCollector extends DataCollector implements EventSubscriberInter if (\is_object($controller)) { $r = new \ReflectionClass($controller); - return array( + return [ 'class' => $r->getName(), 'method' => null, 'file' => $r->getFileName(), 'line' => $r->getStartLine(), - ); + ]; } return \is_string($controller) ? $controller : 'n/a'; diff --git a/vendor/symfony/http-kernel/DataCollector/RouterDataCollector.php b/vendor/symfony/http-kernel/DataCollector/RouterDataCollector.php index 481747b3..65fc90dc 100644 --- a/vendor/symfony/http-kernel/DataCollector/RouterDataCollector.php +++ b/vendor/symfony/http-kernel/DataCollector/RouterDataCollector.php @@ -17,8 +17,6 @@ use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpKernel\Event\FilterControllerEvent; /** - * RouterDataCollector. - * * @author Fabien Potencier */ class RouterDataCollector extends DataCollector @@ -54,11 +52,11 @@ class RouterDataCollector extends DataCollector { $this->controllers = new \SplObjectStorage(); - $this->data = array( + $this->data = [ 'redirect' => false, 'url' => null, 'route' => null, - ); + ]; } protected function guessRoute(Request $request, $controller) @@ -68,6 +66,8 @@ class RouterDataCollector extends DataCollector /** * Remembers the controller associated to each request. + * + * @final since Symfony 4.3 */ public function onKernelController(FilterControllerEvent $event) { diff --git a/vendor/symfony/http-kernel/DataCollector/TimeDataCollector.php b/vendor/symfony/http-kernel/DataCollector/TimeDataCollector.php index e489d775..f48db705 100644 --- a/vendor/symfony/http-kernel/DataCollector/TimeDataCollector.php +++ b/vendor/symfony/http-kernel/DataCollector/TimeDataCollector.php @@ -43,11 +43,12 @@ class TimeDataCollector extends DataCollector implements LateDataCollectorInterf $startTime = $request->server->get('REQUEST_TIME_FLOAT'); } - $this->data = array( + $this->data = [ 'token' => $response->headers->get('X-Debug-Token'), 'start_time' => $startTime * 1000, - 'events' => array(), - ); + 'events' => [], + 'stopwatch_installed' => \class_exists(Stopwatch::class, false), + ]; } /** @@ -55,7 +56,7 @@ class TimeDataCollector extends DataCollector implements LateDataCollectorInterf */ public function reset() { - $this->data = array(); + $this->data = []; if (null !== $this->stopwatch) { $this->stopwatch->reset(); @@ -139,6 +140,14 @@ class TimeDataCollector extends DataCollector implements LateDataCollectorInterf return $this->data['start_time']; } + /** + * @return bool whether or not the stopwatch component is installed + */ + public function isStopwatchInstalled() + { + return $this->data['stopwatch_installed']; + } + /** * {@inheritdoc} */ diff --git a/vendor/symfony/http-kernel/Debug/FileLinkFormatter.php b/vendor/symfony/http-kernel/Debug/FileLinkFormatter.php index 221d3347..eb241675 100644 --- a/vendor/symfony/http-kernel/Debug/FileLinkFormatter.php +++ b/vendor/symfony/http-kernel/Debug/FileLinkFormatter.php @@ -20,8 +20,10 @@ use Symfony\Component\Routing\Generator\UrlGeneratorInterface; * Formats debug file links. * * @author Jérémy Romey + * + * @final since Symfony 4.3 */ -class FileLinkFormatter implements \Serializable +class FileLinkFormatter { private $fileLinkFormat; private $requestStack; @@ -36,7 +38,7 @@ class FileLinkFormatter implements \Serializable $fileLinkFormat = $fileLinkFormat ?: ini_get('xdebug.file_link_format') ?: get_cfg_var('xdebug.file_link_format'); if ($fileLinkFormat && !\is_array($fileLinkFormat)) { $i = strpos($f = $fileLinkFormat, '&', max(strrpos($f, '%f'), strrpos($f, '%l'))) ?: \strlen($f); - $fileLinkFormat = array(substr($f, 0, $i)) + preg_split('/&([^>]++)>/', substr($f, $i), -1, PREG_SPLIT_DELIM_CAPTURE); + $fileLinkFormat = [substr($f, 0, $i)] + preg_split('/&([^>]++)>/', substr($f, $i), -1, PREG_SPLIT_DELIM_CAPTURE); } $this->fileLinkFormat = $fileLinkFormat; @@ -55,20 +57,20 @@ class FileLinkFormatter implements \Serializable } } - return strtr($fmt[0], array('%f' => $file, '%l' => $line)); + return strtr($fmt[0], ['%f' => $file, '%l' => $line]); } return false; } - public function serialize() + /** + * @internal + */ + public function __sleep(): array { - return serialize($this->getFileLinkFormat()); - } + $this->fileLinkFormat = $this->getFileLinkFormat(); - public function unserialize($serialized) - { - $this->fileLinkFormat = unserialize($serialized, array('allowed_classes' => false)); + return ['fileLinkFormat']; } /** @@ -88,17 +90,15 @@ class FileLinkFormatter implements \Serializable if ($this->fileLinkFormat) { return $this->fileLinkFormat; } + if ($this->requestStack && $this->baseDir && $this->urlFormat) { $request = $this->requestStack->getMasterRequest(); - if ($request instanceof Request) { - if ($this->urlFormat instanceof \Closure && !$this->urlFormat = ($this->urlFormat)()) { - return; - } - return array( + if ($request instanceof Request && (!$this->urlFormat instanceof \Closure || $this->urlFormat = ($this->urlFormat)())) { + return [ $request->getSchemeAndHttpHost().$request->getBasePath().$this->urlFormat, $this->baseDir.\DIRECTORY_SEPARATOR, '', - ); + ]; } } } diff --git a/vendor/symfony/http-kernel/Debug/TraceableEventDispatcher.php b/vendor/symfony/http-kernel/Debug/TraceableEventDispatcher.php index ddf4fa7c..6c96afdf 100644 --- a/vendor/symfony/http-kernel/Debug/TraceableEventDispatcher.php +++ b/vendor/symfony/http-kernel/Debug/TraceableEventDispatcher.php @@ -12,7 +12,6 @@ namespace Symfony\Component\HttpKernel\Debug; use Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher as BaseTraceableEventDispatcher; -use Symfony\Component\EventDispatcher\Event; use Symfony\Component\HttpKernel\KernelEvents; /** @@ -27,7 +26,7 @@ class TraceableEventDispatcher extends BaseTraceableEventDispatcher /** * {@inheritdoc} */ - protected function preDispatch($eventName, Event $event) + protected function beforeDispatch(string $eventName, $event) { switch ($eventName) { case KernelEvents::REQUEST: @@ -58,7 +57,7 @@ class TraceableEventDispatcher extends BaseTraceableEventDispatcher /** * {@inheritdoc} */ - protected function postDispatch($eventName, Event $event) + protected function afterDispatch(string $eventName, $event) { switch ($eventName) { case KernelEvents::CONTROLLER_ARGUMENTS: diff --git a/vendor/symfony/http-kernel/DependencyInjection/AddAnnotatedClassesToCachePass.php b/vendor/symfony/http-kernel/DependencyInjection/AddAnnotatedClassesToCachePass.php index 783e6fbb..2659d34d 100644 --- a/vendor/symfony/http-kernel/DependencyInjection/AddAnnotatedClassesToCachePass.php +++ b/vendor/symfony/http-kernel/DependencyInjection/AddAnnotatedClassesToCachePass.php @@ -59,7 +59,7 @@ class AddAnnotatedClassesToCachePass implements CompilerPassInterface */ private function expandClasses(array $patterns, array $classes) { - $expanded = array(); + $expanded = []; // Explicit classes declared in the patterns are returned directly foreach ($patterns as $key => $pattern) { @@ -85,7 +85,7 @@ class AddAnnotatedClassesToCachePass implements CompilerPassInterface private function getClassesInComposerClassMaps() { - $classes = array(); + $classes = []; foreach (spl_autoload_functions() as $function) { if (!\is_array($function)) { @@ -106,14 +106,14 @@ class AddAnnotatedClassesToCachePass implements CompilerPassInterface private function patternsToRegexps($patterns) { - $regexps = array(); + $regexps = []; foreach ($patterns as $pattern) { // Escape user input $regex = preg_quote(ltrim($pattern, '\\')); // Wildcards * and ** - $regex = strtr($regex, array('\\*\\*' => '.*?', '\\*' => '[^\\\\]*?')); + $regex = strtr($regex, ['\\*\\*' => '.*?', '\\*' => '[^\\\\]*?']); // If this class does not end by a slash, anchor the end if ('\\' !== substr($regex, -1)) { diff --git a/vendor/symfony/http-kernel/DependencyInjection/ControllerArgumentValueResolverPass.php b/vendor/symfony/http-kernel/DependencyInjection/ControllerArgumentValueResolverPass.php index 77c0e479..705c88db 100644 --- a/vendor/symfony/http-kernel/DependencyInjection/ControllerArgumentValueResolverPass.php +++ b/vendor/symfony/http-kernel/DependencyInjection/ControllerArgumentValueResolverPass.php @@ -52,7 +52,7 @@ class ControllerArgumentValueResolverPass implements CompilerPassInterface $id = (string) $resolverReference; $container->register("debug.$id", TraceableValueResolver::class) ->setDecoratedService($id) - ->setArguments(array(new Reference("debug.$id.inner"), new Reference($this->traceableResolverStopwatch))); + ->setArguments([new Reference("debug.$id.inner"), new Reference($this->traceableResolverStopwatch)]); } } diff --git a/vendor/symfony/http-kernel/DependencyInjection/Extension.php b/vendor/symfony/http-kernel/DependencyInjection/Extension.php index 64787555..db376e6d 100644 --- a/vendor/symfony/http-kernel/DependencyInjection/Extension.php +++ b/vendor/symfony/http-kernel/DependencyInjection/Extension.php @@ -20,7 +20,7 @@ use Symfony\Component\DependencyInjection\Extension\Extension as BaseExtension; */ abstract class Extension extends BaseExtension { - private $annotatedClasses = array(); + private $annotatedClasses = []; /** * Gets the annotated classes to cache. diff --git a/vendor/symfony/http-kernel/DependencyInjection/FragmentRendererPass.php b/vendor/symfony/http-kernel/DependencyInjection/FragmentRendererPass.php index 2a8c1b1b..432f7672 100644 --- a/vendor/symfony/http-kernel/DependencyInjection/FragmentRendererPass.php +++ b/vendor/symfony/http-kernel/DependencyInjection/FragmentRendererPass.php @@ -41,7 +41,7 @@ class FragmentRendererPass implements CompilerPassInterface } $definition = $container->getDefinition($this->handlerService); - $renderers = array(); + $renderers = []; foreach ($container->findTaggedServiceIds($this->rendererTag, true) as $id => $tags) { $def = $container->getDefinition($id); $class = $container->getParameterBag()->resolveValue($def->getClass()); diff --git a/vendor/symfony/http-kernel/DependencyInjection/LazyLoadingFragmentHandler.php b/vendor/symfony/http-kernel/DependencyInjection/LazyLoadingFragmentHandler.php index 4bb47902..526c11fa 100644 --- a/vendor/symfony/http-kernel/DependencyInjection/LazyLoadingFragmentHandler.php +++ b/vendor/symfony/http-kernel/DependencyInjection/LazyLoadingFragmentHandler.php @@ -23,19 +23,19 @@ use Symfony\Component\HttpKernel\Fragment\FragmentHandler; class LazyLoadingFragmentHandler extends FragmentHandler { private $container; - private $initialized = array(); + private $initialized = []; public function __construct(ContainerInterface $container, RequestStack $requestStack, bool $debug = false) { $this->container = $container; - parent::__construct($requestStack, array(), $debug); + parent::__construct($requestStack, [], $debug); } /** * {@inheritdoc} */ - public function render($uri, $renderer = 'inline', array $options = array()) + public function render($uri, $renderer = 'inline', array $options = []) { if (!isset($this->initialized[$renderer]) && $this->container->has($renderer)) { $this->addRenderer($this->container->get($renderer)); diff --git a/vendor/symfony/http-kernel/DependencyInjection/MergeExtensionConfigurationPass.php b/vendor/symfony/http-kernel/DependencyInjection/MergeExtensionConfigurationPass.php index 1dbf7f7b..83e1b758 100644 --- a/vendor/symfony/http-kernel/DependencyInjection/MergeExtensionConfigurationPass.php +++ b/vendor/symfony/http-kernel/DependencyInjection/MergeExtensionConfigurationPass.php @@ -32,7 +32,7 @@ class MergeExtensionConfigurationPass extends BaseMergeExtensionConfigurationPas { foreach ($this->extensions as $extension) { if (!\count($container->getExtensionConfig($extension))) { - $container->loadFromExtension($extension, array()); + $container->loadFromExtension($extension, []); } } diff --git a/vendor/symfony/http-kernel/DependencyInjection/RegisterControllerArgumentLocatorsPass.php b/vendor/symfony/http-kernel/DependencyInjection/RegisterControllerArgumentLocatorsPass.php index 125464b1..a3f5012e 100644 --- a/vendor/symfony/http-kernel/DependencyInjection/RegisterControllerArgumentLocatorsPass.php +++ b/vendor/symfony/http-kernel/DependencyInjection/RegisterControllerArgumentLocatorsPass.php @@ -34,22 +34,24 @@ class RegisterControllerArgumentLocatorsPass implements CompilerPassInterface private $resolverServiceId; private $controllerTag; private $controllerLocator; + private $notTaggedControllerResolverServiceId; - public function __construct(string $resolverServiceId = 'argument_resolver.service', string $controllerTag = 'controller.service_arguments', string $controllerLocator = 'argument_resolver.controller_locator') + public function __construct(string $resolverServiceId = 'argument_resolver.service', string $controllerTag = 'controller.service_arguments', string $controllerLocator = 'argument_resolver.controller_locator', string $notTaggedControllerResolverServiceId = 'argument_resolver.not_tagged_controller') { $this->resolverServiceId = $resolverServiceId; $this->controllerTag = $controllerTag; $this->controllerLocator = $controllerLocator; + $this->notTaggedControllerResolverServiceId = $notTaggedControllerResolverServiceId; } public function process(ContainerBuilder $container) { - if (false === $container->hasDefinition($this->resolverServiceId)) { + if (false === $container->hasDefinition($this->resolverServiceId) && false === $container->hasDefinition($this->notTaggedControllerResolverServiceId)) { return; } $parameterBag = $container->getParameterBag(); - $controllers = array(); + $controllers = []; foreach ($container->findTaggedServiceIds($this->controllerTag, true) as $id => $tags) { $def = $container->getDefinition($id); @@ -72,14 +74,14 @@ class RegisterControllerArgumentLocatorsPass implements CompilerPassInterface $isContainerAware = $r->implementsInterface(ContainerAwareInterface::class) || is_subclass_of($class, AbstractController::class); // get regular public methods - $methods = array(); - $arguments = array(); + $methods = []; + $arguments = []; foreach ($r->getMethods(\ReflectionMethod::IS_PUBLIC) as $r) { if ('setContainer' === $r->name && $isContainerAware) { continue; } if (!$r->isConstructor() && !$r->isDestructor() && !$r->isAbstract()) { - $methods[strtolower($r->name)] = array($r, $r->getParameters()); + $methods[strtolower($r->name)] = [$r, $r->getParameters()]; } } @@ -89,7 +91,7 @@ class RegisterControllerArgumentLocatorsPass implements CompilerPassInterface $autowire = true; continue; } - foreach (array('action', 'argument', 'id') as $k) { + foreach (['action', 'argument', 'id'] as $k) { if (!isset($attributes[$k][0])) { throw new InvalidArgumentException(sprintf('Missing "%s" attribute on tag "%s" %s for service "%s".', $k, $this->controllerTag, json_encode($attributes, JSON_UNESCAPED_UNICODE), $id)); } @@ -119,7 +121,7 @@ class RegisterControllerArgumentLocatorsPass implements CompilerPassInterface /** @var \ReflectionMethod $r */ // create a per-method map of argument-names to service/type-references - $args = array(); + $args = []; foreach ($parameters as $p) { /** @var \ReflectionParameter $p */ $type = ltrim($target = ProxyHelper::getTypeHint($r, $p), '\\'); @@ -137,14 +139,14 @@ class RegisterControllerArgumentLocatorsPass implements CompilerPassInterface } elseif (isset($bindings[$bindingName = $type.' $'.$p->name]) || isset($bindings[$bindingName = '$'.$p->name]) || isset($bindings[$bindingName = $type])) { $binding = $bindings[$bindingName]; - list($bindingValue, $bindingId) = $binding->getValues(); - $binding->setValues(array($bindingValue, $bindingId, true)); + list($bindingValue, $bindingId, , $bindingType, $bindingFile) = $binding->getValues(); + $binding->setValues([$bindingValue, $bindingId, true, $bindingType, $bindingFile]); if (!$bindingValue instanceof Reference) { $args[$p->name] = new Reference('.value.'.$container->hash($bindingValue)); $container->register((string) $args[$p->name], 'mixed') ->setFactory('current') - ->addArgument(array($bindingValue)); + ->addArgument([$bindingValue]); } else { $args[$p->name] = $bindingValue; } @@ -181,8 +183,17 @@ class RegisterControllerArgumentLocatorsPass implements CompilerPassInterface } } - $container->getDefinition($this->resolverServiceId) - ->replaceArgument(0, $controllerLocatorRef = ServiceLocatorTagPass::register($container, $controllers)); + $controllerLocatorRef = ServiceLocatorTagPass::register($container, $controllers); + + if ($container->hasDefinition($this->resolverServiceId)) { + $container->getDefinition($this->resolverServiceId) + ->replaceArgument(0, $controllerLocatorRef); + } + + if ($container->hasDefinition($this->notTaggedControllerResolverServiceId)) { + $container->getDefinition($this->notTaggedControllerResolverServiceId) + ->replaceArgument(0, $controllerLocatorRef); + } $container->setAlias($this->controllerLocator, (string) $controllerLocatorRef); } diff --git a/vendor/symfony/http-kernel/DependencyInjection/RegisterLocaleAwareServicesPass.php b/vendor/symfony/http-kernel/DependencyInjection/RegisterLocaleAwareServicesPass.php new file mode 100644 index 00000000..0efb164b --- /dev/null +++ b/vendor/symfony/http-kernel/DependencyInjection/RegisterLocaleAwareServicesPass.php @@ -0,0 +1,58 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\DependencyInjection; + +use Symfony\Component\DependencyInjection\Argument\IteratorArgument; +use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Reference; + +/** + * Register all services that have the "kernel.locale_aware" tag into the listener. + * + * @author Pierre Bobiet + */ +class RegisterLocaleAwareServicesPass implements CompilerPassInterface +{ + private $listenerServiceId; + private $localeAwareTag; + + public function __construct(string $listenerServiceId = 'locale_aware_listener', string $localeAwareTag = 'kernel.locale_aware') + { + $this->listenerServiceId = $listenerServiceId; + $this->localeAwareTag = $localeAwareTag; + } + + public function process(ContainerBuilder $container) + { + if (!$container->hasDefinition($this->listenerServiceId)) { + return; + } + + $services = []; + + foreach ($container->findTaggedServiceIds($this->localeAwareTag) as $id => $tags) { + $services[] = new Reference($id); + } + + if (!$services) { + $container->removeDefinition($this->listenerServiceId); + + return; + } + + $container + ->getDefinition($this->listenerServiceId) + ->setArgument(0, new IteratorArgument($services)) + ; + } +} diff --git a/vendor/symfony/http-kernel/DependencyInjection/ResettableServicePass.php b/vendor/symfony/http-kernel/DependencyInjection/ResettableServicePass.php index 564f879c..c1199f63 100644 --- a/vendor/symfony/http-kernel/DependencyInjection/ResettableServicePass.php +++ b/vendor/symfony/http-kernel/DependencyInjection/ResettableServicePass.php @@ -39,7 +39,7 @@ class ResettableServicePass implements CompilerPassInterface return; } - $services = $methods = array(); + $services = $methods = []; foreach ($container->findTaggedServiceIds($this->tagName, true) as $id => $tags) { $services[$id] = new Reference($id, ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE); diff --git a/vendor/symfony/http-kernel/Event/ControllerArgumentsEvent.php b/vendor/symfony/http-kernel/Event/ControllerArgumentsEvent.php new file mode 100644 index 00000000..3dc6ea50 --- /dev/null +++ b/vendor/symfony/http-kernel/Event/ControllerArgumentsEvent.php @@ -0,0 +1,28 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Event; + +/** + * Allows filtering of controller arguments. + * + * You can call getController() to retrieve the controller and getArguments + * to retrieve the current arguments. With setArguments() you can replace + * arguments that are used to call the controller. + * + * Arguments set in the event must be compatible with the signature of the + * controller. + * + * @author Christophe Coevoet + */ +class ControllerArgumentsEvent extends FilterControllerArgumentsEvent +{ +} diff --git a/vendor/symfony/http-kernel/Event/ControllerEvent.php b/vendor/symfony/http-kernel/Event/ControllerEvent.php new file mode 100644 index 00000000..9afb818a --- /dev/null +++ b/vendor/symfony/http-kernel/Event/ControllerEvent.php @@ -0,0 +1,27 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Event; + +/** + * Allows filtering of a controller callable. + * + * You can call getController() to retrieve the current controller. With + * setController() you can set a new controller that is used in the processing + * of the request. + * + * Controllers should be callables. + * + * @author Bernhard Schussek + */ +class ControllerEvent extends FilterControllerEvent +{ +} diff --git a/vendor/symfony/http-kernel/Event/ExceptionEvent.php b/vendor/symfony/http-kernel/Event/ExceptionEvent.php new file mode 100644 index 00000000..d3b2d8f6 --- /dev/null +++ b/vendor/symfony/http-kernel/Event/ExceptionEvent.php @@ -0,0 +1,29 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Event; + +/** + * Allows to create a response for a thrown exception. + * + * Call setResponse() to set the response that will be returned for the + * current request. The propagation of this event is stopped as soon as a + * response is set. + * + * You can also call setException() to replace the thrown exception. This + * exception will be thrown if no response is set during processing of this + * event. + * + * @author Bernhard Schussek + */ +class ExceptionEvent extends GetResponseForExceptionEvent +{ +} diff --git a/vendor/symfony/http-kernel/Event/FilterControllerArgumentsEvent.php b/vendor/symfony/http-kernel/Event/FilterControllerArgumentsEvent.php index 5e178f2b..ac8e0263 100644 --- a/vendor/symfony/http-kernel/Event/FilterControllerArgumentsEvent.php +++ b/vendor/symfony/http-kernel/Event/FilterControllerArgumentsEvent.php @@ -15,18 +15,9 @@ use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpKernel\HttpKernelInterface; /** - * Allows filtering of controller arguments. - * - * You can call getController() to retrieve the controller and getArguments - * to retrieve the current arguments. With setArguments() you can replace - * arguments that are used to call the controller. - * - * Arguments set in the event must be compatible with the signature of the - * controller. - * - * @author Christophe Coevoet + * @deprecated since Symfony 4.3, use ControllerArgumentsEvent instead */ -class FilterControllerArgumentsEvent extends FilterControllerEvent +class FilterControllerArgumentsEvent extends ControllerEvent { private $arguments; diff --git a/vendor/symfony/http-kernel/Event/FilterControllerEvent.php b/vendor/symfony/http-kernel/Event/FilterControllerEvent.php index 7eab4493..74fa681f 100644 --- a/vendor/symfony/http-kernel/Event/FilterControllerEvent.php +++ b/vendor/symfony/http-kernel/Event/FilterControllerEvent.php @@ -15,15 +15,7 @@ use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpKernel\HttpKernelInterface; /** - * Allows filtering of a controller callable. - * - * You can call getController() to retrieve the current controller. With - * setController() you can set a new controller that is used in the processing - * of the request. - * - * Controllers should be callables. - * - * @author Bernhard Schussek + * @deprecated since Symfony 4.3, use ControllerEvent instead */ class FilterControllerEvent extends KernelEvent { diff --git a/vendor/symfony/http-kernel/Event/FilterResponseEvent.php b/vendor/symfony/http-kernel/Event/FilterResponseEvent.php index 04589f7b..eaa2e825 100644 --- a/vendor/symfony/http-kernel/Event/FilterResponseEvent.php +++ b/vendor/symfony/http-kernel/Event/FilterResponseEvent.php @@ -16,13 +16,7 @@ use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpKernel\HttpKernelInterface; /** - * Allows to filter a Response object. - * - * You can call getResponse() to retrieve the current response. With - * setResponse() you can set a new response that will be returned to the - * browser. - * - * @author Bernhard Schussek + * @deprecated since Symfony 4.3, use ResponseEvent instead */ class FilterResponseEvent extends KernelEvent { diff --git a/vendor/symfony/http-kernel/Event/GetResponseEvent.php b/vendor/symfony/http-kernel/Event/GetResponseEvent.php index c25a0f1c..fbed7bee 100644 --- a/vendor/symfony/http-kernel/Event/GetResponseEvent.php +++ b/vendor/symfony/http-kernel/Event/GetResponseEvent.php @@ -14,13 +14,7 @@ namespace Symfony\Component\HttpKernel\Event; use Symfony\Component\HttpFoundation\Response; /** - * Allows to create a response for a request. - * - * Call setResponse() to set the response that will be returned for the - * current request. The propagation of this event is stopped as soon as a - * response is set. - * - * @author Bernhard Schussek + * @deprecated since Symfony 4.3, use RequestEvent instead */ class GetResponseEvent extends KernelEvent { diff --git a/vendor/symfony/http-kernel/Event/GetResponseForControllerResultEvent.php b/vendor/symfony/http-kernel/Event/GetResponseForControllerResultEvent.php index a0082821..4e70dbc6 100644 --- a/vendor/symfony/http-kernel/Event/GetResponseForControllerResultEvent.php +++ b/vendor/symfony/http-kernel/Event/GetResponseForControllerResultEvent.php @@ -15,15 +15,9 @@ use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpKernel\HttpKernelInterface; /** - * Allows to create a response for the return value of a controller. - * - * Call setResponse() to set the response that will be returned for the - * current request. The propagation of this event is stopped as soon as a - * response is set. - * - * @author Bernhard Schussek + * @deprecated since Symfony 4.3, use ViewEvent instead */ -class GetResponseForControllerResultEvent extends GetResponseEvent +class GetResponseForControllerResultEvent extends RequestEvent { /** * The return value of the controller. diff --git a/vendor/symfony/http-kernel/Event/GetResponseForExceptionEvent.php b/vendor/symfony/http-kernel/Event/GetResponseForExceptionEvent.php index 7fab006d..3476c7e6 100644 --- a/vendor/symfony/http-kernel/Event/GetResponseForExceptionEvent.php +++ b/vendor/symfony/http-kernel/Event/GetResponseForExceptionEvent.php @@ -15,19 +15,9 @@ use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpKernel\HttpKernelInterface; /** - * Allows to create a response for a thrown exception. - * - * Call setResponse() to set the response that will be returned for the - * current request. The propagation of this event is stopped as soon as a - * response is set. - * - * You can also call setException() to replace the thrown exception. This - * exception will be thrown if no response is set during processing of this - * event. - * - * @author Bernhard Schussek + * @deprecated since Symfony 4.3, use ExceptionEvent instead */ -class GetResponseForExceptionEvent extends GetResponseEvent +class GetResponseForExceptionEvent extends RequestEvent { /** * The exception object. diff --git a/vendor/symfony/http-kernel/Event/PostResponseEvent.php b/vendor/symfony/http-kernel/Event/PostResponseEvent.php index 0981e64c..b86bf077 100644 --- a/vendor/symfony/http-kernel/Event/PostResponseEvent.php +++ b/vendor/symfony/http-kernel/Event/PostResponseEvent.php @@ -16,12 +16,7 @@ use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpKernel\HttpKernelInterface; /** - * Allows to execute logic after a response was sent. - * - * Since it's only triggered on master requests, the `getRequestType()` method - * will always return the value of `HttpKernelInterface::MASTER_REQUEST`. - * - * @author Jordi Boggiano + * @deprecated since Symfony 4.3, use TerminateEvent instead */ class PostResponseEvent extends KernelEvent { diff --git a/vendor/symfony/http-kernel/Event/RequestEvent.php b/vendor/symfony/http-kernel/Event/RequestEvent.php new file mode 100644 index 00000000..c1beb929 --- /dev/null +++ b/vendor/symfony/http-kernel/Event/RequestEvent.php @@ -0,0 +1,25 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Event; + +/** + * Allows to create a response for a request. + * + * Call setResponse() to set the response that will be returned for the + * current request. The propagation of this event is stopped as soon as a + * response is set. + * + * @author Bernhard Schussek + */ +class RequestEvent extends GetResponseEvent +{ +} diff --git a/vendor/symfony/http-kernel/Event/ResponseEvent.php b/vendor/symfony/http-kernel/Event/ResponseEvent.php new file mode 100644 index 00000000..88c1996e --- /dev/null +++ b/vendor/symfony/http-kernel/Event/ResponseEvent.php @@ -0,0 +1,25 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Event; + +/** + * Allows to filter a Response object. + * + * You can call getResponse() to retrieve the current response. With + * setResponse() you can set a new response that will be returned to the + * browser. + * + * @author Bernhard Schussek + */ +class ResponseEvent extends FilterResponseEvent +{ +} diff --git a/vendor/symfony/http-kernel/Event/TerminateEvent.php b/vendor/symfony/http-kernel/Event/TerminateEvent.php new file mode 100644 index 00000000..6ce23e43 --- /dev/null +++ b/vendor/symfony/http-kernel/Event/TerminateEvent.php @@ -0,0 +1,24 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Event; + +/** + * Allows to execute logic after a response was sent. + * + * Since it's only triggered on master requests, the `getRequestType()` method + * will always return the value of `HttpKernelInterface::MASTER_REQUEST`. + * + * @author Jordi Boggiano + */ +class TerminateEvent extends PostResponseEvent +{ +} diff --git a/vendor/symfony/http-kernel/Event/ViewEvent.php b/vendor/symfony/http-kernel/Event/ViewEvent.php new file mode 100644 index 00000000..1cb7e239 --- /dev/null +++ b/vendor/symfony/http-kernel/Event/ViewEvent.php @@ -0,0 +1,25 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Event; + +/** + * Allows to create a response for the return value of a controller. + * + * Call setResponse() to set the response that will be returned for the + * current request. The propagation of this event is stopped as soon as a + * response is set. + * + * @author Bernhard Schussek + */ +class ViewEvent extends GetResponseForControllerResultEvent +{ +} diff --git a/vendor/symfony/http-kernel/EventListener/AbstractSessionListener.php b/vendor/symfony/http-kernel/EventListener/AbstractSessionListener.php index c7c17170..d89bc813 100644 --- a/vendor/symfony/http-kernel/EventListener/AbstractSessionListener.php +++ b/vendor/symfony/http-kernel/EventListener/AbstractSessionListener.php @@ -32,13 +32,15 @@ use Symfony\Component\HttpKernel\KernelEvents; * * @author Johannes M. Schmitt * @author Tobias Schultze + * + * @internal since Symfony 4.3 */ abstract class AbstractSessionListener implements EventSubscriberInterface { const NO_AUTO_CACHE_CONTROL_HEADER = 'Symfony-Session-NoAutoCacheControl'; protected $container; - private $sessionUsageStack = array(); + private $sessionUsageStack = []; public function __construct(ContainerInterface $container = null) { @@ -131,12 +133,12 @@ abstract class AbstractSessionListener implements EventSubscriberInterface public static function getSubscribedEvents() { - return array( - KernelEvents::REQUEST => array('onKernelRequest', 128), + return [ + KernelEvents::REQUEST => ['onKernelRequest', 128], // low priority to come after regular response listeners, but higher than StreamedResponseListener - KernelEvents::RESPONSE => array('onKernelResponse', -1000), - KernelEvents::FINISH_REQUEST => array('onFinishRequest'), - ); + KernelEvents::RESPONSE => ['onKernelResponse', -1000], + KernelEvents::FINISH_REQUEST => ['onFinishRequest'], + ]; } /** diff --git a/vendor/symfony/http-kernel/EventListener/AbstractTestSessionListener.php b/vendor/symfony/http-kernel/EventListener/AbstractTestSessionListener.php index 993c6ddf..054695e6 100644 --- a/vendor/symfony/http-kernel/EventListener/AbstractTestSessionListener.php +++ b/vendor/symfony/http-kernel/EventListener/AbstractTestSessionListener.php @@ -26,13 +26,15 @@ use Symfony\Component\HttpKernel\KernelEvents; * * @author Bulat Shakirzyanov * @author Fabien Potencier + * + * @internal since Symfony 4.3 */ abstract class AbstractTestSessionListener implements EventSubscriberInterface { private $sessionId; private $sessionOptions; - public function __construct(array $sessionOptions = array()) + public function __construct(array $sessionOptions = []) { $this->sessionOptions = $sessionOptions; } @@ -78,7 +80,7 @@ abstract class AbstractTestSessionListener implements EventSubscriberInterface } if ($session instanceof Session ? !$session->isEmpty() || (null !== $this->sessionId && $session->getId() !== $this->sessionId) : $wasStarted) { - $params = session_get_cookie_params() + array('samesite' => null); + $params = session_get_cookie_params() + ['samesite' => null]; foreach ($this->sessionOptions as $k => $v) { if (0 === strpos($k, 'cookie_')) { $params[substr($k, 7)] = $v; @@ -98,10 +100,10 @@ abstract class AbstractTestSessionListener implements EventSubscriberInterface public static function getSubscribedEvents() { - return array( - KernelEvents::REQUEST => array('onKernelRequest', 192), - KernelEvents::RESPONSE => array('onKernelResponse', -128), - ); + return [ + KernelEvents::REQUEST => ['onKernelRequest', 192], + KernelEvents::RESPONSE => ['onKernelResponse', -128], + ]; } /** diff --git a/vendor/symfony/http-kernel/EventListener/AddRequestFormatsListener.php b/vendor/symfony/http-kernel/EventListener/AddRequestFormatsListener.php index 5ec52841..47c7069c 100644 --- a/vendor/symfony/http-kernel/EventListener/AddRequestFormatsListener.php +++ b/vendor/symfony/http-kernel/EventListener/AddRequestFormatsListener.php @@ -19,6 +19,8 @@ use Symfony\Component\HttpKernel\KernelEvents; * Adds configured formats to each request. * * @author Gildas Quemener + * + * @final since Symfony 4.3 */ class AddRequestFormatsListener implements EventSubscriberInterface { @@ -45,6 +47,6 @@ class AddRequestFormatsListener implements EventSubscriberInterface */ public static function getSubscribedEvents() { - return array(KernelEvents::REQUEST => array('onKernelRequest', 1)); + return [KernelEvents::REQUEST => ['onKernelRequest', 100]]; } } diff --git a/vendor/symfony/http-kernel/EventListener/DebugHandlersListener.php b/vendor/symfony/http-kernel/EventListener/DebugHandlersListener.php index 47fe05c5..b28ad7b8 100644 --- a/vendor/symfony/http-kernel/EventListener/DebugHandlersListener.php +++ b/vendor/symfony/http-kernel/EventListener/DebugHandlersListener.php @@ -19,6 +19,10 @@ use Symfony\Component\Debug\ErrorHandler; use Symfony\Component\Debug\ExceptionHandler; use Symfony\Component\EventDispatcher\Event; use Symfony\Component\EventDispatcher\EventSubscriberInterface; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpKernel\Debug\FileLinkFormatter; +use Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent; use Symfony\Component\HttpKernel\Event\KernelEvent; use Symfony\Component\HttpKernel\KernelEvents; @@ -36,19 +40,20 @@ class DebugHandlersListener implements EventSubscriberInterface private $scream; private $fileLinkFormat; private $scope; + private $charset; private $firstCall = true; private $hasTerminatedWithException; /** - * @param callable|null $exceptionHandler A handler that will be called on Exception - * @param LoggerInterface|null $logger A PSR-3 logger - * @param array|int $levels An array map of E_* to LogLevel::* or an integer bit field of E_* constants - * @param int|null $throwAt Thrown errors in a bit field of E_* constants, or null to keep the current value - * @param bool $scream Enables/disables screaming mode, where even silenced errors are logged - * @param string|array $fileLinkFormat The format for links to source files - * @param bool $scope Enables/disables scoping mode + * @param callable|null $exceptionHandler A handler that will be called on Exception + * @param LoggerInterface|null $logger A PSR-3 logger + * @param array|int $levels An array map of E_* to LogLevel::* or an integer bit field of E_* constants + * @param int|null $throwAt Thrown errors in a bit field of E_* constants, or null to keep the current value + * @param bool $scream Enables/disables screaming mode, where even silenced errors are logged + * @param string|FileLinkFormatter|null $fileLinkFormat The format for links to source files + * @param bool $scope Enables/disables scoping mode */ - public function __construct(callable $exceptionHandler = null, LoggerInterface $logger = null, $levels = E_ALL, ?int $throwAt = E_ALL, bool $scream = true, $fileLinkFormat = null, bool $scope = true) + public function __construct(callable $exceptionHandler = null, LoggerInterface $logger = null, $levels = E_ALL, ?int $throwAt = E_ALL, bool $scream = true, $fileLinkFormat = null, bool $scope = true, string $charset = null) { $this->exceptionHandler = $exceptionHandler; $this->logger = $logger; @@ -57,6 +62,7 @@ class DebugHandlersListener implements EventSubscriberInterface $this->scream = $scream; $this->fileLinkFormat = $fileLinkFormat; $this->scope = $scope; + $this->charset = $charset; } /** @@ -105,7 +111,7 @@ class DebugHandlersListener implements EventSubscriberInterface if (method_exists($kernel = $event->getKernel(), 'terminateWithException')) { $request = $event->getRequest(); $hasRun = &$this->hasTerminatedWithException; - $this->exceptionHandler = function (\Exception $e) use ($kernel, $request, &$hasRun) { + $this->exceptionHandler = static function (\Exception $e) use ($kernel, $request, &$hasRun) { if ($hasRun) { throw $e; } @@ -143,14 +149,36 @@ class DebugHandlersListener implements EventSubscriberInterface } } + /** + * @internal + */ + public function onKernelException(GetResponseForExceptionEvent $event) + { + if (!$this->hasTerminatedWithException || !$event->isMasterRequest()) { + return; + } + + $debug = $this->scream && $this->scope; + $controller = function (Request $request) use ($debug) { + $e = $request->attributes->get('exception'); + $handler = new ExceptionHandler($debug, $this->charset, $this->fileLinkFormat); + + return new Response($handler->getHtml($e), $e->getStatusCode(), $e->getHeaders()); + }; + + (new ExceptionListener($controller, $this->logger, $debug))->onKernelException($event); + } + public static function getSubscribedEvents() { - $events = array(KernelEvents::REQUEST => array('configure', 2048)); + $events = [KernelEvents::REQUEST => ['configure', 2048]]; if ('cli' === \PHP_SAPI && \defined('Symfony\Component\Console\ConsoleEvents::COMMAND')) { - $events[ConsoleEvents::COMMAND] = array('configure', 2048); + $events[ConsoleEvents::COMMAND] = ['configure', 2048]; } + $events[KernelEvents::EXCEPTION] = ['onKernelException', -2048]; + return $events; } } diff --git a/vendor/symfony/http-kernel/EventListener/DisallowRobotsIndexingListener.php b/vendor/symfony/http-kernel/EventListener/DisallowRobotsIndexingListener.php new file mode 100644 index 00000000..6607e49e --- /dev/null +++ b/vendor/symfony/http-kernel/EventListener/DisallowRobotsIndexingListener.php @@ -0,0 +1,43 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\EventListener; + +use Symfony\Component\EventDispatcher\EventSubscriberInterface; +use Symfony\Component\HttpKernel\Event\ResponseEvent; +use Symfony\Component\HttpKernel\KernelEvents; + +/** + * Ensures that the application is not indexed by search engines. + * + * @author Gary PEGEOT + */ +class DisallowRobotsIndexingListener implements EventSubscriberInterface +{ + private const HEADER_NAME = 'X-Robots-Tag'; + + public function onResponse(ResponseEvent $event): void + { + if (!$event->getResponse()->headers->has(static::HEADER_NAME)) { + $event->getResponse()->headers->set(static::HEADER_NAME, 'noindex'); + } + } + + /** + * {@inheritdoc} + */ + public static function getSubscribedEvents() + { + return [ + KernelEvents::RESPONSE => ['onResponse', -255], + ]; + } +} diff --git a/vendor/symfony/http-kernel/EventListener/DumpListener.php b/vendor/symfony/http-kernel/EventListener/DumpListener.php index 3acbe7d4..30908a4f 100644 --- a/vendor/symfony/http-kernel/EventListener/DumpListener.php +++ b/vendor/symfony/http-kernel/EventListener/DumpListener.php @@ -54,10 +54,10 @@ class DumpListener implements EventSubscriberInterface public static function getSubscribedEvents() { if (!class_exists(ConsoleEvents::class)) { - return array(); + return []; } // Register early to have a working dump() as early as possible - return array(ConsoleEvents::COMMAND => array('configure', 1024)); + return [ConsoleEvents::COMMAND => ['configure', 1024]]; } } diff --git a/vendor/symfony/http-kernel/EventListener/ExceptionListener.php b/vendor/symfony/http-kernel/EventListener/ExceptionListener.php index 02b1d4dd..f8044537 100644 --- a/vendor/symfony/http-kernel/EventListener/ExceptionListener.php +++ b/vendor/symfony/http-kernel/EventListener/ExceptionListener.php @@ -13,12 +13,10 @@ namespace Symfony\Component\HttpKernel\EventListener; use Psr\Log\LoggerInterface; use Symfony\Component\Debug\Exception\FlattenException; -use Symfony\Component\Debug\ExceptionHandler; use Symfony\Component\EventDispatcher\EventDispatcherInterface; use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\Event\FilterResponseEvent; use Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent; use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface; use Symfony\Component\HttpKernel\HttpKernelInterface; @@ -26,26 +24,21 @@ use Symfony\Component\HttpKernel\KernelEvents; use Symfony\Component\HttpKernel\Log\DebugLoggerInterface; /** - * ExceptionListener. - * * @author Fabien Potencier + * + * @final since Symfony 4.3 */ class ExceptionListener implements EventSubscriberInterface { protected $controller; protected $logger; protected $debug; - private $charset; - private $fileLinkFormat; - private $isTerminating = false; - public function __construct($controller, LoggerInterface $logger = null, $debug = false, string $charset = null, $fileLinkFormat = null) + public function __construct($controller, LoggerInterface $logger = null, $debug = false) { $this->controller = $controller; $this->logger = $logger; $this->debug = $debug; - $this->charset = $charset; - $this->fileLinkFormat = $fileLinkFormat; } public function logKernelException(GetResponseForExceptionEvent $event) @@ -55,19 +48,16 @@ class ExceptionListener implements EventSubscriberInterface $this->logException($event->getException(), sprintf('Uncaught PHP Exception %s: "%s" at %s line %s', $e->getClass(), $e->getMessage(), $e->getFile(), $e->getLine())); } + /** + * @param string $eventName + * @param EventDispatcherInterface $eventDispatcher + */ public function onKernelException(GetResponseForExceptionEvent $event) { if (null === $this->controller) { - if (!$event->isMasterRequest()) { - return; - } - if (!$this->isTerminating) { - $this->isTerminating = true; - - return; - } - $this->isTerminating = false; + return; } + $exception = $event->getException(); $request = $this->duplicateRequest($exception, $event->getRequest()); $eventDispatcher = \func_num_args() > 2 ? func_get_arg(2) : null; @@ -79,13 +69,12 @@ class ExceptionListener implements EventSubscriberInterface $this->logException($e, sprintf('Exception thrown when handling an exception (%s: %s at %s line %s)', $f->getClass(), $f->getMessage(), $e->getFile(), $e->getLine())); - $wrapper = $e; - - while ($prev = $wrapper->getPrevious()) { + $prev = $e; + do { if ($exception === $wrapper = $prev) { throw $e; } - } + } while ($prev = $wrapper->getPrevious()); $prev = new \ReflectionProperty($wrapper instanceof \Exception ? \Exception::class : \Error::class, 'previous'); $prev->setAccessible(true); @@ -97,7 +86,7 @@ class ExceptionListener implements EventSubscriberInterface $event->setResponse($response); if ($this->debug && $eventDispatcher instanceof EventDispatcherInterface) { - $cspRemovalListener = function (FilterResponseEvent $event) use (&$cspRemovalListener, $eventDispatcher) { + $cspRemovalListener = function ($event) use (&$cspRemovalListener, $eventDispatcher) { $event->getResponse()->headers->remove('Content-Security-Policy'); $eventDispatcher->removeListener(KernelEvents::RESPONSE, $cspRemovalListener); }; @@ -105,19 +94,14 @@ class ExceptionListener implements EventSubscriberInterface } } - public function reset() - { - $this->isTerminating = false; - } - public static function getSubscribedEvents() { - return array( - KernelEvents::EXCEPTION => array( - array('logKernelException', 0), - array('onKernelException', -128), - ), - ); + return [ + KernelEvents::EXCEPTION => [ + ['logKernelException', 0], + ['onKernelException', -128], + ], + ]; } /** @@ -130,9 +114,9 @@ class ExceptionListener implements EventSubscriberInterface { if (null !== $this->logger) { if (!$exception instanceof HttpExceptionInterface || $exception->getStatusCode() >= 500) { - $this->logger->critical($message, array('exception' => $exception)); + $this->logger->critical($message, ['exception' => $exception]); } else { - $this->logger->error($message, array('exception' => $exception)); + $this->logger->error($message, ['exception' => $exception]); } } } @@ -147,15 +131,11 @@ class ExceptionListener implements EventSubscriberInterface */ protected function duplicateRequest(\Exception $exception, Request $request) { - $attributes = array( - 'exception' => $exception = FlattenException::create($exception), - '_controller' => $this->controller ?: function () use ($exception) { - $handler = new ExceptionHandler($this->debug, $this->charset, $this->fileLinkFormat); - - return new Response($handler->getHtml($exception), $exception->getStatusCode(), $exception->getHeaders()); - }, + $attributes = [ + '_controller' => $this->controller, + 'exception' => FlattenException::create($exception), 'logger' => $this->logger instanceof DebugLoggerInterface ? $this->logger : null, - ); + ]; $request = $request->duplicate(null, null, $attributes); $request->setMethod('GET'); diff --git a/vendor/symfony/http-kernel/EventListener/FragmentListener.php b/vendor/symfony/http-kernel/EventListener/FragmentListener.php index b47aa7cc..fc4ba56d 100644 --- a/vendor/symfony/http-kernel/EventListener/FragmentListener.php +++ b/vendor/symfony/http-kernel/EventListener/FragmentListener.php @@ -24,10 +24,12 @@ use Symfony\Component\HttpKernel\UriSigner; * All URL paths starting with /_fragment are handled as * content fragments by this listener. * - * If throws an AccessDeniedHttpException exception if the request + * Throws an AccessDeniedHttpException exception if the request * is not signed or if it is not an internal sub-request. * * @author Fabien Potencier + * + * @final since Symfony 4.3 */ class FragmentListener implements EventSubscriberInterface { @@ -70,7 +72,7 @@ class FragmentListener implements EventSubscriberInterface parse_str($request->query->get('_path', ''), $attributes); $request->attributes->add($attributes); - $request->attributes->set('_route_params', array_replace($request->attributes->get('_route_params', array()), $attributes)); + $request->attributes->set('_route_params', array_replace($request->attributes->get('_route_params', []), $attributes)); $request->query->remove('_path'); } @@ -92,8 +94,8 @@ class FragmentListener implements EventSubscriberInterface public static function getSubscribedEvents() { - return array( - KernelEvents::REQUEST => array(array('onKernelRequest', 48)), - ); + return [ + KernelEvents::REQUEST => [['onKernelRequest', 48]], + ]; } } diff --git a/vendor/symfony/http-kernel/EventListener/LocaleAwareListener.php b/vendor/symfony/http-kernel/EventListener/LocaleAwareListener.php new file mode 100644 index 00000000..325b8cbc --- /dev/null +++ b/vendor/symfony/http-kernel/EventListener/LocaleAwareListener.php @@ -0,0 +1,76 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\EventListener; + +use Symfony\Component\EventDispatcher\EventSubscriberInterface; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\RequestStack; +use Symfony\Component\HttpKernel\Event\FinishRequestEvent; +use Symfony\Component\HttpKernel\Event\RequestEvent; +use Symfony\Component\HttpKernel\KernelEvents; +use Symfony\Contracts\Translation\LocaleAwareInterface; + +/** + * Pass the current locale to the provided services. + * + * @author Pierre Bobiet + */ +class LocaleAwareListener implements EventSubscriberInterface +{ + private $localeAwareServices; + private $requestStack; + + /** + * @param LocaleAwareInterface[] $localeAwareServices + */ + public function __construct(iterable $localeAwareServices, RequestStack $requestStack) + { + $this->localeAwareServices = $localeAwareServices; + $this->requestStack = $requestStack; + } + + public function onKernelRequest(RequestEvent $event): void + { + $this->setLocale($event->getRequest()->getLocale(), $event->getRequest()->getDefaultLocale()); + } + + public function onKernelFinishRequest(FinishRequestEvent $event): void + { + if (null === $parentRequest = $this->requestStack->getParentRequest()) { + $this->setLocale($event->getRequest()->getDefaultLocale()); + + return; + } + + $this->setLocale($parentRequest->getLocale(), $parentRequest->getDefaultLocale()); + } + + public static function getSubscribedEvents() + { + return [ + // must be registered after the Locale listener + KernelEvents::REQUEST => [['onKernelRequest', 15]], + KernelEvents::FINISH_REQUEST => [['onKernelFinishRequest', -15]], + ]; + } + + private function setLocale(string $locale, ?string $defaultLocale = null): void + { + foreach ($this->localeAwareServices as $service) { + try { + $service->setLocale($locale); + } catch (\InvalidArgumentException $e) { + $service->setLocale($defaultLocale); + } + } + } +} diff --git a/vendor/symfony/http-kernel/EventListener/LocaleListener.php b/vendor/symfony/http-kernel/EventListener/LocaleListener.php index 1067e8a0..cb8a194d 100644 --- a/vendor/symfony/http-kernel/EventListener/LocaleListener.php +++ b/vendor/symfony/http-kernel/EventListener/LocaleListener.php @@ -16,6 +16,7 @@ use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\RequestStack; use Symfony\Component\HttpKernel\Event\FinishRequestEvent; use Symfony\Component\HttpKernel\Event\GetResponseEvent; +use Symfony\Component\HttpKernel\Event\KernelEvent; use Symfony\Component\HttpKernel\KernelEvents; use Symfony\Component\Routing\RequestContextAwareInterface; @@ -23,6 +24,8 @@ use Symfony\Component\Routing\RequestContextAwareInterface; * Initializes the locale based on the current request. * * @author Fabien Potencier + * + * @final since Symfony 4.3 */ class LocaleListener implements EventSubscriberInterface { @@ -42,10 +45,14 @@ class LocaleListener implements EventSubscriberInterface $this->router = $router; } + public function setDefaultLocale(KernelEvent $event) + { + $event->getRequest()->setDefaultLocale($this->defaultLocale); + } + public function onKernelRequest(GetResponseEvent $event) { $request = $event->getRequest(); - $request->setDefaultLocale($this->defaultLocale); $this->setLocale($request); $this->setRouterContext($request); @@ -74,10 +81,13 @@ class LocaleListener implements EventSubscriberInterface public static function getSubscribedEvents() { - return array( - // must be registered after the Router to have access to the _locale - KernelEvents::REQUEST => array(array('onKernelRequest', 16)), - KernelEvents::FINISH_REQUEST => array(array('onKernelFinishRequest', 0)), - ); + return [ + KernelEvents::REQUEST => [ + ['setDefaultLocale', 100], + // must be registered after the Router to have access to the _locale + ['onKernelRequest', 16], + ], + KernelEvents::FINISH_REQUEST => [['onKernelFinishRequest', 0]], + ]; } } diff --git a/vendor/symfony/http-kernel/EventListener/ProfilerListener.php b/vendor/symfony/http-kernel/EventListener/ProfilerListener.php index 03344be7..85a0aacb 100644 --- a/vendor/symfony/http-kernel/EventListener/ProfilerListener.php +++ b/vendor/symfony/http-kernel/EventListener/ProfilerListener.php @@ -24,6 +24,8 @@ use Symfony\Component\HttpKernel\Profiler\Profiler; * ProfilerListener collects data for the current request by listening to the kernel events. * * @author Fabien Potencier + * + * @final since Symfony 4.3 */ class ProfilerListener implements EventSubscriberInterface { @@ -119,10 +121,10 @@ class ProfilerListener implements EventSubscriberInterface public static function getSubscribedEvents() { - return array( - KernelEvents::RESPONSE => array('onKernelResponse', -100), - KernelEvents::EXCEPTION => array('onKernelException', 0), - KernelEvents::TERMINATE => array('onKernelTerminate', -1024), - ); + return [ + KernelEvents::RESPONSE => ['onKernelResponse', -100], + KernelEvents::EXCEPTION => ['onKernelException', 0], + KernelEvents::TERMINATE => ['onKernelTerminate', -1024], + ]; } } diff --git a/vendor/symfony/http-kernel/EventListener/ResponseListener.php b/vendor/symfony/http-kernel/EventListener/ResponseListener.php index 0550c023..01973e22 100644 --- a/vendor/symfony/http-kernel/EventListener/ResponseListener.php +++ b/vendor/symfony/http-kernel/EventListener/ResponseListener.php @@ -19,6 +19,8 @@ use Symfony\Component\HttpKernel\KernelEvents; * ResponseListener fixes the Response headers based on the Request. * * @author Fabien Potencier + * + * @final since Symfony 4.3 */ class ResponseListener implements EventSubscriberInterface { @@ -49,8 +51,8 @@ class ResponseListener implements EventSubscriberInterface public static function getSubscribedEvents() { - return array( + return [ KernelEvents::RESPONSE => 'onKernelResponse', - ); + ]; } } diff --git a/vendor/symfony/http-kernel/EventListener/RouterListener.php b/vendor/symfony/http-kernel/EventListener/RouterListener.php index 39192845..01a95ebf 100644 --- a/vendor/symfony/http-kernel/EventListener/RouterListener.php +++ b/vendor/symfony/http-kernel/EventListener/RouterListener.php @@ -37,6 +37,8 @@ use Symfony\Component\Routing\RequestContextAwareInterface; * * @author Fabien Potencier * @author Yonel Ceruto + * + * @final since Symfony 4.3 */ class RouterListener implements EventSubscriberInterface { @@ -118,12 +120,12 @@ class RouterListener implements EventSubscriberInterface } if (null !== $this->logger) { - $this->logger->info('Matched route "{route}".', array( + $this->logger->info('Matched route "{route}".', [ 'route' => isset($parameters['_route']) ? $parameters['_route'] : 'n/a', 'route_parameters' => $parameters, 'request_uri' => $request->getUri(), 'method' => $request->getMethod(), - )); + ]); } $request->attributes->add($parameters); @@ -157,11 +159,11 @@ class RouterListener implements EventSubscriberInterface public static function getSubscribedEvents() { - return array( - KernelEvents::REQUEST => array(array('onKernelRequest', 32)), - KernelEvents::FINISH_REQUEST => array(array('onKernelFinishRequest', 0)), - KernelEvents::EXCEPTION => array('onKernelException', -64), - ); + return [ + KernelEvents::REQUEST => [['onKernelRequest', 32]], + KernelEvents::FINISH_REQUEST => [['onKernelFinishRequest', 0]], + KernelEvents::EXCEPTION => ['onKernelException', -64], + ]; } private function createWelcomeResponse() diff --git a/vendor/symfony/http-kernel/EventListener/SaveSessionListener.php b/vendor/symfony/http-kernel/EventListener/SaveSessionListener.php index 99382ea3..b14153ad 100644 --- a/vendor/symfony/http-kernel/EventListener/SaveSessionListener.php +++ b/vendor/symfony/http-kernel/EventListener/SaveSessionListener.php @@ -38,9 +38,9 @@ class SaveSessionListener implements EventSubscriberInterface public static function getSubscribedEvents() { - return array( + return [ // low priority but higher than StreamedResponseListener - KernelEvents::RESPONSE => array(array('onKernelResponse', -1000)), - ); + KernelEvents::RESPONSE => [['onKernelResponse', -1000]], + ]; } } diff --git a/vendor/symfony/http-kernel/EventListener/SessionListener.php b/vendor/symfony/http-kernel/EventListener/SessionListener.php index 75624b6c..c466fb7c 100644 --- a/vendor/symfony/http-kernel/EventListener/SessionListener.php +++ b/vendor/symfony/http-kernel/EventListener/SessionListener.php @@ -40,9 +40,10 @@ class SessionListener extends AbstractSessionListener if ($this->container->has('session_storage') && ($storage = $this->container->get('session_storage')) instanceof NativeSessionStorage - && $this->container->get('request_stack')->getMasterRequest()->isSecure() + && ($masterRequest = $this->container->get('request_stack')->getMasterRequest()) + && $masterRequest->isSecure() ) { - $storage->setOptions(array('cookie_secure' => true)); + $storage->setOptions(['cookie_secure' => true]); } return $this->container->get('session'); diff --git a/vendor/symfony/http-kernel/EventListener/StreamedResponseListener.php b/vendor/symfony/http-kernel/EventListener/StreamedResponseListener.php index 2c616b91..f28f5d86 100644 --- a/vendor/symfony/http-kernel/EventListener/StreamedResponseListener.php +++ b/vendor/symfony/http-kernel/EventListener/StreamedResponseListener.php @@ -21,6 +21,8 @@ use Symfony\Component\HttpKernel\KernelEvents; * to the client. * * @author Fabien Potencier + * + * @final since Symfony 4.3 */ class StreamedResponseListener implements EventSubscriberInterface { @@ -42,8 +44,8 @@ class StreamedResponseListener implements EventSubscriberInterface public static function getSubscribedEvents() { - return array( - KernelEvents::RESPONSE => array('onKernelResponse', -1024), - ); + return [ + KernelEvents::RESPONSE => ['onKernelResponse', -1024], + ]; } } diff --git a/vendor/symfony/http-kernel/EventListener/SurrogateListener.php b/vendor/symfony/http-kernel/EventListener/SurrogateListener.php index 63435338..9c3e960b 100644 --- a/vendor/symfony/http-kernel/EventListener/SurrogateListener.php +++ b/vendor/symfony/http-kernel/EventListener/SurrogateListener.php @@ -21,6 +21,8 @@ use Symfony\Component\HttpKernel\KernelEvents; * SurrogateListener adds a Surrogate-Control HTTP header when the Response needs to be parsed for Surrogates. * * @author Fabien Potencier + * + * @final since Symfony 4.3 */ class SurrogateListener implements EventSubscriberInterface { @@ -58,8 +60,8 @@ class SurrogateListener implements EventSubscriberInterface public static function getSubscribedEvents() { - return array( + return [ KernelEvents::RESPONSE => 'onKernelResponse', - ); + ]; } } diff --git a/vendor/symfony/http-kernel/EventListener/TestSessionListener.php b/vendor/symfony/http-kernel/EventListener/TestSessionListener.php index 23589a2b..46323ae2 100644 --- a/vendor/symfony/http-kernel/EventListener/TestSessionListener.php +++ b/vendor/symfony/http-kernel/EventListener/TestSessionListener.php @@ -24,7 +24,7 @@ class TestSessionListener extends AbstractTestSessionListener { private $container; - public function __construct(ContainerInterface $container, array $sessionOptions = array()) + public function __construct(ContainerInterface $container, array $sessionOptions = []) { $this->container = $container; parent::__construct($sessionOptions); diff --git a/vendor/symfony/http-kernel/EventListener/TranslatorListener.php b/vendor/symfony/http-kernel/EventListener/TranslatorListener.php index e0b344e4..d28eee2b 100644 --- a/vendor/symfony/http-kernel/EventListener/TranslatorListener.php +++ b/vendor/symfony/http-kernel/EventListener/TranslatorListener.php @@ -11,6 +11,8 @@ namespace Symfony\Component\HttpKernel\EventListener; +@trigger_error(sprintf('The "%s" class is deprecated since Symfony 4.3 and will be removed in 5.0, use LocaleAwareListener instead.', TranslatorListener::class), E_USER_DEPRECATED); + use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\RequestStack; @@ -24,6 +26,8 @@ use Symfony\Contracts\Translation\LocaleAwareInterface; * Synchronizes the locale between the request and the translator. * * @author Fabien Potencier + * + * @deprecated since Symfony 4.3, use LocaleAwareListener instead */ class TranslatorListener implements EventSubscriberInterface { @@ -58,11 +62,11 @@ class TranslatorListener implements EventSubscriberInterface public static function getSubscribedEvents() { - return array( + return [ // must be registered after the Locale listener - KernelEvents::REQUEST => array(array('onKernelRequest', 10)), - KernelEvents::FINISH_REQUEST => array(array('onKernelFinishRequest', 0)), - ); + KernelEvents::REQUEST => [['onKernelRequest', 10]], + KernelEvents::FINISH_REQUEST => [['onKernelFinishRequest', 0]], + ]; } private function setLocale(Request $request) diff --git a/vendor/symfony/http-kernel/EventListener/ValidateRequestListener.php b/vendor/symfony/http-kernel/EventListener/ValidateRequestListener.php index a33853f7..69c86b40 100644 --- a/vendor/symfony/http-kernel/EventListener/ValidateRequestListener.php +++ b/vendor/symfony/http-kernel/EventListener/ValidateRequestListener.php @@ -19,6 +19,8 @@ use Symfony\Component\HttpKernel\KernelEvents; * Validates Requests. * * @author Magnus Nordlander + * + * @final since Symfony 4.3 */ class ValidateRequestListener implements EventSubscriberInterface { @@ -44,10 +46,10 @@ class ValidateRequestListener implements EventSubscriberInterface */ public static function getSubscribedEvents() { - return array( - KernelEvents::REQUEST => array( - array('onKernelRequest', 256), - ), - ); + return [ + KernelEvents::REQUEST => [ + ['onKernelRequest', 256], + ], + ]; } } diff --git a/vendor/symfony/http-kernel/Exception/AccessDeniedHttpException.php b/vendor/symfony/http-kernel/Exception/AccessDeniedHttpException.php index 3aedbf97..326e9361 100644 --- a/vendor/symfony/http-kernel/Exception/AccessDeniedHttpException.php +++ b/vendor/symfony/http-kernel/Exception/AccessDeniedHttpException.php @@ -19,11 +19,11 @@ class AccessDeniedHttpException extends HttpException { /** * @param string $message The internal exception message - * @param \Exception $previous The previous exception + * @param \Throwable $previous The previous exception * @param int $code The internal exception code * @param array $headers */ - public function __construct(string $message = null, \Exception $previous = null, int $code = 0, array $headers = array()) + public function __construct(string $message = null, \Throwable $previous = null, int $code = 0, array $headers = []) { parent::__construct(403, $message, $previous, $headers, $code); } diff --git a/vendor/symfony/http-kernel/Exception/BadRequestHttpException.php b/vendor/symfony/http-kernel/Exception/BadRequestHttpException.php index ff215db4..db031bea 100644 --- a/vendor/symfony/http-kernel/Exception/BadRequestHttpException.php +++ b/vendor/symfony/http-kernel/Exception/BadRequestHttpException.php @@ -18,11 +18,11 @@ class BadRequestHttpException extends HttpException { /** * @param string $message The internal exception message - * @param \Exception $previous The previous exception + * @param \Throwable $previous The previous exception * @param int $code The internal exception code * @param array $headers */ - public function __construct(string $message = null, \Exception $previous = null, int $code = 0, array $headers = array()) + public function __construct(string $message = null, \Throwable $previous = null, int $code = 0, array $headers = []) { parent::__construct(400, $message, $previous, $headers, $code); } diff --git a/vendor/symfony/http-kernel/Exception/ConflictHttpException.php b/vendor/symfony/http-kernel/Exception/ConflictHttpException.php index 60195daf..e1542cd0 100644 --- a/vendor/symfony/http-kernel/Exception/ConflictHttpException.php +++ b/vendor/symfony/http-kernel/Exception/ConflictHttpException.php @@ -18,11 +18,11 @@ class ConflictHttpException extends HttpException { /** * @param string $message The internal exception message - * @param \Exception $previous The previous exception + * @param \Throwable $previous The previous exception * @param int $code The internal exception code * @param array $headers */ - public function __construct(string $message = null, \Exception $previous = null, int $code = 0, array $headers = array()) + public function __construct(string $message = null, \Throwable $previous = null, int $code = 0, array $headers = []) { parent::__construct(409, $message, $previous, $headers, $code); } diff --git a/vendor/symfony/http-kernel/Exception/ControllerDoesNotReturnResponseException.php b/vendor/symfony/http-kernel/Exception/ControllerDoesNotReturnResponseException.php index 39149aa5..1e87690f 100644 --- a/vendor/symfony/http-kernel/Exception/ControllerDoesNotReturnResponseException.php +++ b/vendor/symfony/http-kernel/Exception/ControllerDoesNotReturnResponseException.php @@ -28,12 +28,12 @@ class ControllerDoesNotReturnResponseException extends \LogicException $this->line = $controllerDefinition['line']; $r = new \ReflectionProperty(\Exception::class, 'trace'); $r->setAccessible(true); - $r->setValue($this, array_merge(array( - array( + $r->setValue($this, array_merge([ + [ 'line' => $line, 'file' => $file, - ), - ), $this->getTrace())); + ], + ], $this->getTrace())); } private function parseControllerDefinition(callable $controller): ?array @@ -46,10 +46,10 @@ class ControllerDoesNotReturnResponseException extends \LogicException try { $r = new \ReflectionMethod($controller[0], $controller[1]); - return array( + return [ 'file' => $r->getFileName(), 'line' => $r->getEndLine(), - ); + ]; } catch (\ReflectionException $e) { return null; } @@ -58,19 +58,25 @@ class ControllerDoesNotReturnResponseException extends \LogicException if ($controller instanceof \Closure) { $r = new \ReflectionFunction($controller); - return array( + return [ 'file' => $r->getFileName(), 'line' => $r->getEndLine(), - ); + ]; } if (\is_object($controller)) { $r = new \ReflectionClass($controller); - return array( + try { + $line = $r->getMethod('__invoke')->getEndLine(); + } catch (\ReflectionException $e) { + $line = $r->getEndLine(); + } + + return [ 'file' => $r->getFileName(), - 'line' => $r->getEndLine(), - ); + 'line' => $line, + ]; } return null; diff --git a/vendor/symfony/http-kernel/Exception/GoneHttpException.php b/vendor/symfony/http-kernel/Exception/GoneHttpException.php index f2f3515f..5d75f92b 100644 --- a/vendor/symfony/http-kernel/Exception/GoneHttpException.php +++ b/vendor/symfony/http-kernel/Exception/GoneHttpException.php @@ -18,11 +18,11 @@ class GoneHttpException extends HttpException { /** * @param string $message The internal exception message - * @param \Exception $previous The previous exception + * @param \Throwable $previous The previous exception * @param int $code The internal exception code * @param array $headers */ - public function __construct(string $message = null, \Exception $previous = null, int $code = 0, array $headers = array()) + public function __construct(string $message = null, \Throwable $previous = null, int $code = 0, array $headers = []) { parent::__construct(410, $message, $previous, $headers, $code); } diff --git a/vendor/symfony/http-kernel/Exception/HttpException.php b/vendor/symfony/http-kernel/Exception/HttpException.php index dab73120..d822cd5d 100644 --- a/vendor/symfony/http-kernel/Exception/HttpException.php +++ b/vendor/symfony/http-kernel/Exception/HttpException.php @@ -21,7 +21,7 @@ class HttpException extends \RuntimeException implements HttpExceptionInterface private $statusCode; private $headers; - public function __construct(int $statusCode, string $message = null, \Exception $previous = null, array $headers = array(), ?int $code = 0) + public function __construct(int $statusCode, string $message = null, \Throwable $previous = null, array $headers = [], ?int $code = 0) { $this->statusCode = $statusCode; $this->headers = $headers; diff --git a/vendor/symfony/http-kernel/Exception/LengthRequiredHttpException.php b/vendor/symfony/http-kernel/Exception/LengthRequiredHttpException.php index 46b76ba6..5e6eda04 100644 --- a/vendor/symfony/http-kernel/Exception/LengthRequiredHttpException.php +++ b/vendor/symfony/http-kernel/Exception/LengthRequiredHttpException.php @@ -18,11 +18,11 @@ class LengthRequiredHttpException extends HttpException { /** * @param string $message The internal exception message - * @param \Exception $previous The previous exception + * @param \Throwable $previous The previous exception * @param int $code The internal exception code * @param array $headers */ - public function __construct(string $message = null, \Exception $previous = null, int $code = 0, array $headers = array()) + public function __construct(string $message = null, \Throwable $previous = null, int $code = 0, array $headers = []) { parent::__construct(411, $message, $previous, $headers, $code); } diff --git a/vendor/symfony/http-kernel/Exception/MethodNotAllowedHttpException.php b/vendor/symfony/http-kernel/Exception/MethodNotAllowedHttpException.php index b0085c16..388c8c70 100644 --- a/vendor/symfony/http-kernel/Exception/MethodNotAllowedHttpException.php +++ b/vendor/symfony/http-kernel/Exception/MethodNotAllowedHttpException.php @@ -19,11 +19,11 @@ class MethodNotAllowedHttpException extends HttpException /** * @param array $allow An array of allowed methods * @param string $message The internal exception message - * @param \Exception $previous The previous exception + * @param \Throwable $previous The previous exception * @param int $code The internal exception code * @param array $headers */ - public function __construct(array $allow, string $message = null, \Exception $previous = null, ?int $code = 0, array $headers = array()) + public function __construct(array $allow, string $message = null, \Throwable $previous = null, ?int $code = 0, array $headers = []) { $headers['Allow'] = strtoupper(implode(', ', $allow)); diff --git a/vendor/symfony/http-kernel/Exception/NotAcceptableHttpException.php b/vendor/symfony/http-kernel/Exception/NotAcceptableHttpException.php index 32c30893..5bdacf69 100644 --- a/vendor/symfony/http-kernel/Exception/NotAcceptableHttpException.php +++ b/vendor/symfony/http-kernel/Exception/NotAcceptableHttpException.php @@ -18,11 +18,11 @@ class NotAcceptableHttpException extends HttpException { /** * @param string $message The internal exception message - * @param \Exception $previous The previous exception + * @param \Throwable $previous The previous exception * @param int $code The internal exception code * @param array $headers */ - public function __construct(string $message = null, \Exception $previous = null, int $code = 0, array $headers = array()) + public function __construct(string $message = null, \Throwable $previous = null, int $code = 0, array $headers = []) { parent::__construct(406, $message, $previous, $headers, $code); } diff --git a/vendor/symfony/http-kernel/Exception/NotFoundHttpException.php b/vendor/symfony/http-kernel/Exception/NotFoundHttpException.php index 433ff9b9..c52587d3 100644 --- a/vendor/symfony/http-kernel/Exception/NotFoundHttpException.php +++ b/vendor/symfony/http-kernel/Exception/NotFoundHttpException.php @@ -18,11 +18,11 @@ class NotFoundHttpException extends HttpException { /** * @param string $message The internal exception message - * @param \Exception $previous The previous exception + * @param \Throwable $previous The previous exception * @param int $code The internal exception code * @param array $headers */ - public function __construct(string $message = null, \Exception $previous = null, int $code = 0, array $headers = array()) + public function __construct(string $message = null, \Throwable $previous = null, int $code = 0, array $headers = []) { parent::__construct(404, $message, $previous, $headers, $code); } diff --git a/vendor/symfony/http-kernel/Exception/PreconditionFailedHttpException.php b/vendor/symfony/http-kernel/Exception/PreconditionFailedHttpException.php index 10817888..9bd895c8 100644 --- a/vendor/symfony/http-kernel/Exception/PreconditionFailedHttpException.php +++ b/vendor/symfony/http-kernel/Exception/PreconditionFailedHttpException.php @@ -18,11 +18,11 @@ class PreconditionFailedHttpException extends HttpException { /** * @param string $message The internal exception message - * @param \Exception $previous The previous exception + * @param \Throwable $previous The previous exception * @param int $code The internal exception code * @param array $headers */ - public function __construct(string $message = null, \Exception $previous = null, int $code = 0, array $headers = array()) + public function __construct(string $message = null, \Throwable $previous = null, int $code = 0, array $headers = []) { parent::__construct(412, $message, $previous, $headers, $code); } diff --git a/vendor/symfony/http-kernel/Exception/PreconditionRequiredHttpException.php b/vendor/symfony/http-kernel/Exception/PreconditionRequiredHttpException.php index 30783282..6aed7340 100644 --- a/vendor/symfony/http-kernel/Exception/PreconditionRequiredHttpException.php +++ b/vendor/symfony/http-kernel/Exception/PreconditionRequiredHttpException.php @@ -20,11 +20,11 @@ class PreconditionRequiredHttpException extends HttpException { /** * @param string $message The internal exception message - * @param \Exception $previous The previous exception + * @param \Throwable $previous The previous exception * @param int $code The internal exception code * @param array $headers */ - public function __construct(string $message = null, \Exception $previous = null, int $code = 0, array $headers = array()) + public function __construct(string $message = null, \Throwable $previous = null, int $code = 0, array $headers = []) { parent::__construct(428, $message, $previous, $headers, $code); } diff --git a/vendor/symfony/http-kernel/Exception/ServiceUnavailableHttpException.php b/vendor/symfony/http-kernel/Exception/ServiceUnavailableHttpException.php index 66776477..34a749fa 100644 --- a/vendor/symfony/http-kernel/Exception/ServiceUnavailableHttpException.php +++ b/vendor/symfony/http-kernel/Exception/ServiceUnavailableHttpException.php @@ -19,11 +19,11 @@ class ServiceUnavailableHttpException extends HttpException /** * @param int|string $retryAfter The number of seconds or HTTP-date after which the request may be retried * @param string $message The internal exception message - * @param \Exception $previous The previous exception + * @param \Throwable $previous The previous exception * @param int $code The internal exception code * @param array $headers */ - public function __construct($retryAfter = null, string $message = null, \Exception $previous = null, ?int $code = 0, array $headers = array()) + public function __construct($retryAfter = null, string $message = null, \Throwable $previous = null, ?int $code = 0, array $headers = []) { if ($retryAfter) { $headers['Retry-After'] = $retryAfter; diff --git a/vendor/symfony/http-kernel/Exception/TooManyRequestsHttpException.php b/vendor/symfony/http-kernel/Exception/TooManyRequestsHttpException.php index 60b024c3..e69961b7 100644 --- a/vendor/symfony/http-kernel/Exception/TooManyRequestsHttpException.php +++ b/vendor/symfony/http-kernel/Exception/TooManyRequestsHttpException.php @@ -21,11 +21,11 @@ class TooManyRequestsHttpException extends HttpException /** * @param int|string $retryAfter The number of seconds or HTTP-date after which the request may be retried * @param string $message The internal exception message - * @param \Exception $previous The previous exception + * @param \Throwable $previous The previous exception * @param int $code The internal exception code * @param array $headers */ - public function __construct($retryAfter = null, string $message = null, \Exception $previous = null, ?int $code = 0, array $headers = array()) + public function __construct($retryAfter = null, string $message = null, \Throwable $previous = null, ?int $code = 0, array $headers = []) { if ($retryAfter) { $headers['Retry-After'] = $retryAfter; diff --git a/vendor/symfony/http-kernel/Exception/UnauthorizedHttpException.php b/vendor/symfony/http-kernel/Exception/UnauthorizedHttpException.php index 17ebb254..7f7d0b47 100644 --- a/vendor/symfony/http-kernel/Exception/UnauthorizedHttpException.php +++ b/vendor/symfony/http-kernel/Exception/UnauthorizedHttpException.php @@ -19,11 +19,11 @@ class UnauthorizedHttpException extends HttpException /** * @param string $challenge WWW-Authenticate challenge string * @param string $message The internal exception message - * @param \Exception $previous The previous exception + * @param \Throwable $previous The previous exception * @param int $code The internal exception code * @param array $headers */ - public function __construct(string $challenge, string $message = null, \Exception $previous = null, ?int $code = 0, array $headers = array()) + public function __construct(string $challenge, string $message = null, \Throwable $previous = null, ?int $code = 0, array $headers = []) { $headers['WWW-Authenticate'] = $challenge; diff --git a/vendor/symfony/http-kernel/Exception/UnprocessableEntityHttpException.php b/vendor/symfony/http-kernel/Exception/UnprocessableEntityHttpException.php index 3a4b40c9..7fbc7eff 100644 --- a/vendor/symfony/http-kernel/Exception/UnprocessableEntityHttpException.php +++ b/vendor/symfony/http-kernel/Exception/UnprocessableEntityHttpException.php @@ -18,11 +18,11 @@ class UnprocessableEntityHttpException extends HttpException { /** * @param string $message The internal exception message - * @param \Exception $previous The previous exception + * @param \Throwable $previous The previous exception * @param int $code The internal exception code * @param array $headers */ - public function __construct(string $message = null, \Exception $previous = null, int $code = 0, array $headers = array()) + public function __construct(string $message = null, \Throwable $previous = null, int $code = 0, array $headers = []) { parent::__construct(422, $message, $previous, $headers, $code); } diff --git a/vendor/symfony/http-kernel/Exception/UnsupportedMediaTypeHttpException.php b/vendor/symfony/http-kernel/Exception/UnsupportedMediaTypeHttpException.php index ed686115..3bfac7f4 100644 --- a/vendor/symfony/http-kernel/Exception/UnsupportedMediaTypeHttpException.php +++ b/vendor/symfony/http-kernel/Exception/UnsupportedMediaTypeHttpException.php @@ -18,11 +18,11 @@ class UnsupportedMediaTypeHttpException extends HttpException { /** * @param string $message The internal exception message - * @param \Exception $previous The previous exception + * @param \Throwable $previous The previous exception * @param int $code The internal exception code * @param array $headers */ - public function __construct(string $message = null, \Exception $previous = null, int $code = 0, array $headers = array()) + public function __construct(string $message = null, \Throwable $previous = null, int $code = 0, array $headers = []) { parent::__construct(415, $message, $previous, $headers, $code); } diff --git a/vendor/symfony/http-kernel/Fragment/AbstractSurrogateFragmentRenderer.php b/vendor/symfony/http-kernel/Fragment/AbstractSurrogateFragmentRenderer.php index 6ab6ec1f..5b76f7a8 100644 --- a/vendor/symfony/http-kernel/Fragment/AbstractSurrogateFragmentRenderer.php +++ b/vendor/symfony/http-kernel/Fragment/AbstractSurrogateFragmentRenderer.php @@ -59,7 +59,7 @@ abstract class AbstractSurrogateFragmentRenderer extends RoutableFragmentRendere * * @see Symfony\Component\HttpKernel\HttpCache\SurrogateInterface */ - public function render($uri, Request $request, array $options = array()) + public function render($uri, Request $request, array $options = []) { if (!$this->surrogate || !$this->surrogate->hasSurrogateCapability($request)) { if ($uri instanceof ControllerReference && $this->containsNonScalars($uri->attributes)) { diff --git a/vendor/symfony/http-kernel/Fragment/FragmentHandler.php b/vendor/symfony/http-kernel/Fragment/FragmentHandler.php index 0c31826b..758f0e8f 100644 --- a/vendor/symfony/http-kernel/Fragment/FragmentHandler.php +++ b/vendor/symfony/http-kernel/Fragment/FragmentHandler.php @@ -29,7 +29,7 @@ use Symfony\Component\HttpKernel\Controller\ControllerReference; class FragmentHandler { private $debug; - private $renderers = array(); + private $renderers = []; private $requestStack; /** @@ -37,7 +37,7 @@ class FragmentHandler * @param FragmentRendererInterface[] $renderers An array of FragmentRendererInterface instances * @param bool $debug Whether the debug mode is enabled or not */ - public function __construct(RequestStack $requestStack, array $renderers = array(), bool $debug = false) + public function __construct(RequestStack $requestStack, array $renderers = [], bool $debug = false) { $this->requestStack = $requestStack; foreach ($renderers as $renderer) { @@ -70,7 +70,7 @@ class FragmentHandler * @throws \InvalidArgumentException when the renderer does not exist * @throws \LogicException when no master request is being handled */ - public function render($uri, $renderer = 'inline', array $options = array()) + public function render($uri, $renderer = 'inline', array $options = []) { if (!isset($options['ignore_errors'])) { $options['ignore_errors'] = !$this->debug; diff --git a/vendor/symfony/http-kernel/Fragment/FragmentRendererInterface.php b/vendor/symfony/http-kernel/Fragment/FragmentRendererInterface.php index bcf4e994..8e454a01 100644 --- a/vendor/symfony/http-kernel/Fragment/FragmentRendererInterface.php +++ b/vendor/symfony/http-kernel/Fragment/FragmentRendererInterface.php @@ -31,7 +31,7 @@ interface FragmentRendererInterface * * @return Response A Response instance */ - public function render($uri, Request $request, array $options = array()); + public function render($uri, Request $request, array $options = []); /** * Gets the name of the strategy. diff --git a/vendor/symfony/http-kernel/Fragment/HIncludeFragmentRenderer.php b/vendor/symfony/http-kernel/Fragment/HIncludeFragmentRenderer.php index 3ee0cfa2..9a700a9b 100644 --- a/vendor/symfony/http-kernel/Fragment/HIncludeFragmentRenderer.php +++ b/vendor/symfony/http-kernel/Fragment/HIncludeFragmentRenderer.php @@ -59,6 +59,10 @@ class HIncludeFragmentRenderer extends RoutableFragmentRenderer throw new \InvalidArgumentException('The hinclude rendering strategy needs an instance of Twig\Environment or Symfony\Component\Templating\EngineInterface'); } + if ($templating instanceof EngineInterface) { + @trigger_error(sprintf('Using a "%s" instance for "%s" is deprecated since version 4.3; use a \Twig\Environment instance instead.', EngineInterface::class, __CLASS__), E_USER_DEPRECATED); + } + $this->templating = $templating; } @@ -81,7 +85,7 @@ class HIncludeFragmentRenderer extends RoutableFragmentRenderer * * id: An optional hx:include tag id attribute * * attributes: An optional array of hx:include tag attributes */ - public function render($uri, Request $request, array $options = array()) + public function render($uri, Request $request, array $options = []) { if ($uri instanceof ControllerReference) { if (null === $this->signer) { @@ -102,7 +106,7 @@ class HIncludeFragmentRenderer extends RoutableFragmentRenderer $content = $template; } - $attributes = isset($options['attributes']) && \is_array($options['attributes']) ? $options['attributes'] : array(); + $attributes = isset($options['attributes']) && \is_array($options['attributes']) ? $options['attributes'] : []; if (isset($options['id']) && $options['id']) { $attributes['id'] = $options['id']; } diff --git a/vendor/symfony/http-kernel/Fragment/InlineFragmentRenderer.php b/vendor/symfony/http-kernel/Fragment/InlineFragmentRenderer.php index ecf12f21..7d624355 100644 --- a/vendor/symfony/http-kernel/Fragment/InlineFragmentRenderer.php +++ b/vendor/symfony/http-kernel/Fragment/InlineFragmentRenderer.php @@ -11,14 +11,15 @@ namespace Symfony\Component\HttpKernel\Fragment; -use Symfony\Component\EventDispatcher\EventDispatcherInterface; +use Symfony\Component\EventDispatcher\LegacyEventDispatcherProxy; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpKernel\Controller\ControllerReference; -use Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent; +use Symfony\Component\HttpKernel\Event\ExceptionEvent; use Symfony\Component\HttpKernel\HttpCache\SubRequestHandler; use Symfony\Component\HttpKernel\HttpKernelInterface; use Symfony\Component\HttpKernel\KernelEvents; +use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; /** * Implements the inline rendering strategy where the Request is rendered by the current HTTP kernel. @@ -33,7 +34,7 @@ class InlineFragmentRenderer extends RoutableFragmentRenderer public function __construct(HttpKernelInterface $kernel, EventDispatcherInterface $dispatcher = null) { $this->kernel = $kernel; - $this->dispatcher = $dispatcher; + $this->dispatcher = LegacyEventDispatcherProxy::decorate($dispatcher); } /** @@ -43,7 +44,7 @@ class InlineFragmentRenderer extends RoutableFragmentRenderer * * * alt: an alternative URI to render in case of an error */ - public function render($uri, Request $request, array $options = array()) + public function render($uri, Request $request, array $options = []) { $reference = null; if ($uri instanceof ControllerReference) { @@ -54,10 +55,10 @@ class InlineFragmentRenderer extends RoutableFragmentRenderer // want that as we want to preserve objects (so we manually set Request attributes // below instead) $attributes = $reference->attributes; - $reference->attributes = array(); + $reference->attributes = []; // The request format and locale might have been overridden by the user - foreach (array('_format', '_locale') as $key) { + foreach (['_format', '_locale'] as $key) { if (isset($attributes[$key])) { $reference->attributes[$key] = $attributes[$key]; } @@ -80,11 +81,11 @@ class InlineFragmentRenderer extends RoutableFragmentRenderer return SubRequestHandler::handle($this->kernel, $subRequest, HttpKernelInterface::SUB_REQUEST, false); } catch (\Exception $e) { // we dispatch the exception event to trigger the logging - // the response that comes back is simply ignored + // the response that comes back is ignored if (isset($options['ignore_errors']) && $options['ignore_errors'] && $this->dispatcher) { - $event = new GetResponseForExceptionEvent($this->kernel, $request, HttpKernelInterface::SUB_REQUEST, $e); + $event = new ExceptionEvent($this->kernel, $request, HttpKernelInterface::SUB_REQUEST, $e); - $this->dispatcher->dispatch(KernelEvents::EXCEPTION, $event); + $this->dispatcher->dispatch($event, KernelEvents::EXCEPTION); } // let's clean up the output buffers that were created by the sub-request @@ -113,7 +114,7 @@ class InlineFragmentRenderer extends RoutableFragmentRenderer unset($server['HTTP_IF_MODIFIED_SINCE']); unset($server['HTTP_IF_NONE_MATCH']); - $subRequest = Request::create($uri, 'get', array(), $cookies, array(), $server); + $subRequest = Request::create($uri, 'get', [], $cookies, [], $server); if ($request->headers->has('Surrogate-Capability')) { $subRequest->headers->set('Surrogate-Capability', $request->headers->get('Surrogate-Capability')); } diff --git a/vendor/symfony/http-kernel/HttpCache/AbstractSurrogate.php b/vendor/symfony/http-kernel/HttpCache/AbstractSurrogate.php index 3b2d5f26..8918a305 100644 --- a/vendor/symfony/http-kernel/HttpCache/AbstractSurrogate.php +++ b/vendor/symfony/http-kernel/HttpCache/AbstractSurrogate.php @@ -24,16 +24,16 @@ use Symfony\Component\HttpKernel\HttpKernelInterface; abstract class AbstractSurrogate implements SurrogateInterface { protected $contentTypes; - protected $phpEscapeMap = array( - array('', '', '', ''), - ); + protected $phpEscapeMap = [ + ['', '', '', ''], + ]; /** * @param array $contentTypes An array of content-type that should be parsed for Surrogate information * (default: text/html, text/xml, application/xhtml+xml, and application/xml) */ - public function __construct(array $contentTypes = array('text/html', 'text/xml', 'application/xhtml+xml', 'application/xml')) + public function __construct(array $contentTypes = ['text/html', 'text/xml', 'application/xhtml+xml', 'application/xml']) { $this->contentTypes = $contentTypes; } @@ -90,7 +90,7 @@ abstract class AbstractSurrogate implements SurrogateInterface */ public function handle(HttpCache $cache, $uri, $alt, $ignoreErrors) { - $subRequest = Request::create($uri, Request::METHOD_GET, array(), $cache->getRequest()->cookies->all(), array(), $cache->getRequest()->server->all()); + $subRequest = Request::create($uri, Request::METHOD_GET, [], $cache->getRequest()->cookies->all(), [], $cache->getRequest()->server->all()); try { $response = $cache->handle($subRequest, HttpKernelInterface::SUB_REQUEST, true); diff --git a/vendor/symfony/http-kernel/HttpCache/Esi.php b/vendor/symfony/http-kernel/HttpCache/Esi.php index 69134c71..dc62990b 100644 --- a/vendor/symfony/http-kernel/HttpCache/Esi.php +++ b/vendor/symfony/http-kernel/HttpCache/Esi.php @@ -85,7 +85,7 @@ class Esi extends AbstractSurrogate $i = 1; while (isset($chunks[$i])) { - $options = array(); + $options = []; preg_match_all('/(src|onerror|alt)="([^"]*?)"/', $chunks[$i], $matches, PREG_SET_ORDER); foreach ($matches as $set) { $options[$set[1]] = $set[2]; diff --git a/vendor/symfony/http-kernel/HttpCache/HttpCache.php b/vendor/symfony/http-kernel/HttpCache/HttpCache.php index 6980745a..051285ae 100644 --- a/vendor/symfony/http-kernel/HttpCache/HttpCache.php +++ b/vendor/symfony/http-kernel/HttpCache/HttpCache.php @@ -32,15 +32,22 @@ class HttpCache implements HttpKernelInterface, TerminableInterface private $request; private $surrogate; private $surrogateCacheStrategy; - private $options = array(); - private $traces = array(); + private $options = []; + private $traces = []; /** * Constructor. * * The available options are: * - * * debug: If true, the traces are added as a HTTP header to ease debugging + * * debug If true, exceptions are thrown when things go wrong. Otherwise, the cache + * will try to carry on and deliver a meaningful response. + * + * * trace_level May be one of 'none', 'short' and 'full'. For 'short', a concise trace of the + * master request will be added as an HTTP header. 'full' will add traces for all + * requests (including ESI subrequests). (default: 'full' if in debug; 'none' otherwise) + * + * * trace_header Header name to use for traces. (default: X-Symfony-Cache) * * * default_ttl The number of seconds that a cache entry should be considered * fresh when no explicit freshness information is provided in @@ -70,24 +77,30 @@ class HttpCache implements HttpKernelInterface, TerminableInterface * This setting is overridden by the stale-if-error HTTP Cache-Control extension * (see RFC 5861). */ - public function __construct(HttpKernelInterface $kernel, StoreInterface $store, SurrogateInterface $surrogate = null, array $options = array()) + public function __construct(HttpKernelInterface $kernel, StoreInterface $store, SurrogateInterface $surrogate = null, array $options = []) { $this->store = $store; $this->kernel = $kernel; $this->surrogate = $surrogate; // needed in case there is a fatal error because the backend is too slow to respond - register_shutdown_function(array($this->store, 'cleanup')); + register_shutdown_function([$this->store, 'cleanup']); - $this->options = array_merge(array( + $this->options = array_merge([ 'debug' => false, 'default_ttl' => 0, - 'private_headers' => array('Authorization', 'Cookie'), + 'private_headers' => ['Authorization', 'Cookie'], 'allow_reload' => false, 'allow_revalidate' => false, 'stale_while_revalidate' => 2, 'stale_if_error' => 60, - ), $options); + 'trace_level' => 'none', + 'trace_header' => 'X-Symfony-Cache', + ], $options); + + if (!isset($options['trace_level']) && $this->options['debug']) { + $this->options['trace_level'] = 'full'; + } } /** @@ -110,6 +123,23 @@ class HttpCache implements HttpKernelInterface, TerminableInterface return $this->traces; } + private function addTraces(Response $response) + { + $traceString = null; + + if ('full' === $this->options['trace_level']) { + $traceString = $this->getLog(); + } + + if ('short' === $this->options['trace_level'] && $masterId = array_key_first($this->traces)) { + $traceString = implode('/', $this->traces[$masterId]); + } + + if (null !== $traceString) { + $response->headers->add([$this->options['trace_header'] => $traceString]); + } + } + /** * Returns a log message for the events of the last request processing. * @@ -117,7 +147,7 @@ class HttpCache implements HttpKernelInterface, TerminableInterface */ public function getLog() { - $log = array(); + $log = []; foreach ($this->traces as $request => $traces) { $log[] = sprintf('%s: %s', $request, implode(', ', $traces)); } @@ -164,7 +194,7 @@ class HttpCache implements HttpKernelInterface, TerminableInterface { // FIXME: catch exceptions and implement a 500 error page here? -> in Varnish, there is a built-in error page mechanism if (HttpKernelInterface::MASTER_REQUEST === $type) { - $this->traces = array(); + $this->traces = []; // Keep a clone of the original request for surrogates so they can access it. // We must clone here to get a separate instance because the application will modify the request during // the application flow (we know it always does because we do ourselves by setting REMOTE_ADDR to 127.0.0.1 @@ -175,7 +205,7 @@ class HttpCache implements HttpKernelInterface, TerminableInterface } } - $this->traces[$this->getTraceKey($request)] = array(); + $this->traces[$this->getTraceKey($request)] = []; if (!$request->isMethodSafe(false)) { $response = $this->invalidate($request, $catch); @@ -194,8 +224,8 @@ class HttpCache implements HttpKernelInterface, TerminableInterface $this->restoreResponseBody($request, $response); - if (HttpKernelInterface::MASTER_REQUEST === $type && $this->options['debug']) { - $response->headers->set('X-Symfony-Cache', $this->getLog()); + if (HttpKernelInterface::MASTER_REQUEST === $type) { + $this->addTraces($response); } if (null !== $this->surrogate) { @@ -260,9 +290,9 @@ class HttpCache implements HttpKernelInterface, TerminableInterface $this->store->invalidate($request); // As per the RFC, invalidate Location and Content-Location URLs if present - foreach (array('Location', 'Content-Location') as $header) { + foreach (['Location', 'Content-Location'] as $header) { if ($uri = $response->headers->get($header)) { - $subRequest = Request::create($uri, 'get', array(), array(), array(), $request->server->all()); + $subRequest = Request::create($uri, 'get', [], [], [], $request->server->all()); $this->store->invalidate($subRequest); } @@ -357,7 +387,7 @@ class HttpCache implements HttpKernelInterface, TerminableInterface // Add our cached etag validator to the environment. // We keep the etags from the client to handle the case when the client // has a different private valid entry which is not cached here. - $cachedEtags = $entry->getEtag() ? array($entry->getEtag()) : array(); + $cachedEtags = $entry->getEtag() ? [$entry->getEtag()] : []; $requestEtags = $request->getETags(); if ($etags = array_unique(array_merge($cachedEtags, $requestEtags))) { $subRequest->headers->set('if_none_match', implode(', ', $etags)); @@ -377,7 +407,7 @@ class HttpCache implements HttpKernelInterface, TerminableInterface $entry = clone $entry; $entry->headers->remove('Date'); - foreach (array('Date', 'Expires', 'Cache-Control', 'ETag', 'Last-Modified') as $name) { + foreach (['Date', 'Expires', 'Cache-Control', 'ETag', 'Last-Modified'] as $name) { if ($response->headers->has($name)) { $entry->headers->set($name, $response->headers->get($name)); } @@ -448,7 +478,7 @@ class HttpCache implements HttpKernelInterface, TerminableInterface $response = SubRequestHandler::handle($this->kernel, $request, HttpKernelInterface::MASTER_REQUEST, $catch); // we don't implement the stale-if-error on Requests, which is nonetheless part of the RFC - if (null !== $entry && \in_array($response->getStatusCode(), array(500, 502, 503, 504))) { + if (null !== $entry && \in_array($response->getStatusCode(), [500, 502, 503, 504])) { if (null === $age = $entry->headers->getCacheControlDirective('stale-if-error')) { $age = $this->options['stale_if_error']; } diff --git a/vendor/symfony/http-kernel/HttpCache/ResponseCacheStrategy.php b/vendor/symfony/http-kernel/HttpCache/ResponseCacheStrategy.php index 672cc893..1efad607 100644 --- a/vendor/symfony/http-kernel/HttpCache/ResponseCacheStrategy.php +++ b/vendor/symfony/http-kernel/HttpCache/ResponseCacheStrategy.php @@ -5,10 +5,6 @@ * * (c) Fabien Potencier * - * This code is partially based on the Rack-Cache library by Ryan Tomayko, - * which is released under the MIT license. - * (based on commit 02d2b48d75bcb63cf1c0c7149c077ad256542801) - * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ @@ -28,30 +24,69 @@ use Symfony\Component\HttpFoundation\Response; */ class ResponseCacheStrategy implements ResponseCacheStrategyInterface { - private $cacheable = true; + /** + * Cache-Control headers that are sent to the final response if they appear in ANY of the responses. + */ + private static $overrideDirectives = ['private', 'no-cache', 'no-store', 'no-transform', 'must-revalidate', 'proxy-revalidate']; + + /** + * Cache-Control headers that are sent to the final response if they appear in ALL of the responses. + */ + private static $inheritDirectives = ['public', 'immutable']; + private $embeddedResponses = 0; - private $ttls = array(); - private $maxAges = array(); private $isNotCacheableResponseEmbedded = false; + private $age = 0; + private $flagDirectives = [ + 'no-cache' => null, + 'no-store' => null, + 'no-transform' => null, + 'must-revalidate' => null, + 'proxy-revalidate' => null, + 'public' => null, + 'private' => null, + 'immutable' => null, + ]; + private $ageDirectives = [ + 'max-age' => null, + 's-maxage' => null, + 'expires' => null, + ]; /** * {@inheritdoc} */ public function add(Response $response) { - if (!$response->isFresh() || !$response->isCacheable()) { - $this->cacheable = false; - } else { - $maxAge = $response->getMaxAge(); - $this->ttls[] = $response->getTtl(); - $this->maxAges[] = $maxAge; + ++$this->embeddedResponses; - if (null === $maxAge) { - $this->isNotCacheableResponseEmbedded = true; + foreach (self::$overrideDirectives as $directive) { + if ($response->headers->hasCacheControlDirective($directive)) { + $this->flagDirectives[$directive] = true; } } - ++$this->embeddedResponses; + foreach (self::$inheritDirectives as $directive) { + if (false !== $this->flagDirectives[$directive]) { + $this->flagDirectives[$directive] = $response->headers->hasCacheControlDirective($directive); + } + } + + $age = $response->getAge(); + $this->age = max($this->age, $age); + + if ($this->willMakeFinalResponseUncacheable($response)) { + $this->isNotCacheableResponseEmbedded = true; + + return; + } + + $this->storeRelativeAgeDirective('max-age', $response->headers->getCacheControlDirective('max-age'), $age); + $this->storeRelativeAgeDirective('s-maxage', $response->headers->getCacheControlDirective('s-maxage') ?: $response->headers->getCacheControlDirective('max-age'), $age); + + $expires = $response->getExpires(); + $expires = null !== $expires ? $expires->format('U') - $response->getDate()->format('U') : null; + $this->storeRelativeAgeDirective('expires', $expires >= 0 ? $expires : null, 0); } /** @@ -64,33 +99,124 @@ class ResponseCacheStrategy implements ResponseCacheStrategyInterface return; } - // Remove validation related headers in order to avoid browsers using - // their own cache, because some of the response content comes from - // at least one embedded response (which likely has a different caching strategy). - if ($response->isValidateable()) { - $response->setEtag(null); - $response->setLastModified(null); - } + // Remove validation related headers of the master response, + // because some of the response content comes from at least + // one embedded response (which likely has a different caching strategy). + $response->setEtag(null); + $response->setLastModified(null); - if (!$response->isFresh() || !$response->isCacheable()) { - $this->cacheable = false; - } + $this->add($response); - if (!$this->cacheable) { - $response->headers->set('Cache-Control', 'no-cache, must-revalidate'); + $response->headers->set('Age', $this->age); + + if ($this->isNotCacheableResponseEmbedded) { + $response->setExpires($response->getDate()); + + if ($this->flagDirectives['no-store']) { + $response->headers->set('Cache-Control', 'no-cache, no-store, must-revalidate'); + } else { + $response->headers->set('Cache-Control', 'no-cache, must-revalidate'); + } return; } - $this->ttls[] = $response->getTtl(); - $this->maxAges[] = $response->getMaxAge(); + $flags = array_filter($this->flagDirectives); - if ($this->isNotCacheableResponseEmbedded) { - $response->headers->removeCacheControlDirective('s-maxage'); - } elseif (null !== $maxAge = min($this->maxAges)) { - $response->setSharedMaxAge($maxAge); - $response->headers->set('Age', $maxAge - min($this->ttls)); + if (isset($flags['must-revalidate'])) { + $flags['no-cache'] = true; + } + + $response->headers->set('Cache-Control', implode(', ', array_keys($flags))); + + $maxAge = null; + $sMaxage = null; + + if (\is_numeric($this->ageDirectives['max-age'])) { + $maxAge = $this->ageDirectives['max-age'] + $this->age; + $response->headers->addCacheControlDirective('max-age', $maxAge); + } + + if (\is_numeric($this->ageDirectives['s-maxage'])) { + $sMaxage = $this->ageDirectives['s-maxage'] + $this->age; + + if ($maxAge !== $sMaxage) { + $response->headers->addCacheControlDirective('s-maxage', $sMaxage); + } + } + + if (\is_numeric($this->ageDirectives['expires'])) { + $date = clone $response->getDate(); + $date->modify('+'.($this->ageDirectives['expires'] + $this->age).' seconds'); + $response->setExpires($date); + } + } + + /** + * RFC2616, Section 13.4. + * + * @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec13.html#sec13.4 + * + * @return bool + */ + private function willMakeFinalResponseUncacheable(Response $response) + { + // RFC2616: A response received with a status code of 200, 203, 300, 301 or 410 + // MAY be stored by a cache […] unless a cache-control directive prohibits caching. + if ($response->headers->hasCacheControlDirective('no-cache') + || $response->headers->getCacheControlDirective('no-store') + ) { + return true; + } + + // Last-Modified and Etag headers cannot be merged, they render the response uncacheable + // by default (except if the response also has max-age etc.). + if (\in_array($response->getStatusCode(), [200, 203, 300, 301, 410]) + && null === $response->getLastModified() + && null === $response->getEtag() + ) { + return false; + } + + // RFC2616: A response received with any other status code (e.g. status codes 302 and 307) + // MUST NOT be returned in a reply to a subsequent request unless there are + // cache-control directives or another header(s) that explicitly allow it. + $cacheControl = ['max-age', 's-maxage', 'must-revalidate', 'proxy-revalidate', 'public', 'private']; + foreach ($cacheControl as $key) { + if ($response->headers->hasCacheControlDirective($key)) { + return false; + } + } + + if ($response->headers->has('Expires')) { + return false; + } + + return true; + } + + /** + * Store lowest max-age/s-maxage/expires for the final response. + * + * The response might have been stored in cache a while ago. To keep things comparable, + * we have to subtract the age so that the value is normalized for an age of 0. + * + * If the value is lower than the currently stored value, we update the value, to keep a rolling + * minimal value of each instruction. If the value is NULL, the directive will not be set on the final response. + * + * @param string $directive + * @param int|null $value + * @param int $age + */ + private function storeRelativeAgeDirective($directive, $value, $age) + { + if (null === $value) { + $this->ageDirectives[$directive] = false; + } + + if (false !== $this->ageDirectives[$directive]) { + $value -= $age; + $this->ageDirectives[$directive] = null !== $this->ageDirectives[$directive] ? min($this->ageDirectives[$directive], $value) : $value; } - $response->setMaxAge(0); } } diff --git a/vendor/symfony/http-kernel/HttpCache/Ssi.php b/vendor/symfony/http-kernel/HttpCache/Ssi.php index 58df1760..eaaa230b 100644 --- a/vendor/symfony/http-kernel/HttpCache/Ssi.php +++ b/vendor/symfony/http-kernel/HttpCache/Ssi.php @@ -70,7 +70,7 @@ class Ssi extends AbstractSurrogate $i = 1; while (isset($chunks[$i])) { - $options = array(); + $options = []; preg_match_all('/(virtual)="([^"]*?)"/', $chunks[$i], $matches, PREG_SET_ORDER); foreach ($matches as $set) { $options[$set[1]] = $set[2]; diff --git a/vendor/symfony/http-kernel/HttpCache/Store.php b/vendor/symfony/http-kernel/HttpCache/Store.php index 925ca96f..0ca14c75 100644 --- a/vendor/symfony/http-kernel/HttpCache/Store.php +++ b/vendor/symfony/http-kernel/HttpCache/Store.php @@ -38,7 +38,7 @@ class Store implements StoreInterface throw new \RuntimeException(sprintf('Unable to create the store directory (%s).', $this->root)); } $this->keyCache = new \SplObjectStorage(); - $this->locks = array(); + $this->locks = []; } /** @@ -52,7 +52,7 @@ class Store implements StoreInterface fclose($lock); } - $this->locks = array(); + $this->locks = []; } /** @@ -190,11 +190,11 @@ class Store implements StoreInterface } // read existing cache entries, remove non-varying, and add this one to the list - $entries = array(); + $entries = []; $vary = $response->headers->get('vary'); foreach ($this->getMetadata($key) as $entry) { if (!isset($entry[1]['vary'][0])) { - $entry[1]['vary'] = array(''); + $entry[1]['vary'] = ['']; } if ($entry[1]['vary'][0] != $vary || !$this->requestsMatch($vary, $entry[0], $storedEnv)) { @@ -205,7 +205,7 @@ class Store implements StoreInterface $headers = $this->persistResponse($response); unset($headers['age']); - array_unshift($entries, array($storedEnv, $headers)); + array_unshift($entries, [$storedEnv, $headers]); if (false === $this->save($key, serialize($entries))) { throw new \RuntimeException('Unable to store the metadata.'); @@ -234,13 +234,13 @@ class Store implements StoreInterface $modified = false; $key = $this->getCacheKey($request); - $entries = array(); + $entries = []; foreach ($this->getMetadata($key) as $entry) { $response = $this->restoreResponse($entry[1]); if ($response->isFresh()) { $response->expire(); $modified = true; - $entries[] = array($entry[0], $this->persistResponse($response)); + $entries[] = [$entry[0], $this->persistResponse($response)]; } else { $entries[] = $entry; } @@ -291,7 +291,7 @@ class Store implements StoreInterface private function getMetadata($key) { if (!$entries = $this->load($key)) { - return array(); + return []; } return unserialize($entries); @@ -462,7 +462,7 @@ class Store implements StoreInterface private function persistResponse(Response $response) { $headers = $response->headers->all(); - $headers['X-Status'] = array($response->getStatusCode()); + $headers['X-Status'] = [$response->getStatusCode()]; return $headers; } @@ -481,7 +481,7 @@ class Store implements StoreInterface unset($headers['X-Status']); if (null !== $body) { - $headers['X-Body-File'] = array($body); + $headers['X-Body-File'] = [$body]; } return new Response($body, $status, $headers); diff --git a/vendor/symfony/http-kernel/HttpCache/SubRequestHandler.php b/vendor/symfony/http-kernel/HttpCache/SubRequestHandler.php index 84d7a84e..cef9817e 100644 --- a/vendor/symfony/http-kernel/HttpCache/SubRequestHandler.php +++ b/vendor/symfony/http-kernel/HttpCache/SubRequestHandler.php @@ -32,13 +32,13 @@ class SubRequestHandler // remove untrusted values $remoteAddr = $request->server->get('REMOTE_ADDR'); if (!IpUtils::checkIp($remoteAddr, $trustedProxies)) { - $trustedHeaders = array( + $trustedHeaders = [ 'FORWARDED' => $trustedHeaderSet & Request::HEADER_FORWARDED, 'X_FORWARDED_FOR' => $trustedHeaderSet & Request::HEADER_X_FORWARDED_FOR, 'X_FORWARDED_HOST' => $trustedHeaderSet & Request::HEADER_X_FORWARDED_HOST, 'X_FORWARDED_PROTO' => $trustedHeaderSet & Request::HEADER_X_FORWARDED_PROTO, 'X_FORWARDED_PORT' => $trustedHeaderSet & Request::HEADER_X_FORWARDED_PORT, - ); + ]; foreach (array_filter($trustedHeaders) as $name => $key) { $request->headers->remove($name); $request->server->remove('HTTP_'.$name); @@ -46,8 +46,8 @@ class SubRequestHandler } // compute trusted values, taking any trusted proxies into account - $trustedIps = array(); - $trustedValues = array(); + $trustedIps = []; + $trustedValues = []; foreach (array_reverse($request->getClientIps()) as $ip) { $trustedIps[] = $ip; $trustedValues[] = sprintf('for="%s"', $ip); @@ -78,7 +78,7 @@ class SubRequestHandler // ensure 127.0.0.1 is set as trusted proxy if (!IpUtils::checkIp('127.0.0.1', $trustedProxies)) { - Request::setTrustedProxies(array_merge($trustedProxies, array('127.0.0.1')), Request::getTrustedHeaderSet()); + Request::setTrustedProxies(array_merge($trustedProxies, ['127.0.0.1']), Request::getTrustedHeaderSet()); } try { diff --git a/vendor/symfony/http-kernel/HttpClientKernel.php b/vendor/symfony/http-kernel/HttpClientKernel.php new file mode 100644 index 00000000..f60a84ea --- /dev/null +++ b/vendor/symfony/http-kernel/HttpClientKernel.php @@ -0,0 +1,106 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel; + +use Symfony\Component\HttpClient\HttpClient; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpFoundation\ResponseHeaderBag; +use Symfony\Component\Mime\Part\AbstractPart; +use Symfony\Component\Mime\Part\DataPart; +use Symfony\Component\Mime\Part\Multipart\FormDataPart; +use Symfony\Component\Mime\Part\TextPart; +use Symfony\Contracts\HttpClient\HttpClientInterface; + +/** + * An implementation of a Symfony HTTP kernel using a "real" HTTP client. + * + * @author Fabien Potencier + */ +final class HttpClientKernel implements HttpKernelInterface +{ + private $client; + + public function __construct(HttpClientInterface $client = null) + { + if (!class_exists(HttpClient::class)) { + throw new \LogicException(sprintf('You cannot use "%s" as the HttpClient component is not installed. Try running "composer require symfony/http-client".', __CLASS__)); + } + + $this->client = $client ?? HttpClient::create(); + } + + public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true) + { + $headers = $this->getHeaders($request); + $body = ''; + if (null !== $part = $this->getBody($request)) { + $headers = array_merge($headers, $part->getPreparedHeaders()->toArray()); + $body = $part->bodyToIterable(); + } + $response = $this->client->request($request->getMethod(), $request->getUri(), [ + 'headers' => $headers, + 'body' => $body, + 'max_redirects' => 0, + ] + $request->attributes->get('http_client_options', [])); + + $response = new Response($response->getContent(!$catch), $response->getStatusCode(), $response->getHeaders(!$catch)); + + $response->headers = new class($response->headers->all()) extends ResponseHeaderBag { + protected function computeCacheControlValue() + { + return $this->getCacheControlHeader(); // preserve the original value + } + }; + + return $response; + } + + private function getBody(Request $request): ?AbstractPart + { + if (\in_array($request->getMethod(), ['GET', 'HEAD'])) { + return null; + } + + if (!class_exists(AbstractPart::class)) { + throw new \LogicException('You cannot pass non-empty bodies as the Mime component is not installed. Try running "composer require symfony/mime".'); + } + + if ($content = $request->getContent()) { + return new TextPart($content, 'utf-8', 'plain', '8bit'); + } + + $fields = $request->request->all(); + foreach ($request->files->all() as $name => $file) { + $fields[$name] = DataPart::fromPath($file->getPathname(), $file->getClientOriginalName(), $file->getClientMimeType()); + } + + return new FormDataPart($fields); + } + + private function getHeaders(Request $request): array + { + $headers = []; + foreach ($request->headers as $key => $value) { + $headers[$key] = $value; + } + $cookies = []; + foreach ($request->cookies->all() as $name => $value) { + $cookies[] = $name.'='.$value; + } + if ($cookies) { + $headers['cookie'] = implode('; ', $cookies); + } + + return $headers; + } +} diff --git a/vendor/symfony/http-kernel/HttpKernel.php b/vendor/symfony/http-kernel/HttpKernel.php index 7ed4118e..64e931f2 100644 --- a/vendor/symfony/http-kernel/HttpKernel.php +++ b/vendor/symfony/http-kernel/HttpKernel.php @@ -11,7 +11,7 @@ namespace Symfony\Component\HttpKernel; -use Symfony\Component\EventDispatcher\EventDispatcherInterface; +use Symfony\Component\EventDispatcher\LegacyEventDispatcherProxy; use Symfony\Component\HttpFoundation\Exception\RequestExceptionInterface; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\RequestStack; @@ -19,18 +19,19 @@ use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpKernel\Controller\ArgumentResolver; use Symfony\Component\HttpKernel\Controller\ArgumentResolverInterface; use Symfony\Component\HttpKernel\Controller\ControllerResolverInterface; -use Symfony\Component\HttpKernel\Event\FilterControllerArgumentsEvent; -use Symfony\Component\HttpKernel\Event\FilterControllerEvent; -use Symfony\Component\HttpKernel\Event\FilterResponseEvent; +use Symfony\Component\HttpKernel\Event\ControllerArgumentsEvent; +use Symfony\Component\HttpKernel\Event\ControllerEvent; +use Symfony\Component\HttpKernel\Event\ExceptionEvent; use Symfony\Component\HttpKernel\Event\FinishRequestEvent; -use Symfony\Component\HttpKernel\Event\GetResponseEvent; -use Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent; -use Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent; -use Symfony\Component\HttpKernel\Event\PostResponseEvent; +use Symfony\Component\HttpKernel\Event\RequestEvent; +use Symfony\Component\HttpKernel\Event\ResponseEvent; +use Symfony\Component\HttpKernel\Event\TerminateEvent; +use Symfony\Component\HttpKernel\Event\ViewEvent; use Symfony\Component\HttpKernel\Exception\BadRequestHttpException; use Symfony\Component\HttpKernel\Exception\ControllerDoesNotReturnResponseException; use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; +use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; /** * HttpKernel notifies events to convert a Request object to a Response one. @@ -46,7 +47,7 @@ class HttpKernel implements HttpKernelInterface, TerminableInterface public function __construct(EventDispatcherInterface $dispatcher, ControllerResolverInterface $resolver, RequestStack $requestStack = null, ArgumentResolverInterface $argumentResolver = null) { - $this->dispatcher = $dispatcher; + $this->dispatcher = LegacyEventDispatcherProxy::decorate($dispatcher); $this->resolver = $resolver; $this->requestStack = $requestStack ?: new RequestStack(); $this->argumentResolver = $argumentResolver; @@ -84,7 +85,7 @@ class HttpKernel implements HttpKernelInterface, TerminableInterface */ public function terminate(Request $request, Response $response) { - $this->dispatcher->dispatch(KernelEvents::TERMINATE, new PostResponseEvent($this, $request, $response)); + $this->dispatcher->dispatch(new TerminateEvent($this, $request, $response), KernelEvents::TERMINATE); } /** @@ -122,8 +123,8 @@ class HttpKernel implements HttpKernelInterface, TerminableInterface $this->requestStack->push($request); // request - $event = new GetResponseEvent($this, $request, $type); - $this->dispatcher->dispatch(KernelEvents::REQUEST, $event); + $event = new RequestEvent($this, $request, $type); + $this->dispatcher->dispatch($event, KernelEvents::REQUEST); if ($event->hasResponse()) { return $this->filterResponse($event->getResponse(), $request, $type); @@ -134,15 +135,15 @@ class HttpKernel implements HttpKernelInterface, TerminableInterface throw new NotFoundHttpException(sprintf('Unable to find the controller for path "%s". The route is wrongly configured.', $request->getPathInfo())); } - $event = new FilterControllerEvent($this, $controller, $request, $type); - $this->dispatcher->dispatch(KernelEvents::CONTROLLER, $event); + $event = new ControllerEvent($this, $controller, $request, $type); + $this->dispatcher->dispatch($event, KernelEvents::CONTROLLER); $controller = $event->getController(); // controller arguments $arguments = $this->argumentResolver->getArguments($request, $controller); - $event = new FilterControllerArgumentsEvent($this, $controller, $arguments, $request, $type); - $this->dispatcher->dispatch(KernelEvents::CONTROLLER_ARGUMENTS, $event); + $event = new ControllerArgumentsEvent($this, $controller, $arguments, $request, $type); + $this->dispatcher->dispatch($event, KernelEvents::CONTROLLER_ARGUMENTS); $controller = $event->getController(); $arguments = $event->getArguments(); @@ -151,8 +152,8 @@ class HttpKernel implements HttpKernelInterface, TerminableInterface // view if (!$response instanceof Response) { - $event = new GetResponseForControllerResultEvent($this, $request, $type, $response); - $this->dispatcher->dispatch(KernelEvents::VIEW, $event); + $event = new ViewEvent($this, $request, $type, $response); + $this->dispatcher->dispatch($event, KernelEvents::VIEW); if ($event->hasResponse()) { $response = $event->getResponse(); @@ -184,9 +185,9 @@ class HttpKernel implements HttpKernelInterface, TerminableInterface */ private function filterResponse(Response $response, Request $request, int $type) { - $event = new FilterResponseEvent($this, $request, $type, $response); + $event = new ResponseEvent($this, $request, $type, $response); - $this->dispatcher->dispatch(KernelEvents::RESPONSE, $event); + $this->dispatcher->dispatch($event, KernelEvents::RESPONSE); $this->finishRequest($request, $type); @@ -202,7 +203,7 @@ class HttpKernel implements HttpKernelInterface, TerminableInterface */ private function finishRequest(Request $request, int $type) { - $this->dispatcher->dispatch(KernelEvents::FINISH_REQUEST, new FinishRequestEvent($this, $request, $type)); + $this->dispatcher->dispatch(new FinishRequestEvent($this, $request, $type), KernelEvents::FINISH_REQUEST); $this->requestStack->pop(); } @@ -217,8 +218,8 @@ class HttpKernel implements HttpKernelInterface, TerminableInterface */ private function handleException(\Exception $e, Request $request, int $type): Response { - $event = new GetResponseForExceptionEvent($this, $request, $type, $e); - $this->dispatcher->dispatch(KernelEvents::EXCEPTION, $event); + $event = new ExceptionEvent($this, $request, $type, $e); + $this->dispatcher->dispatch($event, KernelEvents::EXCEPTION); // a listener might have replaced the exception $e = $event->getException(); @@ -260,7 +261,7 @@ class HttpKernel implements HttpKernelInterface, TerminableInterface } if (\is_array($var)) { - $a = array(); + $a = []; foreach ($var as $k => $v) { $a[] = sprintf('%s => ...', $k); } diff --git a/vendor/symfony/http-kernel/HttpKernelBrowser.php b/vendor/symfony/http-kernel/HttpKernelBrowser.php new file mode 100644 index 00000000..ab52df14 --- /dev/null +++ b/vendor/symfony/http-kernel/HttpKernelBrowser.php @@ -0,0 +1,24 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel; + +/** + * Client simulates a browser and makes requests to an HttpKernel instance. + * + * @author Fabien Potencier + * + * @method Request getRequest() A Request instance + * @method Response getResponse() A Response instance + */ +class HttpKernelBrowser extends Client +{ +} diff --git a/vendor/symfony/http-kernel/Kernel.php b/vendor/symfony/http-kernel/Kernel.php index d09be5a0..9c62c087 100644 --- a/vendor/symfony/http-kernel/Kernel.php +++ b/vendor/symfony/http-kernel/Kernel.php @@ -52,7 +52,7 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl /** * @var BundleInterface[] */ - protected $bundles = array(); + protected $bundles = []; protected $container; /** @@ -73,15 +73,15 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl private $requestStackSize = 0; private $resetServices = false; - const VERSION = '4.2.2'; - const VERSION_ID = 40202; + const VERSION = '4.3.1'; + const VERSION_ID = 40301; const MAJOR_VERSION = 4; - const MINOR_VERSION = 2; - const RELEASE_VERSION = 2; + const MINOR_VERSION = 3; + const RELEASE_VERSION = 1; const EXTRA_VERSION = ''; - const END_OF_MAINTENANCE = '07/2019'; - const END_OF_LIFE = '01/2020'; + const END_OF_MAINTENANCE = '01/2020'; + const END_OF_LIFE = '07/2020'; public function __construct(string $environment, bool $debug) { @@ -258,7 +258,7 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl $isResource = 0 === strpos($path, 'Resources') && null !== $dir; $overridePath = substr($path, 9); $bundle = $this->getBundle($bundleName); - $files = array(); + $files = []; if ($isResource && file_exists($file = $dir.'/'.$bundle->getName().$overridePath)) { $files[] = $file; @@ -409,7 +409,7 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl */ public function getAnnotatedClassesToCompile(): array { - return array(); + return []; } /** @@ -420,7 +420,7 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl protected function initializeBundles() { // init bundles - $this->bundles = array(); + $this->bundles = []; foreach ($this->registerBundles() as $bundle) { $name = $bundle->getName(); if (isset($this->bundles[$name])) { @@ -442,14 +442,21 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl /** * Gets the container class. * + * @throws \InvalidArgumentException If the generated classname is invalid + * * @return string The container class */ protected function getContainerClass() { $class = \get_class($this); - $class = 'c' === $class[0] && 0 === strpos($class, "class@anonymous\0") ? get_parent_class($class).ContainerBuilder::hash($class) : $class; + $class = 'c' === $class[0] && 0 === strpos($class, "class@anonymous\0") ? get_parent_class($class).str_replace('.', '_', ContainerBuilder::hash($class)) : $class; + $class = $this->name.str_replace('\\', '_', $class).ucfirst($this->environment).($this->debug ? 'Debug' : '').'Container'; - return $this->name.str_replace('\\', '_', $class).ucfirst($this->environment).($this->debug ? 'Debug' : '').'Container'; + if (!preg_match('/^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*$/', $class)) { + throw new \InvalidArgumentException(sprintf('The environment "%s" contains invalid characters, it can only contain characters allowed in PHP class names.', $this->environment)); + } + + return $class; } /** @@ -487,7 +494,6 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl $fresh = true; } } catch (\Throwable $e) { - } catch (\Exception $e) { } finally { error_reporting($errorLevel); } @@ -498,7 +504,7 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl } if ($this->debug) { - $collectedLogs = array(); + $collectedLogs = []; $previousHandler = \defined('PHPUNIT_COMPOSER_INSTALL'); $previousHandler = $previousHandler ?: set_error_handler(function ($type, $message, $file, $line) use (&$collectedLogs, &$previousHandler) { if (E_USER_DEPRECATED !== $type && E_DEPRECATED !== $type) { @@ -522,19 +528,19 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl // Remove frames added by DebugClassLoader. for ($i = \count($backtrace) - 2; 0 < $i; --$i) { if (DebugClassLoader::class === ($backtrace[$i]['class'] ?? null)) { - $backtrace = array($backtrace[$i + 1]); + $backtrace = [$backtrace[$i + 1]]; break; } } - $collectedLogs[$message] = array( + $collectedLogs[$message] = [ 'type' => $type, 'message' => $message, 'file' => $file, 'line' => $line, - 'trace' => array($backtrace[0]), + 'trace' => [$backtrace[0]], 'count' => 1, - ); + ]; }); } @@ -556,7 +562,6 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl try { $oldContainer = include $cache->getPath(); } catch (\Throwable $e) { - } catch (\Exception $e) { } finally { error_reporting($errorLevel); } @@ -571,7 +576,7 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl // Because concurrent requests might still be using them, // old container files are not removed immediately, // but on a next dump of the container. - static $legacyContainers = array(); + static $legacyContainers = []; $oldContainerDir = \dirname($oldContainer->getFileName()); $legacyContainers[$oldContainerDir.'.legacy'] = true; foreach (glob(\dirname($oldContainerDir).\DIRECTORY_SEPARATOR.'*.legacy') as $legacyContainer) { @@ -595,18 +600,18 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl */ protected function getKernelParameters() { - $bundles = array(); - $bundlesMetadata = array(); + $bundles = []; + $bundlesMetadata = []; foreach ($this->bundles as $name => $bundle) { $bundles[$name] = \get_class($bundle); - $bundlesMetadata[$name] = array( + $bundlesMetadata[$name] = [ 'path' => $bundle->getPath(), 'namespace' => $bundle->getNamespace(), - ); + ]; } - return array( + return [ /* * @deprecated since Symfony 4.2, use kernel.project_dir instead */ @@ -624,7 +629,7 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl 'kernel.bundles_metadata' => $bundlesMetadata, 'kernel.charset' => $this->getCharset(), 'kernel.container_class' => $this->getContainerClass(), - ); + ]; } /** @@ -636,7 +641,7 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl */ protected function buildContainer() { - foreach (array('cache' => $this->warmupDir ?: $this->getCacheDir(), 'logs' => $this->getLogDir()) as $name => $dir) { + foreach (['cache' => $this->warmupDir ?: $this->getCacheDir(), 'logs' => $this->getLogDir()] as $name => $dir) { if (!is_dir($dir)) { if (false === @mkdir($dir, 0777, true) && !is_dir($dir)) { throw new \RuntimeException(sprintf("Unable to create the %s directory (%s)\n", $name, $dir)); @@ -664,7 +669,7 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl */ protected function prepareContainer(ContainerBuilder $container) { - $extensions = array(); + $extensions = []; foreach ($this->bundles as $bundle) { if ($extension = $bundle->getContainerExtension()) { $container->registerExtension($extension); @@ -726,14 +731,14 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl $dumper->setProxyDumper(new ProxyDumper()); } - $content = $dumper->dump(array( + $content = $dumper->dump([ 'class' => $class, 'base_class' => $baseClass, 'file' => $cache->getPath(), 'as_files' => true, 'debug' => $this->debug, 'build_time' => $container->hasParameter('kernel.container_build_time') ? $container->getParameter('kernel.container_build_time') : time(), - )); + ]); $rootCode = array_pop($content); $dir = \dirname($cache->getPath()).'/'; @@ -759,7 +764,7 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl protected function getContainerLoader(ContainerInterface $container) { $locator = new FileLocator($this); - $resolver = new LoaderResolver(array( + $resolver = new LoaderResolver([ new XmlFileLoader($container, $locator), new YamlFileLoader($container, $locator), new IniFileLoader($container, $locator), @@ -767,7 +772,7 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl new GlobFileLoader($container, $locator), new DirectoryLoader($container, $locator), new ClosureLoader($container), - )); + ]); return new DelegatingLoader($resolver); } @@ -811,8 +816,8 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl } // replace multiple new lines with a single newline - $rawChunk .= preg_replace(array('/\n{2,}/S'), "\n", $token[1]); - } elseif (\in_array($token[0], array(T_COMMENT, T_DOC_COMMENT))) { + $rawChunk .= preg_replace(['/\n{2,}/S'], "\n", $token[1]); + } elseif (\in_array($token[0], [T_COMMENT, T_DOC_COMMENT])) { $ignoreSpace = true; } else { $rawChunk .= $token[1]; @@ -826,22 +831,54 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl $output .= $rawChunk; - // PHP 7 memory manager will not release after token_get_all(), see https://bugs.php.net/70098 unset($tokens, $rawChunk); gc_mem_caches(); return $output; } + /** + * @deprecated since Symfony 4.3 + */ public function serialize() { - return serialize(array($this->environment, $this->debug)); + @trigger_error(sprintf('The "%s" method is deprecated since Symfony 4.3.', __METHOD__), E_USER_DEPRECATED); + + return serialize([$this->environment, $this->debug]); } + /** + * @deprecated since Symfony 4.3 + */ public function unserialize($data) { - list($environment, $debug) = unserialize($data, array('allowed_classes' => false)); + @trigger_error(sprintf('The "%s" method is deprecated since Symfony 4.3.', __METHOD__), E_USER_DEPRECATED); + list($environment, $debug) = unserialize($data, ['allowed_classes' => false]); $this->__construct($environment, $debug); } + + public function __sleep() + { + if (__CLASS__ !== $c = (new \ReflectionMethod($this, 'serialize'))->getDeclaringClass()->name) { + @trigger_error(sprintf('Implementing the "%s::serialize()" method is deprecated since Symfony 4.3.', $c), E_USER_DEPRECATED); + $this->serialized = $this->serialize(); + + return ['serialized']; + } + + return ['environment', 'debug']; + } + + public function __wakeup() + { + if (__CLASS__ !== $c = (new \ReflectionMethod($this, 'serialize'))->getDeclaringClass()->name) { + @trigger_error(sprintf('Implementing the "%s::serialize()" method is deprecated since Symfony 4.3.', $c), E_USER_DEPRECATED); + $this->unserialize($this->serialized); + unset($this->serialized); + + return; + } + $this->__construct($this->environment, $this->debug); + } } diff --git a/vendor/symfony/http-kernel/KernelEvents.php b/vendor/symfony/http-kernel/KernelEvents.php index 67437632..682561c3 100644 --- a/vendor/symfony/http-kernel/KernelEvents.php +++ b/vendor/symfony/http-kernel/KernelEvents.php @@ -25,7 +25,7 @@ final class KernelEvents * This event allows you to create a response for a request before any * other code in the framework is executed. * - * @Event("Symfony\Component\HttpKernel\Event\GetResponseEvent") + * @Event("Symfony\Component\HttpKernel\Event\RequestEvent") */ const REQUEST = 'kernel.request'; @@ -35,7 +35,7 @@ final class KernelEvents * This event allows you to create a response for a thrown exception or * to modify the thrown exception. * - * @Event("Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent") + * @Event("Symfony\Component\HttpKernel\Event\ExceptionEvent") */ const EXCEPTION = 'kernel.exception'; @@ -46,7 +46,7 @@ final class KernelEvents * This event allows you to create a response for the return value of the * controller. * - * @Event("Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent") + * @Event("Symfony\Component\HttpKernel\Event\ViewEvent") */ const VIEW = 'kernel.view'; @@ -57,7 +57,7 @@ final class KernelEvents * This event allows you to change the controller that will handle the * request. * - * @Event("Symfony\Component\HttpKernel\Event\FilterControllerEvent") + * @Event("Symfony\Component\HttpKernel\Event\ControllerEvent") */ const CONTROLLER = 'kernel.controller'; @@ -67,7 +67,7 @@ final class KernelEvents * This event allows you to change the arguments that will be passed to * the controller. * - * @Event("Symfony\Component\HttpKernel\Event\FilterControllerArgumentsEvent") + * @Event("Symfony\Component\HttpKernel\Event\ControllerArgumentsEvent") */ const CONTROLLER_ARGUMENTS = 'kernel.controller_arguments'; @@ -78,7 +78,7 @@ final class KernelEvents * This event allows you to modify or replace the response that will be * replied. * - * @Event("Symfony\Component\HttpKernel\Event\FilterResponseEvent") + * @Event("Symfony\Component\HttpKernel\Event\ResponseEvent") */ const RESPONSE = 'kernel.response'; @@ -87,7 +87,7 @@ final class KernelEvents * * This event allows you to run expensive post-response jobs. * - * @Event("Symfony\Component\HttpKernel\Event\PostResponseEvent") + * @Event("Symfony\Component\HttpKernel\Event\TerminateEvent") */ const TERMINATE = 'kernel.terminate'; diff --git a/vendor/symfony/http-kernel/KernelInterface.php b/vendor/symfony/http-kernel/KernelInterface.php index 93c4190b..ead6920e 100644 --- a/vendor/symfony/http-kernel/KernelInterface.php +++ b/vendor/symfony/http-kernel/KernelInterface.php @@ -24,7 +24,7 @@ use Symfony\Component\HttpKernel\Bundle\BundleInterface; * * @method string getProjectDir() Gets the project dir (path of the project's composer file) - not defining it is deprecated since Symfony 4.2 */ -interface KernelInterface extends HttpKernelInterface, \Serializable +interface KernelInterface extends HttpKernelInterface { /** * Returns an array of bundles to register. diff --git a/vendor/symfony/http-kernel/Log/Logger.php b/vendor/symfony/http-kernel/Log/Logger.php index 8b671d84..3969487b 100644 --- a/vendor/symfony/http-kernel/Log/Logger.php +++ b/vendor/symfony/http-kernel/Log/Logger.php @@ -22,7 +22,7 @@ use Psr\Log\LogLevel; */ class Logger extends AbstractLogger { - private static $levels = array( + private static $levels = [ LogLevel::DEBUG => 0, LogLevel::INFO => 1, LogLevel::NOTICE => 2, @@ -31,7 +31,7 @@ class Logger extends AbstractLogger LogLevel::CRITICAL => 5, LogLevel::ALERT => 6, LogLevel::EMERGENCY => 7, - ); + ]; private $minLevelIndex; private $formatter; @@ -40,7 +40,7 @@ class Logger extends AbstractLogger public function __construct(string $minLevel = null, $output = 'php://stderr', callable $formatter = null) { if (null === $minLevel) { - $minLevel = LogLevel::WARNING; + $minLevel = 'php://stdout' === $output || 'php://stderr' === $output ? LogLevel::CRITICAL : LogLevel::WARNING; if (isset($_ENV['SHELL_VERBOSITY']) || isset($_SERVER['SHELL_VERBOSITY'])) { switch ((int) (isset($_ENV['SHELL_VERBOSITY']) ? $_ENV['SHELL_VERBOSITY'] : $_SERVER['SHELL_VERBOSITY'])) { @@ -57,7 +57,7 @@ class Logger extends AbstractLogger } $this->minLevelIndex = self::$levels[$minLevel]; - $this->formatter = $formatter ?: array($this, 'format'); + $this->formatter = $formatter ?: [$this, 'format']; if (false === $this->handle = \is_resource($output) ? $output : @fopen($output, 'a')) { throw new InvalidArgumentException(sprintf('Unable to open "%s".', $output)); } @@ -66,7 +66,7 @@ class Logger extends AbstractLogger /** * {@inheritdoc} */ - public function log($level, $message, array $context = array()) + public function log($level, $message, array $context = []) { if (!isset(self::$levels[$level])) { throw new InvalidArgumentException(sprintf('The log level "%s" does not exist.', $level)); @@ -83,7 +83,7 @@ class Logger extends AbstractLogger private function format(string $level, string $message, array $context): string { if (false !== strpos($message, '{')) { - $replacements = array(); + $replacements = []; foreach ($context as $key => $val) { if (null === $val || is_scalar($val) || (\is_object($val) && method_exists($val, '__toString'))) { $replacements["{{$key}}"] = $val; diff --git a/vendor/symfony/http-kernel/Profiler/FileProfilerStorage.php b/vendor/symfony/http-kernel/Profiler/FileProfilerStorage.php index 955afed5..863998fd 100644 --- a/vendor/symfony/http-kernel/Profiler/FileProfilerStorage.php +++ b/vendor/symfony/http-kernel/Profiler/FileProfilerStorage.php @@ -52,13 +52,13 @@ class FileProfilerStorage implements ProfilerStorageInterface $file = $this->getIndexFilename(); if (!file_exists($file)) { - return array(); + return []; } $file = fopen($file, 'r'); fseek($file, 0, SEEK_END); - $result = array(); + $result = []; while (\count($result) < $limit && $line = $this->readLineFromFile($file)) { $values = str_getcsv($line); list($csvToken, $csvIp, $csvMethod, $csvUrl, $csvTime, $csvParent, $csvStatusCode) = $values; @@ -76,7 +76,7 @@ class FileProfilerStorage implements ProfilerStorageInterface continue; } - $result[$csvToken] = array( + $result[$csvToken] = [ 'token' => $csvToken, 'ip' => $csvIp, 'method' => $csvMethod, @@ -84,7 +84,7 @@ class FileProfilerStorage implements ProfilerStorageInterface 'time' => $csvTime, 'parent' => $csvParent, 'status_code' => $csvStatusCode, - ); + ]; } fclose($file); @@ -149,7 +149,7 @@ class FileProfilerStorage implements ProfilerStorageInterface }, $profile->getChildren())); // Store profile - $data = array( + $data = [ 'token' => $profileToken, 'parent' => $parentToken, 'children' => $childrenToken, @@ -159,7 +159,7 @@ class FileProfilerStorage implements ProfilerStorageInterface 'url' => $profile->getUrl(), 'time' => $profile->getTime(), 'status_code' => $profile->getStatusCode(), - ); + ]; if (false === file_put_contents($file, serialize($data))) { return false; @@ -171,7 +171,7 @@ class FileProfilerStorage implements ProfilerStorageInterface return false; } - fputcsv($file, array( + fputcsv($file, [ $profile->getToken(), $profile->getIp(), $profile->getMethod(), @@ -179,7 +179,7 @@ class FileProfilerStorage implements ProfilerStorageInterface $profile->getTime(), $profile->getParentToken(), $profile->getStatusCode(), - )); + ]); fclose($file); } diff --git a/vendor/symfony/http-kernel/Profiler/Profile.php b/vendor/symfony/http-kernel/Profiler/Profile.php index 4716a229..f896c00e 100644 --- a/vendor/symfony/http-kernel/Profiler/Profile.php +++ b/vendor/symfony/http-kernel/Profiler/Profile.php @@ -25,7 +25,7 @@ class Profile /** * @var DataCollectorInterface[] */ - private $collectors = array(); + private $collectors = []; private $ip; private $method; @@ -41,7 +41,7 @@ class Profile /** * @var Profile[] */ - private $children = array(); + private $children = []; public function __construct(string $token) { @@ -201,7 +201,7 @@ class Profile */ public function setChildren(array $children) { - $this->children = array(); + $this->children = []; foreach ($children as $child) { $this->addChild($child); } @@ -262,7 +262,7 @@ class Profile */ public function setCollectors(array $collectors) { - $this->collectors = array(); + $this->collectors = []; foreach ($collectors as $collector) { $this->addCollector($collector); } @@ -290,6 +290,6 @@ class Profile public function __sleep() { - return array('token', 'parent', 'children', 'collectors', 'ip', 'method', 'url', 'time', 'statusCode'); + return ['token', 'parent', 'children', 'collectors', 'ip', 'method', 'url', 'time', 'statusCode']; } } diff --git a/vendor/symfony/http-kernel/Profiler/Profiler.php b/vendor/symfony/http-kernel/Profiler/Profiler.php index 809a3396..4a32c784 100644 --- a/vendor/symfony/http-kernel/Profiler/Profiler.php +++ b/vendor/symfony/http-kernel/Profiler/Profiler.php @@ -31,7 +31,7 @@ class Profiler implements ResetInterface /** * @var DataCollectorInterface[] */ - private $collectors = array(); + private $collectors = []; private $logger; private $initiallyEnabled = true; @@ -101,7 +101,7 @@ class Profiler implements ResetInterface } if (!($ret = $this->storage->write($profile)) && null !== $this->logger) { - $this->logger->warning('Unable to store the profiler information.', array('configured_storage' => \get_class($this->storage))); + $this->logger->warning('Unable to store the profiler information.', ['configured_storage' => \get_class($this->storage)]); } return $ret; @@ -196,9 +196,9 @@ class Profiler implements ResetInterface * * @param DataCollectorInterface[] $collectors An array of collectors */ - public function set(array $collectors = array()) + public function set(array $collectors = []) { - $this->collectors = array(); + $this->collectors = []; foreach ($collectors as $collector) { $this->add($collector); } diff --git a/vendor/symfony/http-kernel/Resources/welcome.html.php b/vendor/symfony/http-kernel/Resources/welcome.html.php index caac7fd6..8fdc0050 100644 --- a/vendor/symfony/http-kernel/Resources/welcome.html.php +++ b/vendor/symfony/http-kernel/Resources/welcome.html.php @@ -51,21 +51,7 @@