From 0e0ef86b712e85747ded3aca85c6f3a3a38f128a Mon Sep 17 00:00:00 2001 From: TheGamecraft Date: Mon, 10 Sep 2018 08:51:18 -0400 Subject: [PATCH 1/2] ALPHA 3.0.2a --- .gitignore | 1 + composer.lock | 360 +-- install.sh | 6 + vendor/bin/php-parse | 203 +- vendor/bin/psysh | 139 +- vendor/composer/autoload_classmap.php | 48 +- vendor/composer/autoload_files.php | 1 - vendor/composer/autoload_static.php | 49 +- vendor/composer/installed.json | 422 +-- .../Validation/DNSCheckValidation.php | 13 +- .../Validation/SpoofCheckValidation.php | 2 +- vendor/egulias/email-validator/README.md | 2 +- vendor/filp/whoops/CHANGELOG.md | 4 + vendor/filp/whoops/composer.json | 2 +- .../src/Whoops/Handler/PrettyPageHandler.php | 4 + vendor/fzaninotto/faker/.travis.yml | 1 + vendor/fzaninotto/faker/CHANGELOG.md | 80 + vendor/fzaninotto/faker/composer.json | 2 +- vendor/fzaninotto/faker/readme.md | 179 +- .../fzaninotto/faker/src/Faker/Generator.php | 12 +- .../Faker/ORM/Doctrine/EntityPopulator.php | 2 +- .../Faker/ORM/Propel/ColumnTypeGuesser.php | 8 +- .../Faker/ORM/Propel2/ColumnTypeGuesser.php | 8 +- .../src/Faker/ORM/Spot/EntityPopulator.php | 26 +- .../faker/src/Faker/Provider/Base.php | 30 +- .../faker/src/Faker/Provider/DateTime.php | 71 +- .../faker/src/Faker/Provider/Image.php | 20 +- .../src/Faker/Provider/Miscellaneous.php | 12 +- .../faker/src/Faker/Provider/Payment.php | 24 +- .../faker/src/Faker/Provider/Text.php | 2 +- .../src/Faker/Provider/de_CH/Internet.php | 10 +- .../src/Faker/Provider/de_DE/Address.php | 4 +- .../src/Faker/Provider/de_DE/Internet.php | 19 +- .../src/Faker/Provider/el_GR/Company.php | 4 +- .../src/Faker/Provider/en_NZ/Internet.php | 6 +- .../src/Faker/Provider/en_US/Company.php | 25 +- .../faker/src/Faker/Provider/en_US/Person.php | 4 +- .../faker/src/Faker/Provider/en_ZA/Person.php | 26 +- .../faker/src/Faker/Provider/es_ES/Person.php | 12 + .../src/Faker/Provider/es_VE/Company.php | 10 + .../faker/src/Faker/Provider/es_VE/Person.php | 15 +- .../src/Faker/Provider/fr_CA/Address.php | 2 +- .../src/Faker/Provider/fr_CH/Company.php | 2 +- .../src/Faker/Provider/fr_FR/Address.php | 10 + .../src/Faker/Provider/fr_FR/Company.php | 6 +- .../src/Faker/Provider/fr_FR/Payment.php | 11 +- .../src/Faker/Provider/fr_FR/PhoneNumber.php | 68 +- .../src/Faker/Provider/hu_HU/Address.php | 4 +- .../src/Faker/Provider/it_IT/Company.php | 6 +- .../faker/src/Faker/Provider/kk_KZ/Person.php | 15 +- .../src/Faker/Provider/ko_KR/PhoneNumber.php | 29 +- .../src/Faker/Provider/lv_LV/Address.php | 53 +- .../src/Faker/Provider/nb_NO/Company.php | 38 +- .../faker/src/Faker/Provider/nl_BE/Person.php | 34 + .../src/Faker/Provider/nl_NL/Address.php | 43 +- .../faker/src/Faker/Provider/nl_NL/Person.php | 33 + .../src/Faker/Provider/pl_PL/Payment.php | 133 +- .../faker/src/Faker/Provider/pl_PL/Person.php | 9 +- .../src/Faker/Provider/pt_BR/PhoneNumber.php | 19 +- .../src/Faker/Provider/ru_RU/Address.php | 79 +- .../faker/src/Faker/Provider/ru_RU/Text.php | 7 + .../src/Faker/Provider/th_TH/PhoneNumber.php | 2 + .../faker/src/Faker/Provider/tr_TR/Person.php | 15 + .../src/Faker/Provider/uk_UA/Address.php | 2 +- .../src/Faker/Provider/uk_UA/Payment.php | 2 +- .../src/Faker/Provider/zh_TW/Address.php | 8 +- .../faker/src/Faker/Provider/zh_TW/Text.php | 852 ++++- .../faker/test/Faker/Calculator/IbanTest.php | 3 +- .../faker/test/Faker/Calculator/InnTest.php | 3 +- .../faker/test/Faker/Calculator/LuhnTest.php | 3 +- .../faker/test/Faker/DefaultGeneratorTest.php | 7 +- .../faker/test/Faker/GeneratorTest.php | 5 +- .../faker/test/Faker/Provider/AddressTest.php | 3 +- .../faker/test/Faker/Provider/BarcodeTest.php | 3 +- .../faker/test/Faker/Provider/BaseTest.php | 51 +- .../faker/test/Faker/Provider/BiasedTest.php | 13 +- .../faker/test/Faker/Provider/ColorTest.php | 3 +- .../faker/test/Faker/Provider/CompanyTest.php | 3 +- .../test/Faker/Provider/DateTimeTest.php | 64 +- .../test/Faker/Provider/HtmlLoremTest.php | 3 +- .../faker/test/Faker/Provider/ImageTest.php | 5 +- .../test/Faker/Provider/InternetTest.php | 3 +- .../test/Faker/Provider/LocalizationTest.php | 3 +- .../faker/test/Faker/Provider/LoremTest.php | 3 +- .../test/Faker/Provider/MiscellaneousTest.php | 3 +- .../faker/test/Faker/Provider/PaymentTest.php | 8 +- .../faker/test/Faker/Provider/PersonTest.php | 3 +- .../test/Faker/Provider/PhoneNumberTest.php | 3 +- .../Faker/Provider/ProviderOverrideTest.php | 3 +- .../faker/test/Faker/Provider/TextTest.php | 3 +- .../test/Faker/Provider/UserAgentTest.php | 3 +- .../faker/test/Faker/Provider/UuidTest.php | 6 +- .../Faker/Provider/ar_JO/InternetTest.php | 3 +- .../Faker/Provider/ar_SA/InternetTest.php | 3 +- .../test/Faker/Provider/at_AT/PaymentTest.php | 3 +- .../test/Faker/Provider/bg_BG/PaymentTest.php | 3 +- .../test/Faker/Provider/bn_BD/PersonTest.php | 3 +- .../test/Faker/Provider/cs_CZ/PersonTest.php | 5 +- .../Faker/Provider/da_DK/InternetTest.php | 3 +- .../Faker/Provider/de_AT/InternetTest.php | 3 +- .../Faker/Provider/de_AT/PhoneNumberTest.php | 3 +- .../test/Faker/Provider/de_CH/AddressTest.php | 3 +- .../Faker/Provider/de_CH/InternetTest.php | 3 +- .../Faker/Provider/de_CH/PhoneNumberTest.php | 3 +- .../Faker/Provider/de_DE/InternetTest.php | 3 +- .../test/Faker/Provider/en_AU/AddressTest.php | 3 +- .../test/Faker/Provider/en_CA/AddressTest.php | 3 +- .../test/Faker/Provider/en_GB/AddressTest.php | 3 +- .../test/Faker/Provider/en_IN/AddressTest.php | 3 +- .../test/Faker/Provider/en_NG/AddressTest.php | 5 +- .../Faker/Provider/en_NG/InternetTest.php | 3 +- .../test/Faker/Provider/en_NG/PersonTest.php | 3 +- .../Faker/Provider/en_NG/PhoneNumberTest.php | 3 +- .../Faker/Provider/en_NZ/PhoneNumberTest.php | 3 +- .../test/Faker/Provider/en_PH/AddressTest.php | 3 +- .../test/Faker/Provider/en_SG/AddressTest.php | 3 +- .../Faker/Provider/en_SG/PhoneNumberTest.php | 3 +- .../test/Faker/Provider/en_UG/AddressTest.php | 3 +- .../test/Faker/Provider/en_US/PaymentTest.php | 3 +- .../test/Faker/Provider/en_US/PersonTest.php | 3 +- .../Faker/Provider/en_US/PhoneNumberTest.php | 3 +- .../test/Faker/Provider/en_ZA/CompanyTest.php | 5 +- .../Faker/Provider/en_ZA/InternetTest.php | 3 +- .../test/Faker/Provider/en_ZA/PersonTest.php | 24 +- .../Faker/Provider/en_ZA/PhoneNumberTest.php | 5 +- .../test/Faker/Provider/es_ES/PaymentTest.php | 3 +- .../test/Faker/Provider/es_ES/PersonTest.php | 10 +- .../test/Faker/Provider/es_ES/TextTest.php | 3 +- .../test/Faker/Provider/es_PE/PersonTest.php | 3 +- .../Faker/Provider/fi_FI/InternetTest.php | 3 +- .../test/Faker/Provider/fi_FI/PersonTest.php | 22 +- .../test/Faker/Provider/fr_BE/PaymentTest.php | 3 +- .../test/Faker/Provider/fr_CH/AddressTest.php | 3 +- .../Faker/Provider/fr_CH/InternetTest.php | 3 +- .../Faker/Provider/fr_CH/PhoneNumberTest.php | 3 +- .../test/Faker/Provider/fr_FR/CompanyTest.php | 3 +- .../test/Faker/Provider/fr_FR/PersonTest.php | 7 +- .../test/Faker/Provider/id_ID/PersonTest.php | 3 +- .../test/Faker/Provider/it_CH/AddressTest.php | 3 +- .../Faker/Provider/it_CH/InternetTest.php | 3 +- .../Faker/Provider/it_CH/PhoneNumberTest.php | 3 +- .../test/Faker/Provider/it_IT/CompanyTest.php | 5 +- .../test/Faker/Provider/it_IT/PersonTest.php | 5 +- .../Faker/Provider/ja_JP/InternetTest.php | 3 +- .../test/Faker/Provider/ja_JP/PersonTest.php | 3 +- .../Faker/Provider/ja_JP/PhoneNumberTest.php | 3 +- .../test/Faker/Provider/kk_KZ/CompanyTest.php | 3 +- .../test/Faker/Provider/kk_KZ/PersonTest.php | 5 +- .../test/Faker/Provider/mn_MN/PersonTest.php | 3 +- .../test/Faker/Provider/nl_BE/PaymentTest.php | 3 +- .../test/Faker/Provider/nl_NL/CompanyTest.php | 3 +- .../test/Faker/Provider/pl_PL/AddressTest.php | 3 +- .../test/Faker/Provider/pt_BR/CompanyTest.php | 3 +- .../test/Faker/Provider/pt_BR/PersonTest.php | 3 +- .../test/Faker/Provider/pt_PT/AddressTest.php | 3 +- .../test/Faker/Provider/pt_PT/PersonTest.php | 3 +- .../Faker/Provider/pt_PT/PhoneNumberTest.php | 3 +- .../test/Faker/Provider/ro_RO/PersonTest.php | 10 +- .../Faker/Provider/ro_RO/PhoneNumberTest.php | 3 +- .../test/Faker/Provider/ru_RU/CompanyTest.php | 3 +- .../test/Faker/Provider/sv_SE/PersonTest.php | 3 +- .../test/Faker/Provider/uk_UA/AddressTest.php | 3 +- .../test/Faker/Provider/uk_UA/PersonTest.php | 3 +- .../Faker/Provider/uk_UA/PhoneNumberTest.php | 3 +- .../test/Faker/Provider/zh_TW/CompanyTest.php | 3 +- .../test/Faker/Provider/zh_TW/PersonTest.php | 3 +- .../test/Faker/Provider/zh_TW/TextTest.php | 4 +- .../Console/stubs/make/views/auth/login.stub | 8 +- .../Console/stubs/make/views/layouts/app.stub | 2 +- .../src/Illuminate/Auth/Recaller.php | 2 +- .../src/Illuminate/Auth/SessionGuard.php | 14 +- .../src/Illuminate/Cache/Repository.php | 4 +- .../src/Illuminate/Console/Application.php | 2 + .../src/Illuminate/Console/Command.php | 33 +- .../src/Illuminate/Console/Parser.php | 2 + .../Contracts/Validation/Validator.php | 2 +- .../Cookie/Middleware/EncryptCookies.php | 29 +- .../Database/Concerns/BuildsQueries.php | 4 +- .../Database/Concerns/ManagesTransactions.php | 26 +- .../src/Illuminate/Database/Connection.php | 2 +- .../Database/Connectors/ConnectionFactory.php | 5 +- .../Database/Connectors/SQLiteConnector.php | 2 +- .../Console/Migrations/FreshCommand.php | 1 + .../Console/Migrations/MigrateMakeCommand.php | 6 +- .../Console/Migrations/RefreshCommand.php | 3 + .../Database/DetectsLostConnections.php | 1 + .../Illuminate/Database/Eloquent/Builder.php | 20 +- .../Database/Eloquent/Collection.php | 8 +- .../Eloquent/Concerns/HasRelationships.php | 2 +- .../Concerns/QueriesRelationships.php | 6 + .../Database/Eloquent/FactoryBuilder.php | 11 + .../Illuminate/Database/Eloquent/Model.php | 2 +- .../Database/Eloquent/Relations/BelongsTo.php | 2 +- .../Eloquent/Relations/BelongsToMany.php | 26 +- .../Concerns/InteractsWithPivotTable.php | 6 +- .../Eloquent/Relations/HasManyThrough.php | 22 +- .../Database/Eloquent/Relations/MorphTo.php | 30 + .../Database/Eloquent/Relations/Relation.php | 2 +- .../Database/Eloquent/SoftDeletes.php | 4 +- .../src/Illuminate/Database/Grammar.php | 2 +- .../Database/Migrations/Migrator.php | 10 + .../src/Illuminate/Database/Query/Builder.php | 10 +- .../Database/Query/Grammars/Grammar.php | 17 +- .../Database/Query/Grammars/MySqlGrammar.php | 10 +- .../Database/Query/Grammars/SQLiteGrammar.php | 19 + .../Query/Grammars/SqlServerGrammar.php | 31 +- .../Illuminate/Database/Schema/Blueprint.php | 2 +- .../Illuminate/Database/Schema/Builder.php | 4 +- .../Illuminate/Events/CallQueuedListener.php | 2 +- .../src/Illuminate/Filesystem/Filesystem.php | 27 +- .../Filesystem/FilesystemAdapter.php | 2 +- .../Filesystem/FilesystemManager.php | 4 +- .../src/Illuminate/Foundation/Application.php | 2 +- .../Foundation/Auth/AuthenticatesUsers.php | 15 +- .../Auth/SendsPasswordResetEmails.php | 6 +- .../Foundation/Console/ConfigCacheCommand.php | 13 +- .../Foundation/Console/ModelMakeCommand.php | 4 + .../Presets/bootstrap-stubs/_variables.scss | 16 +- .../Console/Presets/bootstrap-stubs/app.scss | 4 +- .../Foundation/Console/ViewClearCommand.php | 2 + .../Foundation/Console/stubs/observer.stub | 24 +- .../Foundation/Console/stubs/policy.stub | 24 + .../Foundation/Exceptions/Handler.php | 2 +- .../Exceptions/views/layout.blade.php | 4 +- .../Middleware/CheckForMaintenanceMode.php | 32 + .../Http/Middleware/VerifyCsrfToken.php | 13 +- .../Illuminate/Foundation/PackageManifest.php | 5 +- .../Providers/ArtisanServiceProvider.php | 6 +- .../Foundation/Testing/TestResponse.php | 35 +- .../src/Illuminate/Foundation/helpers.php | 14 +- .../src/Illuminate/Hashing/ArgonHasher.php | 2 + .../src/Illuminate/Http/RedirectResponse.php | 6 +- .../framework/src/Illuminate/Http/Request.php | 14 + .../ConditionallyLoadsAttributes.php | 19 +- .../Http/Resources/Json/JsonResource.php | 6 +- .../Illuminate/Http/Testing/FileFactory.php | 22 +- .../src/Illuminate/Http/UploadedFile.php | 17 + .../src/Illuminate/Mail/Mailable.php | 4 +- .../framework/src/Illuminate/Mail/Mailer.php | 4 +- .../resources/views/html/message.blade.php | 2 +- .../views/markdown/message.blade.php | 2 +- .../Notifications/Channels/MailChannel.php | 2 +- .../Channels/SlackWebhookChannel.php | 2 +- .../Notifications/Messages/MailMessage.php | 51 +- .../Notifications/SendQueuedNotifications.php | 2 +- .../Illuminate/Queue/CallQueuedHandler.php | 2 +- .../Queue/Connectors/SqsConnector.php | 2 +- .../src/Illuminate/Queue/Listener.php | 2 +- .../src/Illuminate/Queue/RedisQueue.php | 6 +- .../framework/src/Illuminate/Queue/Worker.php | 6 +- .../Redis/Connectors/PhpRedisConnector.php | 18 +- .../Routing/Console/ControllerMakeCommand.php | 8 +- .../src/Illuminate/Routing/Redirector.php | 4 +- .../src/Illuminate/Routing/RouteAction.php | 2 + .../src/Illuminate/Routing/RouteRegistrar.php | 5 +- .../src/Illuminate/Routing/Router.php | 4 +- .../Illuminate/Session/FileSessionHandler.php | 6 +- .../src/Illuminate/Support/Collection.php | 8 +- .../src/Illuminate/Support/Facades/Facade.php | 6 +- .../src/Illuminate/Support/Facades/Hash.php | 2 +- .../src/Illuminate/Support/Facades/Route.php | 1 + .../src/Illuminate/Support/Manager.php | 2 + .../src/Illuminate/Support/Pluralizer.php | 2 +- .../Support/Testing/Fakes/EventFake.php | 24 +- .../Support/Testing/Fakes/MailFake.php | 8 +- .../Testing/Fakes/NotificationFake.php | 2 +- .../Concerns/ValidatesAttributes.php | 10 +- .../src/Illuminate/Validation/Rule.php | 11 + .../Validation/Rules/DatabaseRule.php | 2 +- .../Concerns/CompilesTranslations.php | 6 +- .../View/Concerns/ManagesComponents.php | 2 +- .../framework/src/Illuminate/View/Factory.php | 2 + vendor/league/flysystem/composer.json | 2 +- vendor/league/flysystem/src/Adapter/Local.php | 11 +- vendor/league/flysystem/src/MountManager.php | 1 + vendor/nikic/php-parser/CHANGELOG.md | 16 +- vendor/nikic/php-parser/bin/php-parse | 0 vendor/nikic/php-parser/grammar/php5.y | 10 +- vendor/nikic/php-parser/grammar/php7.y | 17 +- .../php-parser/lib/PhpParser/Parser/Php5.php | 2002 ++++++------ .../php-parser/lib/PhpParser/Parser/Php7.php | 1539 ++++----- .../lib/PhpParser/PrettyPrinterAbstract.php | 5 +- vendor/nikic/php-parser/phpunit.xml.dist | 9 +- .../code/parser/errorHandling/recovery.test | 107 + .../test/code/parser/semiReserved.test | 5 + .../nikic/php-parser/test_old/run-php-src.sh | 0 vendor/paragonie/random_compat/composer.json | 8 +- .../random_compat/lib/byte_safe_strings.php | 195 -- .../random_compat/lib/cast_to_int.php | 77 - .../random_compat/lib/error_polyfill.php | 49 - vendor/paragonie/random_compat/lib/random.php | 199 +- .../lib/random_bytes_com_dotnet.php | 91 - .../lib/random_bytes_dev_urandom.php | 172 - .../lib/random_bytes_libsodium.php | 91 - .../lib/random_bytes_libsodium_legacy.php | 93 - .../random_compat/lib/random_bytes_mcrypt.php | 79 - .../random_compat/lib/random_int.php | 204 -- vendor/paragonie/random_compat/psalm.xml | 13 +- vendor/phar-io/manifest/.gitignore | 1 - vendor/phar-io/manifest/composer.json | 2 +- .../tests/ManifestDocumentMapperTest.php | 2 +- .../manifest/tests/ManifestLoaderTest.php | 2 +- .../manifest/tests/ManifestSerializerTest.php | 2 +- .../ManifestDocumentLoadingExceptionTest.php | 2 +- .../tests/values/ApplicationNameTest.php | 11 +- .../tests/xml/AuthorElementCollectionTest.php | 2 +- .../manifest/tests/xml/AuthorElementTest.php | 2 +- .../manifest/tests/xml/BundlesElementTest.php | 2 +- .../xml/ComponentElementCollectionTest.php | 2 +- .../tests/xml/ComponentElementTest.php | 2 +- .../tests/xml/ContainsElementTest.php | 2 +- .../tests/xml/CopyrightElementTest.php | 2 +- .../tests/xml/ExtElementCollectionTest.php | 2 +- .../manifest/tests/xml/ExtElementTest.php | 2 +- .../tests/xml/ExtensionElementTest.php | 2 +- .../manifest/tests/xml/LicenseElementTest.php | 2 +- .../tests/xml/ManifestDocumentTest.php | 2 +- .../manifest/tests/xml/PhpElementTest.php | 2 +- .../tests/xml/RequiresElementTest.php | 2 +- vendor/phar-io/version/README.md | 45 + .../version/src/AbstractVersionConstraint.php | 32 - .../version/src/AndVersionConstraintGroup.php | 43 - .../version/src/AnyVersionConstraint.php | 29 - .../version/src/ExactVersionConstraint.php | 22 - vendor/phar-io/version/src/Exception.php | 14 - .../GreaterThanOrEqualToVersionConstraint.php | 38 - .../version/src/InvalidVersionException.php | 5 - .../version/src/OrVersionConstraintGroup.php | 43 - .../phar-io/version/src/PreReleaseSuffix.php | 80 +- ...SpecificMajorAndMinorVersionConstraint.php | 48 - .../src/SpecificMajorVersionConstraint.php | 37 - .../UnsupportedVersionConstraintException.php | 14 - vendor/phar-io/version/src/Version.php | 59 +- .../phar-io/version/src/VersionConstraint.php | 26 - .../version/src/VersionConstraintParser.php | 10 +- .../version/src/VersionConstraintValue.php | 78 +- .../VersionConstraintParserTest.php | 23 +- .../Unit/AndVersionConstraintGroupTest.php | 6 +- .../tests/Unit/AnyVersionConstraintTest.php | 2 +- .../tests/Unit/ExactVersionConstraintTest.php | 6 +- ...aterThanOrEqualToVersionConstraintTest.php | 4 +- .../Unit/OrVersionConstraintGroupTest.php | 8 +- ...ificMajorAndMinorVersionConstraintTest.php | 8 +- .../SpecificMajorVersionConstraintTest.php | 6 +- .../version/tests/Unit/VersionTest.php | 23 +- vendor/phpspec/prophecy/CHANGES.md | 21 +- vendor/phpspec/prophecy/composer.json | 4 +- .../Argument/Token/StringContainsToken.php | 2 +- .../prophecy/src/Prophecy/Call/Call.php | 35 + .../prophecy/src/Prophecy/Call/CallCenter.php | 80 +- .../Doubler/ClassPatch/MagicCallPatch.php | 25 +- .../ClassPatch/ProphecySubjectPatch.php | 6 +- .../Doubler/Generator/ClassMirror.php | 2 + .../Doubler/Generator/Node/ClassNode.php | 7 +- .../Prediction/AggregateException.php | 3 +- .../src/Prophecy/Prophecy/MethodProphecy.php | 26 +- .../phpspec/prophecy/src/Prophecy/Prophet.php | 1 + .../prophecy/src/Prophecy/Util/StringUtil.php | 12 +- vendor/phpunit/phpunit/.gitignore | 12 +- vendor/phpunit/phpunit/.travis.yml | 2 +- vendor/phpunit/phpunit/ChangeLog-6.5.md | 29 +- vendor/phpunit/phpunit/ChangeLog-7.2.md | 9 + vendor/phpunit/phpunit/README.md | 8 +- vendor/phpunit/phpunit/build.xml | 10 +- vendor/phpunit/phpunit/composer.json | 6 +- vendor/phpunit/phpunit/phive.xml | 5 +- vendor/phpunit/phpunit/phpstan-tests.neon | 8 +- vendor/phpunit/phpunit/phpunit.xml | 13 +- vendor/phpunit/phpunit/phpunit.xsd | 578 ++-- .../phpunit/phpunit/src/Framework/Assert.php | 44 +- .../src/Framework/Assert/Functions.php | 4 - .../src/Framework/Constraint/ArraySubset.php | 14 +- .../StringMatchesFormatDescription.php | 44 +- .../src/Framework/ExceptionWrapper.php | 2 - .../src/Framework/MockObject/Generator.php | 56 +- .../Matcher/ConsecutiveParameters.php | 6 +- .../src/Framework/MockObject/MockBuilder.php | 2 - .../phpunit/src/Framework/TestCase.php | 111 +- .../phpunit/src/Framework/TestResult.php | 66 +- .../phpunit/src/Framework/TestSuite.php | 255 +- .../src/Runner/Filter/NameFilterIterator.php | 9 +- .../phpunit/src/Runner/PhptTestCase.php | 39 +- .../phpunit/src/Runner/TestSuiteSorter.php | 138 +- vendor/phpunit/phpunit/src/Runner/Version.php | 2 +- vendor/phpunit/phpunit/src/TextUI/Command.php | 78 +- .../phpunit/phpunit/src/TextUI/TestRunner.php | 53 +- .../phpunit/src/Util/Configuration.php | 54 +- vendor/phpunit/phpunit/src/Util/Filter.php | 1 + vendor/phpunit/phpunit/src/Util/Json.php | 2 +- vendor/phpunit/phpunit/src/Util/Log/JUnit.php | 2 +- .../phpunit/phpunit/src/Util/Log/TeamCity.php | 46 +- .../src/Util/PHP/AbstractPhpProcess.php | 19 +- .../Util/PHP/Template/PhptTestCase.tpl.dist | 10 +- .../Util/PHP/Template/TestCaseClass.tpl.dist | 5 +- .../Util/PHP/Template/TestCaseMethod.tpl.dist | 5 +- vendor/phpunit/phpunit/src/Util/Test.php | 17 + .../src/Util/TestDox/CliTestDoxPrinter.php | 27 +- .../src/Util/TestDox/NamePrettifier.php | 107 +- .../src/Util/TestDox/ResultPrinter.php | 25 +- .../src/Util/TestDox/XmlResultPrinter.php | 2 +- vendor/phpunit/phpunit/tests/Fail/fail.phpt | 5 - .../phpunit/tests/Framework/AssertTest.php | 2810 ----------------- .../Framework/Constraint/ArrayHasKeyTest.php | 64 - .../Framework/Constraint/ArraySubsetTest.php | 86 - .../Framework/Constraint/AttributeTest.php | 80 - .../Framework/Constraint/CallbackTest.php | 65 - .../Constraint/ClassHasAttributeTest.php | 70 - .../ClassHasStaticAttributeTest.php | 66 - .../Constraint/ConstraintTestCase.php | 54 - .../tests/Framework/Constraint/CountTest.php | 145 - .../Constraint/DirectoryExistsTest.php | 66 - .../Constraint/ExceptionMessageRegExpTest.php | 55 - .../Constraint/ExceptionMessageTest.php | 51 - .../Framework/Constraint/FileExistsTest.php | 65 - .../Framework/Constraint/GreaterThanTest.php | 66 - .../Framework/Constraint/IsEmptyTest.php | 67 - .../Framework/Constraint/IsEqualTest.php | 321 -- .../Framework/Constraint/IsIdenticalTest.php | 197 -- .../Framework/Constraint/IsInstanceOfTest.php | 41 - .../tests/Framework/Constraint/IsJsonTest.php | 34 - .../tests/Framework/Constraint/IsNullTest.php | 66 - .../Framework/Constraint/IsReadableTest.php | 42 - .../tests/Framework/Constraint/IsTypeTest.php | 111 - .../Framework/Constraint/IsWritableTest.php | 42 - .../JsonMatchesErrorMessageProviderTest.php | 87 - .../Framework/Constraint/JsonMatchesTest.php | 94 - .../Framework/Constraint/LessThanTest.php | 66 - .../Framework/Constraint/LogicalAndTest.php | 237 -- .../Framework/Constraint/LogicalOrTest.php | 232 -- .../Framework/Constraint/LogicalXorTest.php | 44 - .../Constraint/ObjectHasAttributeTest.php | 66 - .../Constraint/RegularExpressionTest.php | 66 - .../Framework/Constraint/SameSizeTest.php | 62 - .../Constraint/StringContainsTest.php | 96 - .../Constraint/StringEndsWithTest.php | 87 - .../StringMatchesFormatDescriptionTest.php | 108 - .../Constraint/StringStartsWithTest.php | 88 - .../Constraint/TraversableContainsTest.php | 170 - .../tests/Framework/ConstraintTest.php | 1492 --------- .../tests/Framework/ExceptionWrapperTest.php | 55 - .../Builder/InvocationMockerTest.php | 74 - .../Framework/MockObject/Generator/232.phpt | 135 - .../Framework/MockObject/Generator/397.phpt | 105 - .../MockObject/Generator/abstract_class.phpt | 154 - .../Framework/MockObject/Generator/class.phpt | 132 - .../Generator/class_call_parent_clone.phpt | 84 - .../class_call_parent_constructor.phpt | 83 - .../class_dont_call_parent_clone.phpt | 83 - .../class_dont_call_parent_constructor.phpt | 83 - ...ing_interface_call_parent_constructor.phpt | 88 - ...nterface_dont_call_parent_constructor.phpt | 88 - .../MockObject/Generator/class_partial.phpt | 110 - .../class_with_deprecated_method.phpt | 112 - .../class_with_method_named_method.phpt | 98 - ...ullable_typehinted_variadic_arguments.phpt | 106 - ...od_with_typehinted_variadic_arguments.phpt | 106 - ...s_with_method_with_variadic_arguments.phpt | 106 - .../constant_as_parameter_default_value.phpt | 106 - .../MockObject/Generator/interface.phpt | 104 - .../invocation_object_clone_object.phpt | 133 - .../Generator/namespaced_class.phpt | 134 - .../namespaced_class_call_parent_clone.phpt | 86 - ...espaced_class_call_parent_constructor.phpt | 85 - ...mespaced_class_dont_call_parent_clone.phpt | 85 - ...ed_class_dont_call_parent_constructor.phpt | 85 - ...ing_interface_call_parent_constructor.phpt | 90 - ...nterface_dont_call_parent_constructor.phpt | 90 - .../Generator/namespaced_class_partial.phpt | 112 - .../Generator/namespaced_interface.phpt | 106 - .../Generator/nonexistent_class.phpt | 81 - .../nonexistent_class_with_namespace.phpt | 89 - ...ith_namespace_starting_with_separator.phpt | 89 - .../MockObject/Generator/nullable_types.phpt | 106 - .../Framework/MockObject/Generator/proxy.phpt | 128 - .../return_type_declarations_closure.phpt | 104 - .../return_type_declarations_final.phpt | 111 - .../return_type_declarations_generator.phpt | 104 - .../return_type_declarations_nullable.phpt | 104 - ...eturn_type_declarations_object_method.phpt | 107 - .../return_type_declarations_parent.phpt | 110 - .../return_type_declarations_self.phpt | 104 - ...eturn_type_declarations_static_method.phpt | 90 - .../return_type_declarations_void.phpt | 102 - .../Generator/scalar_type_declarations.phpt | 106 - .../MockObject/Generator/wsdl_class.phpt | 37 - .../Generator/wsdl_class_namespace.phpt | 38 - .../Generator/wsdl_class_partial.phpt | 30 - .../Framework/MockObject/GeneratorTest.php | 213 -- .../Invocation/ObjectInvocationTest.php | 120 - .../Invocation/StaticInvocationTest.php | 114 - .../Matcher/ConsecutiveParametersTest.php | 68 - .../Framework/MockObject/MockBuilderTest.php | 129 - .../Framework/MockObject/MockObjectTest.php | 1114 ------- .../Framework/MockObject/ProxyObjectTest.php | 41 - .../phpunit/tests/Framework/TestCaseTest.php | 766 ----- .../tests/Framework/TestFailureTest.php | 40 - .../tests/Framework/TestImplementorTest.php | 25 - .../tests/Framework/TestListenerTest.php | 119 - .../phpunit/tests/Framework/TestSuiteTest.php | 203 -- .../phpunit/tests/Regression/GitHub/1149.phpt | 20 - .../Regression/GitHub/1149/Issue1149Test.php | 28 - .../phpunit/tests/Regression/GitHub/1216.phpt | 25 - .../Regression/GitHub/1216/Issue1216Test.php | 18 - .../Regression/GitHub/1216/bootstrap1216.php | 10 - .../Regression/GitHub/1216/phpunit1216.xml | 8 - .../phpunit/tests/Regression/GitHub/1265.phpt | 21 - .../Regression/GitHub/1265/Issue1265Test.php | 18 - .../Regression/GitHub/1265/phpunit1265.xml | 2 - .../phpunit/tests/Regression/GitHub/1330.phpt | 24 - .../Regression/GitHub/1330/Issue1330Test.php | 18 - .../Regression/GitHub/1330/phpunit1330.xml | 5 - .../phpunit/tests/Regression/GitHub/1335.phpt | 19 - .../Regression/GitHub/1335/Issue1335Test.php | 77 - .../Regression/GitHub/1335/bootstrap1335.php | 21 - .../phpunit/tests/Regression/GitHub/1337.phpt | 19 - .../Regression/GitHub/1337/Issue1337Test.php | 29 - .../phpunit/tests/Regression/GitHub/1348.phpt | 33 - .../Regression/GitHub/1348/Issue1348Test.php | 24 - .../phpunit/tests/Regression/GitHub/1351.phpt | 46 - .../GitHub/1351/ChildProcessClass1351.php | 12 - .../Regression/GitHub/1351/Issue1351Test.php | 59 - .../phpunit/tests/Regression/GitHub/1374.phpt | 19 - .../Regression/GitHub/1374/Issue1374Test.php | 31 - .../phpunit/tests/Regression/GitHub/1437.phpt | 26 - .../Regression/GitHub/1437/Issue1437Test.php | 19 - .../phpunit/tests/Regression/GitHub/1468.phpt | 20 - .../Regression/GitHub/1468/Issue1468Test.php | 21 - .../phpunit/tests/Regression/GitHub/1471.phpt | 26 - .../Regression/GitHub/1471/Issue1471Test.php | 22 - .../phpunit/tests/Regression/GitHub/1472.phpt | 18 - .../Regression/GitHub/1472/Issue1472Test.php | 31 - .../phpunit/tests/Regression/GitHub/1570.phpt | 25 - .../Regression/GitHub/1570/Issue1570Test.php | 18 - .../tests/Regression/GitHub/2137-filter.phpt | 28 - .../Regression/GitHub/2137-no_filter.phpt | 30 - .../Regression/GitHub/2137/Issue2137Test.php | 43 - .../phpunit/tests/Regression/GitHub/2145.phpt | 27 - .../Regression/GitHub/2145/Issue2145Test.php | 24 - .../phpunit/tests/Regression/GitHub/2158.phpt | 19 - .../Regression/GitHub/2158/Issue2158Test.php | 33 - .../tests/Regression/GitHub/2158/constant.inc | 5 - .../phpunit/tests/Regression/GitHub/2366.phpt | 19 - .../Regression/GitHub/2366/Issue2366Test.php | 41 - .../phpunit/tests/Regression/GitHub/2380.phpt | 19 - .../Regression/GitHub/2380/Issue2380Test.php | 29 - .../phpunit/tests/Regression/GitHub/2382.phpt | 19 - .../Regression/GitHub/2382/Issue2382Test.php | 30 - .../phpunit/tests/Regression/GitHub/2435.phpt | 20 - .../Regression/GitHub/2435/Issue2435Test.php | 16 - .../phpunit/tests/Regression/GitHub/244.phpt | 32 - .../Regression/GitHub/244/Issue244Test.php | 65 - .../Regression/GitHub/2448-existing-test.phpt | 20 - .../GitHub/2448-not-existing-test.phpt | 12 - .../tests/Regression/GitHub/2448/Test.php | 16 - ...-separate-class-preserve-no-bootstrap.phpt | 35 - .../GitHub/2591-separate-class-preserve.phpt | 21 - ...nction-no-preserve-no-bootstrap-php73.phpt | 47 - ...ction-no-preserve-no-bootstrap-xdebug.phpt | 39 - ...ate-function-no-preserve-no-bootstrap.phpt | 37 - .../2591-separate-function-no-preserve.phpt | 20 - .../2591-separate-function-preserve.phpt | 20 - .../GitHub/2591/SeparateClassPreserveTest.php | 35 - .../2591/SeparateFunctionNoPreserveTest.php | 28 - .../2591/SeparateFunctionPreserveTest.php | 28 - .../GitHub/2591/bootstrapNoBootstrap.php | 15 - .../GitHub/2591/bootstrapWithBootstrap.php | 12 - .../2591/bootstrapWithBootstrapNoGlobal.php | 11 - .../2724-diff-pid-from-master-process.phpt | 22 - ...SeparateClassRunMethodInNewProcessTest.php | 53 - .../2725-separate-class-before-after-pid.phpt | 18 - .../GitHub/2725/BeforeAfterClassPidTest.php | 50 - .../phpunit/tests/Regression/GitHub/2731.phpt | 26 - .../Regression/GitHub/2731/Issue2731Test.php | 19 - .../phpunit/tests/Regression/GitHub/2811.phpt | 20 - .../Regression/GitHub/2811/Issue2811Test.php | 18 - .../phpunit/tests/Regression/GitHub/2830.phpt | 20 - .../Regression/GitHub/2830/Issue2830Test.php | 27 - .../phpunit/tests/Regression/GitHub/2972.phpt | 18 - .../GitHub/2972/issue-2972-test.phpt | 10 - .../2972/unconventiallyNamedIssue2972Test.php | 20 - .../Regression/GitHub/3107/Issue3107Test.php | 25 - .../GitHub/3107/issue-3107-test.phpt | 27 - .../Regression/GitHub/3156/Issue3156Test.php | 41 - .../phpunit/tests/Regression/GitHub/322.phpt | 27 - .../Regression/GitHub/322/Issue322Test.php | 29 - .../Regression/GitHub/322/phpunit322.xml | 11 - .../phpunit/tests/Regression/GitHub/433.phpt | 31 - .../Regression/GitHub/433/Issue433Test.php | 31 - .../phpunit/tests/Regression/GitHub/445.phpt | 32 - .../Regression/GitHub/445/Issue445Test.php | 31 - .../phpunit/tests/Regression/GitHub/498.phpt | 29 - .../Regression/GitHub/498/Issue498Test.php | 53 - .../phpunit/tests/Regression/GitHub/503.phpt | 35 - .../Regression/GitHub/503/Issue503Test.php | 21 - .../phpunit/tests/Regression/GitHub/581.phpt | 40 - .../Regression/GitHub/581/Issue581Test.php | 21 - .../phpunit/tests/Regression/GitHub/74.phpt | 28 - .../Regression/GitHub/74/Issue74Test.php | 20 - .../Regression/GitHub/74/NewException.php | 12 - .../phpunit/tests/Regression/GitHub/765.phpt | 26 - .../Regression/GitHub/765/Issue765Test.php | 32 - .../phpunit/tests/Regression/GitHub/797.phpt | 22 - .../Regression/GitHub/797/Issue797Test.php | 20 - .../Regression/GitHub/797/bootstrap797.php | 13 - .../phpunit/tests/Regression/GitHub/863.phpt | 24 - .../phpunit/tests/Regression/GitHub/873.phpt | 22 - .../Regression/GitHub/873/Issue873Test.php | 16 - .../phpunit/tests/Regression/Trac/1021.phpt | 19 - .../Regression/Trac/1021/Issue1021Test.php | 34 - .../phpunit/tests/Regression/Trac/523.phpt | 19 - .../Regression/Trac/523/Issue523Test.php | 23 - .../phpunit/tests/Regression/Trac/578.phpt | 37 - .../Regression/Trac/578/Issue578Test.php | 30 - .../phpunit/tests/Regression/Trac/684.phpt | 25 - .../Regression/Trac/684/Issue684Test.php | 14 - .../phpunit/tests/Regression/Trac/783.phpt | 21 - .../tests/Regression/Trac/783/ChildSuite.php | 26 - .../tests/Regression/Trac/783/OneTest.php | 21 - .../tests/Regression/Trac/783/ParentSuite.php | 23 - .../tests/Regression/Trac/783/TwoTest.php | 21 - .../phpunit/tests/Runner/PhptTestCaseTest.php | 320 -- .../tests/Runner/TestSuiteSorterTest.php | 84 - .../phpunit/tests/TextUI/_files/Extension.php | 87 - .../phpunit/tests/TextUI/_files/HookTest.php | 52 - .../tests/TextUI/_files/NullPrinter.php | 19 - .../tests/TextUI/_files/expect_external.txt | 1 - .../phpunit/tests/TextUI/_files/hooks.xml | 14 - .../tests/TextUI/_files/phpt-env.expected.txt | 1 - .../tests/TextUI/_files/phpt_external.php | 10 - .../tests/TextUI/abstract-test-class.phpt | 24 - .../phpunit/tests/TextUI/assertion.phpt | 38 - .../tests/TextUI/code-coverage-ignore.phpt | 36 - .../tests/TextUI/code-coverage-phpt.phpt | 43 - .../phpunit/tests/TextUI/colors-always.phpt | 18 - .../tests/TextUI/concrete-test-class.phpt | 18 - .../tests/TextUI/custom-printer-debug.phpt | 26 - .../tests/TextUI/custom-printer-verbose.phpt | 31 - .../tests/TextUI/dataprovider-debug.phpt | 33 - .../tests/TextUI/dataprovider-issue-2833.phpt | 17 - .../tests/TextUI/dataprovider-issue-2859.phpt | 17 - .../tests/TextUI/dataprovider-issue-2922.phpt | 18 - .../dataprovider-log-xml-isolation.phpt | 46 - .../tests/TextUI/dataprovider-log-xml.phpt | 45 - .../tests/TextUI/dataprovider-testdox.phpt | 23 - .../phpunit/phpunit/tests/TextUI/debug.phpt | 25 - .../tests/TextUI/default-isolation.phpt | 19 - .../phpunit/phpunit/tests/TextUI/default.phpt | 18 - .../defaulttestsuite-using-testsuite.phpt | 21 - .../tests/TextUI/defaulttestsuite.phpt | 19 - .../tests/TextUI/dependencies-clone.phpt | 22 - .../tests/TextUI/dependencies-isolation.phpt | 42 - .../phpunit/tests/TextUI/dependencies.phpt | 41 - .../tests/TextUI/dependencies2-isolation.phpt | 19 - .../phpunit/tests/TextUI/dependencies2.phpt | 18 - .../tests/TextUI/dependencies3-isolation.phpt | 19 - .../phpunit/tests/TextUI/dependencies3.phpt | 19 - .../TextUI/disable-code-coverage-ignore.phpt | 40 - .../phpunit/tests/TextUI/empty-testcase.phpt | 25 - .../phpunit/tests/TextUI/exception-stack.phpt | 64 - .../tests/TextUI/exclude-group-isolation.phpt | 21 - .../phpunit/tests/TextUI/exclude-group.phpt | 20 - .../tests/TextUI/failure-isolation.phpt | 140 - .../tests/TextUI/failure-reverse-list.phpt | 140 - .../phpunit/phpunit/tests/TextUI/failure.phpt | 139 - .../phpunit/tests/TextUI/fatal-isolation.phpt | 25 - .../tests/TextUI/filter-class-isolation.phpt | 21 - .../phpunit/tests/TextUI/filter-class.phpt | 20 - ...ider-by-classname-and-range-isolation.phpt | 21 - ...r-dataprovider-by-classname-and-range.phpt | 20 - ...lter-dataprovider-by-number-isolation.phpt | 21 - .../TextUI/filter-dataprovider-by-number.phpt | 20 - ...-dataprovider-by-only-range-isolation.phpt | 21 - .../filter-dataprovider-by-only-range.phpt | 20 - ...dataprovider-by-only-regexp-isolation.phpt | 21 - .../filter-dataprovider-by-only-regexp.phpt | 20 - ...dataprovider-by-only-string-isolation.phpt | 21 - .../filter-dataprovider-by-only-string.phpt | 20 - ...ilter-dataprovider-by-range-isolation.phpt | 21 - .../TextUI/filter-dataprovider-by-range.phpt | 20 - ...lter-dataprovider-by-regexp-isolation.phpt | 21 - .../TextUI/filter-dataprovider-by-regexp.phpt | 20 - ...lter-dataprovider-by-string-isolation.phpt | 21 - .../TextUI/filter-dataprovider-by-string.phpt | 20 - .../filter-method-case-insensitive.phpt | 20 - ...ilter-method-case-sensitive-no-result.phpt | 20 - .../tests/TextUI/filter-method-isolation.phpt | 21 - .../phpunit/tests/TextUI/filter-method.phpt | 20 - .../tests/TextUI/filter-no-results.phpt | 20 - .../tests/TextUI/forward-compatibility.phpt | 18 - .../phpunit/tests/TextUI/group-isolation.phpt | 21 - .../phpunit/phpunit/tests/TextUI/group.phpt | 20 - vendor/phpunit/phpunit/tests/TextUI/help.phpt | 108 - .../phpunit/phpunit/tests/TextUI/help2.phpt | 109 - .../phpunit/phpunit/tests/TextUI/hooks.phpt | 31 - .../phpunit/tests/TextUI/ini-isolation.phpt | 21 - .../phpunit/tests/TextUI/list-groups.phpt | 18 - .../phpunit/tests/TextUI/list-suites.phpt | 16 - .../tests/TextUI/list-tests-dataprovider.phpt | 19 - .../TextUI/list-tests-xml-dataprovider.phpt | 31 - .../phpunit/tests/TextUI/log-junit.phpt | 89 - .../phpunit/tests/TextUI/log-teamcity.phpt | 38 - .../phpunit/tests/TextUI/mycommand.phpt | 24 - .../tests/TextUI/options-after-arguments.phpt | 18 - .../tests/TextUI/output-isolation.phpt | 20 - .../TextUI/phar-extension-suppressed.phpt | 12 - .../phpunit/tests/TextUI/phar-extension.phpt | 21 - .../phpunit/tests/TextUI/phpt-args.phpt | 12 - .../phpunit/tests/TextUI/phpt-env.phpt | 12 - .../phpunit/tests/TextUI/phpt-external.phpt | 6 - .../phpunit/tests/TextUI/phpt-stderr.phpt | 8 - .../phpunit/tests/TextUI/phpt-stdin.phpt | 11 - .../phpunit/tests/TextUI/phpt-xfail.phpt | 18 - .../phpunit/phpunit/tests/TextUI/repeat.phpt | 20 - ...ated-with-does-not-perform-assertions.phpt | 24 - .../report-useless-tests-incomplete.phpt | 19 - .../report-useless-tests-isolation.phpt | 25 - .../tests/TextUI/report-useless-tests.phpt | 24 - .../tests/TextUI/stop-on-warning-via-cli.phpt | 25 - .../TextUI/stop-on-warning-via-config.phpt | 26 - .../TextUI/teamcity-inner-exceptions.phpt | 39 - .../phpunit/tests/TextUI/teamcity.phpt | 37 - ...mized-seed-with-dependency-resolution.phpt | 37 - ...randomized-with-dependency-resolution.phpt | 25 - ...r-reversed-with-dependency-resolution.phpt | 35 - ...eversed-without-dependency-resolution.phpt | 44 - .../tests/TextUI/test-suffix-multiple.phpt | 19 - .../tests/TextUI/test-suffix-single.phpt | 19 - .../tests/TextUI/testdox-exclude-group.phpt | 25 - .../phpunit/tests/TextUI/testdox-group.phpt | 25 - .../phpunit/tests/TextUI/testdox-html.phpt | 57 - .../phpunit/tests/TextUI/testdox-text.phpt | 25 - .../phpunit/tests/TextUI/testdox-verbose.phpt | 25 - .../phpunit/tests/TextUI/testdox-xml.phpt | 62 - .../phpunit/phpunit/tests/TextUI/testdox.phpt | 22 - .../tests/Util/ConfigurationGeneratorTest.php | 51 - .../phpunit/tests/Util/ConfigurationTest.php | 572 ---- .../phpunit/phpunit/tests/Util/GetoptTest.php | 214 -- .../phpunit/tests/Util/GlobalStateTest.php | 35 - .../phpunit/phpunit/tests/Util/JsonTest.php | 86 - .../tests/Util/PHP/AbstractPhpProcessTest.php | 120 - .../tests/Util/RegularExpressionTest.php | 56 - .../Util/TestDox/CliTestDoxPrinterTest.php | 209 -- .../tests/Util/TestDox/NamePrettifierTest.php | 60 - .../phpunit/phpunit/tests/Util/TestTest.php | 1031 ------ vendor/phpunit/phpunit/tests/Util/XmlTest.php | 119 - .../tests/_files/DataProviderTestDoxTest.php | 29 + .../_files/configuration.one-file-suite.xml | 2 +- .../phpunit/tests/_files/configuration.xml | 5 +- .../tests/_files/configuration_xinclude.xml | 2 + vendor/psy/psysh/bin/build-stub | 0 vendor/psy/psysh/bin/psysh | 0 vendor/psy/psysh/composer.json | 2 + vendor/psy/psysh/src/CodeCleaner.php | 22 +- .../src/CodeCleaner/AbstractClassPass.php | 10 +- .../psysh/src/CodeCleaner/CalledClassPass.php | 8 +- .../psysh/src/CodeCleaner/FinalClassPass.php | 8 +- .../FunctionReturnInWriteContextPass.php | 2 +- .../src/CodeCleaner/ImplicitReturnPass.php | 10 +- .../psysh/src/CodeCleaner/LegacyEmptyPass.php | 6 +- vendor/psy/psysh/src/CodeCleaner/ListPass.php | 31 +- .../psysh/src/CodeCleaner/LoopContextPass.php | 8 +- .../src/CodeCleaner/NamespaceAwarePass.php | 6 +- .../psysh/src/CodeCleaner/NamespacePass.php | 2 +- .../CodeCleaner/PassableByReferencePass.php | 2 +- .../psy/psysh/src/CodeCleaner/RequirePass.php | 13 +- .../psysh/src/CodeCleaner/StrictTypesPass.php | 6 +- .../src/CodeCleaner/UseStatementPass.php | 16 +- .../src/CodeCleaner/ValidClassNamePass.php | 47 +- .../src/CodeCleaner/ValidConstantPass.php | 12 +- .../src/CodeCleaner/ValidConstructorPass.php | 14 +- .../src/CodeCleaner/ValidFunctionNamePass.php | 16 +- .../psy/psysh/src/Command/BufferCommand.php | 6 +- vendor/psy/psysh/src/Command/ClearCommand.php | 2 +- vendor/psy/psysh/src/Command/Command.php | 54 +- vendor/psy/psysh/src/Command/DocCommand.php | 5 +- vendor/psy/psysh/src/Command/DumpCommand.php | 4 +- vendor/psy/psysh/src/Command/EditCommand.php | 16 +- vendor/psy/psysh/src/Command/HelpCommand.php | 4 +- .../psy/psysh/src/Command/HistoryCommand.php | 40 +- vendor/psy/psysh/src/Command/ListCommand.php | 8 +- .../ListCommand/ClassConstantEnumerator.php | 6 +- .../Command/ListCommand/ClassEnumerator.php | 14 +- .../ListCommand/ConstantEnumerator.php | 14 +- .../ListCommand/FunctionEnumerator.php | 6 +- .../ListCommand/GlobalVariableEnumerator.php | 4 +- .../ListCommand/InterfaceEnumerator.php | 6 +- .../Command/ListCommand/MethodEnumerator.php | 4 +- .../ListCommand/PropertyEnumerator.php | 8 +- .../Command/ListCommand/TraitEnumerator.php | 6 +- .../ListCommand/VariableEnumerator.php | 12 +- vendor/psy/psysh/src/Command/ParseCommand.php | 8 +- .../psysh/src/Command/ReflectingCommand.php | 34 +- vendor/psy/psysh/src/Command/ShowCommand.php | 26 +- vendor/psy/psysh/src/Command/SudoCommand.php | 8 +- .../psy/psysh/src/Command/ThrowUpCommand.php | 6 +- .../psy/psysh/src/Command/TimeitCommand.php | 17 +- .../Command/TimeitCommand/TimeitVisitor.php | 10 +- vendor/psy/psysh/src/Command/TraceCommand.php | 22 +- .../psy/psysh/src/Command/WhereamiCommand.php | 24 +- vendor/psy/psysh/src/Command/WtfCommand.php | 14 +- vendor/psy/psysh/src/ConfigPaths.php | 48 +- vendor/psy/psysh/src/Configuration.php | 62 +- vendor/psy/psysh/src/Context.php | 18 +- .../psysh/src/Exception/BreakException.php | 2 +- .../psysh/src/Exception/ErrorException.php | 4 +- .../src/Exception/FatalErrorException.php | 2 +- .../src/Exception/ParseErrorException.php | 2 +- .../psysh/src/Exception/ThrowUpException.php | 2 +- .../src/Exception/TypeErrorException.php | 4 +- vendor/psy/psysh/src/ExecutionClosure.php | 32 +- vendor/psy/psysh/src/ExecutionLoop.php | 8 +- .../psysh/src/ExecutionLoop/ProcessForker.php | 52 +- .../src/ExecutionLoop/RunkitReloader.php | 12 +- vendor/psy/psysh/src/ExecutionLoopClosure.php | 27 +- .../psy/psysh/src/Formatter/CodeFormatter.php | 4 +- .../psysh/src/Formatter/DocblockFormatter.php | 32 +- .../src/Formatter/SignatureFormatter.php | 54 +- vendor/psy/psysh/src/Input/FilterOptions.php | 16 +- vendor/psy/psysh/src/Input/ShellInput.php | 80 +- .../psy/psysh/src/Output/ProcOutputPager.php | 14 +- vendor/psy/psysh/src/Output/ShellOutput.php | 14 +- vendor/psy/psysh/src/ParserFactory.php | 8 +- vendor/psy/psysh/src/Readline/GNUReadline.php | 34 +- vendor/psy/psysh/src/Readline/HoaConsole.php | 2 +- vendor/psy/psysh/src/Readline/Libedit.php | 16 +- vendor/psy/psysh/src/Readline/Transient.php | 14 +- .../Reflection/ReflectionClassConstant.php | 6 +- .../src/Reflection/ReflectionConstant.php | 2 +- .../src/Reflection/ReflectionConstant_.php | 12 +- .../ReflectionLanguageConstruct.php | 4 +- .../ReflectionLanguageConstructParameter.php | 8 +- vendor/psy/psysh/src/Shell.php | 104 +- vendor/psy/psysh/src/Sudo.php | 12 +- vendor/psy/psysh/src/Sudo/SudoVisitor.php | 26 +- .../psysh/src/TabCompletion/AutoCompleter.php | 18 +- .../AbstractDefaultParametersMatcher.php | 10 +- .../TabCompletion/Matcher/AbstractMatcher.php | 26 +- .../Matcher/ClassAttributesMatcher.php | 24 +- .../ClassMethodDefaultParametersMatcher.php | 12 +- .../Matcher/ClassMethodsMatcher.php | 18 +- .../Matcher/ClassNamesMatcher.php | 24 +- .../TabCompletion/Matcher/CommandsMatcher.php | 12 +- .../Matcher/ConstantsMatcher.php | 6 +- .../FunctionDefaultParametersMatcher.php | 10 +- .../Matcher/FunctionsMatcher.php | 10 +- .../TabCompletion/Matcher/KeywordsMatcher.php | 8 +- .../Matcher/MongoClientMatcher.php | 16 +- .../Matcher/MongoDatabaseMatcher.php | 14 +- .../Matcher/ObjectAttributesMatcher.php | 20 +- .../ObjectMethodDefaultParametersMatcher.php | 18 +- .../Matcher/ObjectMethodsMatcher.php | 20 +- .../Matcher/VariablesMatcher.php | 8 +- vendor/psy/psysh/src/Util/Docblock.php | 40 +- vendor/psy/psysh/src/Util/Json.php | 2 +- vendor/psy/psysh/src/Util/Mirror.php | 16 +- vendor/psy/psysh/src/Util/Str.php | 16 +- vendor/psy/psysh/src/VarDumper/Dumper.php | 8 +- vendor/psy/psysh/src/VarDumper/Presenter.php | 14 +- .../src/VersionUpdater/GitHubChecker.php | 12 +- .../src/VersionUpdater/IntervalChecker.php | 8 +- vendor/psy/psysh/src/functions.php | 46 +- vendor/psy/psysh/test/ClassWithSecrets.php | 4 +- .../test/CodeCleaner/FinalClassPassTest.php | 2 +- .../FunctionReturnInWriteContextPassTest.php | 4 +- .../test/CodeCleaner/LegacyEmptyPassTest.php | 4 +- .../psysh/test/CodeCleaner/ListPassTest.php | 17 +- .../test/CodeCleaner/NamespacePassTest.php | 2 +- .../test/CodeCleaner/NoReturnValueTest.php | 2 +- .../test/CodeCleaner/RequirePassTest.php | 2 +- .../test/CodeCleaner/StrictTypesPassTest.php | 2 +- .../test/CodeCleaner/UseStatementPassTest.php | 2 +- .../CodeCleaner/ValidClassNamePassTest.php | 5 +- .../CodeCleaner/ValidConstructorPassTest.php | 4 +- vendor/psy/psysh/test/CodeCleanerTest.php | 2 +- vendor/psy/psysh/test/ConfigurationTest.php | 40 +- vendor/psy/psysh/test/ContextTest.php | 6 +- .../test/Exception/ErrorExceptionTest.php | 8 +- .../test/Exception/ThrowUpExceptionTest.php | 2 +- .../test/Exception/TypeErrorExceptionTest.php | 2 +- .../test/Formatter/CodeFormatterTest.php | 8 +- .../test/Formatter/SignatureFormatterTest.php | 4 +- vendor/psy/psysh/test/ParserTestCase.php | 2 +- .../psysh/test/Readline/GNUReadlineTest.php | 4 +- .../psy/psysh/test/Readline/LibeditTest.php | 16 +- .../Reflection/ReflectionConstantTest.php | 2 +- vendor/psy/psysh/test/ShellTest.php | 67 +- vendor/psy/psysh/test/SudoTest.php | 2 +- .../test/TabCompletion/AutoCompleterTest.php | 2 +- vendor/psy/psysh/test/Util/DocblockTest.php | 2 +- vendor/psy/psysh/test/Util/MirrorTest.php | 2 +- vendor/psy/psysh/test/Util/StrTest.php | 2 +- .../test/VersionUpdater/GitHubCheckerTest.php | 24 +- vendor/psy/psysh/test/fixtures/config.php | 2 +- .../psysh/test/tools/gen_unvis_fixtures.py | 0 vendor/psy/psysh/test/tools/vis.py | 0 vendor/ramsey/uuid/CHANGELOG.md | 10 + vendor/ramsey/uuid/composer.json | 21 +- vendor/ramsey/uuid/docs/.gitignore | 1 - vendor/ramsey/uuid/docs/Makefile | 20 - vendor/ramsey/uuid/docs/_static/.gitkeep | 0 vendor/ramsey/uuid/docs/conf.py | 169 - vendor/ramsey/uuid/docs/index.rst | 19 - .../ramsey/uuid/src/Codec/CodecInterface.php | 3 + .../ramsey/uuid/src/Codec/GuidStringCodec.php | 2 + .../uuid/src/Codec/OrderedTimeCodec.php | 1 + vendor/ramsey/uuid/src/Codec/StringCodec.php | 3 + .../src/Codec/TimestampFirstCombCodec.php | 2 + .../Converter/NumberConverterInterface.php | 2 + .../Converter/Time/DegradedTimeConverter.php | 2 +- .../src/Converter/TimeConverterInterface.php | 2 + vendor/ramsey/uuid/src/DegradedUuid.php | 3 + .../uuid/src/Generator/CombGenerator.php | 3 + .../src/Generator/DefaultTimeGenerator.php | 6 + .../src/Generator/RandomBytesGenerator.php | 1 + .../Generator/RandomGeneratorInterface.php | 3 + .../src/Generator/TimeGeneratorInterface.php | 4 + .../Provider/Node/FallbackNodeProvider.php | 1 + .../src/Provider/Node/RandomNodeProvider.php | 1 + .../src/Provider/Node/SystemNodeProvider.php | 16 +- .../src/Provider/NodeProviderInterface.php | 1 + vendor/ramsey/uuid/src/Uuid.php | 28 +- vendor/ramsey/uuid/src/UuidFactory.php | 22 + .../ramsey/uuid/src/UuidFactoryInterface.php | 18 +- vendor/ramsey/uuid/src/UuidInterface.php | 3 + vendor/sebastian/comparator/ChangeLog.md | 7 + vendor/sebastian/comparator/src/Factory.php | 22 +- .../comparator/src/NumericComparator.php | 2 +- .../comparator/tests/ArrayComparatorTest.php | 26 +- .../tests/ComparisonFailureTest.php | 8 +- .../tests/DOMNodeComparatorTest.php | 29 +- .../tests/DateTimeComparatorTest.php | 38 +- .../comparator/tests/DoubleComparatorTest.php | 27 +- .../tests/ExceptionComparatorTest.php | 27 +- .../comparator/tests/FactoryTest.php | 26 +- .../tests/MockObjectComparatorTest.php | 27 +- .../tests/NumericComparatorTest.php | 27 +- .../comparator/tests/ObjectComparatorTest.php | 27 +- .../tests/ResourceComparatorTest.php | 27 +- .../comparator/tests/ScalarComparatorTest.php | 27 +- .../tests/SplObjectStorageComparatorTest.php | 31 +- .../comparator/tests/TypeComparatorTest.php | 24 +- vendor/swiftmailer/swiftmailer/CHANGES | 5 + .../swiftmailer/lib/classes/Swift.php | 2 +- .../Swift/Transport/AbstractSmtpTransport.php | 30 +- .../Swift/Transport/EsmtpTransport.php | 9 +- .../Swift/Transport/EsmtpTransportTest.php | 235 +- vendor/symfony/console/Application.php | 86 +- vendor/symfony/console/Command/Command.php | 26 +- .../symfony/console/Command/HelpCommand.php | 2 +- .../symfony/console/Command/ListCommand.php | 6 +- .../symfony/console/Descriptor/Descriptor.php | 4 +- .../console/Descriptor/MarkdownDescriptor.php | 4 +- .../console/Descriptor/TextDescriptor.php | 14 +- .../console/Descriptor/XmlDescriptor.php | 4 +- .../console/Event/ConsoleErrorEvent.php | 2 +- .../console/Formatter/OutputFormatter.php | 8 +- .../Formatter/OutputFormatterStyle.php | 8 +- .../Formatter/OutputFormatterStyleStack.php | 4 +- .../console/Helper/DebugFormatterHelper.php | 2 +- .../console/Helper/DescriptorHelper.php | 2 +- .../console/Helper/FormatterHelper.php | 2 +- vendor/symfony/console/Helper/Helper.php | 6 +- vendor/symfony/console/Helper/HelperSet.php | 2 +- .../console/Helper/InputAwareHelper.php | 2 +- .../symfony/console/Helper/ProcessHelper.php | 2 +- vendor/symfony/console/Helper/ProgressBar.php | 4 +- .../console/Helper/ProgressIndicator.php | 6 +- .../symfony/console/Helper/QuestionHelper.php | 18 +- .../console/Helper/SymfonyQuestionHelper.php | 2 +- vendor/symfony/console/Helper/Table.php | 30 +- vendor/symfony/console/Helper/TableStyle.php | 12 +- vendor/symfony/console/Input/ArgvInput.php | 20 +- vendor/symfony/console/Input/ArrayInput.php | 18 +- vendor/symfony/console/Input/Input.php | 2 +- .../symfony/console/Input/InputArgument.php | 2 +- .../symfony/console/Input/InputDefinition.php | 8 +- vendor/symfony/console/Input/InputOption.php | 4 +- vendor/symfony/console/Input/StringInput.php | 8 +- .../symfony/console/Logger/ConsoleLogger.php | 2 +- .../symfony/console/Output/ConsoleOutput.php | 2 +- vendor/symfony/console/Output/Output.php | 2 +- .../console/Output/OutputInterface.php | 4 +- .../symfony/console/Output/StreamOutput.php | 14 +- .../console/Question/ChoiceQuestion.php | 2 +- .../console/Question/ConfirmationQuestion.php | 2 +- vendor/symfony/console/Question/Question.php | 6 +- vendor/symfony/console/Style/OutputStyle.php | 2 +- vendor/symfony/console/Style/SymfonyStyle.php | 12 +- vendor/symfony/console/Terminal.php | 10 +- .../symfony/console/Tests/ApplicationTest.php | 12 +- .../console/Tests/Command/CommandTest.php | 10 +- .../console/Tests/Command/HelpCommandTest.php | 4 +- .../console/Tests/Command/ListCommandTest.php | 2 +- .../Tests/EventListener/ErrorListenerTest.php | 2 +- .../Style/SymfonyStyle/command/command_8.php | 2 +- .../OutputFormatterStyleStackTest.php | 2 +- .../console/Tests/Helper/HelperSetTest.php | 2 +- .../Tests/Helper/ProcessHelperTest.php | 2 +- .../console/Tests/Helper/ProgressBarTest.php | 2 +- .../Tests/Helper/QuestionHelperTest.php | 8 +- .../Helper/SymfonyQuestionHelperTest.php | 2 +- .../console/Tests/Helper/TableTest.php | 4 +- .../console/Tests/Input/ArgvInputTest.php | 27 +- .../console/Tests/Input/ArrayInputTest.php | 6 +- .../Tests/Input/InputDefinitionTest.php | 2 +- .../symfony/console/Tests/Input/InputTest.php | 2 +- .../Tests/Logger/ConsoleLoggerTest.php | 2 +- .../console/Tests/Output/OutputTest.php | 2 +- .../console/Tests/Style/SymfonyStyleTest.php | 6 +- .../Tests/Tester/CommandTesterTest.php | 6 +- .../css-selector/Node/AbstractNode.php | 2 +- .../Parser/Handler/HashHandler.php | 4 +- .../Parser/Handler/IdentifierHandler.php | 4 +- .../Parser/Handler/NumberHandler.php | 4 +- .../Parser/Handler/StringHandler.php | 10 +- .../Parser/Handler/WhitespaceHandler.php | 2 +- vendor/symfony/css-selector/Parser/Parser.php | 6 +- vendor/symfony/css-selector/Parser/Reader.php | 2 +- vendor/symfony/css-selector/Parser/Token.php | 2 +- .../Parser/Tokenizer/TokenizerEscaping.php | 6 +- .../css-selector/Tests/Node/HashNodeTest.php | 2 +- .../Tests/Node/NegationNodeTest.php | 2 +- .../Parser/Handler/AbstractHandlerTest.php | 2 +- .../Tests/Parser/Handler/HashHandlerTest.php | 2 +- .../Parser/Handler/IdentifierHandlerTest.php | 2 +- .../Parser/Handler/StringHandlerTest.php | 2 +- .../Tests/XPath/TranslatorTest.php | 8 +- .../Extension/AttributeMatchingExtension.php | 2 +- .../symfony/css-selector/XPath/Translator.php | 10 +- vendor/symfony/debug/Debug.php | 2 +- vendor/symfony/debug/DebugClassLoader.php | 30 +- vendor/symfony/debug/ErrorHandler.php | 24 +- .../debug/Exception/FatalErrorException.php | 2 +- .../debug/Exception/FlattenException.php | 16 +- vendor/symfony/debug/ExceptionHandler.php | 106 +- .../ClassNotFoundFatalErrorHandler.php | 22 +- .../UndefinedFunctionFatalErrorHandler.php | 8 +- .../UndefinedMethodFatalErrorHandler.php | 2 +- .../symfony/debug/Tests/ErrorHandlerTest.php | 2 +- .../Tests/Exception/FlattenExceptionTest.php | 12 +- .../debug/Tests/ExceptionHandlerTest.php | 4 +- .../ClassNotFoundFatalErrorHandlerTest.php | 8 +- vendor/symfony/debug/Tests/HeaderMock.php | 4 +- .../debug/Tests/phpt/debug_class_loader.phpt | 2 +- .../Tests/phpt/decorate_exception_hander.phpt | 5 +- .../debug/Tests/phpt/exception_rethrown.phpt | 2 +- .../phpt/fatal_with_nested_handlers.phpt | 2 +- .../Debug/TraceableEventDispatcher.php | 11 +- .../Debug/WrappedListener.php | 12 +- .../RegisterListenersPass.php | 2 +- .../event-dispatcher/EventDispatcher.php | 16 +- .../Debug/TraceableEventDispatcherTest.php | 15 +- .../symfony/finder/Comparator/Comparator.php | 2 +- vendor/symfony/finder/Finder.php | 8 +- vendor/symfony/finder/Glob.php | 2 +- .../finder/Iterator/CustomFilterIterator.php | 4 +- .../finder/Iterator/PathFilterIterator.php | 2 +- .../Iterator/RecursiveDirectoryIterator.php | 4 +- .../finder/Iterator/SortableIterator.php | 2 +- vendor/symfony/finder/Tests/FinderTest.php | 80 +- vendor/symfony/finder/Tests/GlobTest.php | 24 +- .../Iterator/DateRangeFilterIteratorTest.php | 2 +- .../Tests/Iterator/IteratorTestCase.php | 6 +- .../finder/Tests/Iterator/MockSplFileInfo.php | 6 +- .../Tests/Iterator/PathFilterIteratorTest.php | 12 +- .../Tests/Iterator/RealIteratorTestCase.php | 18 +- .../RecursiveDirectoryIteratorTest.php | 4 +- .../Iterator/SizeRangeFilterIteratorTest.php | 2 +- .../Tests/Iterator/SortableIteratorTest.php | 6 +- .../http-foundation/AcceptHeaderItem.php | 2 +- .../symfony/http-foundation/ApacheRequest.php | 2 +- .../http-foundation/BinaryFileResponse.php | 12 +- vendor/symfony/http-foundation/CHANGELOG.md | 6 + vendor/symfony/http-foundation/Cookie.php | 4 +- .../Exception/UnexpectedTypeException.php | 2 +- vendor/symfony/http-foundation/File/File.php | 4 +- .../MimeType/FileBinaryMimeTypeGuesser.php | 4 +- .../File/MimeType/FileinfoMimeTypeGuesser.php | 4 +- .../File/MimeType/MimeTypeGuesser.php | 2 +- .../MimeType/MimeTypeGuesserInterface.php | 2 +- .../http-foundation/File/UploadedFile.php | 10 +- vendor/symfony/http-foundation/FileBag.php | 8 +- vendor/symfony/http-foundation/HeaderBag.php | 12 +- vendor/symfony/http-foundation/IpUtils.php | 4 +- .../symfony/http-foundation/JsonResponse.php | 4 +- .../symfony/http-foundation/ParameterBag.php | 6 +- vendor/symfony/http-foundation/Request.php | 92 +- .../http-foundation/RequestMatcher.php | 6 +- .../symfony/http-foundation/RequestStack.php | 2 +- vendor/symfony/http-foundation/Response.php | 33 +- .../http-foundation/ResponseHeaderBag.php | 4 +- vendor/symfony/http-foundation/ServerBag.php | 2 +- .../Session/Attribute/AttributeBag.php | 2 +- .../Attribute/NamespacedAttributeBag.php | 12 +- .../Session/Flash/FlashBagInterface.php | 2 +- .../http-foundation/Session/Session.php | 14 +- .../Session/SessionBagProxy.php | 5 +- .../Handler/AbstractSessionHandler.php | 2 +- .../Storage/Handler/MongoDbSessionHandler.php | 17 +- .../Storage/Handler/PdoSessionHandler.php | 10 +- .../Storage/Handler/RedisSessionHandler.php | 15 +- .../Storage/Handler/StrictSessionHandler.php | 2 +- .../Session/Storage/NativeSessionStorage.php | 4 +- .../Storage/Proxy/SessionHandlerProxy.php | 18 +- .../http-foundation/StreamedResponse.php | 14 +- .../Tests/BinaryFileResponseTest.php | 13 + .../http-foundation/Tests/CookieTest.php | 12 + .../Tests/File/MimeType/MimeTypeTest.php | 4 +- .../Tests/File/UploadedFileTest.php | 2 +- .../cookie_urlencode.expected | 2 +- .../http-foundation/Tests/HeaderBagTest.php | 4 +- .../http-foundation/Tests/IpUtilsTest.php | 4 +- .../Tests/ParameterBagTest.php | 4 +- .../Tests/RequestMatcherTest.php | 2 +- .../http-foundation/Tests/RequestTest.php | 110 +- .../Tests/ResponseHeaderBagTest.php | 2 +- .../http-foundation/Tests/ResponseTest.php | 16 +- .../Session/Attribute/AttributeBagTest.php | 4 +- .../Attribute/NamespacedAttributeBagTest.php | 22 + .../Tests/Session/Flash/FlashBagTest.php | 25 + .../Tests/Session/SessionTest.php | 6 +- .../AbstractRedisSessionHandlerTestCase.php | 56 +- .../Handler/NullSessionHandlerTest.php | 2 +- .../Storage/Handler/PdoSessionHandlerTest.php | 4 +- .../PredisClusterSessionHandlerTest.php | 2 +- .../Storage/MockArraySessionStorageTest.php | 2 +- .../Storage/MockFileSessionStorageTest.php | 4 +- .../Storage/NativeSessionStorageTest.php | 2 +- .../Storage/PhpBridgeSessionStorageTest.php | 2 +- .../Storage/Proxy/SessionHandlerProxyTest.php | 33 + .../Tests/StreamedResponseTest.php | 18 + vendor/symfony/http-kernel/Bundle/Bundle.php | 8 +- .../http-kernel/CacheWarmer/CacheWarmer.php | 2 +- vendor/symfony/http-kernel/Client.php | 8 +- .../Controller/ArgumentResolver.php | 10 +- .../VariadicValueResolver.php | 4 +- .../Controller/ControllerResolver.php | 34 +- .../Controller/TraceableArgumentResolver.php | 2 +- .../TraceableControllerResolver.php | 2 +- .../ArgumentMetadataFactory.php | 4 +- .../DataCollector/ConfigDataCollector.php | 12 +- .../DataCollector/DataCollector.php | 2 +- .../DataCollector/DumpDataCollector.php | 10 +- .../DataCollector/LoggerDataCollector.php | 2 +- .../DataCollector/MemoryDataCollector.php | 4 +- .../DataCollector/RequestDataCollector.php | 24 +- .../DataCollector/RouterDataCollector.php | 2 +- .../http-kernel/Debug/FileLinkFormatter.php | 8 +- .../Debug/TraceableEventDispatcher.php | 2 +- .../AddAnnotatedClassesToCachePass.php | 6 +- .../FragmentRendererPass.php | 2 +- .../DependencyInjection/LoggerPass.php | 2 +- .../MergeExtensionConfigurationPass.php | 2 +- ...RegisterControllerArgumentLocatorsPass.php | 2 +- .../Event/FilterControllerArgumentsEvent.php | 2 +- .../Event/FilterControllerEvent.php | 2 +- .../http-kernel/Event/FilterResponseEvent.php | 2 +- .../http-kernel/Event/GetResponseEvent.php | 2 +- .../GetResponseForControllerResultEvent.php | 2 +- .../Event/GetResponseForExceptionEvent.php | 2 +- .../symfony/http-kernel/Event/KernelEvent.php | 4 +- .../http-kernel/Event/PostResponseEvent.php | 2 +- .../EventListener/AbstractSessionListener.php | 4 +- .../AbstractTestSessionListener.php | 11 +- .../AddRequestFormatsListener.php | 2 +- .../EventListener/DebugHandlersListener.php | 14 +- .../EventListener/ExceptionListener.php | 14 +- .../EventListener/FragmentListener.php | 4 +- .../EventListener/LocaleListener.php | 12 +- .../EventListener/ProfilerListener.php | 8 +- .../EventListener/ResponseListener.php | 2 +- .../EventListener/RouterListener.php | 16 +- .../StreamedResponseListener.php | 2 +- .../EventListener/SurrogateListener.php | 2 +- .../EventListener/TranslatorListener.php | 6 +- .../AbstractSurrogateFragmentRenderer.php | 4 +- .../http-kernel/Fragment/FragmentHandler.php | 2 +- .../Fragment/FragmentRendererInterface.php | 2 +- .../Fragment/HIncludeFragmentRenderer.php | 10 +- .../Fragment/InlineFragmentRenderer.php | 18 +- .../Fragment/RoutableFragmentRenderer.php | 4 +- vendor/symfony/http-kernel/HttpCache/Esi.php | 2 +- .../http-kernel/HttpCache/HttpCache.php | 33 +- vendor/symfony/http-kernel/HttpCache/Ssi.php | 2 +- .../symfony/http-kernel/HttpCache/Store.php | 12 +- vendor/symfony/http-kernel/HttpKernel.php | 24 +- vendor/symfony/http-kernel/Kernel.php | 60 +- .../symfony/http-kernel/KernelInterface.php | 2 +- vendor/symfony/http-kernel/Log/Logger.php | 2 +- .../Profiler/FileProfilerStorage.php | 4 +- .../symfony/http-kernel/Profiler/Profiler.php | 4 +- .../CacheClearer/Psr6CacheClearerTest.php | 2 +- .../Tests/CacheWarmer/CacheWarmerTest.php | 4 +- .../symfony/http-kernel/Tests/ClientTest.php | 8 +- .../Tests/Controller/ArgumentResolverTest.php | 2 +- .../Controller/ControllerResolverTest.php | 8 +- .../DataCollector/ConfigDataCollectorTest.php | 10 +- .../ExceptionDataCollectorTest.php | 2 +- .../DataCollector/MemoryDataCollectorTest.php | 2 +- .../RequestDataCollectorTest.php | 12 +- .../DataCollector/TimeDataCollectorTest.php | 2 +- .../Tests/Debug/FileLinkFormatterTest.php | 6 +- .../Debug/TraceableEventDispatcherTest.php | 4 +- .../LazyLoadingFragmentHandlerTest.php | 2 +- .../DependencyInjection/LoggerPassTest.php | 2 +- ...sterControllerArgumentLocatorsPassTest.php | 26 +- .../FilterControllerArgumentsEventTest.php | 2 +- .../AddRequestFormatsListenerTest.php | 2 +- .../DebugHandlersListenerTest.php | 2 +- .../EventListener/ExceptionListenerTest.php | 18 +- .../EventListener/FragmentListenerTest.php | 4 +- .../EventListener/LocaleListenerTest.php | 2 +- .../EventListener/ProfilerListenerTest.php | 2 +- .../EventListener/ResponseListenerTest.php | 6 +- .../EventListener/RouterListenerTest.php | 4 +- .../EventListener/SessionListenerTest.php | 2 +- .../EventListener/SurrogateListenerTest.php | 14 +- .../EventListener/TestSessionListenerTest.php | 42 +- .../ValidateRequestListenerTest.php | 2 +- .../Tests/Fixtures/123/Kernel123.php | 2 +- .../Tests/Fixtures/KernelForOverrideName.php | 2 +- .../Tests/Fixtures/KernelForTest.php | 2 +- .../Fragment/EsiFragmentRendererTest.php | 2 +- .../Tests/Fragment/FragmentHandlerTest.php | 4 +- .../Fragment/HIncludeFragmentRendererTest.php | 15 +- .../Fragment/InlineFragmentRendererTest.php | 53 +- .../Fragment/SsiFragmentRendererTest.php | 2 +- .../http-kernel/Tests/HttpCache/EsiTest.php | 6 +- .../Tests/HttpCache/HttpCacheTest.php | 63 +- .../Tests/HttpCache/HttpCacheTestCase.php | 2 +- .../http-kernel/Tests/HttpCache/SsiTest.php | 4 +- .../Tests/HttpCache/TestHttpKernel.php | 24 +- .../HttpCache/TestMultipleHttpKernel.php | 8 +- .../http-kernel/Tests/HttpKernelTest.php | 14 +- .../symfony/http-kernel/Tests/KernelTest.php | 20 +- .../http-kernel/Tests/Log/LoggerTest.php | 2 +- .../Tests/Profiler/ProfilerTest.php | 4 +- .../http-kernel/Tests/TestHttpKernel.php | 6 +- vendor/symfony/polyfill-ctype/composer.json | 5 +- vendor/symfony/polyfill-mbstring/Mbstring.php | 18 +- .../symfony/polyfill-mbstring/composer.json | 2 +- vendor/symfony/polyfill-php72/Php72.php | 3 +- vendor/symfony/polyfill-php72/composer.json | 2 +- vendor/symfony/process/ExecutableFinder.php | 4 +- .../symfony/process/PhpExecutableFinder.php | 8 +- vendor/symfony/process/PhpProcess.php | 2 +- .../symfony/process/Pipes/AbstractPipes.php | 12 +- vendor/symfony/process/Pipes/WindowsPipes.php | 4 +- vendor/symfony/process/Process.php | 48 +- vendor/symfony/process/ProcessUtils.php | 4 +- .../process/Tests/ExecutableFinderTest.php | 16 +- .../process/Tests/PhpExecutableFinderTest.php | 4 +- .../symfony/process/Tests/PhpProcessTest.php | 2 +- .../PipeStdinInStdoutStdErrStreamSelect.php | 8 +- vendor/symfony/process/Tests/ProcessTest.php | 50 +- vendor/symfony/routing/Annotation/Route.php | 12 +- .../RoutingResolverPass.php | 4 +- .../routing/Generator/UrlGenerator.php | 14 +- .../routing/Loader/AnnotationClassLoader.php | 6 +- .../Loader/AnnotationDirectoryLoader.php | 4 +- .../routing/Loader/AnnotationFileLoader.php | 16 +- .../Configurator/RoutingConfigurator.php | 4 +- .../routing/Loader/DirectoryLoader.php | 2 +- .../routing/Loader/ObjectRouteLoader.php | 16 +- .../symfony/routing/Loader/PhpFileLoader.php | 4 +- .../symfony/routing/Loader/XmlFileLoader.php | 12 +- .../symfony/routing/Loader/YamlFileLoader.php | 18 +- .../Matcher/Dumper/PhpMatcherDumper.php | 32 +- .../Matcher/RequestMatcherInterface.php | 2 +- .../routing/Matcher/TraceableUrlMatcher.php | 4 +- vendor/symfony/routing/Matcher/UrlMatcher.php | 12 +- .../routing/Matcher/UrlMatcherInterface.php | 6 +- vendor/symfony/routing/Route.php | 4 +- vendor/symfony/routing/RouteCollection.php | 2 +- .../routing/RouteCollectionBuilder.php | 4 +- vendor/symfony/routing/RouteCompiler.php | 22 +- vendor/symfony/routing/Router.php | 16 +- .../Tests/Fixtures/CustomXmlFileLoader.php | 2 +- .../Tests/Fixtures/RedirectableUrlMatcher.php | 2 +- .../Tests/Fixtures/dumper/url_matcher0.php | 2 +- .../Tests/Fixtures/dumper/url_matcher1.php | 92 +- .../Tests/Fixtures/dumper/url_matcher10.php | 2 +- .../Tests/Fixtures/dumper/url_matcher11.php | 2 +- .../Tests/Fixtures/dumper/url_matcher12.php | 2 +- .../Tests/Fixtures/dumper/url_matcher13.php | 2 +- .../Tests/Fixtures/dumper/url_matcher2.php | 92 +- .../Tests/Fixtures/dumper/url_matcher3.php | 2 +- .../Tests/Fixtures/dumper/url_matcher4.php | 2 +- .../Tests/Fixtures/dumper/url_matcher5.php | 2 +- .../Tests/Fixtures/dumper/url_matcher6.php | 2 +- .../Tests/Fixtures/dumper/url_matcher7.php | 2 +- .../Tests/Fixtures/dumper/url_matcher8.php | 2 +- .../Tests/Fixtures/dumper/url_matcher9.php | 2 +- .../routing/Tests/Fixtures/validpattern.php | 2 +- .../Dumper/PhpGeneratorDumperTest.php | 10 +- .../Tests/Generator/UrlGeneratorTest.php | 4 +- .../Loader/AnnotationDirectoryLoaderTest.php | 6 +- .../Tests/Loader/AnnotationFileLoaderTest.php | 2 +- .../Tests/Loader/DirectoryLoaderTest.php | 6 +- .../Tests/Loader/GlobFileLoaderTest.php | 2 +- .../Tests/Loader/YamlFileLoaderTest.php | 2 +- .../DumpedRedirectableUrlMatcherTest.php | 2 +- .../Tests/Matcher/DumpedUrlMatcherTest.php | 2 +- .../Matcher/Dumper/PhpMatcherDumperTest.php | 14 +- .../Matcher/RedirectableUrlMatcherTest.php | 16 +- .../Tests/Matcher/TraceableUrlMatcherTest.php | 4 +- .../routing/Tests/Matcher/UrlMatcherTest.php | 12 +- .../routing/Tests/RouteCollectionTest.php | 4 +- vendor/symfony/routing/Tests/RouterTest.php | 2 +- .../Catalogue/AbstractOperation.php | 10 +- .../translation/Command/XliffLintCommand.php | 18 +- .../TranslationDataCollector.php | 4 +- .../translation/DataCollectorTranslator.php | 4 +- .../TranslationDumperPass.php | 4 +- .../TranslationExtractorPass.php | 4 +- .../DependencyInjection/TranslatorPass.php | 4 +- .../symfony/translation/Dumper/FileDumper.php | 6 +- .../translation/Dumper/IcuResFileDumper.php | 12 +- .../translation/Dumper/MoFileDumper.php | 4 +- .../translation/Dumper/XliffFileDumper.php | 6 +- .../translation/Dumper/YamlFileDumper.php | 2 +- .../Extractor/AbstractFileExtractor.php | 2 +- .../translation/Extractor/PhpExtractor.php | 2 +- .../Extractor/PhpStringTokenParser.php | 4 +- .../translation/Loader/ArrayLoader.php | 2 +- .../translation/Loader/CsvFileLoader.php | 2 +- .../symfony/translation/Loader/FileLoader.php | 4 +- .../translation/Loader/IcuDatFileLoader.php | 4 +- .../translation/Loader/IcuResFileLoader.php | 4 +- .../translation/Loader/LoaderInterface.php | 2 +- .../translation/Loader/MoFileLoader.php | 2 +- .../translation/Loader/PoFileLoader.php | 8 +- .../translation/Loader/QtFileLoader.php | 4 +- .../translation/Loader/XliffFileLoader.php | 8 +- .../translation/Loader/YamlFileLoader.php | 2 +- .../symfony/translation/LoggingTranslator.php | 4 +- .../symfony/translation/MessageSelector.php | 2 +- .../translation/PluralizationRules.php | 13 +- .../translation/Reader/TranslationReader.php | 2 +- .../schemas/xliff-core-1.2-strict.xsd | 2 +- .../TranslationDataCollectorTest.php | 2 +- .../Tests/DataCollectorTranslatorTest.php | 2 +- .../TranslationDumperPassTest.php | 4 +- .../TranslationExtractorPassTest.php | 4 +- .../Tests/Dumper/CsvFileDumperTest.php | 2 +- .../Tests/Dumper/FileDumperTest.php | 2 +- .../Tests/Dumper/IcuResFileDumperTest.php | 2 +- .../Tests/Dumper/IniFileDumperTest.php | 2 +- .../Tests/Dumper/JsonFileDumperTest.php | 2 +- .../Tests/Dumper/MoFileDumperTest.php | 2 +- .../Tests/Dumper/PhpFileDumperTest.php | 2 +- .../Tests/Dumper/PoFileDumperTest.php | 2 +- .../Tests/Dumper/QtFileDumperTest.php | 2 +- .../Tests/Dumper/XliffFileDumperTest.php | 2 +- .../Tests/Dumper/YamlFileDumperTest.php | 2 +- .../Tests/Loader/CsvFileLoaderTest.php | 2 +- .../Tests/Loader/IcuDatFileLoaderTest.php | 2 +- .../Tests/Loader/IcuResFileLoaderTest.php | 2 +- .../Tests/Loader/IniFileLoaderTest.php | 2 +- .../Tests/Loader/JsonFileLoaderTest.php | 2 +- .../Tests/Loader/LocalizedTestCase.php | 2 +- .../Tests/Loader/MoFileLoaderTest.php | 2 +- .../Tests/Loader/PhpFileLoaderTest.php | 2 +- .../Tests/Loader/PoFileLoaderTest.php | 2 +- .../Tests/Loader/QtFileLoaderTest.php | 2 +- .../Tests/Loader/XliffFileLoaderTest.php | 2 +- .../Tests/Loader/YamlFileLoaderTest.php | 2 +- .../Tests/LoggingTranslatorTest.php | 4 +- .../Tests/PluralizationRulesTest.php | 4 +- .../translation/Tests/TranslatorCacheTest.php | 2 +- .../translation/Tests/TranslatorTest.php | 8 +- vendor/symfony/translation/Translator.php | 18 +- .../translation/Util/ArrayConverter.php | 8 +- .../translation/Writer/TranslationWriter.php | 4 +- vendor/symfony/var-dumper/Caster/ArgsStub.php | 8 +- vendor/symfony/var-dumper/Caster/Caster.php | 4 +- .../symfony/var-dumper/Caster/ClassStub.php | 14 +- .../var-dumper/Caster/CutArrayStub.php | 2 +- vendor/symfony/var-dumper/Caster/CutStub.php | 8 +- .../symfony/var-dumper/Caster/DateCaster.php | 4 +- .../var-dumper/Caster/DoctrineCaster.php | 2 +- .../var-dumper/Caster/ExceptionCaster.php | 16 +- vendor/symfony/var-dumper/Caster/LinkStub.php | 22 +- .../symfony/var-dumper/Caster/PdoCaster.php | 2 +- .../symfony/var-dumper/Caster/RedisCaster.php | 2 +- .../var-dumper/Caster/ReflectionCaster.php | 2 +- .../symfony/var-dumper/Caster/StubCaster.php | 4 +- .../var-dumper/Cloner/AbstractCloner.php | 4 +- vendor/symfony/var-dumper/Cloner/Data.php | 20 +- .../var-dumper/Dumper/AbstractDumper.php | 8 +- .../symfony/var-dumper/Dumper/CliDumper.php | 39 +- .../ContextProvider/CliContextProvider.php | 2 +- .../ContextProvider/SourceContextProvider.php | 4 +- .../symfony/var-dumper/Dumper/HtmlDumper.php | 8 +- .../Exception/ThrowingCasterException.php | 2 +- .../Resources/css/htmlDescriptor.css | 2 +- .../symfony/var-dumper/Server/DumpServer.php | 2 +- .../var-dumper/Test/VarDumperTestTrait.php | 2 +- .../Tests/Caster/DateCasterTest.php | 12 +- .../Tests/Caster/ExceptionCasterTest.php | 6 +- .../Tests/Caster/ReflectionCasterTest.php | 2 +- .../var-dumper/Tests/Cloner/DataTest.php | 4 +- vendor/symfony/var-dumper/VarDumper.php | 4 +- vendor/vlucas/phpdotenv/src/Loader.php | 12 +- 1404 files changed, 10604 insertions(+), 33714 deletions(-) create mode 100644 install.sh mode change 100644 => 120000 vendor/bin/php-parse mode change 100644 => 120000 vendor/bin/psysh mode change 100644 => 100755 vendor/nikic/php-parser/bin/php-parse mode change 100644 => 100755 vendor/nikic/php-parser/test_old/run-php-src.sh delete mode 100644 vendor/paragonie/random_compat/lib/byte_safe_strings.php delete mode 100644 vendor/paragonie/random_compat/lib/cast_to_int.php delete mode 100644 vendor/paragonie/random_compat/lib/error_polyfill.php delete mode 100644 vendor/paragonie/random_compat/lib/random_bytes_com_dotnet.php delete mode 100644 vendor/paragonie/random_compat/lib/random_bytes_dev_urandom.php delete mode 100644 vendor/paragonie/random_compat/lib/random_bytes_libsodium.php delete mode 100644 vendor/paragonie/random_compat/lib/random_bytes_libsodium_legacy.php delete mode 100644 vendor/paragonie/random_compat/lib/random_bytes_mcrypt.php delete mode 100644 vendor/paragonie/random_compat/lib/random_int.php delete mode 100644 vendor/phar-io/version/src/AbstractVersionConstraint.php delete mode 100644 vendor/phar-io/version/src/AndVersionConstraintGroup.php delete mode 100644 vendor/phar-io/version/src/AnyVersionConstraint.php delete mode 100644 vendor/phar-io/version/src/ExactVersionConstraint.php delete mode 100644 vendor/phar-io/version/src/Exception.php delete mode 100644 vendor/phar-io/version/src/GreaterThanOrEqualToVersionConstraint.php delete mode 100644 vendor/phar-io/version/src/InvalidVersionException.php delete mode 100644 vendor/phar-io/version/src/OrVersionConstraintGroup.php delete mode 100644 vendor/phar-io/version/src/SpecificMajorAndMinorVersionConstraint.php delete mode 100644 vendor/phar-io/version/src/SpecificMajorVersionConstraint.php delete mode 100644 vendor/phar-io/version/src/UnsupportedVersionConstraintException.php delete mode 100644 vendor/phar-io/version/src/VersionConstraint.php delete mode 100644 vendor/phpunit/phpunit/tests/Fail/fail.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Framework/AssertTest.php delete mode 100644 vendor/phpunit/phpunit/tests/Framework/Constraint/ArrayHasKeyTest.php delete mode 100644 vendor/phpunit/phpunit/tests/Framework/Constraint/ArraySubsetTest.php delete mode 100644 vendor/phpunit/phpunit/tests/Framework/Constraint/AttributeTest.php delete mode 100644 vendor/phpunit/phpunit/tests/Framework/Constraint/CallbackTest.php delete mode 100644 vendor/phpunit/phpunit/tests/Framework/Constraint/ClassHasAttributeTest.php delete mode 100644 vendor/phpunit/phpunit/tests/Framework/Constraint/ClassHasStaticAttributeTest.php delete mode 100644 vendor/phpunit/phpunit/tests/Framework/Constraint/ConstraintTestCase.php delete mode 100644 vendor/phpunit/phpunit/tests/Framework/Constraint/CountTest.php delete mode 100644 vendor/phpunit/phpunit/tests/Framework/Constraint/DirectoryExistsTest.php delete mode 100644 vendor/phpunit/phpunit/tests/Framework/Constraint/ExceptionMessageRegExpTest.php delete mode 100644 vendor/phpunit/phpunit/tests/Framework/Constraint/ExceptionMessageTest.php delete mode 100644 vendor/phpunit/phpunit/tests/Framework/Constraint/FileExistsTest.php delete mode 100644 vendor/phpunit/phpunit/tests/Framework/Constraint/GreaterThanTest.php delete mode 100644 vendor/phpunit/phpunit/tests/Framework/Constraint/IsEmptyTest.php delete mode 100644 vendor/phpunit/phpunit/tests/Framework/Constraint/IsEqualTest.php delete mode 100644 vendor/phpunit/phpunit/tests/Framework/Constraint/IsIdenticalTest.php delete mode 100644 vendor/phpunit/phpunit/tests/Framework/Constraint/IsInstanceOfTest.php delete mode 100644 vendor/phpunit/phpunit/tests/Framework/Constraint/IsJsonTest.php delete mode 100644 vendor/phpunit/phpunit/tests/Framework/Constraint/IsNullTest.php delete mode 100644 vendor/phpunit/phpunit/tests/Framework/Constraint/IsReadableTest.php delete mode 100644 vendor/phpunit/phpunit/tests/Framework/Constraint/IsTypeTest.php delete mode 100644 vendor/phpunit/phpunit/tests/Framework/Constraint/IsWritableTest.php delete mode 100644 vendor/phpunit/phpunit/tests/Framework/Constraint/JsonMatchesErrorMessageProviderTest.php delete mode 100644 vendor/phpunit/phpunit/tests/Framework/Constraint/JsonMatchesTest.php delete mode 100644 vendor/phpunit/phpunit/tests/Framework/Constraint/LessThanTest.php delete mode 100644 vendor/phpunit/phpunit/tests/Framework/Constraint/LogicalAndTest.php delete mode 100644 vendor/phpunit/phpunit/tests/Framework/Constraint/LogicalOrTest.php delete mode 100644 vendor/phpunit/phpunit/tests/Framework/Constraint/LogicalXorTest.php delete mode 100644 vendor/phpunit/phpunit/tests/Framework/Constraint/ObjectHasAttributeTest.php delete mode 100644 vendor/phpunit/phpunit/tests/Framework/Constraint/RegularExpressionTest.php delete mode 100644 vendor/phpunit/phpunit/tests/Framework/Constraint/SameSizeTest.php delete mode 100644 vendor/phpunit/phpunit/tests/Framework/Constraint/StringContainsTest.php delete mode 100644 vendor/phpunit/phpunit/tests/Framework/Constraint/StringEndsWithTest.php delete mode 100644 vendor/phpunit/phpunit/tests/Framework/Constraint/StringMatchesFormatDescriptionTest.php delete mode 100644 vendor/phpunit/phpunit/tests/Framework/Constraint/StringStartsWithTest.php delete mode 100644 vendor/phpunit/phpunit/tests/Framework/Constraint/TraversableContainsTest.php delete mode 100644 vendor/phpunit/phpunit/tests/Framework/ConstraintTest.php delete mode 100644 vendor/phpunit/phpunit/tests/Framework/ExceptionWrapperTest.php delete mode 100644 vendor/phpunit/phpunit/tests/Framework/MockObject/Builder/InvocationMockerTest.php delete mode 100644 vendor/phpunit/phpunit/tests/Framework/MockObject/Generator/232.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Framework/MockObject/Generator/397.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Framework/MockObject/Generator/abstract_class.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Framework/MockObject/Generator/class.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Framework/MockObject/Generator/class_call_parent_clone.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Framework/MockObject/Generator/class_call_parent_constructor.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Framework/MockObject/Generator/class_dont_call_parent_clone.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Framework/MockObject/Generator/class_dont_call_parent_constructor.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Framework/MockObject/Generator/class_implementing_interface_call_parent_constructor.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Framework/MockObject/Generator/class_implementing_interface_dont_call_parent_constructor.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Framework/MockObject/Generator/class_partial.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Framework/MockObject/Generator/class_with_deprecated_method.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Framework/MockObject/Generator/class_with_method_named_method.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Framework/MockObject/Generator/class_with_method_with_nullable_typehinted_variadic_arguments.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Framework/MockObject/Generator/class_with_method_with_typehinted_variadic_arguments.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Framework/MockObject/Generator/class_with_method_with_variadic_arguments.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Framework/MockObject/Generator/constant_as_parameter_default_value.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Framework/MockObject/Generator/interface.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Framework/MockObject/Generator/invocation_object_clone_object.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Framework/MockObject/Generator/namespaced_class.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Framework/MockObject/Generator/namespaced_class_call_parent_clone.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Framework/MockObject/Generator/namespaced_class_call_parent_constructor.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Framework/MockObject/Generator/namespaced_class_dont_call_parent_clone.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Framework/MockObject/Generator/namespaced_class_dont_call_parent_constructor.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Framework/MockObject/Generator/namespaced_class_implementing_interface_call_parent_constructor.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Framework/MockObject/Generator/namespaced_class_implementing_interface_dont_call_parent_constructor.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Framework/MockObject/Generator/namespaced_class_partial.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Framework/MockObject/Generator/namespaced_interface.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Framework/MockObject/Generator/nonexistent_class.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Framework/MockObject/Generator/nonexistent_class_with_namespace.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Framework/MockObject/Generator/nonexistent_class_with_namespace_starting_with_separator.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Framework/MockObject/Generator/nullable_types.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Framework/MockObject/Generator/proxy.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Framework/MockObject/Generator/return_type_declarations_closure.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Framework/MockObject/Generator/return_type_declarations_final.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Framework/MockObject/Generator/return_type_declarations_generator.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Framework/MockObject/Generator/return_type_declarations_nullable.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Framework/MockObject/Generator/return_type_declarations_object_method.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Framework/MockObject/Generator/return_type_declarations_parent.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Framework/MockObject/Generator/return_type_declarations_self.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Framework/MockObject/Generator/return_type_declarations_static_method.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Framework/MockObject/Generator/return_type_declarations_void.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Framework/MockObject/Generator/scalar_type_declarations.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Framework/MockObject/Generator/wsdl_class.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Framework/MockObject/Generator/wsdl_class_namespace.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Framework/MockObject/Generator/wsdl_class_partial.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Framework/MockObject/GeneratorTest.php delete mode 100644 vendor/phpunit/phpunit/tests/Framework/MockObject/Invocation/ObjectInvocationTest.php delete mode 100644 vendor/phpunit/phpunit/tests/Framework/MockObject/Invocation/StaticInvocationTest.php delete mode 100644 vendor/phpunit/phpunit/tests/Framework/MockObject/Matcher/ConsecutiveParametersTest.php delete mode 100644 vendor/phpunit/phpunit/tests/Framework/MockObject/MockBuilderTest.php delete mode 100644 vendor/phpunit/phpunit/tests/Framework/MockObject/MockObjectTest.php delete mode 100644 vendor/phpunit/phpunit/tests/Framework/MockObject/ProxyObjectTest.php delete mode 100644 vendor/phpunit/phpunit/tests/Framework/TestCaseTest.php delete mode 100644 vendor/phpunit/phpunit/tests/Framework/TestFailureTest.php delete mode 100644 vendor/phpunit/phpunit/tests/Framework/TestImplementorTest.php delete mode 100644 vendor/phpunit/phpunit/tests/Framework/TestListenerTest.php delete mode 100644 vendor/phpunit/phpunit/tests/Framework/TestSuiteTest.php delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/1149.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/1149/Issue1149Test.php delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/1216.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/1216/Issue1216Test.php delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/1216/bootstrap1216.php delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/1216/phpunit1216.xml delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/1265.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/1265/Issue1265Test.php delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/1265/phpunit1265.xml delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/1330.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/1330/Issue1330Test.php delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/1330/phpunit1330.xml delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/1335.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/1335/Issue1335Test.php delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/1335/bootstrap1335.php delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/1337.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/1337/Issue1337Test.php delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/1348.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/1348/Issue1348Test.php delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/1351.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/1351/ChildProcessClass1351.php delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/1351/Issue1351Test.php delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/1374.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/1374/Issue1374Test.php delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/1437.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/1437/Issue1437Test.php delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/1468.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/1468/Issue1468Test.php delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/1471.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/1471/Issue1471Test.php delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/1472.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/1472/Issue1472Test.php delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/1570.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/1570/Issue1570Test.php delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/2137-filter.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/2137-no_filter.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/2137/Issue2137Test.php delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/2145.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/2145/Issue2145Test.php delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/2158.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/2158/Issue2158Test.php delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/2158/constant.inc delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/2366.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/2366/Issue2366Test.php delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/2380.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/2380/Issue2380Test.php delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/2382.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/2382/Issue2382Test.php delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/2435.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/2435/Issue2435Test.php delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/244.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/244/Issue244Test.php delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/2448-existing-test.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/2448-not-existing-test.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/2448/Test.php delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/2591-separate-class-preserve-no-bootstrap.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/2591-separate-class-preserve.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/2591-separate-function-no-preserve-no-bootstrap-php73.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/2591-separate-function-no-preserve-no-bootstrap-xdebug.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/2591-separate-function-no-preserve-no-bootstrap.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/2591-separate-function-no-preserve.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/2591-separate-function-preserve.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/2591/SeparateClassPreserveTest.php delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/2591/SeparateFunctionNoPreserveTest.php delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/2591/SeparateFunctionPreserveTest.php delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/2591/bootstrapNoBootstrap.php delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/2591/bootstrapWithBootstrap.php delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/2591/bootstrapWithBootstrapNoGlobal.php delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/2724-diff-pid-from-master-process.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/2724/SeparateClassRunMethodInNewProcessTest.php delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/2725-separate-class-before-after-pid.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/2725/BeforeAfterClassPidTest.php delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/2731.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/2731/Issue2731Test.php delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/2811.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/2811/Issue2811Test.php delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/2830.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/2830/Issue2830Test.php delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/2972.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/2972/issue-2972-test.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/2972/unconventiallyNamedIssue2972Test.php delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/3107/Issue3107Test.php delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/3107/issue-3107-test.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/3156/Issue3156Test.php delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/322.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/322/Issue322Test.php delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/322/phpunit322.xml delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/433.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/433/Issue433Test.php delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/445.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/445/Issue445Test.php delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/498.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/498/Issue498Test.php delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/503.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/503/Issue503Test.php delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/581.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/581/Issue581Test.php delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/74.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/74/Issue74Test.php delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/74/NewException.php delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/765.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/765/Issue765Test.php delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/797.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/797/Issue797Test.php delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/797/bootstrap797.php delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/863.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/873.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Regression/GitHub/873/Issue873Test.php delete mode 100644 vendor/phpunit/phpunit/tests/Regression/Trac/1021.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Regression/Trac/1021/Issue1021Test.php delete mode 100644 vendor/phpunit/phpunit/tests/Regression/Trac/523.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Regression/Trac/523/Issue523Test.php delete mode 100644 vendor/phpunit/phpunit/tests/Regression/Trac/578.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Regression/Trac/578/Issue578Test.php delete mode 100644 vendor/phpunit/phpunit/tests/Regression/Trac/684.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Regression/Trac/684/Issue684Test.php delete mode 100644 vendor/phpunit/phpunit/tests/Regression/Trac/783.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Regression/Trac/783/ChildSuite.php delete mode 100644 vendor/phpunit/phpunit/tests/Regression/Trac/783/OneTest.php delete mode 100644 vendor/phpunit/phpunit/tests/Regression/Trac/783/ParentSuite.php delete mode 100644 vendor/phpunit/phpunit/tests/Regression/Trac/783/TwoTest.php delete mode 100644 vendor/phpunit/phpunit/tests/Runner/PhptTestCaseTest.php delete mode 100644 vendor/phpunit/phpunit/tests/Runner/TestSuiteSorterTest.php delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/_files/Extension.php delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/_files/HookTest.php delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/_files/NullPrinter.php delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/_files/expect_external.txt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/_files/hooks.xml delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/_files/phpt-env.expected.txt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/_files/phpt_external.php delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/abstract-test-class.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/assertion.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/code-coverage-ignore.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/code-coverage-phpt.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/colors-always.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/concrete-test-class.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/custom-printer-debug.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/custom-printer-verbose.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/dataprovider-debug.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/dataprovider-issue-2833.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/dataprovider-issue-2859.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/dataprovider-issue-2922.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/dataprovider-log-xml-isolation.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/dataprovider-log-xml.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/dataprovider-testdox.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/debug.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/default-isolation.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/default.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/defaulttestsuite-using-testsuite.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/defaulttestsuite.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/dependencies-clone.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/dependencies-isolation.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/dependencies.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/dependencies2-isolation.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/dependencies2.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/dependencies3-isolation.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/dependencies3.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/disable-code-coverage-ignore.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/empty-testcase.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/exception-stack.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/exclude-group-isolation.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/exclude-group.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/failure-isolation.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/failure-reverse-list.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/failure.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/fatal-isolation.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/filter-class-isolation.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/filter-class.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-classname-and-range-isolation.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-classname-and-range.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-number-isolation.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-number.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-only-range-isolation.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-only-range.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-only-regexp-isolation.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-only-regexp.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-only-string-isolation.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-only-string.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-range-isolation.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-range.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-regexp-isolation.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-regexp.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-string-isolation.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-string.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/filter-method-case-insensitive.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/filter-method-case-sensitive-no-result.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/filter-method-isolation.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/filter-method.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/filter-no-results.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/forward-compatibility.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/group-isolation.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/group.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/help.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/help2.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/hooks.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/ini-isolation.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/list-groups.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/list-suites.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/list-tests-dataprovider.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/list-tests-xml-dataprovider.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/log-junit.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/log-teamcity.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/mycommand.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/options-after-arguments.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/output-isolation.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/phar-extension-suppressed.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/phar-extension.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/phpt-args.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/phpt-env.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/phpt-external.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/phpt-stderr.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/phpt-stdin.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/phpt-xfail.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/repeat.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/report-tests-performing-assertions-when-annotated-with-does-not-perform-assertions.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/report-useless-tests-incomplete.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/report-useless-tests-isolation.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/report-useless-tests.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/stop-on-warning-via-cli.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/stop-on-warning-via-config.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/teamcity-inner-exceptions.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/teamcity.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/test-order-randomized-seed-with-dependency-resolution.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/test-order-randomized-with-dependency-resolution.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/test-order-reversed-with-dependency-resolution.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/test-order-reversed-without-dependency-resolution.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/test-suffix-multiple.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/test-suffix-single.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/testdox-exclude-group.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/testdox-group.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/testdox-html.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/testdox-text.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/testdox-verbose.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/testdox-xml.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/testdox.phpt delete mode 100644 vendor/phpunit/phpunit/tests/Util/ConfigurationGeneratorTest.php delete mode 100644 vendor/phpunit/phpunit/tests/Util/ConfigurationTest.php delete mode 100644 vendor/phpunit/phpunit/tests/Util/GetoptTest.php delete mode 100644 vendor/phpunit/phpunit/tests/Util/GlobalStateTest.php delete mode 100644 vendor/phpunit/phpunit/tests/Util/JsonTest.php delete mode 100644 vendor/phpunit/phpunit/tests/Util/PHP/AbstractPhpProcessTest.php delete mode 100644 vendor/phpunit/phpunit/tests/Util/RegularExpressionTest.php delete mode 100644 vendor/phpunit/phpunit/tests/Util/TestDox/CliTestDoxPrinterTest.php delete mode 100644 vendor/phpunit/phpunit/tests/Util/TestDox/NamePrettifierTest.php delete mode 100644 vendor/phpunit/phpunit/tests/Util/TestTest.php delete mode 100644 vendor/phpunit/phpunit/tests/Util/XmlTest.php mode change 100644 => 100755 vendor/psy/psysh/bin/build-stub mode change 100644 => 100755 vendor/psy/psysh/bin/psysh mode change 100644 => 100755 vendor/psy/psysh/test/tools/gen_unvis_fixtures.py mode change 100644 => 100755 vendor/psy/psysh/test/tools/vis.py delete mode 100644 vendor/ramsey/uuid/docs/.gitignore delete mode 100644 vendor/ramsey/uuid/docs/Makefile delete mode 100644 vendor/ramsey/uuid/docs/_static/.gitkeep delete mode 100644 vendor/ramsey/uuid/docs/conf.py delete mode 100644 vendor/ramsey/uuid/docs/index.rst diff --git a/.gitignore b/.gitignore index 67c0aeab..554dce54 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ Homestead.yaml npm-debug.log yarn-error.log .env +/public/assets/public diff --git a/composer.lock b/composer.lock index c433da54..86b152b3 100644 --- a/composer.lock +++ b/composer.lock @@ -211,16 +211,16 @@ }, { "name": "egulias/email-validator", - "version": "2.1.4", + "version": "2.1.5", "source": { "type": "git", "url": "https://github.com/egulias/EmailValidator.git", - "reference": "8790f594151ca6a2010c6218e09d96df67173ad3" + "reference": "54859fabea8b3beecbb1a282888d5c990036b9e3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/8790f594151ca6a2010c6218e09d96df67173ad3", - "reference": "8790f594151ca6a2010c6218e09d96df67173ad3", + "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/54859fabea8b3beecbb1a282888d5c990036b9e3", + "reference": "54859fabea8b3beecbb1a282888d5c990036b9e3", "shasum": "" }, "require": { @@ -264,7 +264,7 @@ "validation", "validator" ], - "time": "2018-04-10T10:11:19+00:00" + "time": "2018-08-16T20:49:45+00:00" }, { "name": "erusev/parsedown", @@ -636,16 +636,16 @@ }, { "name": "laravel/framework", - "version": "v5.6.26", + "version": "v5.6.38", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "7047df295e77cecb6a2f84736a732af66cc6789c" + "reference": "38d838bab9434af79e8ab274ae63f52f7ed45d6e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/7047df295e77cecb6a2f84736a732af66cc6789c", - "reference": "7047df295e77cecb6a2f84736a732af66cc6789c", + "url": "https://api.github.com/repos/laravel/framework/zipball/38d838bab9434af79e8ab274ae63f52f7ed45d6e", + "reference": "38d838bab9434af79e8ab274ae63f52f7ed45d6e", "shasum": "" }, "require": { @@ -771,7 +771,7 @@ "framework", "laravel" ], - "time": "2018-06-20T14:21:11+00:00" + "time": "2018-09-04T13:15:09+00:00" }, { "name": "laravel/tinker", @@ -896,16 +896,16 @@ }, { "name": "league/flysystem", - "version": "1.0.45", + "version": "1.0.46", "source": { "type": "git", "url": "https://github.com/thephpleague/flysystem.git", - "reference": "a99f94e63b512d75f851b181afcdf0ee9ebef7e6" + "reference": "f3e0d925c18b92cf3ce84ea5cc58d62a1762a2b2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/a99f94e63b512d75f851b181afcdf0ee9ebef7e6", - "reference": "a99f94e63b512d75f851b181afcdf0ee9ebef7e6", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/f3e0d925c18b92cf3ce84ea5cc58d62a1762a2b2", + "reference": "f3e0d925c18b92cf3ce84ea5cc58d62a1762a2b2", "shasum": "" }, "require": { @@ -917,7 +917,7 @@ "require-dev": { "ext-fileinfo": "*", "phpspec/phpspec": "^3.4", - "phpunit/phpunit": "^5.7" + "phpunit/phpunit": "^5.7.10" }, "suggest": { "ext-fileinfo": "Required for MimeType", @@ -976,7 +976,7 @@ "sftp", "storage" ], - "time": "2018-05-07T08:44:23+00:00" + "time": "2018-08-22T07:45:22+00:00" }, { "name": "monolog/monolog", @@ -1159,16 +1159,16 @@ }, { "name": "nikic/php-parser", - "version": "v4.0.2", + "version": "v4.0.3", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "35b8caf75e791ba1b2d24fec1552168d72692b12" + "reference": "bd088dc940a418f09cda079a9b5c7c478890fb8d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/35b8caf75e791ba1b2d24fec1552168d72692b12", - "reference": "35b8caf75e791ba1b2d24fec1552168d72692b12", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/bd088dc940a418f09cda079a9b5c7c478890fb8d", + "reference": "bd088dc940a418f09cda079a9b5c7c478890fb8d", "shasum": "" }, "require": { @@ -1206,37 +1206,33 @@ "parser", "php" ], - "time": "2018-06-03T11:33:10+00:00" + "time": "2018-07-15T17:25:16+00:00" }, { "name": "paragonie/random_compat", - "version": "v2.0.17", + "version": "v9.99.99", "source": { "type": "git", "url": "https://github.com/paragonie/random_compat.git", - "reference": "29af24f25bab834fcbb38ad2a69fa93b867e070d" + "reference": "84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paragonie/random_compat/zipball/29af24f25bab834fcbb38ad2a69fa93b867e070d", - "reference": "29af24f25bab834fcbb38ad2a69fa93b867e070d", + "url": "https://api.github.com/repos/paragonie/random_compat/zipball/84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95", + "reference": "84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95", "shasum": "" }, "require": { - "php": ">=5.2.0" + "php": "^7" }, "require-dev": { - "phpunit/phpunit": "4.*|5.*" + "phpunit/phpunit": "4.*|5.*", + "vimeo/psalm": "^1" }, "suggest": { "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." }, "type": "library", - "autoload": { - "files": [ - "lib/random.php" - ] - }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" @@ -1255,7 +1251,7 @@ "pseudorandom", "random" ], - "time": "2018-07-04T16:31:37+00:00" + "time": "2018-07-02T15:55:56+00:00" }, { "name": "php-http/guzzle6-adapter", @@ -1619,20 +1615,22 @@ }, { "name": "psy/psysh", - "version": "v0.9.6", + "version": "v0.9.8", "source": { "type": "git", "url": "https://github.com/bobthecow/psysh.git", - "reference": "4a2ce86f199d51b6e2524214dc06835e872f4fce" + "reference": "ed3c32c4304e1a678a6e0f9dc11dd2d927d89555" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/bobthecow/psysh/zipball/4a2ce86f199d51b6e2524214dc06835e872f4fce", - "reference": "4a2ce86f199d51b6e2524214dc06835e872f4fce", + "url": "https://api.github.com/repos/bobthecow/psysh/zipball/ed3c32c4304e1a678a6e0f9dc11dd2d927d89555", + "reference": "ed3c32c4304e1a678a6e0f9dc11dd2d927d89555", "shasum": "" }, "require": { "dnoegel/php-xdg-base-dir": "0.1", + "ext-json": "*", + "ext-tokenizer": "*", "jakub-onderka/php-console-highlighter": "0.3.*", "nikic/php-parser": "~1.3|~2.0|~3.0|~4.0", "php": ">=5.4.0", @@ -1687,25 +1685,26 @@ "interactive", "shell" ], - "time": "2018-06-10T17:57:20+00:00" + "time": "2018-09-05T11:40:09+00:00" }, { "name": "ramsey/uuid", - "version": "3.7.3", + "version": "3.8.0", "source": { "type": "git", "url": "https://github.com/ramsey/uuid.git", - "reference": "44abcdad877d9a46685a3a4d221e3b2c4b87cb76" + "reference": "d09ea80159c1929d75b3f9c60504d613aeb4a1e3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ramsey/uuid/zipball/44abcdad877d9a46685a3a4d221e3b2c4b87cb76", - "reference": "44abcdad877d9a46685a3a4d221e3b2c4b87cb76", + "url": "https://api.github.com/repos/ramsey/uuid/zipball/d09ea80159c1929d75b3f9c60504d613aeb4a1e3", + "reference": "d09ea80159c1929d75b3f9c60504d613aeb4a1e3", "shasum": "" }, "require": { - "paragonie/random_compat": "^1.0|^2.0", - "php": "^5.4 || ^7.0" + "paragonie/random_compat": "^1.0|^2.0|9.99.99", + "php": "^5.4 || ^7.0", + "symfony/polyfill-ctype": "^1.8" }, "replace": { "rhumsaa/uuid": "self.version" @@ -1713,16 +1712,17 @@ "require-dev": { "codeception/aspect-mock": "^1.0 | ~2.0.0", "doctrine/annotations": "~1.2.0", - "goaop/framework": "1.0.0-alpha.2 | ^1.0 | ^2.1", + "goaop/framework": "1.0.0-alpha.2 | ^1.0 | ~2.1.0", "ircmaxell/random-lib": "^1.1", "jakub-onderka/php-parallel-lint": "^0.9.0", "mockery/mockery": "^0.9.9", "moontoast/math": "^1.1", "php-mock/php-mock-phpunit": "^0.3|^1.1", - "phpunit/phpunit": "^4.7|^5.0", + "phpunit/phpunit": "^4.7|^5.0|^6.5", "squizlabs/php_codesniffer": "^2.3" }, "suggest": { + "ext-ctype": "Provides support for PHP Ctype functions", "ext-libsodium": "Provides the PECL libsodium extension for use with the SodiumRandomGenerator", "ext-uuid": "Provides the PECL UUID extension for use with the PeclUuidTimeGenerator and PeclUuidRandomGenerator", "ircmaxell/random-lib": "Provides RandomLib for use with the RandomLibAdapter", @@ -1767,20 +1767,20 @@ "identifier", "uuid" ], - "time": "2018-01-20T00:28:24+00:00" + "time": "2018-07-19T23:38:55+00:00" }, { "name": "swiftmailer/swiftmailer", - "version": "v6.1.1", + "version": "v6.1.2", "source": { "type": "git", "url": "https://github.com/swiftmailer/swiftmailer.git", - "reference": "aa899fef280b1c1aec8d5d4ac069af7f80c89a23" + "reference": "7d760881d266d63c5e7a1155cbcf2ac656a31ca8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/aa899fef280b1c1aec8d5d4ac069af7f80c89a23", - "reference": "aa899fef280b1c1aec8d5d4ac069af7f80c89a23", + "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/7d760881d266d63c5e7a1155cbcf2ac656a31ca8", + "reference": "7d760881d266d63c5e7a1155cbcf2ac656a31ca8", "shasum": "" }, "require": { @@ -1826,20 +1826,20 @@ "mail", "mailer" ], - "time": "2018-07-04T11:12:44+00:00" + "time": "2018-07-13T07:04:35+00:00" }, { "name": "symfony/console", - "version": "v4.1.1", + "version": "v4.1.4", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "70591cda56b4b47c55776ac78e157c4bb6c8b43f" + "reference": "ca80b8ced97cf07390078b29773dc384c39eee1f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/70591cda56b4b47c55776ac78e157c4bb6c8b43f", - "reference": "70591cda56b4b47c55776ac78e157c4bb6c8b43f", + "url": "https://api.github.com/repos/symfony/console/zipball/ca80b8ced97cf07390078b29773dc384c39eee1f", + "reference": "ca80b8ced97cf07390078b29773dc384c39eee1f", "shasum": "" }, "require": { @@ -1894,20 +1894,20 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2018-05-31T10:17:53+00:00" + "time": "2018-07-26T11:24:31+00:00" }, { "name": "symfony/css-selector", - "version": "v4.1.1", + "version": "v4.1.4", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", - "reference": "03ac71606ecb0b0ce792faa17d74cc32c2949ef4" + "reference": "2a4df7618f869b456f9096781e78c57b509d76c7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/css-selector/zipball/03ac71606ecb0b0ce792faa17d74cc32c2949ef4", - "reference": "03ac71606ecb0b0ce792faa17d74cc32c2949ef4", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/2a4df7618f869b456f9096781e78c57b509d76c7", + "reference": "2a4df7618f869b456f9096781e78c57b509d76c7", "shasum": "" }, "require": { @@ -1947,20 +1947,20 @@ ], "description": "Symfony CssSelector Component", "homepage": "https://symfony.com", - "time": "2018-05-30T07:26:09+00:00" + "time": "2018-07-26T09:10:45+00:00" }, { "name": "symfony/debug", - "version": "v4.1.1", + "version": "v4.1.4", "source": { "type": "git", "url": "https://github.com/symfony/debug.git", - "reference": "dbe0fad88046a755dcf9379f2964c61a02f5ae3d" + "reference": "47ead688f1f2877f3f14219670f52e4722ee7052" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/dbe0fad88046a755dcf9379f2964c61a02f5ae3d", - "reference": "dbe0fad88046a755dcf9379f2964c61a02f5ae3d", + "url": "https://api.github.com/repos/symfony/debug/zipball/47ead688f1f2877f3f14219670f52e4722ee7052", + "reference": "47ead688f1f2877f3f14219670f52e4722ee7052", "shasum": "" }, "require": { @@ -2003,20 +2003,20 @@ ], "description": "Symfony Debug Component", "homepage": "https://symfony.com", - "time": "2018-06-08T09:39:36+00:00" + "time": "2018-08-03T11:13:38+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v4.1.1", + "version": "v4.1.4", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "2391ed210a239868e7256eb6921b1bd83f3087b5" + "reference": "bfb30c2ad377615a463ebbc875eba64a99f6aa3e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/2391ed210a239868e7256eb6921b1bd83f3087b5", - "reference": "2391ed210a239868e7256eb6921b1bd83f3087b5", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/bfb30c2ad377615a463ebbc875eba64a99f6aa3e", + "reference": "bfb30c2ad377615a463ebbc875eba64a99f6aa3e", "shasum": "" }, "require": { @@ -2066,20 +2066,20 @@ ], "description": "Symfony EventDispatcher Component", "homepage": "https://symfony.com", - "time": "2018-04-06T07:35:57+00:00" + "time": "2018-07-26T09:10:45+00:00" }, { "name": "symfony/finder", - "version": "v4.1.1", + "version": "v4.1.4", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "84714b8417d19e4ba02ea78a41a975b3efaafddb" + "reference": "e162f1df3102d0b7472805a5a9d5db9fcf0a8068" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/84714b8417d19e4ba02ea78a41a975b3efaafddb", - "reference": "84714b8417d19e4ba02ea78a41a975b3efaafddb", + "url": "https://api.github.com/repos/symfony/finder/zipball/e162f1df3102d0b7472805a5a9d5db9fcf0a8068", + "reference": "e162f1df3102d0b7472805a5a9d5db9fcf0a8068", "shasum": "" }, "require": { @@ -2115,20 +2115,20 @@ ], "description": "Symfony Finder Component", "homepage": "https://symfony.com", - "time": "2018-06-19T21:38:16+00:00" + "time": "2018-07-26T11:24:31+00:00" }, { "name": "symfony/http-foundation", - "version": "v4.1.1", + "version": "v4.1.4", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "4f9c7cf962e635b0b26b14500ac046e07dbef7f3" + "reference": "3a5c91e133b220bb882b3cd773ba91bf39989345" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/4f9c7cf962e635b0b26b14500ac046e07dbef7f3", - "reference": "4f9c7cf962e635b0b26b14500ac046e07dbef7f3", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/3a5c91e133b220bb882b3cd773ba91bf39989345", + "reference": "3a5c91e133b220bb882b3cd773ba91bf39989345", "shasum": "" }, "require": { @@ -2169,20 +2169,20 @@ ], "description": "Symfony HttpFoundation Component", "homepage": "https://symfony.com", - "time": "2018-06-19T21:38:16+00:00" + "time": "2018-08-27T17:47:02+00:00" }, { "name": "symfony/http-kernel", - "version": "v4.1.1", + "version": "v4.1.4", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "29c094a1c4f8209b7e033f612cbbd69029e38955" + "reference": "33de0a1ff2e1720096189e3ced682d7a4e8f5e35" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/29c094a1c4f8209b7e033f612cbbd69029e38955", - "reference": "29c094a1c4f8209b7e033f612cbbd69029e38955", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/33de0a1ff2e1720096189e3ced682d7a4e8f5e35", + "reference": "33de0a1ff2e1720096189e3ced682d7a4e8f5e35", "shasum": "" }, "require": { @@ -2256,29 +2256,32 @@ ], "description": "Symfony HttpKernel Component", "homepage": "https://symfony.com", - "time": "2018-06-25T13:06:45+00:00" + "time": "2018-08-28T06:17:42+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.8.0", + "version": "v1.9.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "7cc359f1b7b80fc25ed7796be7d96adc9b354bae" + "reference": "e3d826245268269cd66f8326bd8bc066687b4a19" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/7cc359f1b7b80fc25ed7796be7d96adc9b354bae", - "reference": "7cc359f1b7b80fc25ed7796be7d96adc9b354bae", + "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" + }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.8-dev" + "dev-master": "1.9-dev" } }, "autoload": { @@ -2311,20 +2314,20 @@ "polyfill", "portable" ], - "time": "2018-04-30T19:57:29+00:00" + "time": "2018-08-06T14:22:27+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.8.0", + "version": "v1.9.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "3296adf6a6454a050679cde90f95350ad604b171" + "reference": "d0cd638f4634c16d8df4508e847f14e9e43168b8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/3296adf6a6454a050679cde90f95350ad604b171", - "reference": "3296adf6a6454a050679cde90f95350ad604b171", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/d0cd638f4634c16d8df4508e847f14e9e43168b8", + "reference": "d0cd638f4634c16d8df4508e847f14e9e43168b8", "shasum": "" }, "require": { @@ -2336,7 +2339,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.8-dev" + "dev-master": "1.9-dev" } }, "autoload": { @@ -2370,20 +2373,20 @@ "portable", "shim" ], - "time": "2018-04-26T10:06:28+00:00" + "time": "2018-08-06T14:22:27+00:00" }, { "name": "symfony/polyfill-php72", - "version": "v1.8.0", + "version": "v1.9.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "a4576e282d782ad82397f3e4ec1df8e0f0cafb46" + "reference": "95c50420b0baed23852452a7f0c7b527303ed5ae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/a4576e282d782ad82397f3e4ec1df8e0f0cafb46", - "reference": "a4576e282d782ad82397f3e4ec1df8e0f0cafb46", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/95c50420b0baed23852452a7f0c7b527303ed5ae", + "reference": "95c50420b0baed23852452a7f0c7b527303ed5ae", "shasum": "" }, "require": { @@ -2392,7 +2395,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.8-dev" + "dev-master": "1.9-dev" } }, "autoload": { @@ -2425,20 +2428,20 @@ "portable", "shim" ], - "time": "2018-04-26T10:06:28+00:00" + "time": "2018-08-06T14:22:27+00:00" }, { "name": "symfony/process", - "version": "v4.1.1", + "version": "v4.1.4", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "1d1677391ecf00d1c5b9482d6050c0c27aa3ac3a" + "reference": "86cdb930a6a855b0ab35fb60c1504cb36184f843" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/1d1677391ecf00d1c5b9482d6050c0c27aa3ac3a", - "reference": "1d1677391ecf00d1c5b9482d6050c0c27aa3ac3a", + "url": "https://api.github.com/repos/symfony/process/zipball/86cdb930a6a855b0ab35fb60c1504cb36184f843", + "reference": "86cdb930a6a855b0ab35fb60c1504cb36184f843", "shasum": "" }, "require": { @@ -2474,20 +2477,20 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com", - "time": "2018-05-31T10:17:53+00:00" + "time": "2018-08-03T11:13:38+00:00" }, { "name": "symfony/routing", - "version": "v4.1.1", + "version": "v4.1.4", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "b38b9797327b26ea2e4146a40e6e2dc9820a6932" + "reference": "a5784c2ec4168018c87b38f0e4f39d2278499f51" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/b38b9797327b26ea2e4146a40e6e2dc9820a6932", - "reference": "b38b9797327b26ea2e4146a40e6e2dc9820a6932", + "url": "https://api.github.com/repos/symfony/routing/zipball/a5784c2ec4168018c87b38f0e4f39d2278499f51", + "reference": "a5784c2ec4168018c87b38f0e4f39d2278499f51", "shasum": "" }, "require": { @@ -2551,20 +2554,20 @@ "uri", "url" ], - "time": "2018-06-19T21:38:16+00:00" + "time": "2018-08-03T07:58:40+00:00" }, { "name": "symfony/translation", - "version": "v4.1.1", + "version": "v4.1.4", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "b6d8164085ee0b6debcd1b7a131fd6f63bb04854" + "reference": "fa2182669f7983b7aa5f1a770d053f79f0ef144f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/b6d8164085ee0b6debcd1b7a131fd6f63bb04854", - "reference": "b6d8164085ee0b6debcd1b7a131fd6f63bb04854", + "url": "https://api.github.com/repos/symfony/translation/zipball/fa2182669f7983b7aa5f1a770d053f79f0ef144f", + "reference": "fa2182669f7983b7aa5f1a770d053f79f0ef144f", "shasum": "" }, "require": { @@ -2620,20 +2623,20 @@ ], "description": "Symfony Translation Component", "homepage": "https://symfony.com", - "time": "2018-06-22T08:59:39+00:00" + "time": "2018-08-07T12:45:11+00:00" }, { "name": "symfony/var-dumper", - "version": "v4.1.1", + "version": "v4.1.4", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "b2eebaec085d1f2cafbad7644733d494a3bbbc9b" + "reference": "a05426e27294bba7b0226ffc17dd01a3c6ef9777" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/b2eebaec085d1f2cafbad7644733d494a3bbbc9b", - "reference": "b2eebaec085d1f2cafbad7644733d494a3bbbc9b", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/a05426e27294bba7b0226ffc17dd01a3c6ef9777", + "reference": "a05426e27294bba7b0226ffc17dd01a3c6ef9777", "shasum": "" }, "require": { @@ -2695,7 +2698,7 @@ "debug", "dump" ], - "time": "2018-06-23T12:23:56+00:00" + "time": "2018-08-02T09:24:26+00:00" }, { "name": "tijsverkoyen/css-to-inline-styles", @@ -2746,16 +2749,16 @@ }, { "name": "vlucas/phpdotenv", - "version": "v2.5.0", + "version": "v2.5.1", "source": { "type": "git", "url": "https://github.com/vlucas/phpdotenv.git", - "reference": "6ae3e2e6494bb5e58c2decadafc3de7f1453f70a" + "reference": "8abb4f9aa89ddea9d52112c65bbe8d0125e2fa8e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/6ae3e2e6494bb5e58c2decadafc3de7f1453f70a", - "reference": "6ae3e2e6494bb5e58c2decadafc3de7f1453f70a", + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/8abb4f9aa89ddea9d52112c65bbe8d0125e2fa8e", + "reference": "8abb4f9aa89ddea9d52112c65bbe8d0125e2fa8e", "shasum": "" }, "require": { @@ -2792,20 +2795,20 @@ "env", "environment" ], - "time": "2018-07-01T10:25:50+00:00" + "time": "2018-07-29T20:33:41+00:00" }, { "name": "zendframework/zend-diactoros", - "version": "1.8.5", + "version": "1.8.6", "source": { "type": "git", "url": "https://github.com/zendframework/zend-diactoros.git", - "reference": "3e4edb822c942f37ade0d09579cfbab11e2fee87" + "reference": "20da13beba0dde8fb648be3cc19765732790f46e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-diactoros/zipball/3e4edb822c942f37ade0d09579cfbab11e2fee87", - "reference": "3e4edb822c942f37ade0d09579cfbab11e2fee87", + "url": "https://api.github.com/repos/zendframework/zend-diactoros/zipball/20da13beba0dde8fb648be3cc19765732790f46e", + "reference": "20da13beba0dde8fb648be3cc19765732790f46e", "shasum": "" }, "require": { @@ -2818,6 +2821,7 @@ "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" }, @@ -2855,7 +2859,7 @@ "psr", "psr-7" ], - "time": "2018-08-10T14:16:32+00:00" + "time": "2018-09-05T19:29:37+00:00" } ], "packages-dev": [ @@ -2915,16 +2919,16 @@ }, { "name": "filp/whoops", - "version": "2.2.0", + "version": "2.2.1", "source": { "type": "git", "url": "https://github.com/filp/whoops.git", - "reference": "181c4502d8f34db7aed7bfe88d4f87875b8e947a" + "reference": "e79cd403fb77fc8963a99ecc30e80ddd885b3311" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filp/whoops/zipball/181c4502d8f34db7aed7bfe88d4f87875b8e947a", - "reference": "181c4502d8f34db7aed7bfe88d4f87875b8e947a", + "url": "https://api.github.com/repos/filp/whoops/zipball/e79cd403fb77fc8963a99ecc30e80ddd885b3311", + "reference": "e79cd403fb77fc8963a99ecc30e80ddd885b3311", "shasum": "" }, "require": { @@ -2943,7 +2947,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.1-dev" + "dev-master": "2.2-dev" } }, "autoload": { @@ -2972,20 +2976,20 @@ "throwable", "whoops" ], - "time": "2018-03-03T17:56:25+00:00" + "time": "2018-06-30T13:14:06+00:00" }, { "name": "fzaninotto/faker", - "version": "v1.7.1", + "version": "v1.8.0", "source": { "type": "git", "url": "https://github.com/fzaninotto/Faker.git", - "reference": "d3ed4cc37051c1ca52d22d76b437d14809fc7e0d" + "reference": "f72816b43e74063c8b10357394b6bba8cb1c10de" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/fzaninotto/Faker/zipball/d3ed4cc37051c1ca52d22d76b437d14809fc7e0d", - "reference": "d3ed4cc37051c1ca52d22d76b437d14809fc7e0d", + "url": "https://api.github.com/repos/fzaninotto/Faker/zipball/f72816b43e74063c8b10357394b6bba8cb1c10de", + "reference": "f72816b43e74063c8b10357394b6bba8cb1c10de", "shasum": "" }, "require": { @@ -2993,7 +2997,7 @@ }, "require-dev": { "ext-intl": "*", - "phpunit/phpunit": "^4.0 || ^5.0", + "phpunit/phpunit": "^4.8.35 || ^5.7", "squizlabs/php_codesniffer": "^1.5" }, "type": "library", @@ -3022,7 +3026,7 @@ "faker", "fixtures" ], - "time": "2017-08-15T16:48:10+00:00" + "time": "2018-07-12T10:23:15+00:00" }, { "name": "hamcrest/hamcrest-php", @@ -3251,22 +3255,22 @@ }, { "name": "phar-io/manifest", - "version": "1.0.1", + "version": "1.0.3", "source": { "type": "git", "url": "https://github.com/phar-io/manifest.git", - "reference": "2df402786ab5368a0169091f61a7c1e0eb6852d0" + "reference": "7761fcacf03b4d4f16e7ccb606d4879ca431fcf4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/2df402786ab5368a0169091f61a7c1e0eb6852d0", - "reference": "2df402786ab5368a0169091f61a7c1e0eb6852d0", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/7761fcacf03b4d4f16e7ccb606d4879ca431fcf4", + "reference": "7761fcacf03b4d4f16e7ccb606d4879ca431fcf4", "shasum": "" }, "require": { "ext-dom": "*", "ext-phar": "*", - "phar-io/version": "^1.0.1", + "phar-io/version": "^2.0", "php": "^5.6 || ^7.0" }, "type": "library", @@ -3302,20 +3306,20 @@ } ], "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", - "time": "2017-03-05T18:14:27+00:00" + "time": "2018-07-08T19:23:20+00:00" }, { "name": "phar-io/version", - "version": "1.0.1", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/phar-io/version.git", - "reference": "a70c0ced4be299a63d32fa96d9281d03e94041df" + "reference": "45a2ec53a73c70ce41d55cedef9063630abaf1b6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/a70c0ced4be299a63d32fa96d9281d03e94041df", - "reference": "a70c0ced4be299a63d32fa96d9281d03e94041df", + "url": "https://api.github.com/repos/phar-io/version/zipball/45a2ec53a73c70ce41d55cedef9063630abaf1b6", + "reference": "45a2ec53a73c70ce41d55cedef9063630abaf1b6", "shasum": "" }, "require": { @@ -3349,7 +3353,7 @@ } ], "description": "Library for handling version information and constraints", - "time": "2017-03-05T17:38:23+00:00" + "time": "2018-07-08T19:19:57+00:00" }, { "name": "phpdocumentor/reflection-common", @@ -3505,16 +3509,16 @@ }, { "name": "phpspec/prophecy", - "version": "1.7.6", + "version": "1.8.0", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "33a7e3c4fda54e912ff6338c48823bd5c0f0b712" + "reference": "4ba436b55987b4bf311cb7c6ba82aa528aac0a06" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/33a7e3c4fda54e912ff6338c48823bd5c0f0b712", - "reference": "33a7e3c4fda54e912ff6338c48823bd5c0f0b712", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/4ba436b55987b4bf311cb7c6ba82aa528aac0a06", + "reference": "4ba436b55987b4bf311cb7c6ba82aa528aac0a06", "shasum": "" }, "require": { @@ -3526,12 +3530,12 @@ }, "require-dev": { "phpspec/phpspec": "^2.5|^3.2", - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5" + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.7.x-dev" + "dev-master": "1.8.x-dev" } }, "autoload": { @@ -3564,7 +3568,7 @@ "spy", "stub" ], - "time": "2018-04-18T13:57:24+00:00" + "time": "2018-08-05T17:53:17+00:00" }, { "name": "phpunit/php-code-coverage", @@ -3817,16 +3821,16 @@ }, { "name": "phpunit/phpunit", - "version": "7.2.6", + "version": "7.3.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "400a3836ee549ae6f665323ac3f21e27eac7155f" + "reference": "7b331efabbb628c518c408fdfcaf571156775de2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/400a3836ee549ae6f665323ac3f21e27eac7155f", - "reference": "400a3836ee549ae6f665323ac3f21e27eac7155f", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/7b331efabbb628c518c408fdfcaf571156775de2", + "reference": "7b331efabbb628c518c408fdfcaf571156775de2", "shasum": "" }, "require": { @@ -3837,8 +3841,8 @@ "ext-mbstring": "*", "ext-xml": "*", "myclabs/deep-copy": "^1.7", - "phar-io/manifest": "^1.0.1", - "phar-io/version": "^1.0", + "phar-io/manifest": "^1.0.2", + "phar-io/version": "^2.0", "php": "^7.1", "phpspec/prophecy": "^1.7", "phpunit/php-code-coverage": "^6.0.7", @@ -3871,7 +3875,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "7.2-dev" + "dev-master": "7.3-dev" } }, "autoload": { @@ -3897,7 +3901,7 @@ "testing", "xunit" ], - "time": "2018-06-21T13:13:39+00:00" + "time": "2018-09-08T15:14:29+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", @@ -3946,16 +3950,16 @@ }, { "name": "sebastian/comparator", - "version": "3.0.1", + "version": "3.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "591a30922f54656695e59b1f39501aec513403da" + "reference": "5de4fc177adf9bce8df98d8d141a7559d7ccf6da" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/591a30922f54656695e59b1f39501aec513403da", - "reference": "591a30922f54656695e59b1f39501aec513403da", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/5de4fc177adf9bce8df98d8d141a7559d7ccf6da", + "reference": "5de4fc177adf9bce8df98d8d141a7559d7ccf6da", "shasum": "" }, "require": { @@ -4006,7 +4010,7 @@ "compare", "equality" ], - "time": "2018-06-14T15:05:28+00:00" + "time": "2018-07-12T15:12:46+00:00" }, { "name": "sebastian/diff", diff --git a/install.sh b/install.sh new file mode 100644 index 00000000..9cd68e31 --- /dev/null +++ b/install.sh @@ -0,0 +1,6 @@ +#!/bin/bash +sudo composer update +sudo chmod -R 777 storage/ +sudo chmod -R 777 bootstrap/ +php artisan migrate +php artisan db:seed \ No newline at end of file diff --git a/vendor/bin/php-parse b/vendor/bin/php-parse deleted file mode 100644 index 5dd01ba1..00000000 --- a/vendor/bin/php-parse +++ /dev/null @@ -1,202 +0,0 @@ -#!/usr/bin/env php - [ - 'startLine', 'endLine', 'startFilePos', 'endFilePos', 'comments' -]]); -$parser = (new PhpParser\ParserFactory)->create( - PhpParser\ParserFactory::PREFER_PHP7, - $lexer -); -$dumper = new PhpParser\NodeDumper([ - 'dumpComments' => true, - 'dumpPositions' => $attributes['with-positions'], -]); -$prettyPrinter = new PhpParser\PrettyPrinter\Standard; - -$traverser = new PhpParser\NodeTraverser(); -$traverser->addVisitor(new PhpParser\NodeVisitor\NameResolver); - -foreach ($files as $file) { - if (strpos($file, ' Code $code\n"; - } else { - if (!file_exists($file)) { - die("File $file does not exist.\n"); - } - - $code = file_get_contents($file); - echo "====> File $file:\n"; - } - - if ($attributes['with-recovery']) { - $errorHandler = new PhpParser\ErrorHandler\Collecting; - $stmts = $parser->parse($code, $errorHandler); - foreach ($errorHandler->getErrors() as $error) { - $message = formatErrorMessage($error, $code, $attributes['with-column-info']); - echo $message . "\n"; - } - if (null === $stmts) { - continue; - } - } else { - try { - $stmts = $parser->parse($code); - } catch (PhpParser\Error $error) { - $message = formatErrorMessage($error, $code, $attributes['with-column-info']); - die($message . "\n"); - } - } - - foreach ($operations as $operation) { - if ('dump' === $operation) { - echo "==> Node dump:\n"; - echo $dumper->dump($stmts, $code), "\n"; - } elseif ('pretty-print' === $operation) { - echo "==> Pretty print:\n"; - echo $prettyPrinter->prettyPrintFile($stmts), "\n"; - } elseif ('json-dump' === $operation) { - echo "==> JSON dump:\n"; - echo json_encode($stmts, JSON_PRETTY_PRINT), "\n"; - } elseif ('var-dump' === $operation) { - echo "==> var_dump():\n"; - var_dump($stmts); - } elseif ('resolve-names' === $operation) { - echo "==> Resolved names.\n"; - $stmts = $traverser->traverse($stmts); - } - } -} - -function formatErrorMessage(PhpParser\Error $e, $code, $withColumnInfo) { - if ($withColumnInfo && $e->hasColumnInfo()) { - return $e->getMessageWithColumnInfo($code); - } else { - return $e->getMessage(); - } -} - -function showHelp($error = '') { - if ($error) { - echo $error . "\n\n"; - } - die(<< false, - 'with-positions' => false, - 'with-recovery' => false, - ]; - - array_shift($args); - $parseOptions = true; - foreach ($args as $arg) { - if (!$parseOptions) { - $files[] = $arg; - continue; - } - - switch ($arg) { - case '--dump': - case '-d': - $operations[] = 'dump'; - break; - case '--pretty-print': - case '-p': - $operations[] = 'pretty-print'; - break; - case '--json-dump': - case '-j': - $operations[] = 'json-dump'; - break; - case '--var-dump': - $operations[] = 'var-dump'; - break; - case '--resolve-names': - case '-N'; - $operations[] = 'resolve-names'; - break; - case '--with-column-info': - case '-c'; - $attributes['with-column-info'] = true; - break; - case '--with-positions': - case '-P': - $attributes['with-positions'] = true; - break; - case '--with-recovery': - case '-r': - $attributes['with-recovery'] = true; - break; - case '--help': - case '-h'; - showHelp(); - break; - case '--': - $parseOptions = false; - break; - default: - if ($arg[0] === '-') { - showHelp("Invalid operation $arg."); - } else { - $files[] = $arg; - } - } - } - - return [$operations, $files, $attributes]; -} diff --git a/vendor/bin/php-parse b/vendor/bin/php-parse new file mode 120000 index 00000000..062d66a3 --- /dev/null +++ b/vendor/bin/php-parse @@ -0,0 +1 @@ +../nikic/php-parser/bin/php-parse \ No newline at end of file diff --git a/vendor/bin/psysh b/vendor/bin/psysh deleted file mode 100644 index 7dbd203e..00000000 --- a/vendor/bin/psysh +++ /dev/null @@ -1,138 +0,0 @@ -#!/usr/bin/env php - $arg) { - if ($arg === '--cwd') { - if ($i >= count($argv) - 1) { - echo 'Missing --cwd argument.' . PHP_EOL; - exit(1); - } - $cwd = $argv[$i + 1]; - break; - } - - if (preg_match('/^--cwd=/', $arg)) { - $cwd = substr($arg, 6); - break; - } - } - - // Or fall back to the actual cwd - if (!isset($cwd)) { - $cwd = getcwd(); - } - - $cwd = str_replace('\\', '/', $cwd); - - $chunks = explode('/', $cwd); - while (!empty($chunks)) { - $path = implode('/', $chunks); - - // Find composer.json - if (is_file($path . '/composer.json')) { - if ($cfg = json_decode(file_get_contents($path . '/composer.json'), true)) { - if (isset($cfg['name']) && $cfg['name'] === 'psy/psysh') { - // We're inside the psysh project. Let's use the local - // Composer autoload. - if (is_file($path . '/vendor/autoload.php')) { - require $path . '/vendor/autoload.php'; - } - - return; - } - } - } - - // Or a composer.lock - if (is_file($path . '/composer.lock')) { - if ($cfg = json_decode(file_get_contents($path . '/composer.lock'), true)) { - foreach (array_merge($cfg['packages'], $cfg['packages-dev']) as $pkg) { - if (isset($pkg['name']) && $pkg['name'] === 'psy/psysh') { - // We're inside a project which requires psysh. We'll - // use the local Composer autoload. - if (is_file($path . '/vendor/autoload.php')) { - require $path . '/vendor/autoload.php'; - } - - return; - } - } - } - } - - array_pop($chunks); - } -}); - -// We didn't find an autoloader for a local version, so use the autoloader that -// came with this script. -if (!class_exists('Psy\Shell')) { -/* <<< */ - if (is_file(__DIR__ . '/../vendor/autoload.php')) { - require __DIR__ . '/../vendor/autoload.php'; - } elseif (is_file(__DIR__ . '/../../../autoload.php')) { - require __DIR__ . '/../../../autoload.php'; - } else { - echo 'PsySH dependencies not found, be sure to run `composer install`.' . PHP_EOL; - echo 'See https://getcomposer.org to get Composer.' . PHP_EOL; - exit(1); - } -/* >>> */ -} - -// If the psysh binary was included directly, assume they just wanted an -// autoloader and bail early. -// -// Keep this PHP 5.3 code around for a while in case someone is using a globally -// installed psysh as a bin launcher for older local versions. -if (version_compare(PHP_VERSION, '5.3.6', '<')) { - $trace = debug_backtrace(); -} elseif (version_compare(PHP_VERSION, '5.4.0', '<')) { - $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS); -} else { - $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 1); -} - -if (Psy\Shell::isIncluded($trace)) { - unset($trace); - - return; -} - -// Clean up after ourselves. -unset($trace); - -// If the local version is too old, we can't do this -if (!function_exists('Psy\bin')) { - $argv = $_SERVER['argv']; - $first = array_shift($argv); - if (preg_match('/php(\.exe)?$/', $first)) { - array_shift($argv); - } - array_unshift($argv, 'vendor/bin/psysh'); - - echo 'A local PsySH dependency was found, but it cannot be loaded. Please update to' . PHP_EOL; - echo 'the latest version, or run the local copy directly, e.g.:' . PHP_EOL; - echo PHP_EOL; - echo ' ' . implode(' ', $argv) . PHP_EOL; - exit(1); -} - -// And go! -call_user_func(Psy\bin()); diff --git a/vendor/bin/psysh b/vendor/bin/psysh new file mode 120000 index 00000000..3c06b1ae --- /dev/null +++ b/vendor/bin/psysh @@ -0,0 +1 @@ +../psy/psysh/bin/psysh \ No newline at end of file diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php index f03f6740..1a16f20a 100644 --- a/vendor/composer/autoload_classmap.php +++ b/vendor/composer/autoload_classmap.php @@ -18,7 +18,10 @@ return array( 'App\\Http\\Controllers\\CalendarController' => $baseDir . '/app/Http/Controllers/CalendarController.php', 'App\\Http\\Controllers\\ConfigController' => $baseDir . '/app/Http/Controllers/ConfigController.php', 'App\\Http\\Controllers\\Controller' => $baseDir . '/app/Http/Controllers/Controller.php', + 'App\\Http\\Controllers\\InventoryController' => $baseDir . '/app/Http/Controllers/InventoryController.php', + 'App\\Http\\Controllers\\ItemController' => $baseDir . '/app/Http/Controllers/ItemController.php', 'App\\Http\\Controllers\\JobController' => $baseDir . '/app/Http/Controllers/JobController.php', + 'App\\Http\\Controllers\\LocalController' => $baseDir . '/app/Http/Controllers/LocalController.php', 'App\\Http\\Controllers\\LogController' => $baseDir . '/app/Http/Controllers/LogController.php', 'App\\Http\\Controllers\\MessageController' => $baseDir . '/app/Http/Controllers/MessageController.php', 'App\\Http\\Controllers\\RankController' => $baseDir . '/app/Http/Controllers/RankController.php', @@ -169,6 +172,7 @@ return array( 'Faker\\Calculator\\Iban' => $vendorDir . '/fzaninotto/faker/src/Faker/Calculator/Iban.php', 'Faker\\Calculator\\Inn' => $vendorDir . '/fzaninotto/faker/src/Faker/Calculator/Inn.php', 'Faker\\Calculator\\Luhn' => $vendorDir . '/fzaninotto/faker/src/Faker/Calculator/Luhn.php', + 'Faker\\Calculator\\TCNo' => $vendorDir . '/fzaninotto/faker/src/Faker/Calculator/TCNo.php', 'Faker\\DefaultGenerator' => $vendorDir . '/fzaninotto/faker/src/Faker/DefaultGenerator.php', 'Faker\\Documentor' => $vendorDir . '/fzaninotto/faker/src/Faker/Documentor.php', 'Faker\\Factory' => $vendorDir . '/fzaninotto/faker/src/Faker/Factory.php', @@ -473,6 +477,12 @@ return array( 'Faker\\Provider\\me_ME\\PhoneNumber' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/me_ME/PhoneNumber.php', 'Faker\\Provider\\mn_MN\\Person' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/mn_MN/Person.php', 'Faker\\Provider\\mn_MN\\PhoneNumber' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/mn_MN/PhoneNumber.php', + 'Faker\\Provider\\ms_MY\\Address' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/ms_MY/Address.php', + 'Faker\\Provider\\ms_MY\\Company' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/ms_MY/Company.php', + 'Faker\\Provider\\ms_MY\\Miscellaneous' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/ms_MY/Miscellaneous.php', + 'Faker\\Provider\\ms_MY\\Payment' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/ms_MY/Payment.php', + 'Faker\\Provider\\ms_MY\\Person' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/ms_MY/Person.php', + 'Faker\\Provider\\ms_MY\\PhoneNumber' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/ms_MY/PhoneNumber.php', 'Faker\\Provider\\nb_NO\\Address' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/nb_NO/Address.php', 'Faker\\Provider\\nb_NO\\Company' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/nb_NO/Company.php', 'Faker\\Provider\\nb_NO\\Payment' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/nb_NO/Payment.php', @@ -538,6 +548,7 @@ return array( 'Faker\\Provider\\sk_SK\\Person' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/sk_SK/Person.php', 'Faker\\Provider\\sk_SK\\PhoneNumber' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/sk_SK/PhoneNumber.php', 'Faker\\Provider\\sl_SI\\Address' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/sl_SI/Address.php', + 'Faker\\Provider\\sl_SI\\Company' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/sl_SI/Company.php', 'Faker\\Provider\\sl_SI\\Internet' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/sl_SI/Internet.php', 'Faker\\Provider\\sl_SI\\Payment' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/sl_SI/Payment.php', 'Faker\\Provider\\sl_SI\\Person' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/sl_SI/Person.php', @@ -557,12 +568,14 @@ return array( 'Faker\\Provider\\sv_SE\\Person' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/sv_SE/Person.php', 'Faker\\Provider\\sv_SE\\PhoneNumber' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/sv_SE/PhoneNumber.php', 'Faker\\Provider\\th_TH\\Address' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/th_TH/Address.php', + 'Faker\\Provider\\th_TH\\Color' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/th_TH/Color.php', 'Faker\\Provider\\th_TH\\Company' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/th_TH/Company.php', 'Faker\\Provider\\th_TH\\Internet' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/th_TH/Internet.php', 'Faker\\Provider\\th_TH\\Payment' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/th_TH/Payment.php', 'Faker\\Provider\\th_TH\\PhoneNumber' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/th_TH/PhoneNumber.php', 'Faker\\Provider\\tr_TR\\Address' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/tr_TR/Address.php', 'Faker\\Provider\\tr_TR\\Color' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/tr_TR/Color.php', + 'Faker\\Provider\\tr_TR\\Company' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/tr_TR/Company.php', 'Faker\\Provider\\tr_TR\\DateTime' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/tr_TR/DateTime.php', 'Faker\\Provider\\tr_TR\\Internet' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/tr_TR/Internet.php', 'Faker\\Provider\\tr_TR\\Payment' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/tr_TR/Payment.php', @@ -572,10 +585,10 @@ return array( 'Faker\\Provider\\uk_UA\\Color' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/uk_UA/Color.php', 'Faker\\Provider\\uk_UA\\Company' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/uk_UA/Company.php', 'Faker\\Provider\\uk_UA\\Internet' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/uk_UA/Internet.php', + 'Faker\\Provider\\uk_UA\\Payment' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/uk_UA/Payment.php', 'Faker\\Provider\\uk_UA\\Person' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/uk_UA/Person.php', 'Faker\\Provider\\uk_UA\\PhoneNumber' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/uk_UA/PhoneNumber.php', 'Faker\\Provider\\uk_UA\\Text' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/uk_UA/Text.php', - 'Faker\\Provider\\uk_Ua\\Payment' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/uk_UA/Payment.php', 'Faker\\Provider\\vi_VN\\Address' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/vi_VN/Address.php', 'Faker\\Provider\\vi_VN\\Color' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/vi_VN/Color.php', 'Faker\\Provider\\vi_VN\\Internet' => $vendorDir . '/fzaninotto/faker/src/Faker/Provider/vi_VN/Internet.php', @@ -978,6 +991,7 @@ return array( 'Illuminate\\Database\\Console\\Migrations\\ResetCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Console/Migrations/ResetCommand.php', 'Illuminate\\Database\\Console\\Migrations\\RollbackCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Console/Migrations/RollbackCommand.php', 'Illuminate\\Database\\Console\\Migrations\\StatusCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Console/Migrations/StatusCommand.php', + 'Illuminate\\Database\\Console\\Migrations\\TableGuesser' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Console/Migrations/TableGuesser.php', 'Illuminate\\Database\\Console\\Seeds\\SeedCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Console/Seeds/SeedCommand.php', 'Illuminate\\Database\\Console\\Seeds\\SeederMakeCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Console/Seeds/SeederMakeCommand.php', 'Illuminate\\Database\\DatabaseManager' => $vendorDir . '/laravel/framework/src/Illuminate/Database/DatabaseManager.php', @@ -1495,6 +1509,7 @@ return array( 'Illuminate\\Validation\\Rules\\Exists' => $vendorDir . '/laravel/framework/src/Illuminate/Validation/Rules/Exists.php', 'Illuminate\\Validation\\Rules\\In' => $vendorDir . '/laravel/framework/src/Illuminate/Validation/Rules/In.php', 'Illuminate\\Validation\\Rules\\NotIn' => $vendorDir . '/laravel/framework/src/Illuminate/Validation/Rules/NotIn.php', + 'Illuminate\\Validation\\Rules\\RequiredIf' => $vendorDir . '/laravel/framework/src/Illuminate/Validation/Rules/RequiredIf.php', 'Illuminate\\Validation\\Rules\\Unique' => $vendorDir . '/laravel/framework/src/Illuminate/Validation/Rules/Unique.php', 'Illuminate\\Validation\\UnauthorizedException' => $vendorDir . '/laravel/framework/src/Illuminate/Validation/UnauthorizedException.php', 'Illuminate\\Validation\\ValidatesWhenResolvedTrait' => $vendorDir . '/laravel/framework/src/Illuminate/Validation/ValidatesWhenResolvedTrait.php', @@ -2066,10 +2081,14 @@ return array( 'PHPUnit\\Runner\\Filter\\IncludeGroupFilterIterator' => $vendorDir . '/phpunit/phpunit/src/Runner/Filter/IncludeGroupFilterIterator.php', 'PHPUnit\\Runner\\Filter\\NameFilterIterator' => $vendorDir . '/phpunit/phpunit/src/Runner/Filter/NameFilterIterator.php', 'PHPUnit\\Runner\\Hook' => $vendorDir . '/phpunit/phpunit/src/Runner/Hook/Hook.php', + 'PHPUnit\\Runner\\NullTestResultCache' => $vendorDir . '/phpunit/phpunit/src/Util/NullTestResultCache.php', 'PHPUnit\\Runner\\PhptTestCase' => $vendorDir . '/phpunit/phpunit/src/Runner/PhptTestCase.php', + 'PHPUnit\\Runner\\ResultCacheExtension' => $vendorDir . '/phpunit/phpunit/src/Runner/ResultCacheExtension.php', 'PHPUnit\\Runner\\StandardTestSuiteLoader' => $vendorDir . '/phpunit/phpunit/src/Runner/StandardTestSuiteLoader.php', 'PHPUnit\\Runner\\TestHook' => $vendorDir . '/phpunit/phpunit/src/Runner/Hook/TestHook.php', 'PHPUnit\\Runner\\TestListenerAdapter' => $vendorDir . '/phpunit/phpunit/src/Runner/Hook/TestListenerAdapter.php', + 'PHPUnit\\Runner\\TestResultCache' => $vendorDir . '/phpunit/phpunit/src/Util/TestResultCache.php', + 'PHPUnit\\Runner\\TestResultCacheInterface' => $vendorDir . '/phpunit/phpunit/src/Util/TestResultCacheInterface.php', 'PHPUnit\\Runner\\TestSuiteLoader' => $vendorDir . '/phpunit/phpunit/src/Runner/TestSuiteLoader.php', 'PHPUnit\\Runner\\TestSuiteSorter' => $vendorDir . '/phpunit/phpunit/src/Runner/TestSuiteSorter.php', 'PHPUnit\\Runner\\Version' => $vendorDir . '/phpunit/phpunit/src/Runner/Version.php', @@ -2329,20 +2348,21 @@ return array( 'PharIo\\Manifest\\RequiresElement' => $vendorDir . '/phar-io/manifest/src/xml/RequiresElement.php', 'PharIo\\Manifest\\Type' => $vendorDir . '/phar-io/manifest/src/values/Type.php', 'PharIo\\Manifest\\Url' => $vendorDir . '/phar-io/manifest/src/values/Url.php', - 'PharIo\\Version\\AbstractVersionConstraint' => $vendorDir . '/phar-io/version/src/AbstractVersionConstraint.php', - 'PharIo\\Version\\AndVersionConstraintGroup' => $vendorDir . '/phar-io/version/src/AndVersionConstraintGroup.php', - 'PharIo\\Version\\AnyVersionConstraint' => $vendorDir . '/phar-io/version/src/AnyVersionConstraint.php', - 'PharIo\\Version\\ExactVersionConstraint' => $vendorDir . '/phar-io/version/src/ExactVersionConstraint.php', - 'PharIo\\Version\\Exception' => $vendorDir . '/phar-io/version/src/Exception.php', - 'PharIo\\Version\\GreaterThanOrEqualToVersionConstraint' => $vendorDir . '/phar-io/version/src/GreaterThanOrEqualToVersionConstraint.php', - 'PharIo\\Version\\InvalidVersionException' => $vendorDir . '/phar-io/version/src/InvalidVersionException.php', - 'PharIo\\Version\\OrVersionConstraintGroup' => $vendorDir . '/phar-io/version/src/OrVersionConstraintGroup.php', + 'PharIo\\Version\\AbstractVersionConstraint' => $vendorDir . '/phar-io/version/src/constraints/AbstractVersionConstraint.php', + 'PharIo\\Version\\AndVersionConstraintGroup' => $vendorDir . '/phar-io/version/src/constraints/AndVersionConstraintGroup.php', + 'PharIo\\Version\\AnyVersionConstraint' => $vendorDir . '/phar-io/version/src/constraints/AnyVersionConstraint.php', + 'PharIo\\Version\\ExactVersionConstraint' => $vendorDir . '/phar-io/version/src/constraints/ExactVersionConstraint.php', + 'PharIo\\Version\\Exception' => $vendorDir . '/phar-io/version/src/exceptions/Exception.php', + 'PharIo\\Version\\GreaterThanOrEqualToVersionConstraint' => $vendorDir . '/phar-io/version/src/constraints/GreaterThanOrEqualToVersionConstraint.php', + 'PharIo\\Version\\InvalidPreReleaseSuffixException' => $vendorDir . '/phar-io/version/src/exceptions/InvalidPreReleaseSuffixException.php', + 'PharIo\\Version\\InvalidVersionException' => $vendorDir . '/phar-io/version/src/exceptions/InvalidVersionException.php', + 'PharIo\\Version\\OrVersionConstraintGroup' => $vendorDir . '/phar-io/version/src/constraints/OrVersionConstraintGroup.php', 'PharIo\\Version\\PreReleaseSuffix' => $vendorDir . '/phar-io/version/src/PreReleaseSuffix.php', - 'PharIo\\Version\\SpecificMajorAndMinorVersionConstraint' => $vendorDir . '/phar-io/version/src/SpecificMajorAndMinorVersionConstraint.php', - 'PharIo\\Version\\SpecificMajorVersionConstraint' => $vendorDir . '/phar-io/version/src/SpecificMajorVersionConstraint.php', - 'PharIo\\Version\\UnsupportedVersionConstraintException' => $vendorDir . '/phar-io/version/src/UnsupportedVersionConstraintException.php', + 'PharIo\\Version\\SpecificMajorAndMinorVersionConstraint' => $vendorDir . '/phar-io/version/src/constraints/SpecificMajorAndMinorVersionConstraint.php', + 'PharIo\\Version\\SpecificMajorVersionConstraint' => $vendorDir . '/phar-io/version/src/constraints/SpecificMajorVersionConstraint.php', + 'PharIo\\Version\\UnsupportedVersionConstraintException' => $vendorDir . '/phar-io/version/src/exceptions/UnsupportedVersionConstraintException.php', 'PharIo\\Version\\Version' => $vendorDir . '/phar-io/version/src/Version.php', - 'PharIo\\Version\\VersionConstraint' => $vendorDir . '/phar-io/version/src/VersionConstraint.php', + 'PharIo\\Version\\VersionConstraint' => $vendorDir . '/phar-io/version/src/constraints/VersionConstraint.php', 'PharIo\\Version\\VersionConstraintParser' => $vendorDir . '/phar-io/version/src/VersionConstraintParser.php', 'PharIo\\Version\\VersionConstraintValue' => $vendorDir . '/phar-io/version/src/VersionConstraintValue.php', 'PharIo\\Version\\VersionNumber' => $vendorDir . '/phar-io/version/src/VersionNumber.php', @@ -2590,6 +2610,7 @@ return array( 'Prophecy\\Doubler\\ClassPatch\\ProphecySubjectPatch' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ProphecySubjectPatch.php', 'Prophecy\\Doubler\\ClassPatch\\ReflectionClassNewInstancePatch' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ReflectionClassNewInstancePatch.php', 'Prophecy\\Doubler\\ClassPatch\\SplFileInfoPatch' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/SplFileInfoPatch.php', + 'Prophecy\\Doubler\\ClassPatch\\ThrowablePatch' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ThrowablePatch.php', 'Prophecy\\Doubler\\ClassPatch\\TraversablePatch' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/TraversablePatch.php', 'Prophecy\\Doubler\\DoubleInterface' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Doubler/DoubleInterface.php', 'Prophecy\\Doubler\\Doubler' => $vendorDir . '/phpspec/prophecy/src/Prophecy/Doubler/Doubler.php', @@ -3319,6 +3340,7 @@ return array( 'Symfony\\Component\\HttpKernel\\HttpCache\\Ssi' => $vendorDir . '/symfony/http-kernel/HttpCache/Ssi.php', 'Symfony\\Component\\HttpKernel\\HttpCache\\Store' => $vendorDir . '/symfony/http-kernel/HttpCache/Store.php', '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\\HttpKernel' => $vendorDir . '/symfony/http-kernel/HttpKernel.php', 'Symfony\\Component\\HttpKernel\\HttpKernelInterface' => $vendorDir . '/symfony/http-kernel/HttpKernelInterface.php', diff --git a/vendor/composer/autoload_files.php b/vendor/composer/autoload_files.php index 14ee1691..1c513d8c 100644 --- a/vendor/composer/autoload_files.php +++ b/vendor/composer/autoload_files.php @@ -13,7 +13,6 @@ return array( '2c102faa651ef8ea5874edb585946bce' => $vendorDir . '/swiftmailer/swiftmailer/lib/swift_required.php', 'c964ee0ededf28c96ebd9db5099ef910' => $vendorDir . '/guzzlehttp/promises/src/functions_include.php', 'a0edc8309cc5e1d60e3047b5df6b7052' => $vendorDir . '/guzzlehttp/psr7/src/functions_include.php', - '5255c38a0faeba867671b61dfda6d864' => $vendorDir . '/paragonie/random_compat/lib/random.php', '37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php', 'f0906e6318348a765ffb6eb24e0d0938' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/helpers.php', '58571171fd5812e6e447dce228f52f4d' => $vendorDir . '/laravel/framework/src/Illuminate/Support/helpers.php', diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index ffcf0989..445d51fd 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -14,7 +14,6 @@ class ComposerStaticInit7aa8410dad307922e6e62bcfdfadda15 '2c102faa651ef8ea5874edb585946bce' => __DIR__ . '/..' . '/swiftmailer/swiftmailer/lib/swift_required.php', 'c964ee0ededf28c96ebd9db5099ef910' => __DIR__ . '/..' . '/guzzlehttp/promises/src/functions_include.php', 'a0edc8309cc5e1d60e3047b5df6b7052' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/functions_include.php', - '5255c38a0faeba867671b61dfda6d864' => __DIR__ . '/..' . '/paragonie/random_compat/lib/random.php', '37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php', 'f0906e6318348a765ffb6eb24e0d0938' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/helpers.php', '58571171fd5812e6e447dce228f52f4d' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Support/helpers.php', @@ -402,7 +401,10 @@ class ComposerStaticInit7aa8410dad307922e6e62bcfdfadda15 'App\\Http\\Controllers\\CalendarController' => __DIR__ . '/../..' . '/app/Http/Controllers/CalendarController.php', 'App\\Http\\Controllers\\ConfigController' => __DIR__ . '/../..' . '/app/Http/Controllers/ConfigController.php', 'App\\Http\\Controllers\\Controller' => __DIR__ . '/../..' . '/app/Http/Controllers/Controller.php', + 'App\\Http\\Controllers\\InventoryController' => __DIR__ . '/../..' . '/app/Http/Controllers/InventoryController.php', + 'App\\Http\\Controllers\\ItemController' => __DIR__ . '/../..' . '/app/Http/Controllers/ItemController.php', 'App\\Http\\Controllers\\JobController' => __DIR__ . '/../..' . '/app/Http/Controllers/JobController.php', + 'App\\Http\\Controllers\\LocalController' => __DIR__ . '/../..' . '/app/Http/Controllers/LocalController.php', 'App\\Http\\Controllers\\LogController' => __DIR__ . '/../..' . '/app/Http/Controllers/LogController.php', 'App\\Http\\Controllers\\MessageController' => __DIR__ . '/../..' . '/app/Http/Controllers/MessageController.php', 'App\\Http\\Controllers\\RankController' => __DIR__ . '/../..' . '/app/Http/Controllers/RankController.php', @@ -553,6 +555,7 @@ class ComposerStaticInit7aa8410dad307922e6e62bcfdfadda15 'Faker\\Calculator\\Iban' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Calculator/Iban.php', 'Faker\\Calculator\\Inn' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Calculator/Inn.php', 'Faker\\Calculator\\Luhn' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Calculator/Luhn.php', + 'Faker\\Calculator\\TCNo' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Calculator/TCNo.php', 'Faker\\DefaultGenerator' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/DefaultGenerator.php', 'Faker\\Documentor' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Documentor.php', 'Faker\\Factory' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Factory.php', @@ -857,6 +860,12 @@ class ComposerStaticInit7aa8410dad307922e6e62bcfdfadda15 'Faker\\Provider\\me_ME\\PhoneNumber' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/me_ME/PhoneNumber.php', 'Faker\\Provider\\mn_MN\\Person' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/mn_MN/Person.php', 'Faker\\Provider\\mn_MN\\PhoneNumber' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/mn_MN/PhoneNumber.php', + 'Faker\\Provider\\ms_MY\\Address' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/ms_MY/Address.php', + 'Faker\\Provider\\ms_MY\\Company' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/ms_MY/Company.php', + 'Faker\\Provider\\ms_MY\\Miscellaneous' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/ms_MY/Miscellaneous.php', + 'Faker\\Provider\\ms_MY\\Payment' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/ms_MY/Payment.php', + 'Faker\\Provider\\ms_MY\\Person' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/ms_MY/Person.php', + 'Faker\\Provider\\ms_MY\\PhoneNumber' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/ms_MY/PhoneNumber.php', 'Faker\\Provider\\nb_NO\\Address' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/nb_NO/Address.php', 'Faker\\Provider\\nb_NO\\Company' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/nb_NO/Company.php', 'Faker\\Provider\\nb_NO\\Payment' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/nb_NO/Payment.php', @@ -922,6 +931,7 @@ class ComposerStaticInit7aa8410dad307922e6e62bcfdfadda15 'Faker\\Provider\\sk_SK\\Person' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/sk_SK/Person.php', 'Faker\\Provider\\sk_SK\\PhoneNumber' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/sk_SK/PhoneNumber.php', 'Faker\\Provider\\sl_SI\\Address' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/sl_SI/Address.php', + 'Faker\\Provider\\sl_SI\\Company' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/sl_SI/Company.php', 'Faker\\Provider\\sl_SI\\Internet' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/sl_SI/Internet.php', 'Faker\\Provider\\sl_SI\\Payment' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/sl_SI/Payment.php', 'Faker\\Provider\\sl_SI\\Person' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/sl_SI/Person.php', @@ -941,12 +951,14 @@ class ComposerStaticInit7aa8410dad307922e6e62bcfdfadda15 'Faker\\Provider\\sv_SE\\Person' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/sv_SE/Person.php', 'Faker\\Provider\\sv_SE\\PhoneNumber' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/sv_SE/PhoneNumber.php', 'Faker\\Provider\\th_TH\\Address' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/th_TH/Address.php', + 'Faker\\Provider\\th_TH\\Color' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/th_TH/Color.php', 'Faker\\Provider\\th_TH\\Company' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/th_TH/Company.php', 'Faker\\Provider\\th_TH\\Internet' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/th_TH/Internet.php', 'Faker\\Provider\\th_TH\\Payment' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/th_TH/Payment.php', 'Faker\\Provider\\th_TH\\PhoneNumber' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/th_TH/PhoneNumber.php', 'Faker\\Provider\\tr_TR\\Address' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/tr_TR/Address.php', 'Faker\\Provider\\tr_TR\\Color' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/tr_TR/Color.php', + 'Faker\\Provider\\tr_TR\\Company' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/tr_TR/Company.php', 'Faker\\Provider\\tr_TR\\DateTime' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/tr_TR/DateTime.php', 'Faker\\Provider\\tr_TR\\Internet' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/tr_TR/Internet.php', 'Faker\\Provider\\tr_TR\\Payment' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/tr_TR/Payment.php', @@ -956,10 +968,10 @@ class ComposerStaticInit7aa8410dad307922e6e62bcfdfadda15 'Faker\\Provider\\uk_UA\\Color' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/uk_UA/Color.php', 'Faker\\Provider\\uk_UA\\Company' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/uk_UA/Company.php', 'Faker\\Provider\\uk_UA\\Internet' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/uk_UA/Internet.php', + 'Faker\\Provider\\uk_UA\\Payment' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/uk_UA/Payment.php', 'Faker\\Provider\\uk_UA\\Person' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/uk_UA/Person.php', 'Faker\\Provider\\uk_UA\\PhoneNumber' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/uk_UA/PhoneNumber.php', 'Faker\\Provider\\uk_UA\\Text' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/uk_UA/Text.php', - 'Faker\\Provider\\uk_Ua\\Payment' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/uk_UA/Payment.php', 'Faker\\Provider\\vi_VN\\Address' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/vi_VN/Address.php', 'Faker\\Provider\\vi_VN\\Color' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/vi_VN/Color.php', 'Faker\\Provider\\vi_VN\\Internet' => __DIR__ . '/..' . '/fzaninotto/faker/src/Faker/Provider/vi_VN/Internet.php', @@ -1362,6 +1374,7 @@ class ComposerStaticInit7aa8410dad307922e6e62bcfdfadda15 'Illuminate\\Database\\Console\\Migrations\\ResetCommand' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Console/Migrations/ResetCommand.php', 'Illuminate\\Database\\Console\\Migrations\\RollbackCommand' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Console/Migrations/RollbackCommand.php', 'Illuminate\\Database\\Console\\Migrations\\StatusCommand' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Console/Migrations/StatusCommand.php', + 'Illuminate\\Database\\Console\\Migrations\\TableGuesser' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Console/Migrations/TableGuesser.php', 'Illuminate\\Database\\Console\\Seeds\\SeedCommand' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Console/Seeds/SeedCommand.php', 'Illuminate\\Database\\Console\\Seeds\\SeederMakeCommand' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Console/Seeds/SeederMakeCommand.php', 'Illuminate\\Database\\DatabaseManager' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/DatabaseManager.php', @@ -1879,6 +1892,7 @@ class ComposerStaticInit7aa8410dad307922e6e62bcfdfadda15 'Illuminate\\Validation\\Rules\\Exists' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Validation/Rules/Exists.php', 'Illuminate\\Validation\\Rules\\In' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Validation/Rules/In.php', 'Illuminate\\Validation\\Rules\\NotIn' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Validation/Rules/NotIn.php', + 'Illuminate\\Validation\\Rules\\RequiredIf' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Validation/Rules/RequiredIf.php', 'Illuminate\\Validation\\Rules\\Unique' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Validation/Rules/Unique.php', 'Illuminate\\Validation\\UnauthorizedException' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Validation/UnauthorizedException.php', 'Illuminate\\Validation\\ValidatesWhenResolvedTrait' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Validation/ValidatesWhenResolvedTrait.php', @@ -2450,10 +2464,14 @@ class ComposerStaticInit7aa8410dad307922e6e62bcfdfadda15 'PHPUnit\\Runner\\Filter\\IncludeGroupFilterIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Filter/IncludeGroupFilterIterator.php', 'PHPUnit\\Runner\\Filter\\NameFilterIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Filter/NameFilterIterator.php', 'PHPUnit\\Runner\\Hook' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Hook/Hook.php', + 'PHPUnit\\Runner\\NullTestResultCache' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/NullTestResultCache.php', 'PHPUnit\\Runner\\PhptTestCase' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/PhptTestCase.php', + 'PHPUnit\\Runner\\ResultCacheExtension' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/ResultCacheExtension.php', 'PHPUnit\\Runner\\StandardTestSuiteLoader' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/StandardTestSuiteLoader.php', 'PHPUnit\\Runner\\TestHook' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Hook/TestHook.php', 'PHPUnit\\Runner\\TestListenerAdapter' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Hook/TestListenerAdapter.php', + 'PHPUnit\\Runner\\TestResultCache' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/TestResultCache.php', + 'PHPUnit\\Runner\\TestResultCacheInterface' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/TestResultCacheInterface.php', 'PHPUnit\\Runner\\TestSuiteLoader' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/TestSuiteLoader.php', 'PHPUnit\\Runner\\TestSuiteSorter' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/TestSuiteSorter.php', 'PHPUnit\\Runner\\Version' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Version.php', @@ -2713,20 +2731,21 @@ class ComposerStaticInit7aa8410dad307922e6e62bcfdfadda15 'PharIo\\Manifest\\RequiresElement' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/RequiresElement.php', 'PharIo\\Manifest\\Type' => __DIR__ . '/..' . '/phar-io/manifest/src/values/Type.php', 'PharIo\\Manifest\\Url' => __DIR__ . '/..' . '/phar-io/manifest/src/values/Url.php', - 'PharIo\\Version\\AbstractVersionConstraint' => __DIR__ . '/..' . '/phar-io/version/src/AbstractVersionConstraint.php', - 'PharIo\\Version\\AndVersionConstraintGroup' => __DIR__ . '/..' . '/phar-io/version/src/AndVersionConstraintGroup.php', - 'PharIo\\Version\\AnyVersionConstraint' => __DIR__ . '/..' . '/phar-io/version/src/AnyVersionConstraint.php', - 'PharIo\\Version\\ExactVersionConstraint' => __DIR__ . '/..' . '/phar-io/version/src/ExactVersionConstraint.php', - 'PharIo\\Version\\Exception' => __DIR__ . '/..' . '/phar-io/version/src/Exception.php', - 'PharIo\\Version\\GreaterThanOrEqualToVersionConstraint' => __DIR__ . '/..' . '/phar-io/version/src/GreaterThanOrEqualToVersionConstraint.php', - 'PharIo\\Version\\InvalidVersionException' => __DIR__ . '/..' . '/phar-io/version/src/InvalidVersionException.php', - 'PharIo\\Version\\OrVersionConstraintGroup' => __DIR__ . '/..' . '/phar-io/version/src/OrVersionConstraintGroup.php', + 'PharIo\\Version\\AbstractVersionConstraint' => __DIR__ . '/..' . '/phar-io/version/src/constraints/AbstractVersionConstraint.php', + 'PharIo\\Version\\AndVersionConstraintGroup' => __DIR__ . '/..' . '/phar-io/version/src/constraints/AndVersionConstraintGroup.php', + 'PharIo\\Version\\AnyVersionConstraint' => __DIR__ . '/..' . '/phar-io/version/src/constraints/AnyVersionConstraint.php', + 'PharIo\\Version\\ExactVersionConstraint' => __DIR__ . '/..' . '/phar-io/version/src/constraints/ExactVersionConstraint.php', + 'PharIo\\Version\\Exception' => __DIR__ . '/..' . '/phar-io/version/src/exceptions/Exception.php', + 'PharIo\\Version\\GreaterThanOrEqualToVersionConstraint' => __DIR__ . '/..' . '/phar-io/version/src/constraints/GreaterThanOrEqualToVersionConstraint.php', + 'PharIo\\Version\\InvalidPreReleaseSuffixException' => __DIR__ . '/..' . '/phar-io/version/src/exceptions/InvalidPreReleaseSuffixException.php', + 'PharIo\\Version\\InvalidVersionException' => __DIR__ . '/..' . '/phar-io/version/src/exceptions/InvalidVersionException.php', + 'PharIo\\Version\\OrVersionConstraintGroup' => __DIR__ . '/..' . '/phar-io/version/src/constraints/OrVersionConstraintGroup.php', 'PharIo\\Version\\PreReleaseSuffix' => __DIR__ . '/..' . '/phar-io/version/src/PreReleaseSuffix.php', - 'PharIo\\Version\\SpecificMajorAndMinorVersionConstraint' => __DIR__ . '/..' . '/phar-io/version/src/SpecificMajorAndMinorVersionConstraint.php', - 'PharIo\\Version\\SpecificMajorVersionConstraint' => __DIR__ . '/..' . '/phar-io/version/src/SpecificMajorVersionConstraint.php', - 'PharIo\\Version\\UnsupportedVersionConstraintException' => __DIR__ . '/..' . '/phar-io/version/src/UnsupportedVersionConstraintException.php', + 'PharIo\\Version\\SpecificMajorAndMinorVersionConstraint' => __DIR__ . '/..' . '/phar-io/version/src/constraints/SpecificMajorAndMinorVersionConstraint.php', + 'PharIo\\Version\\SpecificMajorVersionConstraint' => __DIR__ . '/..' . '/phar-io/version/src/constraints/SpecificMajorVersionConstraint.php', + 'PharIo\\Version\\UnsupportedVersionConstraintException' => __DIR__ . '/..' . '/phar-io/version/src/exceptions/UnsupportedVersionConstraintException.php', 'PharIo\\Version\\Version' => __DIR__ . '/..' . '/phar-io/version/src/Version.php', - 'PharIo\\Version\\VersionConstraint' => __DIR__ . '/..' . '/phar-io/version/src/VersionConstraint.php', + 'PharIo\\Version\\VersionConstraint' => __DIR__ . '/..' . '/phar-io/version/src/constraints/VersionConstraint.php', 'PharIo\\Version\\VersionConstraintParser' => __DIR__ . '/..' . '/phar-io/version/src/VersionConstraintParser.php', 'PharIo\\Version\\VersionConstraintValue' => __DIR__ . '/..' . '/phar-io/version/src/VersionConstraintValue.php', 'PharIo\\Version\\VersionNumber' => __DIR__ . '/..' . '/phar-io/version/src/VersionNumber.php', @@ -2974,6 +2993,7 @@ class ComposerStaticInit7aa8410dad307922e6e62bcfdfadda15 'Prophecy\\Doubler\\ClassPatch\\ProphecySubjectPatch' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ProphecySubjectPatch.php', 'Prophecy\\Doubler\\ClassPatch\\ReflectionClassNewInstancePatch' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ReflectionClassNewInstancePatch.php', 'Prophecy\\Doubler\\ClassPatch\\SplFileInfoPatch' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/SplFileInfoPatch.php', + 'Prophecy\\Doubler\\ClassPatch\\ThrowablePatch' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ThrowablePatch.php', 'Prophecy\\Doubler\\ClassPatch\\TraversablePatch' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/TraversablePatch.php', 'Prophecy\\Doubler\\DoubleInterface' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Doubler/DoubleInterface.php', 'Prophecy\\Doubler\\Doubler' => __DIR__ . '/..' . '/phpspec/prophecy/src/Prophecy/Doubler/Doubler.php', @@ -3703,6 +3723,7 @@ class ComposerStaticInit7aa8410dad307922e6e62bcfdfadda15 'Symfony\\Component\\HttpKernel\\HttpCache\\Ssi' => __DIR__ . '/..' . '/symfony/http-kernel/HttpCache/Ssi.php', 'Symfony\\Component\\HttpKernel\\HttpCache\\Store' => __DIR__ . '/..' . '/symfony/http-kernel/HttpCache/Store.php', '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\\HttpKernel' => __DIR__ . '/..' . '/symfony/http-kernel/HttpKernel.php', 'Symfony\\Component\\HttpKernel\\HttpKernelInterface' => __DIR__ . '/..' . '/symfony/http-kernel/HttpKernelInterface.php', diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index 333971fd..4e6535e7 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -268,17 +268,17 @@ }, { "name": "egulias/email-validator", - "version": "2.1.4", - "version_normalized": "2.1.4.0", + "version": "2.1.5", + "version_normalized": "2.1.5.0", "source": { "type": "git", "url": "https://github.com/egulias/EmailValidator.git", - "reference": "8790f594151ca6a2010c6218e09d96df67173ad3" + "reference": "54859fabea8b3beecbb1a282888d5c990036b9e3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/8790f594151ca6a2010c6218e09d96df67173ad3", - "reference": "8790f594151ca6a2010c6218e09d96df67173ad3", + "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/54859fabea8b3beecbb1a282888d5c990036b9e3", + "reference": "54859fabea8b3beecbb1a282888d5c990036b9e3", "shasum": "" }, "require": { @@ -293,7 +293,7 @@ "suggest": { "ext-intl": "PHP Internationalization Libraries are required to use the SpoofChecking validation" }, - "time": "2018-04-10T10:11:19+00:00", + "time": "2018-08-16T20:49:45+00:00", "type": "library", "extra": { "branch-alias": { @@ -431,17 +431,17 @@ }, { "name": "filp/whoops", - "version": "2.2.0", - "version_normalized": "2.2.0.0", + "version": "2.2.1", + "version_normalized": "2.2.1.0", "source": { "type": "git", "url": "https://github.com/filp/whoops.git", - "reference": "181c4502d8f34db7aed7bfe88d4f87875b8e947a" + "reference": "e79cd403fb77fc8963a99ecc30e80ddd885b3311" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filp/whoops/zipball/181c4502d8f34db7aed7bfe88d4f87875b8e947a", - "reference": "181c4502d8f34db7aed7bfe88d4f87875b8e947a", + "url": "https://api.github.com/repos/filp/whoops/zipball/e79cd403fb77fc8963a99ecc30e80ddd885b3311", + "reference": "e79cd403fb77fc8963a99ecc30e80ddd885b3311", "shasum": "" }, "require": { @@ -457,11 +457,11 @@ "symfony/var-dumper": "Pretty print complex values better with var-dumper available", "whoops/soap": "Formats errors as SOAP responses" }, - "time": "2018-03-03T17:56:25+00:00", + "time": "2018-06-30T13:14:06+00:00", "type": "library", "extra": { "branch-alias": { - "dev-master": "2.1-dev" + "dev-master": "2.2-dev" } }, "installation-source": "dist", @@ -494,17 +494,17 @@ }, { "name": "fzaninotto/faker", - "version": "v1.7.1", - "version_normalized": "1.7.1.0", + "version": "v1.8.0", + "version_normalized": "1.8.0.0", "source": { "type": "git", "url": "https://github.com/fzaninotto/Faker.git", - "reference": "d3ed4cc37051c1ca52d22d76b437d14809fc7e0d" + "reference": "f72816b43e74063c8b10357394b6bba8cb1c10de" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/fzaninotto/Faker/zipball/d3ed4cc37051c1ca52d22d76b437d14809fc7e0d", - "reference": "d3ed4cc37051c1ca52d22d76b437d14809fc7e0d", + "url": "https://api.github.com/repos/fzaninotto/Faker/zipball/f72816b43e74063c8b10357394b6bba8cb1c10de", + "reference": "f72816b43e74063c8b10357394b6bba8cb1c10de", "shasum": "" }, "require": { @@ -512,10 +512,10 @@ }, "require-dev": { "ext-intl": "*", - "phpunit/phpunit": "^4.0 || ^5.0", + "phpunit/phpunit": "^4.8.35 || ^5.7", "squizlabs/php_codesniffer": "^1.5" }, - "time": "2017-08-15T16:48:10+00:00", + "time": "2018-07-12T10:23:15+00:00", "type": "library", "extra": { "branch-alias": { @@ -874,17 +874,17 @@ }, { "name": "laravel/framework", - "version": "v5.6.26", - "version_normalized": "5.6.26.0", + "version": "v5.6.38", + "version_normalized": "5.6.38.0", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "7047df295e77cecb6a2f84736a732af66cc6789c" + "reference": "38d838bab9434af79e8ab274ae63f52f7ed45d6e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/7047df295e77cecb6a2f84736a732af66cc6789c", - "reference": "7047df295e77cecb6a2f84736a732af66cc6789c", + "url": "https://api.github.com/repos/laravel/framework/zipball/38d838bab9434af79e8ab274ae63f52f7ed45d6e", + "reference": "38d838bab9434af79e8ab274ae63f52f7ed45d6e", "shasum": "" }, "require": { @@ -979,7 +979,7 @@ "symfony/dom-crawler": "Required to use most of the crawler integration testing tools (~4.0).", "symfony/psr-http-message-bridge": "Required to psr7 bridging features (~1.0)." }, - "time": "2018-06-20T14:21:11+00:00", + "time": "2018-09-04T13:15:09+00:00", "type": "library", "extra": { "branch-alias": { @@ -1140,17 +1140,17 @@ }, { "name": "league/flysystem", - "version": "1.0.45", - "version_normalized": "1.0.45.0", + "version": "1.0.46", + "version_normalized": "1.0.46.0", "source": { "type": "git", "url": "https://github.com/thephpleague/flysystem.git", - "reference": "a99f94e63b512d75f851b181afcdf0ee9ebef7e6" + "reference": "f3e0d925c18b92cf3ce84ea5cc58d62a1762a2b2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/a99f94e63b512d75f851b181afcdf0ee9ebef7e6", - "reference": "a99f94e63b512d75f851b181afcdf0ee9ebef7e6", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/f3e0d925c18b92cf3ce84ea5cc58d62a1762a2b2", + "reference": "f3e0d925c18b92cf3ce84ea5cc58d62a1762a2b2", "shasum": "" }, "require": { @@ -1162,7 +1162,7 @@ "require-dev": { "ext-fileinfo": "*", "phpspec/phpspec": "^3.4", - "phpunit/phpunit": "^5.7" + "phpunit/phpunit": "^5.7.10" }, "suggest": { "ext-fileinfo": "Required for MimeType", @@ -1180,7 +1180,7 @@ "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-05-07T08:44:23+00:00", + "time": "2018-08-22T07:45:22+00:00", "type": "library", "extra": { "branch-alias": { @@ -1529,17 +1529,17 @@ }, { "name": "nikic/php-parser", - "version": "v4.0.2", - "version_normalized": "4.0.2.0", + "version": "v4.0.3", + "version_normalized": "4.0.3.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "35b8caf75e791ba1b2d24fec1552168d72692b12" + "reference": "bd088dc940a418f09cda079a9b5c7c478890fb8d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/35b8caf75e791ba1b2d24fec1552168d72692b12", - "reference": "35b8caf75e791ba1b2d24fec1552168d72692b12", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/bd088dc940a418f09cda079a9b5c7c478890fb8d", + "reference": "bd088dc940a418f09cda079a9b5c7c478890fb8d", "shasum": "" }, "require": { @@ -1549,7 +1549,7 @@ "require-dev": { "phpunit/phpunit": "^6.5 || ^7.0" }, - "time": "2018-06-03T11:33:10+00:00", + "time": "2018-07-15T17:25:16+00:00", "bin": [ "bin/php-parse" ], @@ -1647,36 +1647,32 @@ }, { "name": "paragonie/random_compat", - "version": "v2.0.17", - "version_normalized": "2.0.17.0", + "version": "v9.99.99", + "version_normalized": "9.99.99.0", "source": { "type": "git", "url": "https://github.com/paragonie/random_compat.git", - "reference": "29af24f25bab834fcbb38ad2a69fa93b867e070d" + "reference": "84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paragonie/random_compat/zipball/29af24f25bab834fcbb38ad2a69fa93b867e070d", - "reference": "29af24f25bab834fcbb38ad2a69fa93b867e070d", + "url": "https://api.github.com/repos/paragonie/random_compat/zipball/84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95", + "reference": "84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95", "shasum": "" }, "require": { - "php": ">=5.2.0" + "php": "^7" }, "require-dev": { - "phpunit/phpunit": "4.*|5.*" + "phpunit/phpunit": "4.*|5.*", + "vimeo/psalm": "^1" }, "suggest": { "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." }, - "time": "2018-07-04T16:31:37+00:00", + "time": "2018-07-02T15:55:56+00:00", "type": "library", "installation-source": "dist", - "autoload": { - "files": [ - "lib/random.php" - ] - }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" @@ -1698,26 +1694,26 @@ }, { "name": "phar-io/manifest", - "version": "1.0.1", - "version_normalized": "1.0.1.0", + "version": "1.0.3", + "version_normalized": "1.0.3.0", "source": { "type": "git", "url": "https://github.com/phar-io/manifest.git", - "reference": "2df402786ab5368a0169091f61a7c1e0eb6852d0" + "reference": "7761fcacf03b4d4f16e7ccb606d4879ca431fcf4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/2df402786ab5368a0169091f61a7c1e0eb6852d0", - "reference": "2df402786ab5368a0169091f61a7c1e0eb6852d0", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/7761fcacf03b4d4f16e7ccb606d4879ca431fcf4", + "reference": "7761fcacf03b4d4f16e7ccb606d4879ca431fcf4", "shasum": "" }, "require": { "ext-dom": "*", "ext-phar": "*", - "phar-io/version": "^1.0.1", + "phar-io/version": "^2.0", "php": "^5.6 || ^7.0" }, - "time": "2017-03-05T18:14:27+00:00", + "time": "2018-07-08T19:23:20+00:00", "type": "library", "extra": { "branch-alias": { @@ -1755,23 +1751,23 @@ }, { "name": "phar-io/version", - "version": "1.0.1", - "version_normalized": "1.0.1.0", + "version": "2.0.1", + "version_normalized": "2.0.1.0", "source": { "type": "git", "url": "https://github.com/phar-io/version.git", - "reference": "a70c0ced4be299a63d32fa96d9281d03e94041df" + "reference": "45a2ec53a73c70ce41d55cedef9063630abaf1b6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/a70c0ced4be299a63d32fa96d9281d03e94041df", - "reference": "a70c0ced4be299a63d32fa96d9281d03e94041df", + "url": "https://api.github.com/repos/phar-io/version/zipball/45a2ec53a73c70ce41d55cedef9063630abaf1b6", + "reference": "45a2ec53a73c70ce41d55cedef9063630abaf1b6", "shasum": "" }, "require": { "php": "^5.6 || ^7.0" }, - "time": "2017-03-05T17:38:23+00:00", + "time": "2018-07-08T19:19:57+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -2134,17 +2130,17 @@ }, { "name": "phpspec/prophecy", - "version": "1.7.6", - "version_normalized": "1.7.6.0", + "version": "1.8.0", + "version_normalized": "1.8.0.0", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "33a7e3c4fda54e912ff6338c48823bd5c0f0b712" + "reference": "4ba436b55987b4bf311cb7c6ba82aa528aac0a06" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/33a7e3c4fda54e912ff6338c48823bd5c0f0b712", - "reference": "33a7e3c4fda54e912ff6338c48823bd5c0f0b712", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/4ba436b55987b4bf311cb7c6ba82aa528aac0a06", + "reference": "4ba436b55987b4bf311cb7c6ba82aa528aac0a06", "shasum": "" }, "require": { @@ -2156,13 +2152,13 @@ }, "require-dev": { "phpspec/phpspec": "^2.5|^3.2", - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5" + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1" }, - "time": "2018-04-18T13:57:24+00:00", + "time": "2018-08-05T17:53:17+00:00", "type": "library", "extra": { "branch-alias": { - "dev-master": "1.7.x-dev" + "dev-master": "1.8.x-dev" } }, "installation-source": "dist", @@ -2458,17 +2454,17 @@ }, { "name": "phpunit/phpunit", - "version": "7.2.6", - "version_normalized": "7.2.6.0", + "version": "7.3.5", + "version_normalized": "7.3.5.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "400a3836ee549ae6f665323ac3f21e27eac7155f" + "reference": "7b331efabbb628c518c408fdfcaf571156775de2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/400a3836ee549ae6f665323ac3f21e27eac7155f", - "reference": "400a3836ee549ae6f665323ac3f21e27eac7155f", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/7b331efabbb628c518c408fdfcaf571156775de2", + "reference": "7b331efabbb628c518c408fdfcaf571156775de2", "shasum": "" }, "require": { @@ -2479,8 +2475,8 @@ "ext-mbstring": "*", "ext-xml": "*", "myclabs/deep-copy": "^1.7", - "phar-io/manifest": "^1.0.1", - "phar-io/version": "^1.0", + "phar-io/manifest": "^1.0.2", + "phar-io/version": "^2.0", "php": "^7.1", "phpspec/prophecy": "^1.7", "phpunit/php-code-coverage": "^6.0.7", @@ -2507,14 +2503,14 @@ "ext-xdebug": "*", "phpunit/php-invoker": "^2.0" }, - "time": "2018-06-21T13:13:39+00:00", + "time": "2018-09-08T15:14:29+00:00", "bin": [ "phpunit" ], "type": "library", "extra": { "branch-alias": { - "dev-master": "7.2-dev" + "dev-master": "7.3-dev" } }, "installation-source": "dist", @@ -2746,21 +2742,23 @@ }, { "name": "psy/psysh", - "version": "v0.9.6", - "version_normalized": "0.9.6.0", + "version": "v0.9.8", + "version_normalized": "0.9.8.0", "source": { "type": "git", "url": "https://github.com/bobthecow/psysh.git", - "reference": "4a2ce86f199d51b6e2524214dc06835e872f4fce" + "reference": "ed3c32c4304e1a678a6e0f9dc11dd2d927d89555" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/bobthecow/psysh/zipball/4a2ce86f199d51b6e2524214dc06835e872f4fce", - "reference": "4a2ce86f199d51b6e2524214dc06835e872f4fce", + "url": "https://api.github.com/repos/bobthecow/psysh/zipball/ed3c32c4304e1a678a6e0f9dc11dd2d927d89555", + "reference": "ed3c32c4304e1a678a6e0f9dc11dd2d927d89555", "shasum": "" }, "require": { "dnoegel/php-xdg-base-dir": "0.1", + "ext-json": "*", + "ext-tokenizer": "*", "jakub-onderka/php-console-highlighter": "0.3.*", "nikic/php-parser": "~1.3|~2.0|~3.0|~4.0", "php": ">=5.4.0", @@ -2779,7 +2777,7 @@ "ext-readline": "Enables support for arrow-key history navigation, and showing and manipulating command history.", "hoa/console": "A pure PHP readline implementation. You'll want this if your PHP install doesn't already support readline or libedit." }, - "time": "2018-06-10T17:57:20+00:00", + "time": "2018-09-05T11:40:09+00:00", "bin": [ "bin/psysh" ], @@ -2820,22 +2818,23 @@ }, { "name": "ramsey/uuid", - "version": "3.7.3", - "version_normalized": "3.7.3.0", + "version": "3.8.0", + "version_normalized": "3.8.0.0", "source": { "type": "git", "url": "https://github.com/ramsey/uuid.git", - "reference": "44abcdad877d9a46685a3a4d221e3b2c4b87cb76" + "reference": "d09ea80159c1929d75b3f9c60504d613aeb4a1e3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ramsey/uuid/zipball/44abcdad877d9a46685a3a4d221e3b2c4b87cb76", - "reference": "44abcdad877d9a46685a3a4d221e3b2c4b87cb76", + "url": "https://api.github.com/repos/ramsey/uuid/zipball/d09ea80159c1929d75b3f9c60504d613aeb4a1e3", + "reference": "d09ea80159c1929d75b3f9c60504d613aeb4a1e3", "shasum": "" }, "require": { - "paragonie/random_compat": "^1.0|^2.0", - "php": "^5.4 || ^7.0" + "paragonie/random_compat": "^1.0|^2.0|9.99.99", + "php": "^5.4 || ^7.0", + "symfony/polyfill-ctype": "^1.8" }, "replace": { "rhumsaa/uuid": "self.version" @@ -2843,16 +2842,17 @@ "require-dev": { "codeception/aspect-mock": "^1.0 | ~2.0.0", "doctrine/annotations": "~1.2.0", - "goaop/framework": "1.0.0-alpha.2 | ^1.0 | ^2.1", + "goaop/framework": "1.0.0-alpha.2 | ^1.0 | ~2.1.0", "ircmaxell/random-lib": "^1.1", "jakub-onderka/php-parallel-lint": "^0.9.0", "mockery/mockery": "^0.9.9", "moontoast/math": "^1.1", "php-mock/php-mock-phpunit": "^0.3|^1.1", - "phpunit/phpunit": "^4.7|^5.0", + "phpunit/phpunit": "^4.7|^5.0|^6.5", "squizlabs/php_codesniffer": "^2.3" }, "suggest": { + "ext-ctype": "Provides support for PHP Ctype functions", "ext-libsodium": "Provides the PECL libsodium extension for use with the SodiumRandomGenerator", "ext-uuid": "Provides the PECL UUID extension for use with the PeclUuidTimeGenerator and PeclUuidRandomGenerator", "ircmaxell/random-lib": "Provides RandomLib for use with the RandomLibAdapter", @@ -2860,7 +2860,7 @@ "ramsey/uuid-console": "A console application for generating UUIDs with ramsey/uuid", "ramsey/uuid-doctrine": "Allows the use of Ramsey\\Uuid\\Uuid as Doctrine field type." }, - "time": "2018-01-20T00:28:24+00:00", + "time": "2018-07-19T23:38:55+00:00", "type": "library", "extra": { "branch-alias": { @@ -2949,17 +2949,17 @@ }, { "name": "sebastian/comparator", - "version": "3.0.1", - "version_normalized": "3.0.1.0", + "version": "3.0.2", + "version_normalized": "3.0.2.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "591a30922f54656695e59b1f39501aec513403da" + "reference": "5de4fc177adf9bce8df98d8d141a7559d7ccf6da" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/591a30922f54656695e59b1f39501aec513403da", - "reference": "591a30922f54656695e59b1f39501aec513403da", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/5de4fc177adf9bce8df98d8d141a7559d7ccf6da", + "reference": "5de4fc177adf9bce8df98d8d141a7559d7ccf6da", "shasum": "" }, "require": { @@ -2970,7 +2970,7 @@ "require-dev": { "phpunit/phpunit": "^7.1" }, - "time": "2018-06-14T15:05:28+00:00", + "time": "2018-07-12T15:12:46+00:00", "type": "library", "extra": { "branch-alias": { @@ -3487,17 +3487,17 @@ }, { "name": "swiftmailer/swiftmailer", - "version": "v6.1.1", - "version_normalized": "6.1.1.0", + "version": "v6.1.2", + "version_normalized": "6.1.2.0", "source": { "type": "git", "url": "https://github.com/swiftmailer/swiftmailer.git", - "reference": "aa899fef280b1c1aec8d5d4ac069af7f80c89a23" + "reference": "7d760881d266d63c5e7a1155cbcf2ac656a31ca8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/aa899fef280b1c1aec8d5d4ac069af7f80c89a23", - "reference": "aa899fef280b1c1aec8d5d4ac069af7f80c89a23", + "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/7d760881d266d63c5e7a1155cbcf2ac656a31ca8", + "reference": "7d760881d266d63c5e7a1155cbcf2ac656a31ca8", "shasum": "" }, "require": { @@ -3512,7 +3512,7 @@ "ext-intl": "Needed to support internationalized email addresses", "true/punycode": "Needed to support internationalized email addresses, if ext-intl is not installed" }, - "time": "2018-07-04T11:12:44+00:00", + "time": "2018-07-13T07:04:35+00:00", "type": "library", "extra": { "branch-alias": { @@ -3548,17 +3548,17 @@ }, { "name": "symfony/console", - "version": "v4.1.1", - "version_normalized": "4.1.1.0", + "version": "v4.1.4", + "version_normalized": "4.1.4.0", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "70591cda56b4b47c55776ac78e157c4bb6c8b43f" + "reference": "ca80b8ced97cf07390078b29773dc384c39eee1f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/70591cda56b4b47c55776ac78e157c4bb6c8b43f", - "reference": "70591cda56b4b47c55776ac78e157c4bb6c8b43f", + "url": "https://api.github.com/repos/symfony/console/zipball/ca80b8ced97cf07390078b29773dc384c39eee1f", + "reference": "ca80b8ced97cf07390078b29773dc384c39eee1f", "shasum": "" }, "require": { @@ -3583,7 +3583,7 @@ "symfony/lock": "", "symfony/process": "" }, - "time": "2018-05-31T10:17:53+00:00", + "time": "2018-07-26T11:24:31+00:00", "type": "library", "extra": { "branch-alias": { @@ -3618,23 +3618,23 @@ }, { "name": "symfony/css-selector", - "version": "v4.1.1", - "version_normalized": "4.1.1.0", + "version": "v4.1.4", + "version_normalized": "4.1.4.0", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", - "reference": "03ac71606ecb0b0ce792faa17d74cc32c2949ef4" + "reference": "2a4df7618f869b456f9096781e78c57b509d76c7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/css-selector/zipball/03ac71606ecb0b0ce792faa17d74cc32c2949ef4", - "reference": "03ac71606ecb0b0ce792faa17d74cc32c2949ef4", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/2a4df7618f869b456f9096781e78c57b509d76c7", + "reference": "2a4df7618f869b456f9096781e78c57b509d76c7", "shasum": "" }, "require": { "php": "^7.1.3" }, - "time": "2018-05-30T07:26:09+00:00", + "time": "2018-07-26T09:10:45+00:00", "type": "library", "extra": { "branch-alias": { @@ -3673,17 +3673,17 @@ }, { "name": "symfony/debug", - "version": "v4.1.1", - "version_normalized": "4.1.1.0", + "version": "v4.1.4", + "version_normalized": "4.1.4.0", "source": { "type": "git", "url": "https://github.com/symfony/debug.git", - "reference": "dbe0fad88046a755dcf9379f2964c61a02f5ae3d" + "reference": "47ead688f1f2877f3f14219670f52e4722ee7052" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/dbe0fad88046a755dcf9379f2964c61a02f5ae3d", - "reference": "dbe0fad88046a755dcf9379f2964c61a02f5ae3d", + "url": "https://api.github.com/repos/symfony/debug/zipball/47ead688f1f2877f3f14219670f52e4722ee7052", + "reference": "47ead688f1f2877f3f14219670f52e4722ee7052", "shasum": "" }, "require": { @@ -3696,7 +3696,7 @@ "require-dev": { "symfony/http-kernel": "~3.4|~4.0" }, - "time": "2018-06-08T09:39:36+00:00", + "time": "2018-08-03T11:13:38+00:00", "type": "library", "extra": { "branch-alias": { @@ -3731,17 +3731,17 @@ }, { "name": "symfony/event-dispatcher", - "version": "v4.1.1", - "version_normalized": "4.1.1.0", + "version": "v4.1.4", + "version_normalized": "4.1.4.0", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "2391ed210a239868e7256eb6921b1bd83f3087b5" + "reference": "bfb30c2ad377615a463ebbc875eba64a99f6aa3e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/2391ed210a239868e7256eb6921b1bd83f3087b5", - "reference": "2391ed210a239868e7256eb6921b1bd83f3087b5", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/bfb30c2ad377615a463ebbc875eba64a99f6aa3e", + "reference": "bfb30c2ad377615a463ebbc875eba64a99f6aa3e", "shasum": "" }, "require": { @@ -3761,7 +3761,7 @@ "symfony/dependency-injection": "", "symfony/http-kernel": "" }, - "time": "2018-04-06T07:35:57+00:00", + "time": "2018-07-26T09:10:45+00:00", "type": "library", "extra": { "branch-alias": { @@ -3796,23 +3796,23 @@ }, { "name": "symfony/finder", - "version": "v4.1.1", - "version_normalized": "4.1.1.0", + "version": "v4.1.4", + "version_normalized": "4.1.4.0", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "84714b8417d19e4ba02ea78a41a975b3efaafddb" + "reference": "e162f1df3102d0b7472805a5a9d5db9fcf0a8068" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/84714b8417d19e4ba02ea78a41a975b3efaafddb", - "reference": "84714b8417d19e4ba02ea78a41a975b3efaafddb", + "url": "https://api.github.com/repos/symfony/finder/zipball/e162f1df3102d0b7472805a5a9d5db9fcf0a8068", + "reference": "e162f1df3102d0b7472805a5a9d5db9fcf0a8068", "shasum": "" }, "require": { "php": "^7.1.3" }, - "time": "2018-06-19T21:38:16+00:00", + "time": "2018-07-26T11:24:31+00:00", "type": "library", "extra": { "branch-alias": { @@ -3847,17 +3847,17 @@ }, { "name": "symfony/http-foundation", - "version": "v4.1.1", - "version_normalized": "4.1.1.0", + "version": "v4.1.4", + "version_normalized": "4.1.4.0", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "4f9c7cf962e635b0b26b14500ac046e07dbef7f3" + "reference": "3a5c91e133b220bb882b3cd773ba91bf39989345" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/4f9c7cf962e635b0b26b14500ac046e07dbef7f3", - "reference": "4f9c7cf962e635b0b26b14500ac046e07dbef7f3", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/3a5c91e133b220bb882b3cd773ba91bf39989345", + "reference": "3a5c91e133b220bb882b3cd773ba91bf39989345", "shasum": "" }, "require": { @@ -3868,7 +3868,7 @@ "predis/predis": "~1.0", "symfony/expression-language": "~3.4|~4.0" }, - "time": "2018-06-19T21:38:16+00:00", + "time": "2018-08-27T17:47:02+00:00", "type": "library", "extra": { "branch-alias": { @@ -3903,17 +3903,17 @@ }, { "name": "symfony/http-kernel", - "version": "v4.1.1", - "version_normalized": "4.1.1.0", + "version": "v4.1.4", + "version_normalized": "4.1.4.0", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "29c094a1c4f8209b7e033f612cbbd69029e38955" + "reference": "33de0a1ff2e1720096189e3ced682d7a4e8f5e35" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/29c094a1c4f8209b7e033f612cbbd69029e38955", - "reference": "29c094a1c4f8209b7e033f612cbbd69029e38955", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/33de0a1ff2e1720096189e3ced682d7a4e8f5e35", + "reference": "33de0a1ff2e1720096189e3ced682d7a4e8f5e35", "shasum": "" }, "require": { @@ -3957,7 +3957,7 @@ "symfony/dependency-injection": "", "symfony/var-dumper": "" }, - "time": "2018-06-25T13:06:45+00:00", + "time": "2018-08-28T06:17:42+00:00", "type": "library", "extra": { "branch-alias": { @@ -3992,27 +3992,30 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.8.0", - "version_normalized": "1.8.0.0", + "version": "v1.9.0", + "version_normalized": "1.9.0.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "7cc359f1b7b80fc25ed7796be7d96adc9b354bae" + "reference": "e3d826245268269cd66f8326bd8bc066687b4a19" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/7cc359f1b7b80fc25ed7796be7d96adc9b354bae", - "reference": "7cc359f1b7b80fc25ed7796be7d96adc9b354bae", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/e3d826245268269cd66f8326bd8bc066687b4a19", + "reference": "e3d826245268269cd66f8326bd8bc066687b4a19", "shasum": "" }, "require": { "php": ">=5.3.3" }, - "time": "2018-04-30T19:57:29+00:00", + "suggest": { + "ext-ctype": "For best performance" + }, + "time": "2018-08-06T14:22:27+00:00", "type": "library", "extra": { "branch-alias": { - "dev-master": "1.8-dev" + "dev-master": "1.9-dev" } }, "installation-source": "dist", @@ -4049,17 +4052,17 @@ }, { "name": "symfony/polyfill-mbstring", - "version": "v1.8.0", - "version_normalized": "1.8.0.0", + "version": "v1.9.0", + "version_normalized": "1.9.0.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "3296adf6a6454a050679cde90f95350ad604b171" + "reference": "d0cd638f4634c16d8df4508e847f14e9e43168b8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/3296adf6a6454a050679cde90f95350ad604b171", - "reference": "3296adf6a6454a050679cde90f95350ad604b171", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/d0cd638f4634c16d8df4508e847f14e9e43168b8", + "reference": "d0cd638f4634c16d8df4508e847f14e9e43168b8", "shasum": "" }, "require": { @@ -4068,11 +4071,11 @@ "suggest": { "ext-mbstring": "For best performance" }, - "time": "2018-04-26T10:06:28+00:00", + "time": "2018-08-06T14:22:27+00:00", "type": "library", "extra": { "branch-alias": { - "dev-master": "1.8-dev" + "dev-master": "1.9-dev" } }, "installation-source": "dist", @@ -4110,27 +4113,27 @@ }, { "name": "symfony/polyfill-php72", - "version": "v1.8.0", - "version_normalized": "1.8.0.0", + "version": "v1.9.0", + "version_normalized": "1.9.0.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "a4576e282d782ad82397f3e4ec1df8e0f0cafb46" + "reference": "95c50420b0baed23852452a7f0c7b527303ed5ae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/a4576e282d782ad82397f3e4ec1df8e0f0cafb46", - "reference": "a4576e282d782ad82397f3e4ec1df8e0f0cafb46", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/95c50420b0baed23852452a7f0c7b527303ed5ae", + "reference": "95c50420b0baed23852452a7f0c7b527303ed5ae", "shasum": "" }, "require": { "php": ">=5.3.3" }, - "time": "2018-04-26T10:06:28+00:00", + "time": "2018-08-06T14:22:27+00:00", "type": "library", "extra": { "branch-alias": { - "dev-master": "1.8-dev" + "dev-master": "1.9-dev" } }, "installation-source": "dist", @@ -4167,23 +4170,23 @@ }, { "name": "symfony/process", - "version": "v4.1.1", - "version_normalized": "4.1.1.0", + "version": "v4.1.4", + "version_normalized": "4.1.4.0", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "1d1677391ecf00d1c5b9482d6050c0c27aa3ac3a" + "reference": "86cdb930a6a855b0ab35fb60c1504cb36184f843" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/1d1677391ecf00d1c5b9482d6050c0c27aa3ac3a", - "reference": "1d1677391ecf00d1c5b9482d6050c0c27aa3ac3a", + "url": "https://api.github.com/repos/symfony/process/zipball/86cdb930a6a855b0ab35fb60c1504cb36184f843", + "reference": "86cdb930a6a855b0ab35fb60c1504cb36184f843", "shasum": "" }, "require": { "php": "^7.1.3" }, - "time": "2018-05-31T10:17:53+00:00", + "time": "2018-08-03T11:13:38+00:00", "type": "library", "extra": { "branch-alias": { @@ -4218,17 +4221,17 @@ }, { "name": "symfony/routing", - "version": "v4.1.1", - "version_normalized": "4.1.1.0", + "version": "v4.1.4", + "version_normalized": "4.1.4.0", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "b38b9797327b26ea2e4146a40e6e2dc9820a6932" + "reference": "a5784c2ec4168018c87b38f0e4f39d2278499f51" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/b38b9797327b26ea2e4146a40e6e2dc9820a6932", - "reference": "b38b9797327b26ea2e4146a40e6e2dc9820a6932", + "url": "https://api.github.com/repos/symfony/routing/zipball/a5784c2ec4168018c87b38f0e4f39d2278499f51", + "reference": "a5784c2ec4168018c87b38f0e4f39d2278499f51", "shasum": "" }, "require": { @@ -4256,7 +4259,7 @@ "symfony/http-foundation": "For using a Symfony Request object", "symfony/yaml": "For using the YAML loader" }, - "time": "2018-06-19T21:38:16+00:00", + "time": "2018-08-03T07:58:40+00:00", "type": "library", "extra": { "branch-alias": { @@ -4297,17 +4300,17 @@ }, { "name": "symfony/translation", - "version": "v4.1.1", - "version_normalized": "4.1.1.0", + "version": "v4.1.4", + "version_normalized": "4.1.4.0", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "b6d8164085ee0b6debcd1b7a131fd6f63bb04854" + "reference": "fa2182669f7983b7aa5f1a770d053f79f0ef144f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/b6d8164085ee0b6debcd1b7a131fd6f63bb04854", - "reference": "b6d8164085ee0b6debcd1b7a131fd6f63bb04854", + "url": "https://api.github.com/repos/symfony/translation/zipball/fa2182669f7983b7aa5f1a770d053f79f0ef144f", + "reference": "fa2182669f7983b7aa5f1a770d053f79f0ef144f", "shasum": "" }, "require": { @@ -4333,7 +4336,7 @@ "symfony/config": "", "symfony/yaml": "" }, - "time": "2018-06-22T08:59:39+00:00", + "time": "2018-08-07T12:45:11+00:00", "type": "library", "extra": { "branch-alias": { @@ -4368,17 +4371,17 @@ }, { "name": "symfony/var-dumper", - "version": "v4.1.1", - "version_normalized": "4.1.1.0", + "version": "v4.1.4", + "version_normalized": "4.1.4.0", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "b2eebaec085d1f2cafbad7644733d494a3bbbc9b" + "reference": "a05426e27294bba7b0226ffc17dd01a3c6ef9777" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/b2eebaec085d1f2cafbad7644733d494a3bbbc9b", - "reference": "b2eebaec085d1f2cafbad7644733d494a3bbbc9b", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/a05426e27294bba7b0226ffc17dd01a3c6ef9777", + "reference": "a05426e27294bba7b0226ffc17dd01a3c6ef9777", "shasum": "" }, "require": { @@ -4400,7 +4403,7 @@ "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": "2018-06-23T12:23:56+00:00", + "time": "2018-08-02T09:24:26+00:00", "bin": [ "Resources/bin/var-dump-server" ], @@ -4536,17 +4539,17 @@ }, { "name": "vlucas/phpdotenv", - "version": "v2.5.0", - "version_normalized": "2.5.0.0", + "version": "v2.5.1", + "version_normalized": "2.5.1.0", "source": { "type": "git", "url": "https://github.com/vlucas/phpdotenv.git", - "reference": "6ae3e2e6494bb5e58c2decadafc3de7f1453f70a" + "reference": "8abb4f9aa89ddea9d52112c65bbe8d0125e2fa8e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/6ae3e2e6494bb5e58c2decadafc3de7f1453f70a", - "reference": "6ae3e2e6494bb5e58c2decadafc3de7f1453f70a", + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/8abb4f9aa89ddea9d52112c65bbe8d0125e2fa8e", + "reference": "8abb4f9aa89ddea9d52112c65bbe8d0125e2fa8e", "shasum": "" }, "require": { @@ -4555,7 +4558,7 @@ "require-dev": { "phpunit/phpunit": "^4.8.35 || ^5.0" }, - "time": "2018-07-01T10:25:50+00:00", + "time": "2018-07-29T20:33:41+00:00", "type": "library", "extra": { "branch-alias": { @@ -4640,17 +4643,17 @@ }, { "name": "zendframework/zend-diactoros", - "version": "1.8.5", - "version_normalized": "1.8.5.0", + "version": "1.8.6", + "version_normalized": "1.8.6.0", "source": { "type": "git", "url": "https://github.com/zendframework/zend-diactoros.git", - "reference": "3e4edb822c942f37ade0d09579cfbab11e2fee87" + "reference": "20da13beba0dde8fb648be3cc19765732790f46e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-diactoros/zipball/3e4edb822c942f37ade0d09579cfbab11e2fee87", - "reference": "3e4edb822c942f37ade0d09579cfbab11e2fee87", + "url": "https://api.github.com/repos/zendframework/zend-diactoros/zipball/20da13beba0dde8fb648be3cc19765732790f46e", + "reference": "20da13beba0dde8fb648be3cc19765732790f46e", "shasum": "" }, "require": { @@ -4663,10 +4666,11 @@ "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-08-10T14:16:32+00:00", + "time": "2018-09-05T19:29:37+00:00", "type": "library", "extra": { "branch-alias": { diff --git a/vendor/egulias/email-validator/EmailValidator/Validation/DNSCheckValidation.php b/vendor/egulias/email-validator/EmailValidator/Validation/DNSCheckValidation.php index a03a5874..e5c3e5df 100644 --- a/vendor/egulias/email-validator/EmailValidator/Validation/DNSCheckValidation.php +++ b/vendor/egulias/email-validator/EmailValidator/Validation/DNSCheckValidation.php @@ -18,6 +18,13 @@ class DNSCheckValidation implements EmailValidation * @var InvalidEmail */ private $error; + + public function __construct() + { + if (!extension_loaded('intl')) { + throw new \LogicException(sprintf('The %s class requires the Intl extension.', __CLASS__)); + } + } public function isValid($email, EmailLexer $emailLexer) { @@ -44,7 +51,11 @@ class DNSCheckValidation implements EmailValidation protected function checkDNS($host) { - $host = rtrim(idn_to_ascii($host, IDNA_DEFAULT, INTL_IDNA_VARIANT_UTS46), '.') . '.'; + $variant = INTL_IDNA_VARIANT_2003; + if ( defined('INTL_IDNA_VARIANT_UTS46') ) { + $variant = INTL_IDNA_VARIANT_UTS46; + } + $host = rtrim(idn_to_ascii($host, IDNA_DEFAULT, $variant), '.') . '.'; $Aresult = true; $MXresult = checkdnsrr($host, 'MX'); diff --git a/vendor/egulias/email-validator/EmailValidator/Validation/SpoofCheckValidation.php b/vendor/egulias/email-validator/EmailValidator/Validation/SpoofCheckValidation.php index fe712f08..4721f0d8 100644 --- a/vendor/egulias/email-validator/EmailValidator/Validation/SpoofCheckValidation.php +++ b/vendor/egulias/email-validator/EmailValidator/Validation/SpoofCheckValidation.php @@ -16,7 +16,7 @@ class SpoofCheckValidation implements EmailValidation public function __construct() { - if (!class_exists(Spoofchecker::class)) { + if (!extension_loaded('intl')) { throw new \LogicException(sprintf('The %s class requires the Intl extension.', __CLASS__)); } } diff --git a/vendor/egulias/email-validator/README.md b/vendor/egulias/email-validator/README.md index 67bb69ab..8fcd2a6f 100644 --- a/vendor/egulias/email-validator/README.md +++ b/vendor/egulias/email-validator/README.md @@ -6,7 +6,7 @@ With the help of [PHPStorm](https://www.jetbrains.com/phpstorm/) ## Requirements ## * [Composer](https://getcomposer.org) is required for installation - * [Spoofchecking](https://github.com/egulias/EmailValidator/blob/master/EmailValidator/Validation/SpoofCheckValidation.php) validation requires that your PHP system have the [PHP Internationalization Libraries](https://php.net/manual/en/book.intl.php) (also known as PHP Intl) + * [Spoofchecking](https://github.com/egulias/EmailValidator/blob/master/EmailValidator/Validation/SpoofCheckValidation.php) and [DNSCheckValidation](https://github.com/egulias/EmailValidator/blob/master/EmailValidator/Validation/DNSCheckValidation.php) validation requires that your PHP system have the [PHP Internationalization Libraries](https://php.net/manual/en/book.intl.php) (also known as PHP Intl) ## Installation ## diff --git a/vendor/filp/whoops/CHANGELOG.md b/vendor/filp/whoops/CHANGELOG.md index 4bbd620b..d7693f0f 100644 --- a/vendor/filp/whoops/CHANGELOG.md +++ b/vendor/filp/whoops/CHANGELOG.md @@ -1,3 +1,7 @@ +# 2.2.0 + +* Support PHP 7.2 + # 2.1.0 * Add a `SystemFacade` to allow clients to override Whoops behavior. diff --git a/vendor/filp/whoops/composer.json b/vendor/filp/whoops/composer.json index 7b2c3a6e..51ab373f 100644 --- a/vendor/filp/whoops/composer.json +++ b/vendor/filp/whoops/composer.json @@ -36,7 +36,7 @@ }, "extra": { "branch-alias": { - "dev-master": "2.1-dev" + "dev-master": "2.2-dev" } } } diff --git a/vendor/filp/whoops/src/Whoops/Handler/PrettyPageHandler.php b/vendor/filp/whoops/src/Whoops/Handler/PrettyPageHandler.php index 08197b4d..99ebe2bc 100644 --- a/vendor/filp/whoops/src/Whoops/Handler/PrettyPageHandler.php +++ b/vendor/filp/whoops/src/Whoops/Handler/PrettyPageHandler.php @@ -507,6 +507,10 @@ class PrettyPageHandler extends Handler $callback = call_user_func($this->editors[$this->editor], $filePath, $line); } + if (empty($callback)) { + return []; + } + if (is_string($callback)) { return [ 'ajax' => false, diff --git a/vendor/fzaninotto/faker/.travis.yml b/vendor/fzaninotto/faker/.travis.yml index 7d19fa75..a719ba81 100644 --- a/vendor/fzaninotto/faker/.travis.yml +++ b/vendor/fzaninotto/faker/.travis.yml @@ -9,6 +9,7 @@ php: - 5.6 - 7.0 - 7.1 + - 7.2 - nightly sudo: false diff --git a/vendor/fzaninotto/faker/CHANGELOG.md b/vendor/fzaninotto/faker/CHANGELOG.md index 611470f3..df218b00 100644 --- a/vendor/fzaninotto/faker/CHANGELOG.md +++ b/vendor/fzaninotto/faker/CHANGELOG.md @@ -1,6 +1,86 @@ CHANGELOG ========= +2018-07-12, v1.8.0 +------------------ + +- Typo in readme [\#1521](https://github.com/fzaninotto/Faker/pull/1521) ([jmhobbs](https://github.com/jmhobbs)) +- Replaced Hilll with Hill [\#1516](https://github.com/fzaninotto/Faker/pull/1516) ([MarkVaughn](https://github.com/MarkVaughn)) +- \[it\_IT\] Improve vat ID generated using official rules [\#1508](https://github.com/fzaninotto/Faker/pull/1508) ([mavimo](https://github.com/mavimo)) +- \[hu\_HU\] Address: Fix unnecessary new line in string [\#1507](https://github.com/fzaninotto/Faker/pull/1507) ([ntomka](https://github.com/ntomka)) +- add phone numer format [\#1506](https://github.com/fzaninotto/Faker/pull/1506) ([Enosh-Yu](https://github.com/Enosh-Yu)) +- Fix typo in fr\_CA Provider [\#1505](https://github.com/fzaninotto/Faker/pull/1505) ([ultreson](https://github.com/ultreson)) +- Add fake-car provider link [\#1497](https://github.com/fzaninotto/Faker/pull/1497) ([pelmered](https://github.com/pelmered)) +- create `passthrough` function [\#1493](https://github.com/fzaninotto/Faker/pull/1493) ([browner12](https://github.com/browner12)) +- update Polish bank list [\#1482](https://github.com/fzaninotto/Faker/pull/1482) ([IonBazan](https://github.com/IonBazan)) +- Update the parameters to check if the setter is callable [\#1470](https://github.com/fzaninotto/Faker/pull/1470) ([rossmitchell](https://github.com/rossmitchell)) +- Push the max date far into the future so the test can pass [\#1469](https://github.com/fzaninotto/Faker/pull/1469) ([rossmitchell](https://github.com/rossmitchell)) +- Update Address.php [\#1465](https://github.com/fzaninotto/Faker/pull/1465) ([Saibamen](https://github.com/Saibamen)) +- Turkish identity number for tr\_TR [\#1462](https://github.com/fzaninotto/Faker/pull/1462) ([aykutaras](https://github.com/aykutaras)) +- Fixing rare iin with 13-digits. [\#1450](https://github.com/fzaninotto/Faker/pull/1450) ([vadimonus](https://github.com/vadimonus)) +- Fix Polish PESEL faker [\#1449](https://github.com/fzaninotto/Faker/pull/1449) ([Dartui](https://github.com/Dartui)) +- Adds valid 08 number formats for fr\_FR [\#1439](https://github.com/fzaninotto/Faker/pull/1439) ([ppelgrims](https://github.com/ppelgrims)) +- Add YouTube provider link [\#1422](https://github.com/fzaninotto/Faker/pull/1422) ([aalaap](https://github.com/aalaap)) +- Update PHPDoc of the DateTime provider. [\#1419](https://github.com/fzaninotto/Faker/pull/1419) ([tomzx](https://github.com/tomzx)) +- Normalize name of variable [\#1412](https://github.com/fzaninotto/Faker/pull/1412) ([eaglewu](https://github.com/eaglewu)) +- Added "blockchain" to en-us company provider catchPhrase method [\#1411](https://github.com/fzaninotto/Faker/pull/1411) ([samoldenburg](https://github.com/samoldenburg)) +- Fix for Spot2 ORM EntityPopulator [\#1408](https://github.com/fzaninotto/Faker/pull/1408) ([michal-borek](https://github.com/michal-borek)) +- TH color name [\#1404](https://github.com/fzaninotto/Faker/pull/1404) ([Naruedom](https://github.com/Naruedom)) +- added Malaysia \[ms\_MY\] locale [\#1403](https://github.com/fzaninotto/Faker/pull/1403) ([kenfai](https://github.com/kenfai)) +- Implementation of the function that generates Brazilian area codes fixed. [\#1401](https://github.com/fzaninotto/Faker/pull/1401) ([jackmiras](https://github.com/jackmiras)) +- VISA retired the 13 digit PAN moved to new cardParams [\#1400](https://github.com/fzaninotto/Faker/pull/1400) ([hppycoder](https://github.com/hppycoder)) +- Remove unused variable inside closure [\#1395](https://github.com/fzaninotto/Faker/pull/1395) ([carusogabriel](https://github.com/carusogabriel)) +- .nz domain updates [\#1393](https://github.com/fzaninotto/Faker/pull/1393) ([xurizaemon](https://github.com/xurizaemon)) +- Add licenceCode method in the to es\_ES person provider [\#1392](https://github.com/fzaninotto/Faker/pull/1392) ([ffiguereo](https://github.com/ffiguereo)) +- allow `randomElements` to accept a Traversable object [\#1389](https://github.com/fzaninotto/Faker/pull/1389) ([browner12](https://github.com/browner12)) +- Doc: rg remove formatting [\#1387](https://github.com/fzaninotto/Faker/pull/1387) ([emtudo](https://github.com/emtudo)) +- Add numbers with start 4 [\#1386](https://github.com/fzaninotto/Faker/pull/1386) ([emtudo](https://github.com/emtudo)) +- update th\_TH mobile number format [\#1385](https://github.com/fzaninotto/Faker/pull/1385) ([earthpyy](https://github.com/earthpyy)) +- Translate country names for lv\_LV provider. [\#1383](https://github.com/fzaninotto/Faker/pull/1383) ([ronaldsgailis](https://github.com/ronaldsgailis)) +- Clean elses [\#1382](https://github.com/fzaninotto/Faker/pull/1382) ([carusogabriel](https://github.com/carusogabriel)) +- French vat formatter [\#1381](https://github.com/fzaninotto/Faker/pull/1381) ([ppelgrims](https://github.com/ppelgrims)) +- Replaces rtrim with preg\_replace [\#1380](https://github.com/fzaninotto/Faker/pull/1380) ([ppelgrims](https://github.com/ppelgrims)) +- Refactoring tests [\#1375](https://github.com/fzaninotto/Faker/pull/1375) ([carusogabriel](https://github.com/carusogabriel)) +- Added link in readme to provider FakerRestaurant [\#1374](https://github.com/fzaninotto/Faker/pull/1374) ([jzonta](https://github.com/jzonta)) +- Remove obsolete currency codes [\#1373](https://github.com/fzaninotto/Faker/pull/1373) ([tpraxl](https://github.com/tpraxl)) +- \[ru\_RU\] Updated countries and added source link [\#1372](https://github.com/fzaninotto/Faker/pull/1372) ([ilyahoilik](https://github.com/ilyahoilik)) +- Test against PHP 7.2 [\#1371](https://github.com/fzaninotto/Faker/pull/1371) ([carusogabriel](https://github.com/carusogabriel)) +- Feature: nl\_BE text provider [\#1370](https://github.com/fzaninotto/Faker/pull/1370) ([rauwebieten](https://github.com/rauwebieten)) +- default value for Payment::iban\(\) country code [\#1369](https://github.com/fzaninotto/Faker/pull/1369) ([madmanmax](https://github.com/madmanmax)) +- skip test failing on bigendian [\#1365](https://github.com/fzaninotto/Faker/pull/1365) ([remicollet](https://github.com/remicollet)) +- Update Person.php [\#1364](https://github.com/fzaninotto/Faker/pull/1364) ([majamusan](https://github.com/majamusan)) +- Prevent errors on private methods [\#1363](https://github.com/fzaninotto/Faker/pull/1363) ([petecoop](https://github.com/petecoop)) +- adds rijksregisternummer [\#1361](https://github.com/fzaninotto/Faker/pull/1361) ([ppelgrims](https://github.com/ppelgrims)) +- Add secondary address to fr\_FR provider [\#1356](https://github.com/fzaninotto/Faker/pull/1356) ([nicodmf](https://github.com/nicodmf)) +- Add company provider for tr\_TR [\#1355](https://github.com/fzaninotto/Faker/pull/1355) ([yuks](https://github.com/yuks)) +- nb\_NO provider updates [\#1350](https://github.com/fzaninotto/Faker/pull/1350) ([alexqhj](https://github.com/alexqhj)) +- only test available date range on 32-bit [\#1348](https://github.com/fzaninotto/Faker/pull/1348) ([remicollet](https://github.com/remicollet)) +- Bump PHPUnit version for namespace compatibility [\#1345](https://github.com/fzaninotto/Faker/pull/1345) ([carusogabriel](https://github.com/carusogabriel)) +- Use PSR-1 for PHPUnit TestCase [\#1344](https://github.com/fzaninotto/Faker/pull/1344) ([carusogabriel](https://github.com/carusogabriel)) +- Fix FR\_fr 07 prefix mobile number generation [\#1343](https://github.com/fzaninotto/Faker/pull/1343) ([svanpoeck](https://github.com/svanpoeck)) +- Update Text.php [\#1339](https://github.com/fzaninotto/Faker/pull/1339) ([gulaandrij](https://github.com/gulaandrij)) +- Add two new company type in the Swiss Provider [\#1336](https://github.com/fzaninotto/Faker/pull/1336) ([pvullioud](https://github.com/pvullioud)) +- Change symbol 'minus' with code 226 to 'minus' with code 45 [\#1333](https://github.com/fzaninotto/Faker/pull/1333) ([Negasus](https://github.com/Negasus)) +- \[sl\_SI\] Created provider for Company [\#1331](https://github.com/fzaninotto/Faker/pull/1331) ([alesvaupotic](https://github.com/alesvaupotic)) +- Update city name [\#1328](https://github.com/fzaninotto/Faker/pull/1328) ([s9801077](https://github.com/s9801077)) +- Fix \#1305 realText in some cases breaks last character [\#1326](https://github.com/fzaninotto/Faker/pull/1326) ([iamraccoon](https://github.com/iamraccoon)) +- Real Dutch postal codes [\#1323](https://github.com/fzaninotto/Faker/pull/1323) ([ametad](https://github.com/ametad)) +- Added male and female titles for the en\_ZA locale [\#1321](https://github.com/fzaninotto/Faker/pull/1321) ([ViGouRCanberra](https://github.com/ViGouRCanberra)) +- Add German Email Providers [\#1320](https://github.com/fzaninotto/Faker/pull/1320) ([Stoffo](https://github.com/Stoffo)) +- Fix "Resource temporarily unavailable" [\#1319](https://github.com/fzaninotto/Faker/pull/1319) ([eberkund](https://github.com/eberkund)) +- Introduced the ability to specify a default timezone... [\#1316](https://github.com/fzaninotto/Faker/pull/1316) ([telkins](https://github.com/telkins)) +- South African licence codes [\#1315](https://github.com/fzaninotto/Faker/pull/1315) ([royalmitten](https://github.com/royalmitten)) +- Fix with incorrect name city. [\#1309](https://github.com/fzaninotto/Faker/pull/1309) ([zzenmate](https://github.com/zzenmate)) +- Fixed type-o in readme under section about Language specific formatters [\#1302](https://github.com/fzaninotto/Faker/pull/1302) ([espenkn](https://github.com/espenkn)) +- Update Person.php [\#1298](https://github.com/fzaninotto/Faker/pull/1298) ([yappkahowe](https://github.com/yappkahowe)) +- Allow children classes to access self::$suffix [\#1296](https://github.com/fzaninotto/Faker/pull/1296) ([greg0ire](https://github.com/greg0ire)) +- Fix with namespace payment provider for uk\_UA [\#1293](https://github.com/fzaninotto/Faker/pull/1293) ([zzenmate](https://github.com/zzenmate)) +- Update zh\_TW text provider [\#1292](https://github.com/fzaninotto/Faker/pull/1292) ([s9801077](https://github.com/s9801077)) +- Fix CURL status code in ImageTest.php [\#1290](https://github.com/fzaninotto/Faker/pull/1290) ([Sanfra1407](https://github.com/Sanfra1407)) +- Tax Id for companies and new formats for es\_VE [\#1287](https://github.com/fzaninotto/Faker/pull/1287) ([DIOHz0r](https://github.com/DIOHz0r)) +- Added idNumber for nl\_NL [\#1283](https://github.com/fzaninotto/Faker/pull/1283) ([artorozenga](https://github.com/artorozenga)) +- Feature/en us company ein [\#1273](https://github.com/fzaninotto/Faker/pull/1273) ([zachflower](https://github.com/zachflower)) + 2017-08-15, v1.7.0 ------------------ diff --git a/vendor/fzaninotto/faker/composer.json b/vendor/fzaninotto/faker/composer.json index d3bfd6c6..e52016ee 100644 --- a/vendor/fzaninotto/faker/composer.json +++ b/vendor/fzaninotto/faker/composer.json @@ -13,7 +13,7 @@ "php": "^5.3.3 || ^7.0" }, "require-dev": { - "phpunit/phpunit": "^4.0 || ^5.0", + "phpunit/phpunit": "^4.8.35 || ^5.7", "squizlabs/php_codesniffer": "^1.5", "ext-intl": "*" }, diff --git a/vendor/fzaninotto/faker/readme.md b/vendor/fzaninotto/faker/readme.md index 6e75ce77..c3754901 100644 --- a/vendor/fzaninotto/faker/readme.md +++ b/vendor/fzaninotto/faker/readme.md @@ -180,17 +180,17 @@ Each of the generator properties (like `name`, `address`, and `lorem`) are calle ### `Faker\Provider\DateTime` unixTime($max = 'now') // 58781813 - dateTime($max = 'now', $timezone = date_default_timezone_get()) // DateTime('2008-04-25 08:37:17', 'UTC') - dateTimeAD($max = 'now', $timezone = date_default_timezone_get()) // DateTime('1800-04-29 20:38:49', 'Europe/Paris') + dateTime($max = 'now', $timezone = null) // DateTime('2008-04-25 08:37:17', 'UTC') + dateTimeAD($max = 'now', $timezone = null) // DateTime('1800-04-29 20:38:49', 'Europe/Paris') iso8601($max = 'now') // '1978-12-09T10:10:29+0000' date($format = 'Y-m-d', $max = 'now') // '1979-06-09' time($format = 'H:i:s', $max = 'now') // '20:49:42' - dateTimeBetween($startDate = '-30 years', $endDate = 'now', $timezone = date_default_timezone_get()) // DateTime('2003-03-15 02:00:49', 'Africa/Lagos') - dateTimeInInterval($startDate = '-30 years', $interval = '+ 5 days', $timezone = date_default_timezone_get()) // DateTime('2003-03-15 02:00:49', 'Antartica/Vostok') - dateTimeThisCentury($max = 'now', $timezone = date_default_timezone_get()) // DateTime('1915-05-30 19:28:21', 'UTC') - dateTimeThisDecade($max = 'now', $timezone = date_default_timezone_get()) // DateTime('2007-05-29 22:30:48', 'Europe/Paris') - dateTimeThisYear($max = 'now', $timezone = date_default_timezone_get()) // DateTime('2011-02-27 20:52:14', 'Africa/Lagos') - dateTimeThisMonth($max = 'now', $timezone = date_default_timezone_get()) // DateTime('2011-10-23 13:46:23', 'Antarctica/Vostok') + dateTimeBetween($startDate = '-30 years', $endDate = 'now', $timezone = null) // DateTime('2003-03-15 02:00:49', 'Africa/Lagos') + dateTimeInInterval($startDate = '-30 years', $interval = '+ 5 days', $timezone = null) // DateTime('2003-03-15 02:00:49', 'Antartica/Vostok') + dateTimeThisCentury($max = 'now', $timezone = null) // DateTime('1915-05-30 19:28:21', 'UTC') + dateTimeThisDecade($max = 'now', $timezone = null) // DateTime('2007-05-29 22:30:48', 'Europe/Paris') + dateTimeThisYear($max = 'now', $timezone = null) // DateTime('2011-02-27 20:52:14', 'Africa/Lagos') + dateTimeThisMonth($max = 'now', $timezone = null) // DateTime('2011-10-23 13:46:23', 'Antarctica/Vostok') amPm($max = 'now') // 'pm' dayOfMonth($max = 'now') // '04' dayOfWeek($max = 'now') // 'Friday' @@ -200,6 +200,8 @@ Each of the generator properties (like `name`, `address`, and `lorem`) are calle century // 'VI' timezone // 'Europe/Paris' +Methods accepting a `$timezone` argument default to `date_default_timezone_get()`. You can pass a custom timezone string to each method, or define a custom timezone for all time methods at once using `$faker::setDefaultTimezone($timezone)`. + ### `Faker\Provider\Internet` email // 'tkshlerin@collins.com' @@ -369,6 +371,12 @@ try { } ``` +If you would like to use a modifier with a value not generated by Faker, use the `passthrough()` method. `passthrough()` simply returns whatever value it was given. + +```php +$faker->optional()->passthrough(mt_rand(5, 15)); +``` + ## Localization `Faker\Factory` can take a locale as an argument, to return localized data. If no localized provider is found, the factory fallbacks to the default locale (en_US). @@ -926,6 +934,15 @@ echo $faker->tollFreeNumber; // "0800 123 456" echo $faker->areaCode; // "03" ``` +### `Faker\Provider\en_US\Company` + +```php +ein; // '12-3456789' +``` + ### `Faker\Provider\en_US\Payment` ```php @@ -960,6 +977,9 @@ echo $faker->companyNumber; // 1999/789634/01 // Generates a random national identification number echo $faker->idNumber; // 6606192211041 + +// Generates a random valid licence code +echo $faker->licenceCode; // EB ``` ### `Faker\Provider\en_ZA\PhoneNumber` @@ -981,6 +1001,9 @@ echo $faker->mobileNumber; // 082 123 5555 // Generates a Documento Nacional de Identidad (DNI) number echo $faker->dni; // '77446565E' + +// Generates a random valid licence code +echo $faker->licenceCode; // B ``` ### `Faker\Provider\es_ES\Payment` @@ -1051,6 +1074,24 @@ echo $faker->vat; // "BE 0123456789" - Belgian Value Added Tax number echo $faker->vat(false); // "BE0123456789" - unspaced Belgian Value Added Tax number ``` +### `Faker\Provider\es_VE\Person` + +```php +nationalId; // 'V11223344' +``` + +### `Faker\Provider\es_VE\Company` + +```php +taxpayerIdentificationNumber; // 'J1234567891' +``` + ### `Faker\Provider\fr_FR\Address` ```php @@ -1067,6 +1108,9 @@ $faker->department; // array('18' => 'Cher'); // Generates a random region echo $faker->region; // "Saint-Pierre-et-Miquelon" + +// Generates a random appartement,stair +echo $faker->secondaryAddress; // "Bat. 961" ``` ### `Faker\Provider\fr_FR\Company` @@ -1099,6 +1143,18 @@ echo $faker->vat; // FR 12 123 456 789 echo $faker->nir; // 1 88 07 35 127 571 - 19 ``` +### `Faker\Provider\fr_FR\PhoneNumber` + +```php +phoneNumber; // +33 (0)1 67 97 01 31 +echo $faker->mobileNumber; // +33 6 21 12 72 84 +echo $faker->serviceNumber // 08 98 04 84 46 +``` + + ### `Faker\Provider\he_IL\Payment` ```php @@ -1229,6 +1285,18 @@ echo $faker->metropolitanCity; // "서울특별시" echo $faker->borough; // "강남구" ``` +### `Faker\Provider\ko_KR\PhoneNumber` + +```php +localAreaPhoneNumber; // "02-1234-4567" + +// Generates a cell phone number +echo $faker->cellPhoneNumber; // "010-9876-5432" +``` + ### `Faker\Provider\lt_LT\Payment` ```php @@ -1246,6 +1314,69 @@ echo $faker->bankAccountNumber // "LT300848876740317118" echo $faker->personalIdentityNumber; // "140190-12301" ``` +### `Faker\Provider\ms_MY\Address` + +```php +township; // "Taman Bahagia" + +// Generates a random Malaysian town address with matching postcode and state +echo $faker->townState; // "55100 Bukit Bintang, Kuala Lumpur" +``` + +### `Faker\Provider\ms_MY\Miscellaneous` + +```php +jpjNumberPlate; // "WPL 5169" +``` + +### `Faker\Provider\ms_MY\Payment` + +```php +bank; // "Maybank" + +// Generates a random Malaysian bank account number (10-16 digits) +echo $faker->bankAccountNumber; // "1234567890123456" + +// Generates a random Malaysian insurance company +echo $faker->insurance; // "AIA Malaysia" + +// Generates a random Malaysian bank SWIFT Code +echo $faker->swiftCode; // "MBBEMYKLXXX" +``` + +### `Faker\Provider\ms_MY\Person` + +```php +myKadNumber($gender = null|'male'|'female', $hyphen = null|true|false); // "710703471796" +``` + +### `Faker\Provider\ms_MY\PhoneNumber` + +```php +mobileNumber($countryCodePrefix = null|true|false, $formatting = null|true|false); // "+6012-705 3767" + +// Generates a random Malaysian landline number +echo $faker->fixedLineNumber($countryCodePrefix = null|true|false, $formatting = null|true|false); // "03-7112 0455" + +// Generates a random Malaysian voip number +echo $faker->voipNumber($countryCodePrefix = null|true|false, $formatting = null|true|false); // "015-458 7099" +``` + ### `Faker\Provider\ne_NP\Address` ```php @@ -1267,6 +1398,15 @@ echo $faker->vat; // "BE 0123456789" - Belgian Value Added Tax number echo $faker->vat(false); // "BE0123456789" - unspaced Belgian Value Added Tax number ``` +### `Faker\Provider\nl_BE\Person` + +```php +rrn(); // "83051711784" - Belgian Rijksregisternummer +echo $faker->rrn('female'); // "50032089858" - Belgian Rijksregisternummer for a female +``` + ### `Faker\Provider\nl_NL\Company` ```php @@ -1276,7 +1416,15 @@ echo $faker->vat; // "NL123456789B01" - Dutch Value Added Tax number echo $faker->btw; // "NL123456789B01" - Dutch Value Added Tax number (alias) ``` -### `Faker\Provider\no_NO\Payment` +### `Faker\Provider\nl_NL\Person` + +```php +idNumber; // "111222333" - Dutch Personal identification number (BSN) +``` + +### `Faker\Provider\nb_NO\Payment` ```php name; // 'Sr. Luis Adriano Sepúlveda Filho' echo $faker->cpf; // '145.343.345-76' echo $faker->cpf(false); // '45623467866' echo $faker->rg; // '84.405.736-3' +echo $faker->rg(false); // '844057363' ``` ### `Faker\Provider\pt_BR\Company` @@ -1479,6 +1628,15 @@ echo $faker->personalIdentityNumber() // '950910-0799' //Since the numbers are different for male and female persons, optionally you can specify gender. echo $faker->personalIdentityNumber('female') // '950910-0781' ``` +### `Faker\Provider\tr_TR\Person` + +```php +tcNo // '55300634882' + +``` ### `Faker\Provider\zh_CN\Payment` @@ -1540,6 +1698,9 @@ echo $faker->VAT; //23456789 * [pattern-lab/plugin-php-faker](https://github.com/pattern-lab/plugin-php-faker): Pattern Lab is a Styleguide, Component Library, and Prototyping tool. This creates unique content each time Pattern Lab is generated. * [guidocella/eloquent-populator](https://github.com/guidocella/eloquent-populator): Adapter for Laravel's Eloquent ORM. * [tamperdata/exiges](https://github.com/tamperdata/exiges): Faker provider for generating random temperatures +* [jzonta/FakerRestaurant](https://github.com/jzonta/FakerRestaurant): Faker for Food and Beverage names generate +* [aalaap/faker-youtube](https://github.com/aalaap/faker-youtube): Faker for YouTube URLs in various formats +* [pelmered/fake-car](https://github.com/pelmered/fake-car): Faker for cars and car data ## License diff --git a/vendor/fzaninotto/faker/src/Faker/Generator.php b/vendor/fzaninotto/faker/src/Faker/Generator.php index 01158704..0a4e0502 100644 --- a/vendor/fzaninotto/faker/src/Faker/Generator.php +++ b/vendor/fzaninotto/faker/src/Faker/Generator.php @@ -94,12 +94,12 @@ namespace Faker; * @property \DateTime $dateTimeThisYear * @property \DateTime $dateTimeThisMonth * @property string $amPm - * @property int $dayOfMonth - * @property int $dayOfWeek - * @property int $month + * @property string $dayOfMonth + * @property string $dayOfWeek + * @property string $month * @property string $monthName - * @property int $year - * @property int $century + * @property string $year + * @property string $century * @property string $timezone * @method string amPm($max = 'now') * @method string date($format = 'Y-m-d', $max = 'now') @@ -109,7 +109,7 @@ namespace Faker; * @method string month($max = 'now') * @method string monthName($max = 'now') * @method string time($format = 'H:i:s', $max = 'now') - * @method string unixTime($max = 'now') + * @method int unixTime($max = 'now') * @method string year($max = 'now') * @method \DateTime dateTime($max = 'now', $timezone = null) * @method \DateTime dateTimeAd($max = 'now', $timezone = null) diff --git a/vendor/fzaninotto/faker/src/Faker/ORM/Doctrine/EntityPopulator.php b/vendor/fzaninotto/faker/src/Faker/ORM/Doctrine/EntityPopulator.php index 31c8125b..bc703e54 100644 --- a/vendor/fzaninotto/faker/src/Faker/ORM/Doctrine/EntityPopulator.php +++ b/vendor/fzaninotto/faker/src/Faker/ORM/Doctrine/EntityPopulator.php @@ -211,7 +211,7 @@ class EntityPopulator } // Try a standard setter if it's available, otherwise fall back on reflection $setter = sprintf("set%s", ucfirst($field)); - if (method_exists($obj, $setter)) { + if (is_callable(array($obj, $setter))) { $obj->$setter($value); } else { $this->class->reflFields[$field]->setValue($obj, $value); diff --git a/vendor/fzaninotto/faker/src/Faker/ORM/Propel/ColumnTypeGuesser.php b/vendor/fzaninotto/faker/src/Faker/ORM/Propel/ColumnTypeGuesser.php index ac9cdb42..1df70494 100644 --- a/vendor/fzaninotto/faker/src/Faker/ORM/Propel/ColumnTypeGuesser.php +++ b/vendor/fzaninotto/faker/src/Faker/ORM/Propel/ColumnTypeGuesser.php @@ -29,11 +29,11 @@ class ColumnTypeGuesser return function () use ($generator) { return $generator->dateTime; }; - } else { - return function () use ($generator) { - return $generator->dateTimeAD; - }; } + + return function () use ($generator) { + return $generator->dateTimeAD; + }; } $type = $column->getType(); switch ($type) { diff --git a/vendor/fzaninotto/faker/src/Faker/ORM/Propel2/ColumnTypeGuesser.php b/vendor/fzaninotto/faker/src/Faker/ORM/Propel2/ColumnTypeGuesser.php index 13e4ee40..024965a7 100644 --- a/vendor/fzaninotto/faker/src/Faker/ORM/Propel2/ColumnTypeGuesser.php +++ b/vendor/fzaninotto/faker/src/Faker/ORM/Propel2/ColumnTypeGuesser.php @@ -29,11 +29,11 @@ class ColumnTypeGuesser return function () use ($generator) { return $generator->dateTime; }; - } else { - return function () use ($generator) { - return $generator->dateTimeAD; - }; } + + return function () use ($generator) { + return $generator->dateTimeAD; + }; } $type = $column->getType(); switch ($type) { diff --git a/vendor/fzaninotto/faker/src/Faker/ORM/Spot/EntityPopulator.php b/vendor/fzaninotto/faker/src/Faker/ORM/Spot/EntityPopulator.php index d59cf56f..ba5bddb5 100644 --- a/vendor/fzaninotto/faker/src/Faker/ORM/Spot/EntityPopulator.php +++ b/vendor/fzaninotto/faker/src/Faker/ORM/Spot/EntityPopulator.php @@ -151,23 +151,23 @@ class EntityPopulator $formatters[$fieldName] = function ($inserted) use ($required, $entityName, $locator) { if (!empty($inserted[$entityName])) { - return $inserted[$entityName][mt_rand(0, count($inserted[$entityName]) - 1)]->getId(); - } else { - if ($required && $this->useExistingData) { - // We did not add anything like this, but it's required, - // So let's find something existing in DB. - $mapper = $this->locator->mapper($entityName); - $records = $mapper->all()->limit(self::RELATED_FETCH_COUNT)->toArray(); - if (empty($records)) { - return null; - } - $id = $records[mt_rand(0, count($records) - 1)]['id']; + return $inserted[$entityName][mt_rand(0, count($inserted[$entityName]) - 1)]->get('id'); + } - return $id; - } else { + if ($required && $this->useExistingData) { + // We did not add anything like this, but it's required, + // So let's find something existing in DB. + $mapper = $locator->mapper($entityName); + $records = $mapper->all()->limit(self::RELATED_FETCH_COUNT)->toArray(); + if (empty($records)) { return null; } + $id = $records[mt_rand(0, count($records) - 1)]['id']; + + return $id; } + + return null; }; } diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/Base.php b/vendor/fzaninotto/faker/src/Faker/Provider/Base.php index d314be71..fa321ee0 100644 --- a/vendor/fzaninotto/faker/src/Faker/Provider/Base.php +++ b/vendor/fzaninotto/faker/src/Faker/Provider/Base.php @@ -139,6 +139,18 @@ class Base $max = $int1 < $int2 ? $int2 : $int1; return mt_rand($min, $max); } + + /** + * Returns the passed value + * + * @param mixed $value + * + * @return mixed + */ + public static function passthrough($value) + { + return $value; + } /** * Returns a random letter from a to z @@ -168,9 +180,19 @@ class Base * * @return array New array with $count elements from $array */ - public static function randomElements(array $array = array('a', 'b', 'c'), $count = 1, $allowDuplicates = false) + public static function randomElements($array = array('a', 'b', 'c'), $count = 1, $allowDuplicates = false) { - $allKeys = array_keys($array); + $traversables = array(); + + if ($array instanceof \Traversable) { + foreach ($array as $element) { + $traversables[] = $element; + } + } + + $arr = count($traversables) ? $traversables : $array; + + $allKeys = array_keys($arr); $numKeys = count($allKeys); if (!$allowDuplicates && $numKeys < $count) { @@ -191,7 +213,7 @@ class Base $keys[$num] = true; } - $elements[] = $array[$allKeys[$num]]; + $elements[] = $arr[$allKeys[$num]]; $numElements++; } @@ -206,7 +228,7 @@ class Base */ public static function randomElement($array = array('a', 'b', 'c')) { - if (!$array) { + if (!$array || ($array instanceof \Traversable && !count($array))) { return null; } $elements = static::randomElements($array, 1); diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/DateTime.php b/vendor/fzaninotto/faker/src/Faker/Provider/DateTime.php index 3bbdd1cc..fb0f474b 100644 --- a/vendor/fzaninotto/faker/src/Faker/Provider/DateTime.php +++ b/vendor/fzaninotto/faker/src/Faker/Provider/DateTime.php @@ -6,6 +6,12 @@ class DateTime extends Base { protected static $century = array('I','II','III','IV','V','VI','VII','VIII','IX','X','XI','XII','XIII','XIV','XV','XVI','XVII','XVIII','XIX','XX','XXI'); + protected static $defaultTimezone = null; + + /** + * @param string|float|int $max + * @return int|false + */ protected static function getMaxTimestamp($max = 'now') { if (is_numeric($max)) { @@ -36,7 +42,7 @@ class DateTime extends Base * Get a datetime object for a date between January 1, 1970 and now * * @param \DateTime|int|string $max maximum timestamp used as random end limit, default to "now" - * @param string $timezone time zone in which the date time should be set, default to result of `date_default_timezone_get` + * @param string $timezone time zone in which the date time should be set, default to DateTime::$defaultTimezone, if set, otherwise the result of `date_default_timezone_get` * @example DateTime('2005-08-16 20:39:21') * @return \DateTime * @see http://php.net/manual/en/timezones.php @@ -46,7 +52,7 @@ class DateTime extends Base { return static::setTimezone( new \DateTime('@' . static::unixTime($max)), - (null === $timezone ? date_default_timezone_get() : $timezone) + $timezone ); } @@ -54,7 +60,7 @@ class DateTime extends Base * Get a datetime object for a date between January 1, 001 and now * * @param \DateTime|int|string $max maximum timestamp used as random end limit, default to "now" - * @param string $timezone time zone in which the date time should be set, default to result of `date_default_timezone_get` + * @param string|null $timezone time zone in which the date time should be set, default to DateTime::$defaultTimezone, if set, otherwise the result of `date_default_timezone_get` * @example DateTime('1265-03-22 21:15:52') * @return \DateTime * @see http://php.net/manual/en/timezones.php @@ -65,7 +71,7 @@ class DateTime extends Base $min = (PHP_INT_SIZE>4 ? -62135597361 : -PHP_INT_MAX); return static::setTimezone( new \DateTime('@' . mt_rand($min, static::getMaxTimestamp($max))), - (null === $timezone ? date_default_timezone_get() : $timezone) + $timezone ); } @@ -113,7 +119,7 @@ class DateTime extends Base * * @param \DateTime|string $startDate Defaults to 30 years ago * @param \DateTime|string $endDate Defaults to "now" - * @param string $timezone time zone in which the date time should be set, default to result of `date_default_timezone_get` + * @param string|null $timezone time zone in which the date time should be set, default to DateTime::$defaultTimezone, if set, otherwise the result of `date_default_timezone_get` * @example DateTime('1999-02-02 11:42:52') * @return \DateTime * @see http://php.net/manual/en/timezones.php @@ -132,7 +138,7 @@ class DateTime extends Base return static::setTimezone( new \DateTime('@' . $timestamp), - (null === $timezone ? date_default_timezone_get() : $timezone) + $timezone ); } @@ -143,7 +149,7 @@ class DateTime extends Base * * @param string $date Defaults to 30 years ago * @param string $interval Defaults to 5 days after - * @param string $timezone time zone in which the date time should be set, default to result of `date_default_timezone_get` + * @param string|null $timezone time zone in which the date time should be set, default to DateTime::$defaultTimezone, if set, otherwise the result of `date_default_timezone_get` * @example dateTimeInInterval('1999-02-02 11:42:52', '+ 5 days') * @return \DateTime * @see http://php.net/manual/en/timezones.php @@ -162,13 +168,13 @@ class DateTime extends Base return static::dateTimeBetween( $begin, $end, - (null === $timezone ? date_default_timezone_get() : $timezone) + $timezone ); } /** * @param \DateTime|int|string $max maximum timestamp used as random end limit, default to "now" - * @param string $timezone time zone in which the date time should be set, default to result of `date_default_timezone_get` + * @param string|null $timezone time zone in which the date time should be set, default to DateTime::$defaultTimezone, if set, otherwise the result of `date_default_timezone_get` * @example DateTime('1964-04-04 11:02:02') * @return \DateTime */ @@ -179,7 +185,7 @@ class DateTime extends Base /** * @param \DateTime|int|string $max maximum timestamp used as random end limit, default to "now" - * @param string $timezone time zone in which the date time should be set, default to result of `date_default_timezone_get` + * @param string|null $timezone time zone in which the date time should be set, default to DateTime::$defaultTimezone, if set, otherwise the result of `date_default_timezone_get` * @example DateTime('2010-03-10 05:18:58') * @return \DateTime */ @@ -190,7 +196,7 @@ class DateTime extends Base /** * @param \DateTime|int|string $max maximum timestamp used as random end limit, default to "now" - * @param string $timezone time zone in which the date time should be set, default to result of `date_default_timezone_get` + * @param string|null $timezone time zone in which the date time should be set, default to DateTime::$defaultTimezone, if set, otherwise the result of `date_default_timezone_get` * @example DateTime('2011-09-19 09:24:37') * @return \DateTime */ @@ -201,7 +207,7 @@ class DateTime extends Base /** * @param \DateTime|int|string $max maximum timestamp used as random end limit, default to "now" - * @param string $timezone time zone in which the date time should be set, default to result of `date_default_timezone_get` + * @param string|null $timezone time zone in which the date time should be set, default to DateTime::$defaultTimezone, if set, otherwise the result of `date_default_timezone_get` * @example DateTime('2011-10-05 12:51:46') * @return \DateTime */ @@ -262,8 +268,8 @@ class DateTime extends Base /** * @param \DateTime|int|string $max maximum timestamp used as random end limit, default to "now" - * @return int - * @example 1673 + * @return string + * @example '1673' */ public static function year($max = 'now') { @@ -292,12 +298,43 @@ class DateTime extends Base * Internal method to set the time zone on a DateTime. * * @param \DateTime $dt - * @param string $timezone + * @param string|null $timezone * - * @return $this + * @return \DateTime */ private static function setTimezone(\DateTime $dt, $timezone) { - return $dt->setTimezone(new \DateTimeZone($timezone)); + return $dt->setTimezone(new \DateTimeZone(static::resolveTimezone($timezone))); + } + + /** + * Sets default time zone. + * + * @param string $timezone + * + * @return void + */ + public static function setDefaultTimezone($timezone = null) + { + static::$defaultTimezone = $timezone; + } + + /** + * Gets default time zone. + * + * @return string|null + */ + public static function getDefaultTimezone() + { + return static::$defaultTimezone; + } + + /** + * @param string|null $timezone + * @return null|string + */ + private static function resolveTimezone($timezone) + { + return ((null === $timezone) ? ((null === static::$defaultTimezone) ? date_default_timezone_get() : static::$defaultTimezone) : $timezone); } } diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/Image.php b/vendor/fzaninotto/faker/src/Faker/Provider/Image.php index 404a45a0..0458ceb9 100644 --- a/vendor/fzaninotto/faker/src/Faker/Provider/Image.php +++ b/vendor/fzaninotto/faker/src/Faker/Provider/Image.php @@ -84,14 +84,15 @@ class Image extends Base $ch = curl_init($url); curl_setopt($ch, CURLOPT_FILE, $fp); $success = curl_exec($ch) && curl_getinfo($ch, CURLINFO_HTTP_CODE) === 200; - - if ($success) { - fclose($fp); - } else { - unlink($filepath); - } - + fclose($fp); curl_close($ch); + + if (!$success) { + unlink($filepath); + + // could not contact the distant URL or HTTP error - fail silently. + return false; + } } elseif (ini_get('allow_url_fopen')) { // use remote fopen() via copy() $success = copy($url, $filepath); @@ -99,11 +100,6 @@ class Image extends Base return new \RuntimeException('The image formatter downloads an image from a remote HTTP server. Therefore, it requires that PHP can request remote hosts, either via cURL or fopen()'); } - if (!$success) { - // could not contact the distant URL or HTTP error - fail silently. - return false; - } - return $fullPath ? $filepath : $filename; } } diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/Miscellaneous.php b/vendor/fzaninotto/faker/src/Faker/Provider/Miscellaneous.php index b15b0e79..55586d11 100644 --- a/vendor/fzaninotto/faker/src/Faker/Provider/Miscellaneous.php +++ b/vendor/fzaninotto/faker/src/Faker/Provider/Miscellaneous.php @@ -203,6 +203,10 @@ class Miscellaneous extends Base /** * @link https://en.wikipedia.org/wiki/ISO_4217 * On date of 2017-07-07 + * + * With the following exceptions: + * SVC has been replaced by the USD in 2001: https://en.wikipedia.org/wiki/Salvadoran_col%C3%B3n + * ZWL has been suspended since 2009: https://en.wikipedia.org/wiki/Zimbabwean_dollar */ protected static $currencyCode = array( 'AED', 'AFN', 'ALL', 'AMD', 'ANG', 'AOA', 'ARS', 'AUD', 'AWG', 'AZN', @@ -217,10 +221,10 @@ class Miscellaneous extends Base 'MRO', 'MUR', 'MVR', 'MWK', 'MXN', 'MYR', 'MZN', 'NAD', 'NGN', 'NIO', 'NOK', 'NPR', 'NZD', 'OMR', 'PAB', 'PEN', 'PGK', 'PHP', 'PKR', 'PLN', 'PYG', 'QAR', 'RON', 'RSD', 'RUB', 'RWF', 'SAR', 'SBD', 'SCR', 'SDG', - 'SEK', 'SGD', 'SHP', 'SLL', 'SOS', 'SRD', 'SSP', 'STD', 'SVC', 'SYP', - 'SZL', 'THB', 'TJS', 'TMT', 'TND', 'TOP', 'TRY', 'TTD', 'TWD', 'TZS', - 'UAH', 'UGX', 'USD', 'UYU', 'UZS', 'VEF', 'VND', 'VUV', 'WST', 'XAF', - 'XCD', 'XOF', 'XPF', 'YER', 'ZAR', 'ZMW', 'ZWL', + 'SEK', 'SGD', 'SHP', 'SLL', 'SOS', 'SRD', 'SSP', 'STD', 'SYP', 'SZL', + 'THB', 'TJS', 'TMT', 'TND', 'TOP', 'TRY', 'TTD', 'TWD', 'TZS', 'UAH', + 'UGX', 'USD', 'UYU', 'UZS', 'VEF', 'VND', 'VUV', 'WST', 'XAF', 'XCD', + 'XOF', 'XPF', 'YER', 'ZAR', 'ZMW', ); /** diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/Payment.php b/vendor/fzaninotto/faker/src/Faker/Provider/Payment.php index 27ce838c..c4c08581 100644 --- a/vendor/fzaninotto/faker/src/Faker/Provider/Payment.php +++ b/vendor/fzaninotto/faker/src/Faker/Provider/Payment.php @@ -12,7 +12,7 @@ class Payment extends Base protected static $cardVendors = array( 'Visa', 'Visa', 'Visa', 'Visa', 'Visa', 'MasterCard', 'MasterCard', 'MasterCard', 'MasterCard', 'MasterCard', - 'American Express', 'Discover Card' + 'American Express', 'Discover Card', 'Visa Retired' ); /** @@ -22,25 +22,27 @@ class Payment extends Base */ protected static $cardParams = array( 'Visa' => array( - "4539########", "4539###########", - "4556########", "4556###########", - "4916########", "4916###########", - "4532########", "4532###########", - "4929########", "4929###########", - "40240071####", "40240071#######", - "4485########", "4485###########", - "4716########", "4716###########", - "4###########", "4##############" ), + 'Visa Retired' => array( + "4539########", + "4556########", + "4916########", + "4532########", + "4929########", + "40240071####", + "4485########", + "4716########", + "4###########", + ), 'MasterCard' => array( "2221###########", "23#############", @@ -222,7 +224,7 @@ class Payment extends Base * @param integer $length total length without country code and 2 check digits * @return string */ - public static function iban($countryCode, $prefix = '', $length = null) + public static function iban($countryCode = null, $prefix = '', $length = null) { $countryCode = is_null($countryCode) ? self::randomKey(self::$ibanFormats) : strtoupper($countryCode); diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/Text.php b/vendor/fzaninotto/faker/src/Faker/Provider/Text.php index 36fafe35..db8c800a 100644 --- a/vendor/fzaninotto/faker/src/Faker/Provider/Text.php +++ b/vendor/fzaninotto/faker/src/Faker/Provider/Text.php @@ -136,6 +136,6 @@ abstract class Text extends Base protected static function appendEnd($text) { - return rtrim($text, ',— ').'.'; + return preg_replace("/([ ,-:;\x{2013}\x{2014}]+$)/us", '', $text).'.'; } } diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/de_CH/Internet.php b/vendor/fzaninotto/faker/src/Faker/Provider/de_CH/Internet.php index 2f5cd2cd..ec96ea21 100644 --- a/vendor/fzaninotto/faker/src/Faker/Provider/de_CH/Internet.php +++ b/vendor/fzaninotto/faker/src/Faker/Provider/de_CH/Internet.php @@ -4,6 +4,14 @@ namespace Faker\Provider\de_CH; class Internet extends \Faker\Provider\Internet { - protected static $freeEmailDomain = array('gmail.com', 'hotmail.com', 'yahoo.com', 'googlemail.com', 'gmx.ch', 'bluewin.ch', 'swissonline.ch'); + protected static $freeEmailDomain = array( + 'gmail.com', + 'hotmail.com', + 'yahoo.com', + 'googlemail.com', + 'gmx.ch', + 'bluewin.ch', + 'swissonline.ch' + ); protected static $tld = array('com', 'com', 'com', 'net', 'org', 'li', 'ch', 'ch'); } diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/de_DE/Address.php b/vendor/fzaninotto/faker/src/Faker/Provider/de_DE/Address.php index 8f30322d..eff738d0 100644 --- a/vendor/fzaninotto/faker/src/Faker/Provider/de_DE/Address.php +++ b/vendor/fzaninotto/faker/src/Faker/Provider/de_DE/Address.php @@ -25,7 +25,7 @@ class Address extends \Faker\Provider\Address 'Calw', 'Castrop-Rauxel', 'Celle', 'Chemnitz', 'Cloppenburg', 'Coburg', 'Coesfeld', 'Coswig', 'Cottbus', 'Crailsheim', 'Cuxhaven', 'Dachau', 'Darmstadt', 'Datteln', 'Deggendorf', 'Delbrück', 'Delitzsch', 'Delmenhorst', 'Dessau-Roßlau', 'Detmold', 'Dietzenbach', 'Dillenburg', 'Dillingen/Saar', 'Dinslaken', 'Ditzingen', 'Döbeln', 'Donaueschingen', 'Dormagen', 'Dorsten', 'Dortmund', 'Dreieich', 'Dresden', 'Duderstadt', 'Duisburg', 'Dülmen', 'Düren', 'Düsseldorf', - 'Eberswalde', 'Eckernförde', 'Edewecht', 'Ehingen', 'Einbeck', 'Eisenach', 'Eisenhüttenstadt', 'Eisleben, Lutherstadt', 'Eislingen/Fils', 'Ellwangen (Jagst)', 'Elmshorn', 'Elsdorf', 'Emden', 'Emmendingen', 'Emmerich am Rhein', 'Emsdetten', 'Enger', 'Ennepetal', 'Ennigerloh', 'Eppingen', 'Erding', 'Erftstadt', 'Erfurt', 'Erkelenz', 'Erkrath', 'Erlangen', 'Eschborn', 'Eschweiler', 'Espelkamp', 'Essen', 'Esslingen am Neckar', 'Ettlingen', 'Euskirchen', + 'Eberswalde', 'Eckernförde', 'Edewecht', 'Ehingen', 'Einbeck', 'Eisenach', 'Eisenhüttenstadt', 'Lutherstadt Eisleben', 'Eislingen/Fils', 'Ellwangen (Jagst)', 'Elmshorn', 'Elsdorf', 'Emden', 'Emmendingen', 'Emmerich am Rhein', 'Emsdetten', 'Enger', 'Ennepetal', 'Ennigerloh', 'Eppingen', 'Erding', 'Erftstadt', 'Erfurt', 'Erkelenz', 'Erkrath', 'Erlangen', 'Eschborn', 'Eschweiler', 'Espelkamp', 'Essen', 'Esslingen am Neckar', 'Ettlingen', 'Euskirchen', 'Falkensee', 'Fellbach', 'Filderstadt', 'Flensburg', 'Flörsheim am Main', 'Forchheim', 'Frankenthal (Pfalz)', 'Frankfurt (Oder)', 'Frankfurt am Main', 'Frechen', 'Freiberg', 'Freiburg im Breisgau', 'Freising', 'Freital', 'Freudenstadt', 'Friedberg', 'Friedberg (Hessen)', 'Friedrichsdorf', 'Friedrichshafen', 'Friesoythe', 'Fröndenberg/Ruhr', 'Fulda', 'Fürstenfeldbruck', 'Fürstenwalde/Spree', 'Fürth', 'Gaggenau', 'Ganderkesee', 'Garbsen', 'Gardelegen', 'Garmisch-Partenkirchen', 'Gauting', 'Geesthacht', 'Geestland', 'Geilenkirchen', 'Geislingen an der Steige', 'Geldern', 'Gelnhausen', 'Gelsenkirchen', 'Georgsmarienhütte', 'Gera', 'Geretsried', 'Germering', 'Germersheim', 'Gersthofen', 'Geseke', 'Gevelsberg', 'Gießen', 'Gifhorn', 'Gladbeck', 'Glauchau', 'Goch', 'Göppingen', 'Görlitz', 'Goslar', 'Gotha', 'Göttingen', 'Greifswald', 'Greiz', 'Greven', 'Grevenbroich', 'Griesheim', 'Grimma', 'Gronau (Westf.)', 'Groß-Gerau', 'Groß-Umstadt', 'Gummersbach', 'Günzburg', 'Güstrow', 'Gütersloh', 'Haan', 'Haar', 'Hagen', 'Halberstadt', 'Halle (Saale)', 'Halle (Westf.)', 'Haltern am See', 'Hamburg', 'Hameln', 'Hamm', 'Hamminkeln', 'Hanau', 'Hann. Münden', 'Hannover', 'Haren (Ems)', 'Harsewinkel', 'Haßloch', 'Hattersheim am Main', 'Hattingen', 'Heide', 'Heidelberg', 'Heidenheim an der Brenz', 'Heilbronn', 'Heiligenhaus', 'Heinsberg', 'Helmstedt', 'Hemer', 'Hennef (Sieg)', 'Hennigsdorf', 'Henstedt-Ulzburg', 'Heppenheim (Bergstraße)', 'Herborn', 'Herdecke', 'Herford', 'Herne', 'Herrenberg', 'Herten', 'Herzogenaurach', 'Herzogenrath', 'Hilden', 'Hildesheim', 'Hockenheim', 'Hof', 'Hofheim am Taunus', 'Hohen Neuendorf', 'Holzminden', 'Homburg', 'Horb am Neckar', 'Höxter', 'Hoyerswerda', 'Hückelhoven', 'Hürth', 'Husum', @@ -44,7 +44,7 @@ class Address extends \Faker\Provider\Address 'Übach-Palenberg', 'Überlingen', 'Uelzen', 'Uetze', 'Ulm', 'Unna', 'Unterhaching', 'Unterschleißheim', 'Vaihingen an der Enz', 'Varel', 'Vaterstetten', 'Vechta', 'Velbert', 'Verden (Aller)', 'Verl', 'Versmold', 'Viernheim', 'Viersen', 'Villingen-Schwenningen', 'Voerde (Niederrhein)', 'Völklingen', 'Vreden', - 'Wachtberg', 'Waghäusel', 'Waiblingen', 'Waldkirch', 'Waldkraiburg', 'Waldshut-Tiengen', 'Wallenhorst', 'Walsrode', 'Waltrop', 'Wandlitz', 'Wangen im Allgäu', 'Warburg', 'Waren (Müritz)', 'Warendorf', 'Warstein', 'Wedel', 'Wedemark', 'Wegberg', 'Weiden in der Oberpfalz', 'Weil am Rhein', 'Weilheim in Oberbayern', 'Weimar', 'Weingarten', 'Weinheim', 'Weinstadt', 'Weißenfels', 'Weiterstadt', 'Werdau', 'Werder (Havel)', 'Werl', 'Wermelskirchen', 'Werne', 'Wernigerode', 'Wertheim', 'Wesel', 'Wesseling', 'Westerstede', 'Westoverledingen', 'Wetter (Ruhr)', 'Wetzlar', 'Weyhe', 'Wiehl', 'Wiesbaden', 'Wiesloch', 'Wilhelmshaven', 'Willich', 'Wilnsdorf', 'Winnenden', 'Winsen (Luhe)', 'Wipperfürth', 'Wismar', 'Witten', 'Wittenberg, Lutherstadt', 'Wittmund', 'Wolfenbüttel', 'Wolfsburg', 'Worms', 'Wülfrath', 'Wunstorf', 'Wuppertal', 'Würselen', 'Würzburg', + 'Wachtberg', 'Waghäusel', 'Waiblingen', 'Waldkirch', 'Waldkraiburg', 'Waldshut-Tiengen', 'Wallenhorst', 'Walsrode', 'Waltrop', 'Wandlitz', 'Wangen im Allgäu', 'Warburg', 'Waren (Müritz)', 'Warendorf', 'Warstein', 'Wedel', 'Wedemark', 'Wegberg', 'Weiden in der Oberpfalz', 'Weil am Rhein', 'Weilheim in Oberbayern', 'Weimar', 'Weingarten', 'Weinheim', 'Weinstadt', 'Weißenfels', 'Weiterstadt', 'Werdau', 'Werder (Havel)', 'Werl', 'Wermelskirchen', 'Werne', 'Wernigerode', 'Wertheim', 'Wesel', 'Wesseling', 'Westerstede', 'Westoverledingen', 'Wetter (Ruhr)', 'Wetzlar', 'Weyhe', 'Wiehl', 'Wiesbaden', 'Wiesloch', 'Wilhelmshaven', 'Willich', 'Wilnsdorf', 'Winnenden', 'Winsen (Luhe)', 'Wipperfürth', 'Wismar', 'Witten', 'Lutherstadt Wittenberg', 'Wittmund', 'Wolfenbüttel', 'Wolfsburg', 'Worms', 'Wülfrath', 'Wunstorf', 'Wuppertal', 'Würselen', 'Würzburg', 'Xanten', 'Zeitz', 'Zerbst/Anhalt', 'Zirndorf', 'Zittau', 'Zülpich', 'Zweibrücken', 'Zwickau', ); diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/de_DE/Internet.php b/vendor/fzaninotto/faker/src/Faker/Provider/de_DE/Internet.php index 7dc33358..2e99de33 100644 --- a/vendor/fzaninotto/faker/src/Faker/Provider/de_DE/Internet.php +++ b/vendor/fzaninotto/faker/src/Faker/Provider/de_DE/Internet.php @@ -4,6 +4,23 @@ namespace Faker\Provider\de_DE; class Internet extends \Faker\Provider\Internet { - protected static $freeEmailDomain = array('web.de', 'gmail.com', 'hotmail.de', 'yahoo.de', 'googlemail.com', 'aol.de', 'gmx.de'); + /** + * @link https://www.statista.com/statistics/446418/most-popular-e-mail-providers-germany/ + * @link http://blog.shuttlecloud.com/the-10-most-popular-email-providers-in-germany + */ + protected static $freeEmailDomain = array( + 'web.de', + 'gmail.com', + 'hotmail.de', + 'yahoo.de', + 'googlemail.com', + 'aol.de', + 'gmx.de', + 'freenet.de', + 'posteo.de', + 'mail.de', + 'live.de', + 't-online.de' + ); protected static $tld = array('com', 'com', 'com', 'net', 'org', 'de', 'de', 'de'); } diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/el_GR/Company.php b/vendor/fzaninotto/faker/src/Faker/Provider/el_GR/Company.php index 24b621fe..5801cafa 100644 --- a/vendor/fzaninotto/faker/src/Faker/Provider/el_GR/Company.php +++ b/vendor/fzaninotto/faker/src/Faker/Provider/el_GR/Company.php @@ -42,7 +42,7 @@ class Company extends \Faker\Provider\Company ); - protected static $οbject = array( + protected static $object = array( 'Προγραμματιστής', 'Δικηγόρος', 'Γιατρός', @@ -79,6 +79,6 @@ class Company extends \Faker\Provider\Company */ public static function object() { - return static::randomElement(static::$οbject); + return static::randomElement(static::$object); } } diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/en_NZ/Internet.php b/vendor/fzaninotto/faker/src/Faker/Provider/en_NZ/Internet.php index b32e6685..8a9af3ad 100644 --- a/vendor/fzaninotto/faker/src/Faker/Provider/en_NZ/Internet.php +++ b/vendor/fzaninotto/faker/src/Faker/Provider/en_NZ/Internet.php @@ -5,10 +5,12 @@ namespace Faker\Provider\en_NZ; class Internet extends \Faker\Provider\Internet { /** - * An array of common en_NZ (New Zeland) TLD's + * An array of New Zealand TLDs. + * + * @link https://en.wikipedia.org/wiki/.nz * @var array */ protected static $tld = array( - 'com', 'co.nz', 'ac.nz', 'geek.nz', 'gen.nz', 'kiwi.nz', 'maori.nz', 'net.nz', 'org.nz', 'school.nz', 'govt.nz', 'iwi.nz', 'mil.nz', 'health.nz', 'parliment.nz' + 'com', 'nz', 'ac.nz', 'co.nz', 'geek.nz', 'gen.nz', 'kiwi.nz', 'maori.nz', 'net.nz', 'org.nz', 'school.nz', 'cri.nz', 'govt.nz', 'health.nz', 'iwi.nz', 'mil.nz', 'parliament.nz', ); } diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/en_US/Company.php b/vendor/fzaninotto/faker/src/Faker/Provider/en_US/Company.php index 3aaf2a31..dff1635e 100644 --- a/vendor/fzaninotto/faker/src/Faker/Provider/en_US/Company.php +++ b/vendor/fzaninotto/faker/src/Faker/Provider/en_US/Company.php @@ -18,7 +18,7 @@ class Company extends \Faker\Provider\Company '24hour', '24/7', '3rdgeneration', '4thgeneration', '5thgeneration', '6thgeneration', 'actuating', 'analyzing', 'assymetric', 'asynchronous', 'attitude-oriented', 'background', 'bandwidth-monitored', 'bi-directional', 'bifurcated', 'bottom-line', 'clear-thinking', 'client-driven', 'client-server', 'coherent', 'cohesive', 'composite', 'context-sensitive', 'contextually-based', 'content-based', 'dedicated', 'demand-driven', 'didactic', 'directional', 'discrete', 'disintermediate', 'dynamic', 'eco-centric', 'empowering', 'encompassing', 'even-keeled', 'executive', 'explicit', 'exuding', 'fault-tolerant', 'foreground', 'fresh-thinking', 'full-range', 'global', 'grid-enabled', 'heuristic', 'high-level', 'holistic', 'homogeneous', 'human-resource', 'hybrid', 'impactful', 'incremental', 'intangible', 'interactive', 'intermediate', 'leadingedge', 'local', 'logistical', 'maximized', 'methodical', 'mission-critical', 'mobile', 'modular', 'motivating', 'multimedia', 'multi-state', 'multi-tasking', 'national', 'needs-based', 'neutral', 'nextgeneration', 'non-volatile', 'object-oriented', 'optimal', 'optimizing', 'radical', 'real-time', 'reciprocal', 'regional', 'responsive', 'scalable', 'secondary', 'solution-oriented', 'stable', 'static', 'systematic', 'systemic', 'system-worthy', 'tangible', 'tertiary', 'transitional', 'uniform', 'upward-trending', 'user-facing', 'value-added', 'web-enabled', 'well-modulated', 'zeroadministration', 'zerodefect', 'zerotolerance', ), array( - 'ability', 'access', 'adapter', 'algorithm', 'alliance', 'analyzer', 'application', 'approach', 'architecture', 'archive', 'artificialintelligence', 'array', 'attitude', 'benchmark', 'budgetarymanagement', 'capability', 'capacity', 'challenge', 'circuit', 'collaboration', 'complexity', 'concept', 'conglomeration', 'contingency', 'core', 'customerloyalty', 'database', 'data-warehouse', 'definition', 'emulation', 'encoding', 'encryption', 'extranet', 'firmware', 'flexibility', 'focusgroup', 'forecast', 'frame', 'framework', 'function', 'functionalities', 'GraphicInterface', 'groupware', 'GraphicalUserInterface', 'hardware', 'help-desk', 'hierarchy', 'hub', 'implementation', 'info-mediaries', 'infrastructure', 'initiative', 'installation', 'instructionset', 'interface', 'internetsolution', 'intranet', 'knowledgeuser', 'knowledgebase', 'localareanetwork', 'leverage', 'matrices', 'matrix', 'methodology', 'middleware', 'migration', 'model', 'moderator', 'monitoring', 'moratorium', 'neural-net', 'openarchitecture', 'opensystem', 'orchestration', 'paradigm', 'parallelism', 'policy', 'portal', 'pricingstructure', 'processimprovement', 'product', 'productivity', 'project', 'projection', 'protocol', 'securedline', 'service-desk', 'software', 'solution', 'standardization', 'strategy', 'structure', 'success', 'superstructure', 'support', 'synergy', 'systemengine', 'task-force', 'throughput', 'time-frame', 'toolset', 'utilisation', 'website', 'workforce', + 'ability', 'access', 'adapter', 'algorithm', 'alliance', 'analyzer', 'application', 'approach', 'architecture', 'archive', 'artificialintelligence', 'array', 'attitude', 'benchmark', 'blockchain', 'budgetarymanagement', 'capability', 'capacity', 'challenge', 'circuit', 'collaboration', 'complexity', 'concept', 'conglomeration', 'contingency', 'core', 'customerloyalty', 'database', 'data-warehouse', 'definition', 'emulation', 'encoding', 'encryption', 'extranet', 'firmware', 'flexibility', 'focusgroup', 'forecast', 'frame', 'framework', 'function', 'functionalities', 'GraphicInterface', 'groupware', 'GraphicalUserInterface', 'hardware', 'help-desk', 'hierarchy', 'hub', 'implementation', 'info-mediaries', 'infrastructure', 'initiative', 'installation', 'instructionset', 'interface', 'internetsolution', 'intranet', 'knowledgeuser', 'knowledgebase', 'localareanetwork', 'leverage', 'matrices', 'matrix', 'methodology', 'middleware', 'migration', 'model', 'moderator', 'monitoring', 'moratorium', 'neural-net', 'openarchitecture', 'opensystem', 'orchestration', 'paradigm', 'parallelism', 'policy', 'portal', 'pricingstructure', 'processimprovement', 'product', 'productivity', 'project', 'projection', 'protocol', 'securedline', 'service-desk', 'software', 'solution', 'standardization', 'strategy', 'structure', 'success', 'superstructure', 'support', 'synergy', 'systemengine', 'task-force', 'throughput', 'time-frame', 'toolset', 'utilisation', 'website', 'workforce', ), ); @@ -65,6 +65,15 @@ class Company extends \Faker\Provider\Company protected static $companySuffix = array('Inc', 'and Sons', 'LLC', 'Group', 'PLC', 'Ltd'); + /** + * @link https://www.irs.gov/businesses/small-businesses-self-employed/how-eins-are-assigned-and-valid-ein-prefixes + */ + protected static $einPrefixes = array( + 01, 02, 03, 04, 05, 06, 10, 11, 12, 13, 14, 15, 16, 20, 21, 22, 23, 24, 25, 26, 27, 30, 31, 32, 33, 34, 35, 36, + 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, + 66, 67, 68, 71, 72, 73, 74, 75, 76, 77, 80, 81, 82, 83, 84, 85, 86, 87, 88, 90, 91, 92, 93, 94, 95, 98, 99 + ); + /** * @example 'Robust full-range hub' */ @@ -90,4 +99,18 @@ class Company extends \Faker\Provider\Company return join($result, ' '); } + + /** + * Employer Identification Number (EIN) + * + * @link https://en.wikipedia.org/wiki/Employer_Identification_Number + * @example '12-3456789' + */ + public static function ein() + { + $prefix = static::randomElement(static::$einPrefixes); + $suffix = static::numberBetween(0, 9999999); + + return sprintf("%02d-%07d", $prefix, $suffix); + } } diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/en_US/Person.php b/vendor/fzaninotto/faker/src/Faker/Provider/en_US/Person.php index edfd6351..47054ffb 100644 --- a/vendor/fzaninotto/faker/src/Faker/Provider/en_US/Person.php +++ b/vendor/fzaninotto/faker/src/Faker/Provider/en_US/Person.php @@ -88,7 +88,7 @@ class Person extends \Faker\Provider\Person 'Ebert', 'Effertz', 'Eichmann', 'Emard', 'Emmerich', 'Erdman', 'Ernser', 'Fadel', 'Fahey', 'Farrell', 'Fay', 'Feeney', 'Feest', 'Feil', 'Ferry', 'Fisher', 'Flatley', 'Frami', 'Franecki', 'Friesen', 'Fritsch', 'Funk', 'Gaylord', 'Gerhold', 'Gerlach', 'Gibson', 'Gislason', 'Gleason', 'Gleichner', 'Glover', 'Goldner', 'Goodwin', 'Gorczany', 'Gottlieb', 'Goyette', 'Grady', 'Graham', 'Grant', 'Green', 'Greenfelder', 'Greenholt', 'Grimes', 'Gulgowski', 'Gusikowski', 'Gutkowski', 'Gutmann', - 'Haag', 'Hackett', 'Hagenes', 'Hahn', 'Haley', 'Halvorson', 'Hamill', 'Hammes', 'Hand', 'Hane', 'Hansen', 'Harber', 'Harris', 'Hartmann', 'Harvey', 'Hauck', 'Hayes', 'Heaney', 'Heathcote', 'Hegmann', 'Heidenreich', 'Heller', 'Herman', 'Hermann', 'Hermiston', 'Herzog', 'Hessel', 'Hettinger', 'Hickle', 'Hilll', 'Hills', 'Hilpert', 'Hintz', 'Hirthe', 'Hodkiewicz', 'Hoeger', 'Homenick', 'Hoppe', 'Howe', 'Howell', 'Hudson', 'Huel', 'Huels', 'Hyatt', + 'Haag', 'Hackett', 'Hagenes', 'Hahn', 'Haley', 'Halvorson', 'Hamill', 'Hammes', 'Hand', 'Hane', 'Hansen', 'Harber', 'Harris', 'Hartmann', 'Harvey', 'Hauck', 'Hayes', 'Heaney', 'Heathcote', 'Hegmann', 'Heidenreich', 'Heller', 'Herman', 'Hermann', 'Hermiston', 'Herzog', 'Hessel', 'Hettinger', 'Hickle', 'Hill', 'Hills', 'Hilpert', 'Hintz', 'Hirthe', 'Hodkiewicz', 'Hoeger', 'Homenick', 'Hoppe', 'Howe', 'Howell', 'Hudson', 'Huel', 'Huels', 'Hyatt', 'Jacobi', 'Jacobs', 'Jacobson', 'Jakubowski', 'Jaskolski', 'Jast', 'Jenkins', 'Jerde', 'Johns', 'Johnson', 'Johnston', 'Jones', 'Kassulke', 'Kautzer', 'Keebler', 'Keeling', 'Kemmer', 'Kerluke', 'Kertzmann', 'Kessler', 'Kiehn', 'Kihn', 'Kilback', 'King', 'Kirlin', 'Klein', 'Kling', 'Klocko', 'Koch', 'Koelpin', 'Koepp', 'Kohler', 'Konopelski', 'Koss', 'Kovacek', 'Kozey', 'Krajcik', 'Kreiger', 'Kris', 'Kshlerin', 'Kub', 'Kuhic', 'Kuhlman', 'Kuhn', 'Kulas', 'Kunde', 'Kunze', 'Kuphal', 'Kutch', 'Kuvalis', 'Labadie', 'Lakin', 'Lang', 'Langosh', 'Langworth', 'Larkin', 'Larson', 'Leannon', 'Lebsack', 'Ledner', 'Leffler', 'Legros', 'Lehner', 'Lemke', 'Lesch', 'Leuschke', 'Lind', 'Lindgren', 'Littel', 'Little', 'Lockman', 'Lowe', 'Lubowitz', 'Lueilwitz', 'Luettgen', 'Lynch', @@ -107,7 +107,7 @@ class Person extends \Faker\Provider\Person 'Zboncak', 'Zemlak', 'Ziemann', 'Zieme', 'Zulauf' ); - private static $suffix = array('Jr.', 'Sr.', 'I', 'II', 'III', 'IV', 'V', 'MD', 'DDS', 'PhD', 'DVM'); + protected static $suffix = array('Jr.', 'Sr.', 'I', 'II', 'III', 'IV', 'V', 'MD', 'DDS', 'PhD', 'DVM'); /** * @example 'PhD' diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/en_ZA/Person.php b/vendor/fzaninotto/faker/src/Faker/Provider/en_ZA/Person.php index 97492511..d44d4731 100644 --- a/vendor/fzaninotto/faker/src/Faker/Provider/en_ZA/Person.php +++ b/vendor/fzaninotto/faker/src/Faker/Provider/en_ZA/Person.php @@ -3,7 +3,6 @@ namespace Faker\Provider\en_ZA; use Faker\Calculator\Luhn; -use Faker\Provider\DateTime; class Person extends \Faker\Provider\Person { @@ -127,13 +126,18 @@ class Person extends \Faker\Provider\Person 'Pule', 'Hlophe', 'Miya', 'Moagi', ); + protected static $titleMale = array('Mr.', 'Dr.', 'Prof.', 'Rev.', 'Hon.'); + + protected static $titleFemale = array('Mrs.', 'Ms.', 'Miss', 'Dr.', 'Prof.', 'Rev.', 'Hon.'); + + protected static $licenceCodes = array('A', 'A1', 'B', 'C', 'C1', 'C2', 'EB', 'EC', 'EC1', 'I', 'L', 'L1'); + /** * @link https://en.wikipedia.org/wiki/National_identification_number#South_Africa * - * @param int $minAge - * @param int $maxAge - * @param bool $citizen - * @param string $gender + * @param \DateTime $birthdate + * @param bool $citizen + * @param string $gender * * @return string */ @@ -155,10 +159,20 @@ class Person extends \Faker\Provider\Person } $sequenceDigits = str_pad(self::randomNumber(3), 3, 0, STR_PAD_BOTH); $citizenDigit = ($citizen === true) ? '0' : '1'; - $raceDigit = self::randomNumber(1); + $raceDigit = self::numberBetween(8, 9); $partialIdNumber = $birthDateString . $genderDigit . $sequenceDigits . $citizenDigit . $raceDigit; return $partialIdNumber . Luhn::computeCheckDigit($partialIdNumber); } + + /** + * @see https://en.wikipedia.org/wiki/Driving_licence_in_South_Africa + * + * @return string + */ + public function licenceCode() + { + return static::randomElement(static::$licenceCodes); + } } diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/es_ES/Person.php b/vendor/fzaninotto/faker/src/Faker/Provider/es_ES/Person.php index 2ee0c393..9787bf92 100644 --- a/vendor/fzaninotto/faker/src/Faker/Provider/es_ES/Person.php +++ b/vendor/fzaninotto/faker/src/Faker/Provider/es_ES/Person.php @@ -63,6 +63,8 @@ class Person extends \Faker\Provider\Person private static $suffix = array('Hijo', 'Segundo', 'Tercero'); + protected static $licenceCodes = array('AM', 'A1', 'A2', 'A','B', 'B+E', 'C1', 'C1+E', 'C', 'C+E', 'D1', 'D1+E', 'D', 'D+E'); + /** * @example 'Hijo' */ @@ -85,4 +87,14 @@ class Person extends \Faker\Provider\Person return $number . $letter; } + + /** + * @see https://sede.dgt.gob.es/es/tramites-y-multas/permiso-de-conduccion/obtencion-permiso-licencia-conduccion/clases-permiso-conduccion-edad.shtml + * + * @return string + */ + public function licenceCode() + { + return static::randomElement(static::$licenceCodes); + } } diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/es_VE/Company.php b/vendor/fzaninotto/faker/src/Faker/Provider/es_VE/Company.php index 7793842d..e2e57383 100644 --- a/vendor/fzaninotto/faker/src/Faker/Provider/es_VE/Company.php +++ b/vendor/fzaninotto/faker/src/Faker/Provider/es_VE/Company.php @@ -27,4 +27,14 @@ class Company extends \Faker\Provider\Company { return static::randomElement(static::$companyPrefix); } + + /** + * Generate random Taxpayer Identification Number (RIF in Venezuela). Ex J-123456789-1 + * @param string $separator + * @return string + */ + public function taxpayerIdentificationNumber($separator = '') + { + return static::randomElement(array('J', 'G', 'V', 'E', 'P', 'C')) . $separator . static::numerify('########') . $separator . static::numerify('#'); + } } diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/es_VE/Person.php b/vendor/fzaninotto/faker/src/Faker/Provider/es_VE/Person.php index b1da57c1..93e6c9fa 100644 --- a/vendor/fzaninotto/faker/src/Faker/Provider/es_VE/Person.php +++ b/vendor/fzaninotto/faker/src/Faker/Provider/es_VE/Person.php @@ -137,7 +137,7 @@ class Person extends \Faker\Provider\Person protected static $titleFemale = array('Sra.', 'Srita.', 'Dra.', 'Lcda.', 'Ing.'); private static $suffix = array('Hijo'); - + private static $nationalityId = array('V', 'E'); /** @@ -149,18 +149,19 @@ class Person extends \Faker\Provider\Person } /** - * Generate random national identification number including nationalized foreigns. Ex V-8756432 or E-82803827 - * @return string + * Generate random national identification number (cédula de identidad). Ex V-8756432 + * @param string $separator + * @return string CNE is the official national election registry org. * CNE is the official national election registry org. * @link http://www.cne.gob.ve/web/registro_electoral/ciudadanos_111_129_2011.php */ - public function nationalId() + public function nationalId($separator = '') { $id = static::randomElement(static::$nationalityId); if ($id == 'V') { - return $id.$this->numberBetween(10000, 100000000); - } else { - return $id.$this->numberBetween(80000000, 100000000); + return $id . $separator . $this->numberBetween(10000, 100000000); } + + return $id . $separator . $this->numberBetween(80000000, 100000000); } } diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/fr_CA/Address.php b/vendor/fzaninotto/faker/src/Faker/Provider/fr_CA/Address.php index 9dfe4470..4930b54f 100644 --- a/vendor/fzaninotto/faker/src/Faker/Provider/fr_CA/Address.php +++ b/vendor/fzaninotto/faker/src/Faker/Provider/fr_CA/Address.php @@ -76,7 +76,7 @@ class Address extends \Faker\Provider\fr_FR\Address protected static $secondaryAddressFormats = array('Apt. ###', 'Suite ###', 'Bureau ###'); protected static $state = array( - 'Alberta', 'Colombie-Brittanique', 'Manitoba', 'Nouveau-Brunswick', 'Terre-Neuve-et-Labrador', 'Nouvelle-Écosse', 'Ontario', 'Île-du-Prince-Édouard', 'Québec', 'Saskatchewan' + 'Alberta', 'Colombie-Britannique', 'Manitoba', 'Nouveau-Brunswick', 'Terre-Neuve-et-Labrador', 'Nouvelle-Écosse', 'Ontario', 'Île-du-Prince-Édouard', 'Québec', 'Saskatchewan' ); protected static $stateAbbr = array( diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/fr_CH/Company.php b/vendor/fzaninotto/faker/src/Faker/Provider/fr_CH/Company.php index e2b4d4e8..a4e91eaf 100644 --- a/vendor/fzaninotto/faker/src/Faker/Provider/fr_CH/Company.php +++ b/vendor/fzaninotto/faker/src/Faker/Provider/fr_CH/Company.php @@ -11,5 +11,5 @@ class Company extends \Faker\Provider\fr_FR\Company '{{lastName}}', ); - protected static $companySuffix = array('AG', 'Sàrl'); + protected static $companySuffix = array('AG', 'Sàrl', 'SA', 'GmbH'); } diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/fr_FR/Address.php b/vendor/fzaninotto/faker/src/Faker/Provider/fr_FR/Address.php index 537a9932..5cd1f4e5 100644 --- a/vendor/fzaninotto/faker/src/Faker/Provider/fr_FR/Address.php +++ b/vendor/fzaninotto/faker/src/Faker/Provider/fr_FR/Address.php @@ -75,6 +75,16 @@ class Address extends \Faker\Provider\Address array('971' => 'Guadeloupe'), array('972' => 'Martinique'), array('973' => 'Guyane'), array('974' => 'La Réunion'), array('976' => 'Mayotte') ); + protected static $secondaryAddressFormats = array('Apt. ###', 'Suite ###', 'Étage ###', "Bât. ###", "Chambre ###"); + + /** + * @example 'Appt. 350' + */ + public static function secondaryAddress() + { + return static::numerify(static::randomElement(static::$secondaryAddressFormats)); + } + /** * @example 'rue' */ diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/fr_FR/Company.php b/vendor/fzaninotto/faker/src/Faker/Provider/fr_FR/Company.php index e1aca223..9112802c 100644 --- a/vendor/fzaninotto/faker/src/Faker/Provider/fr_FR/Company.php +++ b/vendor/fzaninotto/faker/src/Faker/Provider/fr_FR/Company.php @@ -112,7 +112,7 @@ class Company extends \Faker\Provider\Company */ public function siret($formatted = true) { - $siret = $this->siren(false); + $siret = self::siren(false); $nicFormat = static::randomElement(static::$siretNicFormats); $siret .= $this->numerify($nicFormat); $siret .= Luhn::computeCheckDigit($siret); @@ -129,9 +129,9 @@ class Company extends \Faker\Provider\Company * @see http://fr.wikipedia.org/wiki/Syst%C3%A8me_d%27identification_du_r%C3%A9pertoire_des_entreprises * @return string */ - public function siren($formatted = true) + public static function siren($formatted = true) { - $siren = $this->numerify('%#######'); + $siren = self::numerify('%#######'); $siren .= Luhn::computeCheckDigit($siren); if ($formatted) { $siren = substr($siren, 0, 3) . ' ' . substr($siren, 3, 3) . ' ' . substr($siren, 6, 3); diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/fr_FR/Payment.php b/vendor/fzaninotto/faker/src/Faker/Provider/fr_FR/Payment.php index 5d5ff895..d436dfe3 100644 --- a/vendor/fzaninotto/faker/src/Faker/Provider/fr_FR/Payment.php +++ b/vendor/fzaninotto/faker/src/Faker/Provider/fr_FR/Payment.php @@ -19,9 +19,14 @@ class Payment extends \Faker\Provider\Payment */ public function vat($spacedNationalPrefix = true) { - $prefix = ($spacedNationalPrefix) ? "FR " : "FR"; - - return sprintf("%s%s%s%s", $prefix, self::randomNumber(2, true), $this->siren($spacedNationalPrefix)); + $siren = Company::siren(false); + $key = (12 + 3 * ($siren % 97)) % 97; + $pattern = "%s%'.02d%s"; + if ($spacedNationalPrefix) { + $siren = trim(chunk_split($siren, 3, ' ')); + $pattern = "%s %'.02d %s"; + } + return sprintf($pattern, 'FR', $key, $siren); } /** diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/fr_FR/PhoneNumber.php b/vendor/fzaninotto/faker/src/Faker/Provider/fr_FR/PhoneNumber.php index 52736050..7c0bd9d5 100644 --- a/vendor/fzaninotto/faker/src/Faker/Provider/fr_FR/PhoneNumber.php +++ b/vendor/fzaninotto/faker/src/Faker/Provider/fr_FR/PhoneNumber.php @@ -15,7 +15,7 @@ class PhoneNumber extends \Faker\Provider\PhoneNumber '+33 (0)5 ## ## ## ##', '+33 (0)6 ## ## ## ##', '+33 (0)7 {{phoneNumber07WithSeparator}}', - '+33 (0)8 ## ## ## ##', + '+33 (0)8 {{phoneNumber08WithSeparator}}', '+33 (0)9 ## ## ## ##', '+33 1 ## ## ## ##', '+33 1 ## ## ## ##', @@ -25,7 +25,7 @@ class PhoneNumber extends \Faker\Provider\PhoneNumber '+33 5 ## ## ## ##', '+33 6 ## ## ## ##', '+33 7 {{phoneNumber07WithSeparator}}', - '+33 8 ## ## ## ##', + '+33 8 {{phoneNumber08WithSeparator}}', '+33 9 ## ## ## ##', '01########', '01########', @@ -35,7 +35,7 @@ class PhoneNumber extends \Faker\Provider\PhoneNumber '05########', '06########', '07{{phoneNumber07}}', - '08########', + '08{{phoneNumber08}}', '09########', '01 ## ## ## ##', '01 ## ## ## ##', @@ -45,19 +45,28 @@ class PhoneNumber extends \Faker\Provider\PhoneNumber '05 ## ## ## ##', '06 ## ## ## ##', '07 {{phoneNumber07WithSeparator}}', - '08 ## ## ## ##', + '08 {{phoneNumber08WithSeparator}}', '09 ## ## ## ##', ); // Mobile phone numbers start by 06 and 07 // 06 is the most common prefix protected static $mobileFormats = array( + '+33 (0)6 ## ## ## ##', '+33 6 ## ## ## ##', + '+33 (0)7 {{phoneNumber07WithSeparator}}', '+33 7 {{phoneNumber07WithSeparator}}', '06########', - '07########', + '07{{phoneNumber07}}', '06 ## ## ## ##', - '07 ## ## ## ##', + '07 {{phoneNumber07WithSeparator}}', + ); + + protected static $serviceFormats = array( + '+33 (0)8 {{phoneNumber08WithSeparator}}', + '+33 8 {{phoneNumber08WithSeparator}}', + '08 {{phoneNumber08WithSeparator}}', + '08{{phoneNumber08}}', ); public function phoneNumber07() @@ -79,11 +88,54 @@ class PhoneNumber extends \Faker\Provider\PhoneNumber return $phoneNumber; } + public function phoneNumber08() + { + $phoneNumber = $this->phoneNumber08WithSeparator(); + $phoneNumber = str_replace(' ', '', $phoneNumber); + return $phoneNumber; + } + + /** + * Valid formats for 08: + * + * 0# ## ## ## + * 1# ## ## ## + * 2# ## ## ## + * 91 ## ## ## + * 92 ## ## ## + * 93 ## ## ## + * 97 ## ## ## + * 98 ## ## ## + * 99 ## ## ## + * + * Formats 089(4|6)## ## ## are valid, but will be + * attributed when other 089 resource ranges are exhausted. + * + * @see https://www.arcep.fr/index.php?id=8146#c9625 + * @see https://issuetracker.google.com/u/1/issues/73269839 + */ + public function phoneNumber08WithSeparator() + { + $regex = '([012]{1}\d{1}|(9[1-357-9])( \d{2}){3}'; + return $this->regexify($regex); + } + /** * @example '0601020304' */ - public static function mobileNumber() + public function mobileNumber() { - return static::numerify(static::randomElement(static::$mobileFormats)); + $format = static::randomElement(static::$mobileFormats); + + return static::numerify($this->generator->parse($format)); + } + /** + * @example '0891951357' + */ + public function serviceNumber() + { + $format = static::randomElement(static::$serviceFormats); + + return static::numerify($this->generator->parse($format)); } } diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/hu_HU/Address.php b/vendor/fzaninotto/faker/src/Faker/Provider/hu_HU/Address.php index 7c4f4903..47abe74e 100644 --- a/vendor/fzaninotto/faker/src/Faker/Provider/hu_HU/Address.php +++ b/vendor/fzaninotto/faker/src/Faker/Provider/hu_HU/Address.php @@ -120,8 +120,8 @@ class Address extends \Faker\Provider\Address * Source: https://hu.wikipedia.org/wiki/Magyarorsz%C3%A1g_v%C3%A1rosainak_list%C3%A1ja */ protected static $capitals = array('Budapest'); - protected static $bigCities = array(' - Békéscsaba', 'Debrecen', 'Dunaújváros', 'Eger', 'Érd', 'Győr', 'Hódmezővásárhely', 'Kaposvár', 'Kecskemét', 'Miskolc', 'Nagykanizsa', 'Nyíregyháza', 'Pécs', 'Salgótarján', 'Sopron', 'Szeged', 'Székesfehérvár', 'Szekszárd', 'Szolnok', 'Szombathely', 'Tatabánya', 'Veszprém', 'Zalaegerszeg' + protected static $bigCities = array( + 'Békéscsaba', 'Debrecen', 'Dunaújváros', 'Eger', 'Érd', 'Győr', 'Hódmezővásárhely', 'Kaposvár', 'Kecskemét', 'Miskolc', 'Nagykanizsa', 'Nyíregyháza', 'Pécs', 'Salgótarján', 'Sopron', 'Szeged', 'Székesfehérvár', 'Szekszárd', 'Szolnok', 'Szombathely', 'Tatabánya', 'Veszprém', 'Zalaegerszeg' ); protected static $smallerCities = array( 'Ajka', 'Aszód', 'Bácsalmás', diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/it_IT/Company.php b/vendor/fzaninotto/faker/src/Faker/Provider/it_IT/Company.php index f27499a3..6acb6daa 100644 --- a/vendor/fzaninotto/faker/src/Faker/Provider/it_IT/Company.php +++ b/vendor/fzaninotto/faker/src/Faker/Provider/it_IT/Company.php @@ -2,6 +2,8 @@ namespace Faker\Provider\it_IT; +use Faker\Calculator\Luhn; + class Company extends \Faker\Provider\Company { protected static $formats = array( @@ -69,6 +71,8 @@ class Company extends \Faker\Provider\Company */ public static function vatId() { - return static::numerify('IT###########'); + $code = sprintf('%s%03d', static::numerify('#######'), static::numberBetween(1, 121)); + + return sprintf('IT%s%d', $code, Luhn::computeCheckDigit($code)); } } diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/kk_KZ/Person.php b/vendor/fzaninotto/faker/src/Faker/Provider/kk_KZ/Person.php index 7e52f74b..4e1e6811 100644 --- a/vendor/fzaninotto/faker/src/Faker/Provider/kk_KZ/Person.php +++ b/vendor/fzaninotto/faker/src/Faker/Provider/kk_KZ/Person.php @@ -209,14 +209,17 @@ class Person extends \Faker\Provider\Person $birthDate = DateTime::dateTimeBetween(); } - $population = mt_rand(1000, 2000); - $century = self::getCenturyByYear((int) $birthDate->format('Y')); + do { + $population = mt_rand(1000, 2000); + $century = self::getCenturyByYear((int) $birthDate->format('Y')); - $iin = $birthDate->format('ymd'); - $iin .= (string) self::$genderCenturyMap[$gender][$century]; - $iin .= (string) $population; + $iin = $birthDate->format('ymd'); + $iin .= (string) self::$genderCenturyMap[$gender][$century]; + $iin .= (string) $population; + $checksum = self::checkSum($iin); + } while ($checksum === 10); - return $iin . (string) self::checkSum($iin); + return $iin . (string) $checksum; } /** diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/ko_KR/PhoneNumber.php b/vendor/fzaninotto/faker/src/Faker/Provider/ko_KR/PhoneNumber.php index c1c0a2e9..6008bbf3 100644 --- a/vendor/fzaninotto/faker/src/Faker/Provider/ko_KR/PhoneNumber.php +++ b/vendor/fzaninotto/faker/src/Faker/Provider/ko_KR/PhoneNumber.php @@ -4,14 +4,39 @@ namespace Faker\Provider\ko_KR; class PhoneNumber extends \Faker\Provider\PhoneNumber { + //reference : https://ko.wikipedia.org/wiki/%EB%8C%80%ED%95%9C%EB%AF%BC%EA%B5%AD%EC%9D%98_%EC%A0%84%ED%99%94%EB%B2%88%ED%98%B8_%EC%B2%B4%EA%B3%84 + protected static $formats = array( - '010-####-####', + //local area phone format '070-####-####', '02-####-####', '03#-####-####', '04#-####-####', '05#-####-####', '06#-####-####', - '1588-####', + + //cell phone format + '010-####-####', + + //others: Intelligent Network(기간통신사업자) + '15##-####', + '16##-####', + '18##-####', ); + + public function localAreaPhoneNumber() + { + $format = self::randomElement(array_slice(static::$formats, 0, 6)); + + return self::numerify($this->generator->parse($format)); + } + + + + public function cellPhoneNumber() + { + $format = self::randomElement(array_slice(static::$formats, 6, 1)); + + return self::numerify($this->generator->parse($format)); + } } diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/lv_LV/Address.php b/vendor/fzaninotto/faker/src/Faker/Provider/lv_LV/Address.php index 9b098491..6f53770b 100644 --- a/vendor/fzaninotto/faker/src/Faker/Provider/lv_LV/Address.php +++ b/vendor/fzaninotto/faker/src/Faker/Provider/lv_LV/Address.php @@ -13,32 +13,35 @@ class Address extends \Faker\Provider\Address protected static $buildingNumber = array('##'); protected static $postcode = array('LV ####'); + + /** + * @link https://lv.wikipedia.org/wiki/Suver%C4%93no_valstu_uzskait%C4%ABjums + */ protected static $country = array( - 'Afghanistan', 'Albania', 'Algeria', 'American Samoa', 'Andorra', 'Angola', 'Anguilla', 'Antarctica (the territory South of 60 deg S)', 'Antigua and Barbuda', 'Argentina', 'Armenia', 'Aruba', 'Australia', 'Austria', 'Azerbaijan', - 'Bahamas', 'Bahrain', 'Bangladesh', 'Barbados', 'Belarus', 'Belgium', 'Belize', 'Benin', 'Bermuda', 'Bhutan', 'Bolivia', 'Bosnia and Herzegovina', 'Botswana', 'Bouvet Island (Bouvetoya)', 'Brazil', 'British Indian Ocean Territory (Chagos Archipelago)', 'British Virgin Islands', 'Brunei Darussalam', 'Bulgaria', 'Burkina Faso', 'Burundi', - 'Cambodia', 'Cameroon', 'Canada', 'Cape Verde', 'Cayman Islands', 'Central African Republic', 'Chad', 'Chile', 'China', 'Christmas Island', 'Cocos (Keeling) Islands', 'Colombia', 'Comoros', 'Congo', 'Congo', 'Cook Islands', 'Costa Rica', 'Cote d\'Ivoire', 'Croatia', 'Cuba', 'Cyprus', 'Czech Republic', - 'Denmark', 'Djibouti', 'Dominica', 'Dominican Republic', - 'Ecuador', 'Egypt', 'El Salvador', 'Equatorial Guinea', 'Eritrea', 'Estonia', 'Ethiopia', - 'Faroe Islands', 'Falkland Islands (Malvinas)', 'Fiji', 'Finland', 'France', 'French Guiana', 'French Polynesia', 'French Southern Territories', - 'Gabon', 'Gambia', 'Georgia', 'Germany', 'Ghana', 'Gibraltar', 'Greece', 'Greenland', 'Grenada', 'Guadeloupe', 'Guam', 'Guatemala', 'Guernsey', 'Guinea', 'Guinea-Bissau', 'Guyana', - 'Haiti', 'Heard Island and McDonald Islands', 'Holy See (Vatican City State)', 'Honduras', 'Hong Kong', 'Hungary', - 'Iceland', 'India', 'Indonesia', 'Iran', 'Iraq', 'Ireland', 'Isle of Man', 'Israel', 'Italy', - 'Jamaica', 'Japan', 'Jersey', 'Jordan', - 'Kazakhstan', 'Kenya', 'Kiribati', 'Korea', 'Korea', 'Kuwait', 'Kyrgyz Republic', - 'Lao People\'s Democratic Republic', 'Latvia', 'Lebanon', 'Lesotho', 'Liberia', 'Libyan Arab Jamahiriya', 'Liechtenstein', 'Lithuania', 'Luxembourg', - 'Macao', 'Macedonia', 'Madagascar', 'Malawi', 'Malaysia', 'Maldives', 'Mali', 'Malta', 'Marshall Islands', 'Martinique', 'Mauritania', 'Mauritius', 'Mayotte', 'Mexico', 'Micronesia', 'Moldova', 'Monaco', 'Mongolia', 'Montenegro', 'Montserrat', 'Morocco', 'Mozambique', 'Myanmar', - 'Namibia', 'Nauru', 'Nepal', 'Netherlands Antilles', 'Netherlands', 'New Caledonia', 'New Zealand', 'Nicaragua', 'Niger', 'Nigeria', 'Niue', 'Norfolk Island', 'Northern Mariana Islands', 'Norway', - 'Oman', - 'Pakistan', 'Palau', 'Palestinian Territories', 'Panama', 'Papua New Guinea', 'Paraguay', 'Peru', 'Philippines', 'Pitcairn Islands', 'Poland', 'Portugal', 'Puerto Rico', - 'Qatar', - 'Reunion', 'Romania', 'Russian Federation', 'Rwanda', - 'Saint Barthelemy', 'Saint Helena', 'Saint Kitts and Nevis', 'Saint Lucia', 'Saint Martin', 'Saint Pierre and Miquelon', 'Saint Vincent and the Grenadines', 'Samoa', 'San Marino', 'Sao Tome and Principe', 'Saudi Arabia', 'Senegal', 'Serbia', 'Seychelles', 'Sierra Leone', 'Singapore', 'Slovakia (Slovak Republic)', 'Slovenia', 'Solomon Islands', 'Somalia', 'South Africa', 'South Georgia and the South Sandwich Islands', 'Spain', 'Sri Lanka', 'Sudan', 'Suriname', 'Svalbard & Jan Mayen Islands', 'Swaziland', 'Sweden', 'Switzerland', 'Syrian Arab Republic', - 'Taiwan', 'Tajikistan', 'Tanzania', 'Thailand', 'Timor-Leste', 'Togo', 'Tokelau', 'Tonga', 'Trinidad and Tobago', 'Tunisia', 'Turkey', 'Turkmenistan', 'Turks and Caicos Islands', 'Tuvalu', - 'Uganda', 'Ukraine', 'United Arab Emirates', 'United Kingdom', 'United States of America', 'United States Minor Outlying Islands', 'United States Virgin Islands', 'Uruguay', 'Uzbekistan', - 'Vanuatu', 'Venezuela', 'Vietnam', - 'Wallis and Futuna', 'Western Sahara', - 'Yemen', - 'Zambia', 'Zimbabwe' + 'Afganistāna', 'Albānija', 'Alžīrija', 'Amerikas Savienotās Valstis', 'Andora', 'Angola', 'Antigva un Barbuda', + 'Apvienotie Arābu Emirāti', 'Argentīna', 'Armēnija', 'Austrālija', 'Austrija', 'Austrumtimora', 'Azerbaidžāna', + 'Bahamas', 'Bahreina', 'Baltkrievija', 'Bangladeša', 'Barbadosa', 'Beliza', 'Beļģija', 'Benina', 'Bolīvija', + 'Bosnija un Hercegovina', 'Botsvana', 'Brazīlija', 'Bruneja', 'Bulgārija', 'Burkinafaso', 'Burundi', 'Butāna', + 'Centrālāfrikas Republika', 'Čada', 'Čehija', 'Čīle', 'Dānija', 'Dienvidāfrikas Republika', 'Dienvidkoreja', + 'Dienvidsudāna', 'Dominika', 'Dominikāna', 'Džibutija', 'Ekvadora', 'Ekvatoriālā Gvineja', 'Eritreja', + 'Etiopija', 'Ēģipte', 'Fidži', 'Filipīnas', 'Francija', 'Gabona', 'Gajāna', 'Gambija', 'Gana', 'Grenada', + 'Grieķija', 'Gruzija', 'Gvatemala', 'Gvineja', 'Gvineja-Bisava', 'Haiti', 'Hondurasa', 'Horvātija', 'Igaunija', + 'Indija', 'Indonēzija', 'Irāka', 'Irāna', 'Islande', 'Itālija', 'Izraēla', 'Īrija', 'Jamaika', 'Japāna', + 'Jaunzēlande', 'Jemena', 'Jordānija', 'Kaboverde', 'Kambodža', 'Kamerūna', 'Kanāda', 'Katara', 'Kazahstāna', + 'Kenija', 'Kipra', 'Kirgizstāna', 'Kiribati', 'Kolumbija', 'Komoru Salas', 'Kongo', 'Kongo DR', 'Kostarika', + 'Kotdivuāra', 'Krievija', 'Kuba', 'Kuveita', 'Ķīna', 'Laosa', 'Latvija', 'Lesoto', 'Libāna', 'Libērija', + 'Lībija', 'Lielbritānija', 'Lietuva', 'Lihtenšteina', 'Luksemburga', 'Madagaskara', 'Maķedonijas Republika', + 'Malaizija', 'Malāvija', 'Maldīvija', 'Mali', 'Malta', 'Maroka', 'Māršala Salas', 'Maurīcija', 'Mauritānija', + 'Meksika', 'Melnkalne', 'Mikronēzija', 'Mjanma', 'Moldova', 'Monako', 'Mongolija', 'Mozambika', 'Namībija', + 'Nauru', 'Nepāla', 'Nīderlande', 'Nigēra', 'Nigērija', 'Nikaragva', 'Norvēģija', 'Omāna', 'Pakistāna', 'Palau', + 'Panama', 'Papua-Jaungvineja', 'Paragvaja', 'Peru', 'Polija', 'Portugāle', 'Ruanda', 'Rumānija', 'Salvadora', + 'Samoa', 'Sanmarīno', 'Santome un Prinsipi', 'Saūda Arābija', 'Seišelu Salas', 'Senegāla', + 'Sentkitsa un Nevisa', 'Sentlūsija', 'Sentvinsenta un Grenadīnas', 'Serbija', 'Singapūra', 'Sīrija', + 'Sjerraleone', 'Slovākija', 'Slovēnija', 'Somālija', 'Somija', 'Spānija', 'Sudāna', 'Surinama', 'Svazilenda', + 'Šrilanka', 'Šveice', 'Tadžikistāna', 'Taizeme', 'Tanzānija', 'Togo', 'Tonga', 'Trinidāda un Tobāgo', + 'Tunisija', 'Turcija', 'Turkmenistāna', 'Tuvalu', 'Uganda', 'Ukraina', 'Ungārija', 'Urugvaja', 'Uzbekistāna', + 'Vācija', 'Vanuatu', 'Vatikāns', 'Venecuēla', 'Vjetnama', 'Zālamana Salas', 'Zambija', 'Ziemeļkoreja', + 'Zimbabve', 'Zviedrija', ); protected static $region = array( diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/nb_NO/Company.php b/vendor/fzaninotto/faker/src/Faker/Provider/nb_NO/Company.php index 027cc9b1..ac9a2a00 100644 --- a/vendor/fzaninotto/faker/src/Faker/Provider/nb_NO/Company.php +++ b/vendor/fzaninotto/faker/src/Faker/Provider/nb_NO/Company.php @@ -15,5 +15,41 @@ class Company extends \Faker\Provider\Company '{{lastName}} og {{lastName}} {{companySuffix}}' ); - protected static $companySuffix = array('AS', 'DA', 'NUF'); + /** + * Common suffixes + * @link https://www.brreg.no/bedrift/organisasjonsformer/ + */ + protected static $companySuffix = array('ANS', 'AS', 'ASA', 'BA', 'DA', 'ENK', 'GFS', 'KTRF', 'NUF', 'PK', 'SA', 'SPA', 'STI', 'VIFE'); + + /** + * 1500 random job titles from Statistisk Sentralbyrå + * @link http://www.ssb.no/a/yrke/yrke.csv + */ + protected static $jobTitleFormat = array( + 'Administrasjonsdirektør', 'Administrasjonskonsulent', 'Administrasjonssekretær', 'Administrasjonssjef', 'Administrerende Overlege', 'Admiral', 'Advokatassistent', 'Aerobicinstruktør', 'Afis-Fullmektig', 'Agrotekniker', 'Ais-Fullmektig', 'Akrobat', 'Aktivitør', 'Akupunktør', 'Alarmoperatør', 'Allmenningbestyrer', 'Allmennpraktiserende Lege', 'Amanuensis', 'Ambassaderåd', 'Ambassadesekretær', 'Ambulansemedhjelper', 'Ambulansesjef', 'Ambulerende Vaktmester', 'Ammoniakkoker', 'Anestesilege', 'Animatør', 'Anleggsdykker', 'Anleggsgartnermester', 'Anleggsmaskinkjører', 'Anleggsmaskinmekaniker', 'Anleggsoperatør', 'Annenflyger', 'Annonseakkvisitør', 'Annonsebehandler', 'Annonsekonsulent', 'Annonseselger', 'Annonsesjef', 'Anretningshjelp', 'Apotekmedarbeider', 'Arbeidsmedisiner', 'Arbeidssjef', 'Arbeidsstudieingeniør', 'Arbeidsterapeut', 'Arbeidstilrettelegger', 'Arbeidstilsynskontrollør', 'Arbeidstilsynsrådgiver', 'Arkivassistent', 'Arkivmedarbeider', 'Arrestforvarer', 'Asfaltarbeider', 'Asfaltverkarbeider', 'Asfaltør', 'Assistentfotograf', 'Assisterende Administrerende Direktør', 'Assisterende Banksjef', 'Assisterende Bestyrer', 'Assisterende Borer', 'Assisterende Byfogd', 'Assisterende Fylkeshelsesjef', 'Assisterende Fylkeslege', 'Assisterende Fylkesmann', 'Assisterende Helsedirektør', 'Assisterende Kjøkkensjef', 'Assisterende Kommunegartner', 'Assisterende Sjefflygeleder', 'Assisterende Sjefspsykolog', 'Assisterende Sykepleiesjef', 'Assisterende Vaktmester', 'Astrofysiker', 'Astronom', 'Atomfysiker', 'Attache', 'Autoklavoperatør', 'Autoklavpasser', 'Automasjonsingeniør', 'Automatiker', 'Automatiseringsmontør', 'Avdelingsarkitekt', 'Avdelingsbanksjef', 'Avdelingsbetjent', 'Avdelingsdirektør', 'Avdelingsergoterapeut', 'Avdelingsingeniør', 'Avdelingsleder/fysioterapeut', 'Avdelingspsykolog', 'Avdelingssekretær', 'Avdelingssjef', 'Avdelingssjef Akvakultur Mv.', 'Avdelingssjef Restaurant', 'Avdelingssykepleier', 'Avlaster', 'Avlskonsulent', 'Avløser', + 'Babysvømmeinstruktør', 'Badeassistent', 'Badebetjent', 'Bakermester', 'Bakteriolog', 'Banearbeider', 'Bankassistent', 'Bankkonsulent', 'Banksjef', 'Barkeeper', 'Barmedarbeider', 'Barne- Og Ungdomssekretær', 'Barnehageassistent', 'Barnehjemsbestyrer', 'Barnepasser', 'Barnevernskonsulent', 'Bartender', 'Basketballtrener', 'Bedriftskonsulent', 'Bedriftspsykolog', 'Bedriftsrevisor', 'Bedriftsøkonom', 'Befrakter', 'Begravelsesbyråassistent', 'Begravelsesbyråmedarbeider', 'Begravelsesbyråsjåfør', 'Beleggskjærer', 'Bemanningskonsulent', 'Benkesnekker', 'Beregner', 'Bergmester', 'Bergverksarbeider', 'Beskjærer', 'Bestyrer Helsetjenester', 'Betjent', 'Betongindustriarbeider', 'Betongvarearbeider', 'Bibliotekleder', 'Biblioteksjef', 'Bilagskontrollør', 'Bilelektriker', 'Bilgummiarbeider', 'Bilinspektør', 'Bilklargjører', 'Billedkonsulent', 'Billedtekniker', 'Billettekspeditør', 'Billettkonsulent', 'Billettkontrollør', 'Billettselger', 'Billettør', 'Bilmegler', 'Bilmekaniker', 'Bilmottaker', 'Bilpleier', 'Bilrenser', 'Bilsakkyndig', 'Biltilsyninspektør', 'Biopat', 'Blandemaskinoperatør', 'Blander', 'Blogger', 'Blomsterdekoratør', 'Blåseinstrumentmaker', 'Bokbinder', 'Bokbinderassistent', 'Bokbussassistent', 'Bokbussfører', 'Bokhandlermedarbeider', 'Bokhandlermedhjelper', 'Bokholderassistent', 'Bokollektivmedarbeider', 'Boligleder', 'Boligsjef', 'Bomringvakt', 'Bomvakt', 'Bookingansvarlig', 'Bookingmedarbeider', 'Bookingsekretær', 'Borearbeider', 'Boredekksarbeider', 'Boreingeniør', 'Boreoperasjonsleder', 'Borer', 'Boresjef', 'Borevæskeingeniør', 'Botaniker', 'Boveileder', 'Bowlingvert', 'Branninspektør', 'Brannisolatør', 'Brannkonstabel', 'Brannmester', 'Brannvakt', 'Brannvarslerinstallatør', 'Brenner', 'Brolegger', 'Bromaler', 'Brooperatør', 'Brukskunstner', 'Brygger', 'Bryggeriformann', 'Bryggerimester', 'Brønnborer', 'Budsjåfør', 'Bukker', 'Bulldoserkjører', 'Bunadmedarbeider', 'Bunnlærstanser', 'Buntmaker', 'Business Controller', 'Bussfører', 'Butikkinnehaver', 'Butikkinspektør', 'Butikkmedarbeider', 'Butikkonsulent', 'Butikksjef', 'Butikkslakter', 'Byarkitekt', 'Bydelsdirektør', 'Byfogd', 'Byggekranfører', 'Byggesaksbehandler', 'Byggesjef', 'Byggtapetserer', 'Byggtapetsermester', 'Bygningsarbeider', 'Bygningskontrollør', 'Byplanlegger', 'Byplansjef', 'Byrettsdommer', 'Byråd', 'Byssegutt', 'Byssepike', 'Båndsager', 'Båtfører', 'Båtmekaniker', 'Bærplukker', 'Børsdirektør', 'Børsemakermester', 'Børstemaker', 'Bøter', + 'Cabin Chief', 'Cafemedarbeider', 'Campingplassmedarbeider', 'Cash Management Controller', 'Cellulosearbeider', 'Charge D\'affaires', 'Cirkustekniker', 'Cnc-Operatør', 'Coach', 'Controller', 'Croupier', 'Cruiseassistent', + 'Daglig Leder', 'Dagsenterleder', 'Damefrisør', 'Danselærer', 'Danser', 'Dataadministrator', 'Datamaskinoperatør', 'Dataservicetekniker', 'Datasjef', 'Datatekniker', 'Dekkbygger', 'Dekorkonsulent', 'Deleekspeditør', 'Delesjef', 'Departementsråd', 'Designer', 'Desksjef', 'Diakoniarbeider', 'Diettkokk', 'Direksjonssekretær', 'Dirigent', 'Discjockey', 'Distribusjonssjåfør', 'Distributør', 'Distriktsarbeidssjef', 'Distriktsbanksjef', 'Distriktsdirektør', 'Distriktsmusiker', 'Distriktsrevisor', 'Distriktstannlege', 'Divisjonsdirektør Akvakultur Mv.', 'Divisjonssjef Akavkultur Mv.', 'Dokumentarfilmfotograf', 'Dommer', 'Domorganist', 'Dp-Operatør', 'Dramalærer', 'Dramatiker', 'Driftsansvarlig Flyfrakt', 'Driftsfullmektig', 'Driftskonsulent', 'Driftskonsulent It', 'Driftskoordinator', 'Driftsplantekniker', 'Driftstekniker', 'Driftsøkonom', 'Droneoperatør', 'Drosjesjåfør', 'Dykkerleder', 'Dyrlege', 'Dørselger', 'Dørvert', 'Døvekapellan', 'Døveprest', + 'Edb-Leder', 'Ekspedent', 'Ekspedisjonssjef', 'Eksportagent', 'Eksportkonsulent', 'Eldreomsorgssjef', 'Elektriker', 'Elektrikerformann', 'Elektrisk Kabeloperasjonstekniker', 'Elektroautomasjonstekniker', 'Elektroingeniør', 'Elektromontør', 'Elkraftingeniør', 'Elverksmontør', 'Emaljebrenner', 'Emaljør', 'Energisjef', 'Engasjementssjef', 'Enhetsleder', 'Entomolog', 'Entreprenør', 'Ergoterapeut', 'Etatsjef', 'Etterforsker', + 'Fagbokforfatter', 'Faglaborant', 'Faglærer', 'Fagopplæringssjef', 'Fagsjef Skogbruk', 'Fagspesialist', 'Fagutdanningskonsulent', 'Faktureringssekretær', 'Familierådgiver', 'Fargekoker', 'Fargeriarbeider', 'Fasademontør', 'Fatter', 'Feierlærling', 'Feltarbeider', 'Feltassistent', 'Feltprest', 'Fengselsavdelingsbetjent', 'Fengselsbetjent', 'Fengselsinspektør', 'Fengselsoverbetjent', 'Fenrik', 'Ferdigstiller', 'Filetarbeider', 'Filialsjef', 'Filminspisient', 'Filmkontrollsjef', 'Filosof', 'Finansanalytiker', 'Finansråd', 'Finansrådgiver', 'Finanstilsynsdirektør', 'Fiolinbygger', 'Fiskehandler', 'Fiskeridirektør', 'Fiskerikonsulent', 'Fiskeriråd', 'Fiskeritekniker', 'Fiskerøkter', 'Fiskeskipper', 'Fiskeslakter', 'Fiskevraker', 'Fjøsmester', 'Flaskesorterer', 'Flekker', 'Flisarbeider', 'Fly-Radiotekniker', 'Flyattache', 'Flyeksportmedarbeider', 'Flyelektrotekniker', 'Flygeleder', 'Flygelederassistent', 'Flyinstruktør', 'Flymekaniker', 'Flyplassekspeditør', 'Flysystemavioniker', 'Flyteknisk Inspektør', 'Flytrafikkassistent', 'Flyvertinne', 'Fms-Operatør', 'Folklorist', 'Forbundssekretær', 'Forhandlingssjef', 'Forkynner', 'Forlagsmedarbeider', 'Formgiver', 'Formstøper', 'Formuesforvalter', 'Forsikringsassistent', 'Forsikringsrådgiver', 'Forsikringsselger', 'Forskalingsbas', 'Forsker', 'Forskjærer', 'Forskningsassistent', 'Forskningssjef', 'Forskningstekniker', 'Forstander', 'Forstkandidat', 'Forsvarsråd', 'Forsøksleder', 'Forvaltningsassistent', 'Forvaltningsingeniør', 'Forvaltningssjef', 'Fosterfar', 'Fotograf', 'Fotolaboratorieassistent', 'Fraktsjef', 'Freelancejournalist', 'Frisørlærling', 'Fritidsassistent', 'Fritidssjef', 'Frivillighetssentralleder', 'Fruktpressearbeider', 'Fruktprodusent', 'Fryseriarbeider', 'Fugearbeider', 'Fylkesagronom', 'Fylkesarkitekt', 'Fylkesbarnevernsjef', 'Fylkesbyggesjef', 'Fylkesingeniør', 'Fylkeskartsjef', 'Fylkeskontorsjef', 'Fylkeskoordinator I Fylkesarbeidskontoret', 'Fylkesmann', 'Fylkespersonalsjef', 'Fylkesstyrerepresentant', 'Fyrmester', 'Fyrtjenestermann', 'Fysiker', 'Fysiokjemiker', 'Fører', 'Førsteamanuensis', 'Førstefarmasøyt', 'Førstefotograf', 'Førstekonservator', 'Førstelagmann', 'Førstelektor', 'Førstemaskinist', 'Førstemeteorologifullmektig', 'Førstepasser', 'Førstepostbetjent', 'Førstepostfullmektig', 'Førstepreparant', 'Førsteprovisor', 'Førsterevisor', 'Førstesekretær', 'Førstestatsadvokat', 'Førstestyrmann', 'Førstetollinspektør', + 'Gallerivakt', 'Garderobebetjening', 'Garnfisker', 'Garnisonstannlege', 'Gartnerassistent', 'Gartnerformann', 'Gassverksjef', 'Gateselger', 'General', 'Generalinspektør For Heimevernet', 'Generalinspektør For Hæren', 'Geodet', 'Geolog', 'Geomatiker', 'Geotekniker', 'Gjærhusarbeider', 'Glasiolog', 'Glassarbeider', 'Glassblåser', 'Glassblåsermester', 'Glasshåndverker', 'Glasurarbeider', 'Godstrafikkleder', 'Grafikerlærling', 'Grafisk Formgiver', 'Grafisk Ingeniør', 'Grafisk Trykkermester', 'Granitthogger', 'Grensekontrollør', 'Grovsliper', 'Gruppeleder I Arbeidsmarkedsetaten', 'Gruvemåler', 'Guide', 'Gullarbeider', 'Gullsmedmester', 'Gummivarearbeider', 'Gynekolog', 'Gårdbruker', 'Gårdsarbeider', 'Gårdshjelp', + 'Hammerarbeider', 'Handelsagent', 'Handelsråd', 'Handlevognrydder', 'Hanskesyer', 'Hartskoker', 'Hattemaker', 'Havarisekretær', 'Havneassistent', 'Havnefogd', 'Havnekontrollør', 'Havnesjef', 'Havnetrafikkleder', 'Heisinstallatør', 'Heismontør', 'Heismontørlærling', 'Helse- Og Miljørådgiver', 'Helseinformatiker', 'Helseinspektør', 'Helsesøster', 'Herrefrisør', 'Hjelpekokk', 'Hjelpepleier', 'Hjelpepleiermedarbeider', 'Hjemmehjelper', 'Hjemmehjelpsleder', 'Hjemmekonsulent', 'Hjemmesykepleier', 'Hjullastersjåfør', 'Hms-Leder', 'Hoffmarskalk', 'Hollenderifører', 'Hostess', 'Hotellarbeider', 'Hotellmedarbeider', 'Hotellsjef', 'Hovedforvalter', 'Hovmester', 'Hr-Direktør', 'Hudarbeider', 'Hudterapeut', 'Hundefører', 'Husdyrkonsulent', 'Husholdsassistent', 'Husmorvikar', 'Hustrykker', 'Hvalfanger', 'Hydrograf', 'Hydrolog', 'Hylsemaker', 'Håndballtrener', 'Håndvever', 'Hørselsassistent', 'Høvelmester', + 'Idrettsinstruktør', 'Idrettsseksjonsleder', 'Idrettstrener', 'Ikt-Lærling', 'Illustratør', 'Importsjef', 'Impregnerer', 'Industribokbinder', 'Industrimontør', 'Industripsykolog', 'Industrirørlegger', 'Industrisnekker', 'Industrisyer', 'Informasjonskonsulent', 'Informasjonsleder', 'Informasjonsmedarbeider', 'Informasjonsskrankemedarbeider', 'Inkassoassistent', 'Inkassokonsulent', 'Inkassoleder', 'Inkassosjef', 'Inneselger', 'Innkjøpsansvarlig', 'Innkjøpsingeniør', 'Innkjøpskonsulent', 'Innreder', 'Innredningskonsulent', 'Innredningsmontør', 'Innsjekkingsmedarbeider', 'Innspillingsleder', 'Inspeksjonsingeniør', 'Inspisient', 'Installasjonsingeniør', 'Instituttsjef', 'Instruktør', 'Instruktørtannlege', 'Instrumentavioniker', 'Instrumentmaker', 'Instrumentrørlegger', 'Interiørarkitekt', 'Internatgruppeassistent', 'Internatgruppeleder', 'Internatleder', 'Iskremarbeider', 'It-Ansvarlig', 'It-Konsulent', 'It-Koordinator', 'It-Leder', 'It-Medarbeider', 'It-Prosjektleder', 'It-Selger/account Manager', 'It-Sjef', 'It-Systemingeniør', 'It-Teknisk Konsulent', + 'Jernbaneekspeditør', 'Jernbinderbas', 'Jordbrukssjef', 'Jordmor', 'Jordregistertekniker', 'Jordskifteassistent', 'Jordskiftedommer', 'Jordskifteingeniør', 'Jordskifteoverdommer', 'Jordskifterettsleder', 'Journalist', 'Juksafisker', 'Juridisk Rådgiver', 'Jurist', 'Juvelèr', + 'Kabelarbeider', 'Kabelbanefører', 'Kabinettsekretær', 'Kafemedarbeider', 'Kaiarbeider', 'Kaibetjent', 'Kalanderarbeider', 'Kammeroperatørleder', 'Kanselist', 'Kapitalforvalter', 'Kapsler', 'Kaptein', 'Kapteinløytnant', 'Kardiolog', 'Karosserimekaniker', 'Kartsjef', 'Kasseleder', 'Kennelleder', 'Keramiker', 'Keramisk Former', 'Kinokontrollør', 'Kinomaskinist', 'Kinosjef', 'Kirkegårdsarbeider', 'Kiropraktor', 'Kjellermester', 'Kjemikaliedykker', 'Kjemiker', 'Kjevekirurg', 'Kjeveortoped', 'Kjole- Og Draktsyermester', 'Kjøkkenbestyrer', 'Kjølemaskinist', 'Kjølemaskinkjører', 'Kjørelærer', 'Kjøreskolelærer', 'Kjøttskjærer', 'Klinikkassistent', 'Klinisk Ernærinsfysiolog', 'Klinisk Sosionom', 'Klinisk Vernepleier', 'Klokkedykker', 'Klokker', 'Klubbarbeider', 'Klubbleder', 'Klubbtillitsmann', 'Koder', 'Kokillestøper', 'Koksbrenner', 'Koldkjøkkenassistent', 'Kolonialhandler', 'Komiker', 'Kommunaldirektør', 'Kommunalsjef', 'Kommuneadvokat', 'Kommuneergoterapeut', 'Kommunekasserer', 'Kommuneplansjef', 'Kommunestyrerepresentant', 'Kommunikasjonsrådgiver', 'Kommunikasjonsrådmann', 'Kommunikatør', 'Kompressoroperatør', 'Konditor', 'Konduktør', 'Konfektmaker', 'Konferansevert', 'Konferansevertinne', 'Konkurransedirektør', 'Konserndirektør', 'Konsernregnskapssjef', 'Konservator', 'Konstruksjonstegner', 'Kontaktmann', 'Kontoraspirant', 'Kontormedarbeider', 'Kontorrengjører', 'Kontraktsleder', 'Kontrollflyger', 'Kontrolloperatør', 'Kontrollromsassistent', 'Kontrollsjef', 'Kontrollveterinær', 'Kontrollør', 'Kopperslager', 'Koranlærer', 'Koreolog', 'Korrespondent', 'Korrosjonsbehandler', 'Kostholdskonsulent', 'Kostnadsingeniør', 'Kostymeformann', 'Kraftmegler', 'Kraftverksdirektør', 'Kraftverksoperatør', 'Kredittleder', 'Kreftsykepleier', 'Krematoriebetjent', 'Kretskortmontør', 'Kringkastingssjef', 'Kulturhussjef', 'Kulturkonsulent', 'Kulturminnekonsulent', 'Kundemegler', 'Kundesuppertleder', 'Kunststopper', 'Kurator', 'Kursmedarbeider', 'Kursveileder', 'Kurvfletter', 'Kurvmaker', 'Kurvmakermester', 'Kusk', 'Kvalitetsbedømmer', 'Kvalitetsmedarbeider', 'Kvalitetssikringsassistent', 'Kvalitetssikringsinspektør', 'Kvalitetssikringskoordinator', 'Kvalitetssikringsleder', 'Kybernetiker', 'Kystdirektør', + 'Laboratorieleder', 'Laboratorierådgiver', 'Laboratorietekniker', 'Lagerformann', 'Lagerforvalter', 'Lagerfunksjonær', 'Lagerleder', 'Lagersjef', 'Lakkerer', 'Lakkoker', 'Landbruksdirektør', 'Landbruksmaskinmekaniker', 'Landbruksveileder', 'Landskapsarkitekt', 'Landssekretær', 'Landsstyremedlem', 'Ledende Aktivitør', 'Ledende Legesekretær', 'Leder', 'Leder It Brukerstøtte', 'Lege I Spesialisering', 'Legemiddelinspektør', 'Legesekretær', 'Legpredikant', 'Leigeskjærer', 'Lekotekleder', 'Lektor', 'Lensmannsbetjent', 'Lensmannsfullmektig', 'Leveransekoordinator', 'Ligningsrevisor', 'Ligningssekretær', 'Limarbeider', 'Limnolog', 'Lineegner', 'Linjeleder', 'Linjemontør', 'Litteraturagent', 'Litteraturkritiker', 'Location Scout', 'Locationassistent', 'Loddselger', 'Logistikkdirektør', 'Logistikkkoordinator', 'Logistikkleder', 'Logistikkmedarbeider', 'Logistikkonsulent', 'Logistikksjef', 'Logoped', 'Lokomotivfører', 'Lokomotivkontrollør', 'Losbåtfører', 'Losbåtsmann', 'Losinspektør', 'Lufthavnbetjent', 'Lufttrafikksjef', 'Lugarpike', 'Lydingeniør', 'Lydmester', 'Lydtekniker', 'Lysrigger', 'Lystekniker', 'Låsemontør', 'Lærervikar', 'Lærling', 'Lønningssekretær', 'Lønningssjef', 'Løypekjører', 'Løytnant', + 'Malerlærling', 'Manikyrist', 'Mannekeng', 'Marinamedarbeider', 'Mariningeniør', 'Maritim Sjef', 'Markedsassistent', 'Markedsfører', 'Markedskoordinator', 'Markedsmedarbeider', 'Markedsovervåker', 'Markedssjef', 'Marketingsekretær', 'Marketingsjef', 'Marketingsplanlegger', 'Markisemontør', 'Maskinassistent', 'Maskinfører', 'Maskiningeniør', 'Maskininnbinder', 'Maskinmekaniker', 'Maskinoffiser', 'Maskinpakker', 'Maskinpasser', 'Maskintegner', 'Maskør', 'Masseoppløser', 'Matematikkinstruktør', 'Materialadministrasjonssjef', 'Materialforvalter', 'Medhjelper', 'Medisinalråd', 'Meglerassistent', 'Meierikonsulent', 'Mekaniker', 'Mekanisk Kabeloperasjonstekniker', 'Mengeblander', 'Menger', 'Menig', 'Menighetsarbeider', 'Menighetssekretær', 'Mensendiecker', 'Merkevaresjef', 'Messepike', 'Messeplanlegger', 'Metalliserer', 'Metallpusser', 'Meteorologikonsulent', 'Mikrofilmfotograf', 'Mikseoperatør', 'Militærattache', 'Militærpsykolog', 'Miljøsaneringsarbeider', 'Miljøvernsjef', 'Miljøvernsjef På Svalbard', 'Mineralvannarbeider', 'Minerer', 'Minerydder', 'Minigraverfører', 'Misjonsprest', 'Misjonssekretær', 'Mobilkranfører', 'Modellsnekker', 'Modellør', 'Molekylærbiolog', 'Montasjeingeniør', 'Montasjesjef', 'Moseplukker', 'Motormann', 'Motormannlærling', 'Motormekaniker', 'Motorsykkelbud', 'Motorsykkelreparatør', 'Mub Ingeniør', 'Multimediedesigner', 'Museumsdirektør', 'Museumstekniker', 'Musikkinstrumentreparatør', 'Musikkpedagog', 'Musikkprodusent', 'Musikkterapeut', 'Mykolog', 'Myntarbeider', 'Møbelmontør', 'Møbelsnekker', 'Møbeltapetserer', 'Møllemester', 'Mølleoperatør', 'Møller', 'Mønsteroperatør', 'Mønstersliper', + 'Namsfullmektig', 'Natler', 'Nattportier', 'Nautisk Instrumentmaker', 'Ndt-Kontrollør', 'Neglskulptør', 'Nemndleder', 'Nestleder', 'Nettmann', 'Nettverksanalytiker', 'Nettverkstekniker', 'Notfisker', 'Nupper', 'Nyhetsredaktør', 'Nyhetsreporter', 'Nyhetssjef', 'Næringsmiddelkandidat', 'Næringsmiddelkontrollør', 'Næringsmiddelteknolog', 'Næringssjef', + 'Odontolog', 'Odontologisk Forsker', 'Offentlig Godkjent Sykepleier', 'Offisersaspirant', 'Offshore Installation Manager', 'Oldfrue', 'Oljeanalytiker', 'Oljedestillatør', 'Oljedirektør', 'Oljekontraktkjøper', 'Oljekontraktmegler', 'Oljepressearbeider', 'Oljeraffinerer', 'Oljeseparatør', 'Ombud', 'Ombudsmann For Forsvaret', 'Områdebanksjef', 'Områdesjef', 'Omsorgsarbeider', 'Onkolog', 'Onkologisykepleier', 'Operatør', 'Operatør Av Pakkemaskiner', 'Opplæringsfarmasøyt', 'Opplæringskonsulent', 'Opplæringsleder', 'Opplæringssjef', 'Oppmålingstekniker', 'Oppredningsarbeider', 'Oppsynssjef', 'Oppvekstsjef', 'Opsjonsmegler', 'Optikermedarbeider', 'Ordensvakt', 'Ordreplukker', 'Organisasjonskonsulent', 'Organisasjonsleder', 'Organisasjonssekretær', 'Orgelbygger', 'Ortoped', 'Ortopeditekniker', 'Ortopediteknisk Sjef', 'Ortoptist', 'Oseanograf', 'Ostemaker', 'Overgartner', 'Overingeniør', 'Overinspektør', 'Overjordmor', 'Overkokk', 'Overlærskjærer', 'Overpleier', 'Overpostbetjent', 'Overpostmester', 'Overradiograf', 'Oversetter', 'Overstiger', 'Oversykepleier', + 'Pantelåner', 'Pappsalarbeider', 'Paraplymaker', 'Parkettlegger', 'Parkettsliper', 'Parksjef', 'Parlamentarisk Leder', 'Partisekretær', 'Parykkmaker', 'Parykkmakermester', 'Passkontrollør', 'Pater', 'Patolog', 'Pedagog', 'Pedagogisk Psykolog', 'Pelsbereder', 'Pelsdyroppdretter', 'Pelsmaker', 'Pengeutlåner', 'Perforerer', 'Perfusjonist', 'Personal-Og Økonomidirektør', 'Personalassistent', 'Personalleder', 'Petrofysiker', 'Petroleumsarkitekt', 'Phytoterapeut', 'Pianoreparatør', 'Pianostemmer', 'Piping Ingeniør', 'Pizzabaker', 'Pizzasjåfør', 'Planlegger', 'Planleggingssjef', 'Planner', 'Plasseringsrådgiver', 'Pleiemedarbeider', 'Pleier', 'Poet', 'Polaritetsterapeut', 'Poliklinikksykepleier', 'Poliseprodusent', 'Politiadvokat', 'Politiavdelingssjef', 'Politiførstebetjent', 'Politimester', 'Politioverkonstabel', 'Politisk Sekretær', 'Popmusiker', 'Porteføljeforvalter', 'Porteføljeselger', 'Post Doc.', 'Postdoktor', 'Postfortoller', 'Postfullmektig', 'Postinspektør', 'Postmester', 'Poståpner', 'Preparantassistent', 'Preserveringstekniker', 'Pressebas', 'Pressefotograf', 'Presser', 'Privatassurandør', 'Prodekan', 'Production Supervisor', 'Produksjonsingeniør', 'Produksjonskoordinator', 'Produksjonsmedarbeider', 'Produksjonsoperatør', 'Produksjonsteknisk Leder', 'Produktsekretær', 'Produkttester', 'Produktutviklingskoordinator', 'Programleder', 'Programmerer', 'Programmeringssjef', 'Programsjef', 'Programvaretester', 'Programvareutvikler', 'Promotionkonsulent', 'Promotionmedarbeider', 'Prorektor', 'Prosjektmegler', 'Prosjektoppfølger', 'Prosjektstyringssjef', 'Prosjektøkonom', 'Protesetekniker', 'Protokollfører', 'Protokollsekretær', 'Pubvert', 'Purserassistent', 'Påkleder', 'Pølsemaker', + 'Rabbiner', 'Radarreparatør', 'Radioingeniør', 'Radioleder', 'Radiosondeleder', 'Radiotekniker', 'Radiotelefonist', 'Raffinerer', 'Rammemaker', 'Redaksjonssekretær', 'Redaktør', 'Regionsekretær', 'Regionsjef', 'Regissør', 'Registrert Legemiddelkonsulent', 'Regningsinnkrever', 'Regnskapsansvarlig', 'Rehabiliteringsterapeut', 'Reineier', 'Reklamefotograf', 'Reklamekonsulent', 'Reklamesekretær', 'Rekrutteringskonsulent', 'Rektor', 'Rekvisitamaker', 'Rekvisittleder', 'Rembursjef', 'Renholdsbetjent', 'Renholdsinspektør', 'Renholdskonsulent', 'Renholdsleder', 'Renovasjonskjører', 'Renseriarbeider', 'Renseribestyrer', 'Renserimaskinarbeider', 'Reparatør', 'Resepsjonsfullmektig', 'Resepsjonsleder', 'Reservedelsekspeditør', 'Reservedykker', 'Reservesjåfør', 'Ressurskoordinator', 'Restaurantinspektør', 'Restaureringsassistent', 'Restaureringstekniker', 'Rettsgenetiker', 'Rettsskriver', 'Revisjonsleder', 'Revisjonsrådgiver', 'Revisjonssjef', 'Revisor', 'Revisormedarbeider', 'Ridelærer', 'Rigger', 'Riksantikvar', 'Riksarkivar', 'Riksbibliotekar', 'Risiko Controller', 'Rockemusiker', 'Rockesanger', 'Rodeleder', 'Romanforfatter', 'Rosenterapeut', 'Roughneck', 'Rullestolreparatør', 'Ryddehjelp', 'Rådgivende Overlege', 'Røkter', 'Røntgenassistent', 'Røringeniør', 'Rørsveiser', + 'Sagbladstiller', 'Sagbruks- Og Høvleriarbeider', 'Sagsliper', 'Salatbarmedarbeider', 'Salgsanalytiker', 'Salgsassistent', 'Salgsingeniør', 'Salgskontrollør', 'Salgsrådgiver', 'Salgssekretær', 'Sambandsoffiser', 'Sametingspresident', 'Samfunnsgeograf', 'Saneringsarbeider', 'Scanner', 'Sceneinstruktør', 'Scenemester', 'Seismisk Personell', 'Sekretær', 'Seksjonsoverlege', 'Sektorsjef/assisterende Leder Av Politistyrke', 'Selfanger', 'Selger', 'Sementarbeider', 'Sementeringstekniker', 'Seminarholder', 'Senior Ingeniør', 'Senior Maskiningeniør', 'Senior Operatør', 'Senior Planleggsingsingeniør', 'Senior Økonomikonsulent', 'Senioranalytiker', 'Seniorinnkjøper', 'Seniorinspektør', 'Seniormetallurg', 'Seniorserviceingeniør', 'Senterleder', 'Sentralbanksjef', 'Sentralbordleder', 'Serigraf', 'Service Manager', 'Servicemontør', 'Servitør', 'Shopper', 'Shoveldoserkjører', 'Signalmann', 'Sikkerhetsansvarlig', 'Sikkerhetsdirektør', 'Sikkerhetsleder', 'Silketrykker', 'Sivilforsvarsinspektør', 'Sivilombud', 'Siviløkonom', 'Sjefbioingeniør', 'Sjeflege', 'Sjefsfysioterapeut', 'Sjefsingeniør', 'Sjefskokk', 'Sjefslandskapsarkitekt', 'Sjefssykepleier', 'Sjefsøkonom', 'Sjåfør Klasse B', 'Skadedyrkontrollør', 'Skadekonsulent', 'Skademedarbeider', 'Skaderegulerer', 'Skadesjef', 'Skatteregnskapssjef', 'Skatterevisor', 'Skiftekontrollør', 'Skiftingeniør', 'Skiftleder', 'Skilærer', 'Skimaker', 'Skinnsorterer', 'Skippingmedarbeider', 'Skipsradiomontør', 'Skipsreperatør', 'Skipsrørlegger', 'Skipssmed', 'Skjenkekontrollør', 'Skogbestyrer', 'Skogbruksplanlegger', 'Skogdirektør', 'Skogformann', 'Skogforvalter', 'Skogfullmektig', 'Skogsmaskinfører', 'Skogtaksator', 'Skoleassistent', 'Skoledirektør', 'Skolefritidsleder', 'Skoleinspektør', 'Skolepsykolog', 'Skolerådgiver', 'Skomakerlærling', 'Skopusser', 'Skoreparatør', 'Skrankeekspeditør', 'Skrankemedarbeider', 'Skredder', 'Skribent', 'Skript', 'Skuespiller', 'Skummer', 'Skøyteinstruktør', 'Slaktermester', 'Slankekonsulent', 'Sminkeassistent', 'Småbruker', 'Smører', 'Snekkermester', 'Snurrevadfisker', 'Snømåker', 'Snørelager', 'Soknediakon', 'Soneterapeut', 'Sortbytter', 'Sorterer', 'Sorteringsleder', 'Sortersalarbeider', 'Sosialfaglig Leder', 'Sosialinspektør', 'Sosialrådmann', 'Sosialsekretær', 'Sparklingsarbeider', 'Speditør', 'Spesialbioingeniør', 'Spesialergoterapeut', 'Spesialfysioterapeut', 'Spesiallærer', 'Spesialpedagog', 'Spesialpsykolog', 'Spesialrevisor', 'Spesialrådgiver', 'Spesialsykepleier', 'Spesialtannlege', 'Spoler', 'Sporveisdirektør', 'Spregningsarbeider', 'Spritdestillatør', 'Sprøytelakkerer', 'Spåkone/-Mann', 'Stabssjef', 'Staffcaptain', 'Stallkar', 'Stallmann', 'Stallpike', 'Stasjonsbetjent', 'Stasjonssjef', 'Statslosaspirant', 'Statsmeteorolog', 'Statsmykolog', 'Statssekretær', 'Statsskogsjef', 'Steinbruddsarbeider', 'Steinfagmester', 'Steward', 'Stillasbygger', 'Stipendiat', 'Stopper', 'Store Manager', 'Storkundeansvarlig', 'Stortingspresident', 'Storurmaker', 'Strategirådgiver', 'Stråleterapeut', 'Studieinspektør', 'Studieleder', 'Studiobetjent', 'Studioformann', 'Stuert', 'Styreleder', 'Styremedlem', 'Støttekontakt', 'Surveyer', 'Svakstrømsmontør', 'Sveiseinspektør', 'Sveiserlærling', 'Sykehusdirektør', 'Sykehusfarmasøyt', 'Sykehuslaborant', 'Sykehusprest', 'Sykehussjef', 'Sysselmann', 'Systemanalytiker', 'Systemarkitekt', 'Systemerer', 'Systemingeniør', 'Systemsjef', 'Systemtekniker', 'Systemtester', 'Systemutvikler', 'Sølvsiselør', 'Sølvsmed', 'Sølvtrykker', 'Søppelkjører', + 'Taksteinlegger', 'Takstmann', 'Takstøkonom', 'Taktekker', 'Tallmagiker', 'Tannhelsesekretær', 'Tannhygieniker', 'Tannlegeassistent', 'Tannteknikermester', 'Tapper', 'Tapperiformann', 'Taubanefører', 'Taxisjåfør', 'Teglsorterer', 'Tegneassistent', 'Teknisk Ansvarlig', 'Teknisk Direktør', 'Teknisk Rådmann', 'Tekstilkonservator', 'Tekstilkunstner', 'Tekstiloperatør', 'Tekstiltrykker', 'Teleekspeditør', 'Telefonsentralmontør', 'Telefullmektig', 'Telegrafbetjent', 'Telekommunikasjonsingeniør', 'Telesjef', 'Teolog', 'Teppelegger', 'Terminalansvarlig', 'Terminalarbeider', 'Terminalleder', 'Termisk Sprøyter', 'Tilrettelegger', 'Tilsynslege', 'Tilsynsveterinær', 'Tiltakssjef', 'Tivoliarbeider', 'Togelektriker', 'Togkontrollør', 'Togsjef', 'Tolldistriktssjef', 'Tollkasserer', 'Tollstedsjef', 'Topograf', 'Torghandler', 'Total Service Manager', 'Totalisatorfunksjonær', 'Trafikkflyger', 'Trafikklærer', 'Trafikksjef', 'Trailersjåfør', 'Transformatormontør', 'Transportformann', 'Transportleder', 'Transportmedarbeider', 'Transportsjef', 'Transportør', 'Tredreier', 'Trepleier', 'Trikkefører', 'Truckfører', 'Trygdedirektør', 'Trygderevisor', 'Trygdesjef', 'Trykker', 'Trykktester', 'Trålbas', 'Turistvert', 'Turoperatør', 'Tvisteløseleder', 'Tvisteløser', 'Tårnarbeider', 'Tårnkranfører', 'Tårnmann', 'Tømmerberegner', 'Tømmerfløter', 'Tømmerhogger', 'Tømmermåler', 'Tømmermålingsinspektør', 'Tømmersjef', 'Tømmersorterer', 'Tørkepasser', 'Tørker', 'Tørrfisktilvirker', 'Tørrstoffkoker', + 'Ullklassifisør', 'Undervisningsassistent', 'Underwriter', 'Utbyggingssjef', 'Utenrikskorrespondent', 'Utenriksredaktør', 'Utenriksråd', 'Utmarkstekniker', 'Utreder', 'Utredningsingeniør', 'Utrykningsleder', 'Utstyrsoperatør', 'Utviklingsdirektør', 'Utviklingssjef', + 'Va-Ingeniør', 'Vakt', 'Vaktbetjent', 'Vaktmann', 'Vaktmesterassistent', 'Valutakoordinator', 'Valutasjef', 'Vannverkssjef', 'Varabrannmester', 'Vareautomatoperatør', 'Varemegler', 'Varmebehandler', 'Vaskeriassistent', 'Vedlikeholdsingeniør', 'Vedlikeholdstekniker', 'Vegvalsekjører', 'Vekterlærling', 'Vektkontrollør', 'Velferdssekretær', 'Velferdssjef', 'Verftssjef', 'Verkstedansvarlig', 'Verkstedarbeider', 'Verkstedformann', 'Verkstedingeniør', 'Verkstedmedarbeider', 'Verkstedsjef', 'Verktøyinnstiller', 'Verktøykonstruktør', 'Verktøymaker', 'Verktøysliper', 'Verneingeniør', 'Verneombud', 'Vervet', 'Veterinærinspektør', 'Vever', 'Vikarbyråkonsulent', 'Viltforvalter', 'Viltkonsulent', 'Vinduspusser', 'Viseadmiral', 'Visekonsernsjef', 'Visekonsul', 'Visesanger', 'Voksenopplæringssjef', 'Vraker', 'Vytnesjæjja', 'Værelsesbetjent', 'Værvarslingssjef', + 'Web-Publisher', 'Webdesigner', 'Webmaster', 'Webredaktør', + 'Yrkesfaglærer', 'Yrkesopplæringsleder', 'Yster', + 'Økonom', 'Økonomiarbeider', + 'Øre-Nese-Hals-Spesialist', + ); } diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/nl_BE/Person.php b/vendor/fzaninotto/faker/src/Faker/Provider/nl_BE/Person.php index c9ac865b..bde3bf64 100644 --- a/vendor/fzaninotto/faker/src/Faker/Provider/nl_BE/Person.php +++ b/vendor/fzaninotto/faker/src/Faker/Provider/nl_BE/Person.php @@ -2,6 +2,8 @@ namespace Faker\Provider\nl_BE; +use Faker\Provider\DateTime; + class Person extends \Faker\Provider\Person { protected static $firstNameMale = array( @@ -69,4 +71,36 @@ class Person extends \Faker\Provider\Person 'Vermeersch', 'Vermeiren', 'Vermeulen', 'Verschueren', 'Verstraete', 'Verstraeten', 'Vervoort', 'Wauters', 'Willems', 'Wouters', 'Wuyts', 'Yildirim', 'Yilmaz' ); + + /** + * Belgian Rijksregister numbers are used to identify each citizen, + * it consists of three parts, the person's day of birth, in the + * format 'ymd', followed by a number between 1 and 997, odd for + * males, even for females. The last part is used to check if it's + * a valid number. + * + * @link https://nl.wikipedia.org/wiki/Rijksregisternummer + * + * @param string|null $gender 'male', 'female' or null for any + * @return string + */ + public static function rrn($gender = null) + { + $middle = self::numberBetween(1, 997); + if ($gender === static::GENDER_MALE) { + $middle = $middle %2 === 1 ? $middle : $middle+1; + } elseif ($gender === static::GENDER_FEMALE) { + $middle = $middle %2 === 0 ? $middle : $middle+1; + } + $middle = sprintf('%03d', $middle); + + $date = DateTime::dateTimeThisCentury(); + $dob = sprintf('%06d', $date->format('ymd')); + $help = $date->format('Y') >= 2000 ? 2 : null; + + $check = intval($help.$dob.$middle); + $rest = sprintf('%02d', 97 - ($check % 97)); + + return $dob.$middle.$rest; + } } diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/nl_NL/Address.php b/vendor/fzaninotto/faker/src/Faker/Provider/nl_NL/Address.php index 04554146..6e91dc09 100644 --- a/vendor/fzaninotto/faker/src/Faker/Provider/nl_NL/Address.php +++ b/vendor/fzaninotto/faker/src/Faker/Provider/nl_NL/Address.php @@ -6,7 +6,43 @@ class Address extends \Faker\Provider\Address { protected static $buildingNumber = array('%', '%#', '%##', '%###', '%-?', '%#-?', '%?', '%#?', '%-#', '%#-##'); - protected static $postcode = array('%### ??'); + protected static $postcodes = array( + '1013PT', '1015GZ', '1053GS', '1058EG', '1060PM', '1068NE', '1072NL', '1073SK', '1074JA', '1078NH', '1111LW', + '1121JC', '1141RP', '1141VM', '1161TC', '1183CH', '1187RK', '1188LP', '1271KZ', '1312SG', '1323CW', '1325EZ', + '1333EJ', '1334DP', '1339VJ', '1351AC', '1352AC', '1354LM', '1356AC', '1391RX', '1406MZ', '1411JM', '1435GS', + '1443CK', '1444TM', '1448VB', '1505WL', '1509GP', '1531CZ', '1531KA', '1561ZV', '1602EP', '1606BS', '1619KB', + '1674PG', '1689BJ', '1702LB', '1761GN', '1775BR', '1782SK', '1788WE', '1862BK', '1901CT', '1911CH', '1949AN', + '1951MS', '1962PL', '1972DA', '2015HA', '2022RM', '2171XJ', '2231BB', '2231DG', '2231NZ', '2242PK', '2245VZ', + '2261BH', '2262EA', '2264BK', '2264TS', '2266AA', '2274GD', '2316XD', '2332KV', '2333CW', '2403CG', '2512VH', + '2516XJ', '2518ER', '2521SZ', '2531BH', '2544KR', '2562VH', '2564CJ', '2595BK', '2597PL', '2613DC', '2622DX', + '2623HS', '2631VK', '2671LD', '2675EE', '2685VZ', '2771JD', '2801JS', '2802ED', '2803ZN', '2841AK', '2903XH', + '2905PN', '2908KA', '2922AG', '2935RD', '2951JC', '3015XB', '3021WL', '3026RC', '3034VE', '3035CE', '3044AB', + '3054XL', '3055AK', '3068DL', '3069HH', '3073DW', '3075AH', '3132CS', '3135EX', '3143KB', '3145CN', '3202AN', + '3208LB', '3209BE', '3222CK', '3223VD', '3232TN', '3235NS', '3241BG', '3247CN', '3252CJ', '3255SC', '3274LD', + '3312CV', '3317HR', '3319BN', '3319RG', '3351RJ', '3411AK', '3439LB', '3511PL', '3513GS', '3514CR', '3515GC', + '3527EJ', '3551GH', '3572KA', '3573AL', '3608VJ', '3628AC', '3704MK', '3731EP', '3739JJ', '3741ZC', '3771RK', + '3824HR', '3843BB', '3871GE', '3882CG', '3892BA', '3904NB', '3981KE', '3985SG', '4011KH', '4021EB', '4103XV', + '4131NE', '4142WE', '4201BS', '4209SE', '4261ZC', '4283HA', '4307LC', '4334HG', '4337VE', '4371EN', '4382JC', + '4382NC', '4385AS', '4401CA', '4401CG', '4521BW', '4553NG', '4581CA', '4614BD', '4614GX', '4698BG', '4702HJ', + '4703LB', '4706CN', '4707WJ', '4735AS', '4793CM', '4797HE', '4811SH', '4814NJ', '4815CJ', '4835GG', '4871DD', + '4921PK', '5011HS', '5013BE', '5061NA', '5103KD', '5105AC', '5111XN', '5126NT', '5126WR', '5151LR', '5151RZ', + '5152VB', '5171GH', '5223BK', '5231PS', '5268GE', '5298AL', '5301HE', '5403NJ', '5469AT', '5481NC', '5482XE', + '5575CS', '5611LP', '5644KR', '5645KR', '5651LX', '5654AX', '5684CP', '5712BR', '5751LD', '5753RJ', '5754GE', + '5912SP', '6019CW', '6021BT', '6021KJ', '6049BL', '6085EX', '6097DG', '6097ZH', '6118BW', '6163KG', '6164GP', + '6165XE', '6222BT', '6222VD', '6222VJ', '6226WC', '6365BJ', '6411ND', '6415BX', '6417BV', '6461JD', '6524SR', + '6534XT', '6538CX', '6538RV', '6541AD', '6581BZ', '6584AM', '6605DP', '6621KN', '6651KG', '6655AE', '6671DV', + '6673DB', '6716ND', '6741BR', '6822JL', '6823JD', '6871ZM', '6905SG', '6915TT', '6922EG', '6942LX', '6952ET', + '6961XV', '6971GW', '7009CN', '7011JD', '7051JB', '7121LZ', '7136LH', '7261CN', '7273PP', '7311AL', '7312DG', + '7314BK', '7315CW', '7323KB', '7361TD', '7391CZ', '7391SG', '7411VR', '7425EB', '7441GB', '7442CW', '7442GX', + '7481DX', '7481SL', '7544XD', '7557VC', '7558GR', '7574PG', '7606XL', '7607RE', '7615RD', '7622VX', '7627SE', + '7642EN', '7645AL', '7678RM', '7681ZA', '7707RL', '7722LG', '7722XJ', '7761AJ', '7825VC', '7833JJ', '7906NK', + '7942JG', '7957DD', '7981BC', '8061BA', '8075AT', '8121HA', '8121SB', '8141HR', '8152BA', '8171JC', '8181VZ', + '8226HJ', '8231DH', '8231JL', '8252HG', '8262EA', '8265GX', '8302AR', '8321KC', '8322EH', '8421PG', '8431MC', + '8446CM', '8472DA', '8502CA', '8521DE', '8573WP', '8602XV', '8605AV', '8606XZ', '8701EG', '8701ZE', '8711EJ', + '8802VB', '8861KZ', '8862AC', '8933EK', '9057LC', '9061AS', '9073LK', '9164LC', '9201TM', '9203PZ', '9269SV', + '9269SZ', '9289ZH', '9354VD', '9401MA', '9406BM', '9431GV', '9501AM', '9502CX', '9642EA', '9651AR', '9675LR', + '9712LJ', '9742GT', '9745EH', '9751TA', '9751TS', '9752BK', '9752GE', '9801TA', '9901EH', '9991EG', '9999XK', + ); protected static $streetNameFormats = array('{{lastName}}{{streetSuffix}}'); @@ -109,4 +145,9 @@ class Address extends \Faker\Provider\Address { return static::randomElement(static::$cityNames); } + + public static function postcode() + { + return static::randomElement(static::$postcodes); + } } diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/nl_NL/Person.php b/vendor/fzaninotto/faker/src/Faker/Provider/nl_NL/Person.php index 075628d5..0bd09a44 100644 --- a/vendor/fzaninotto/faker/src/Faker/Provider/nl_NL/Person.php +++ b/vendor/fzaninotto/faker/src/Faker/Provider/nl_NL/Person.php @@ -314,4 +314,37 @@ class Person extends \Faker\Provider\Person { return static::randomElement(static::$prefix); } + + /** + * @link https://nl.wikipedia.org/wiki/Burgerservicenummer#11-proef + * + * @return string + */ + public function idNumber() + { + $return = ''; + $nr = array(); + $nr[] = 0; + while (count($nr) < 8) { + $nr[] = static::randomDigit(); + } + $nr[] = mt_rand(0, 6); + if ($nr[7] == 0 && $nr[8] == 0) { + $nr[7] = 0; + } + + $bsn = (9 * $nr[8]) + (8 * $nr[7]) + (7 * $nr[6]) + (6 * $nr[5]) + (5 * $nr[4]) + (4 * $nr[3]) + (3 * $nr[2]) + (2 * $nr[1]); + $nr[0] = floor($bsn - floor($bsn / 11) * 11); + if ($nr[0] > 9) { + if ($nr[1] > 0) { + $nr[0] = 8; + $nr[1]--; + } else { + $nr[0] = 1; + $nr[1]++; + + } + } + return implode('', array_reverse($nr)); + } } diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/pl_PL/Payment.php b/vendor/fzaninotto/faker/src/Faker/Provider/pl_PL/Payment.php index cc5f9581..ffd0cb6a 100644 --- a/vendor/fzaninotto/faker/src/Faker/Provider/pl_PL/Payment.php +++ b/vendor/fzaninotto/faker/src/Faker/Provider/pl_PL/Payment.php @@ -5,81 +5,76 @@ namespace Faker\Provider\pl_PL; class Payment extends \Faker\Provider\Payment { /** - * @var array list of Polish banks, source: http://www.nbp.pl/banki_w_polsce/ewidencja/ewidencja.html + * @var array list of Polish banks, source: https://ewib.nbp.pl/ */ protected static $banks = array( - '251' => 'Aareal Bank Aktiengesellschaft (Spółka Akcyjna) - Oddział w Polsce', - '249' => 'Alior Bank SA', - '247' => 'Banco Espirito Santo de Investimento, S.A. Spółka Akcyjna Oddział w Polsce', - '238' => 'Banco Mais S.A. (SA) Oddział w Polsce', - '106' => 'Bank BPH SA', - '219' => 'Bank DnB NORD Polska SA', - '203' => 'Bank Gospodarki Żywnościowej SA', - '113' => 'Bank Gospodarstwa Krajowego', - '122' => 'Bank Handlowo - Kredytowy SA (w likwidacji 31.03.92)', - '103' => 'Bank Handlowy w Warszawie SA', - '116' => 'Bank Millennium SA', - '154' => 'Bank Ochrony Środowiska SA', - '260' => 'Bank of China (Luxembourg)S.A. Spółka Akcyjna Oddział w Polsce', - '221' => 'Bank of Tokyo-Mitsubishi UFJ (Polska) SA', - '132' => 'Bank Pocztowy SA', - '124' => 'Bank Polska Kasa Opieki SA', - '193' => 'BANK POLSKIEJ SPÓŁDZIELCZOŚCI SA', - '109' => 'Bank Zachodni WBK SA', - '224' => 'Banque PSA Finance SA Oddział w Polsce', - '160' => 'BNP PARIBAS BANK POLSKA SA', - '235' => 'BNP PARIBAS SA Oddział w Polsce', - '243' => 'BNP Paribas Securities Services SKAOddział w Polsce', - '229' => 'BPI Bank Polskich Inwestycji SA', - '215' => 'BRE Bank Hipoteczny SA', - '114' => 'BRE Bank SA', - '239' => 'CAIXABANK, S.A. (SPÓŁKA AKCYJNA)ODDZIAŁ W POLSCE', - '254' => 'Citibank Europe plc (Publiczna Spółka Akcyjna) Oddział w Polsce', - '194' => 'Credit Agricole Bank Polska SA', - '252' => 'CREDIT SUISSE (LUXEMBOURG) S.A. Spółka Akcyjna, Oddział w Polsce', - '236' => 'Danske Bank A/S SA Oddział w Polsce', - '191' => 'Deutsche Bank PBC SA', - '188' => 'Deutsche Bank Polska SA', - '174' => 'DZ BANK Polska SA', - '241' => 'Elavon Financial Services Limited (Spółka z ograniczoną odpowiedzialnością) Oddział w Polsce', - '147' => 'Euro Bank SA', - '265' => 'EUROCLEAR Bank SA/NV (Spółka Akcyjna) - Oddział w Polsce', - '207' => 'FCE Bank Polska SA', - '214' => 'Fiat Bank Polska SA', - '253' => 'FM Bank SA', - '248' => 'Getin Noble Bank SA', - '128' => 'HSBC Bank Polska SA', - '195' => 'Idea Bank SA', - '255' => 'Ikano Bank GmbH (Sp. z o.o.) Oddział w Polsce', - '262' => 'Industrial and Commercial Bank of China (Europe) S.A. (Spółka Akcyjna) Oddział w Polsce', - '105' => 'ING Bank Śląski SA', - '266' => 'Intesa Sanpaolo S.p.A. Spółka Akcyjna Oddział w Polsce', - '168' => 'INVEST - BANK SA', - '258' => 'J.P. Morgan Europe Limited Sp. z o.o. Oddział w Polsce', - '158' => 'Mercedes-Benz Bank Polska SA', - '130' => 'Meritum Bank ICB SA', '101' => 'Narodowy Bank Polski', - '256' => 'Nordea Bank AB SA Oddział w Polsce', - '144' => 'NORDEA BANK POLSKA SA', - '232' => 'Nykredit Realkredit A/S SA - Oddział w Polsce', - '189' => 'Pekao Bank Hipoteczny SA', - '187' => 'Polski Bank Przedsiębiorczości SA', '102' => 'Powszechna Kasa Oszczędności Bank Polski SA', - '200' => 'Rabobank Polska SA', - '175' => 'Raiffeisen Bank Polska SA', - '167' => 'RBS Bank (Polska) SA', - '264' => 'RCI Banque Spółka Akcyjna Oddział w Polsce', - '212' => 'Santander Consumer Bank SA', - '263' => 'Saxo Bank A/S Spółka Akcyjna Oddział w Polsce', + '103' => 'Bank Handlowy w Warszawie SA', + '105' => 'ING Bank Śląski SA', + '106' => 'Bank BPH SA', + '109' => 'Bank Zachodni WBK SA', + '113' => 'Bank Gospodarstwa Krajowego', + '114' => 'mBank SA', + '116' => 'Bank Millennium SA', + '122' => 'Bank Handlowo-Kredytowy Spółka Akcyjna w Katowicach w likwidacji', + '124' => 'Bank Polska Kasa Opieki SA', + '128' => 'HSBC Bank Polska SA', + '132' => 'Bank Pocztowy SA', + '147' => 'Euro Bank SA', + '154' => 'Bank Ochrony Środowiska SA', + '158' => 'Mercedes-Benz Bank Polska SA', '161' => 'SGB-Bank SA', - '237' => 'Skandinaviska Enskilda Banken AB (SA) - Oddział w Polsce', + '167' => 'RBS Bank (Polska) SA', + '168' => 'PLUS BANK SA', + '175' => 'Raiffeisen Bank Polska SA', '184' => 'Societe Generale SA Oddział w Polsce', - '225' => 'Svenska Handelsbanken AB SA Oddział w Polsce', - '227' => 'Sygma Banque Societe Anonyme (SA) Oddział w Polsce', - '216' => 'Toyota Bank Polska SA', - '257' => 'UBS Limited (spółka z ograniczoną odpowiedzialnością) Oddział w Polsce', - '261' => 'Vanquis Bank Limited (spółka z ograniczoną odpowiedzialnością) Oddział w Polsce', + '187' => 'Nest Bank S.A.', + '189' => 'Pekao Bank Hipoteczny SA', + '191' => 'Deutsche Bank Polska SA', + '193' => 'BANK POLSKIEJ SPÓŁDZIELCZOŚCI SA', + '194' => 'Credit Agricole Bank Polska SA', + '195' => 'Idea Bank SA', + '203' => 'Bank BGŻ BNP Paribas SA', + '212' => 'Santander Consumer Bank SA', '213' => 'VOLKSWAGEN BANK POLSKA SA', + '214' => 'FCA-Group Bank Polska SA', + '215' => 'mBank Hipoteczny SA', + '216' => 'Toyota Bank Polska SA', + '219' => 'DNB Bank Polska SA', + '224' => 'Banque PSA Finance SA Oddział w Polsce', + '225' => 'Svenska Handelsbanken AB SA Oddział w Polsce', + '229' => 'BPI Bank Polskich Inwestycji SA', + '232' => 'Nykredit Realkredit A/S SA - Oddział w Polsce', + '235' => 'BNP PARIBAS SA Oddział w Polsce', + '236' => 'Danske Bank A/S SA Oddział w Polsce', + '237' => 'Skandinaviska Enskilda Banken AB (SA) - Oddział w Polsce', + '239' => 'CAIXABANK, S.A. (SPÓŁKA AKCYJNA)ODDZIAŁ W POLSCE', + '241' => 'Elavon Financial Services Designated Activity Company (spółka z o.o. o wyznaczonym przedmiocie działalności) Oddział w Polsce', + '243' => 'BNP Paribas Securities Services SKA Oddział w Polsce', + '247' => 'HAITONG BANK, S.A. Spółka Akcyjna Oddział w Polsce', + '248' => 'Getin Noble Bank SA', + '249' => 'Alior Bank SA', + '251' => 'Aareal Bank Aktiengesellschaft (Spółka Akcyjna) - Oddział w Polsce', + '254' => 'Citibank Europe plc (Publiczna Spółka Akcyjna) Oddział w Polsce', + '255' => 'Ikano Bank AB (publ) Spółka Akcyjna Oddział w Polsce', + '256' => 'Nordea Bank AB SA Oddział w Polsce', + '257' => 'UBS Limited (spółka z ograniczoną odpowiedzialnością) Oddział w Polsce', + '258' => 'J.P. Morgan Europe Limited Sp. z o.o. Oddział w Polsce', + '260' => 'Bank of China (Luxembourg) S.A. Spółka Akcyjna Oddział w Polsce', + '262' => 'Industrial and Commercial Bank of China (Europe) S.A. (Spółka Akcyjna) Oddział w Polsce', + '263' => 'Saxo Bank A/S Spółka Akcyjna Oddział w Polsce w likwidacji', + '264' => 'RCI Banque Spółka Akcyjna Oddział w Polsce', + '265' => 'EUROCLEAR Bank SA/NV (Spółka Akcyjna) - Oddział w Polsce', + '266' => 'Intesa Sanpaolo S.p.A. Spółka Akcyjna Oddział w Polsce', + '267' => 'Western Union International Bank GmbH, Sp. z o.o. Oddział w Polsce', + '269' => 'PKO Bank Hipoteczny SA', + '270' => 'TF BANK AB (Spółka z ograniczoną odpowiedzialnością) Oddział w Polsce', + '271' => 'FCE Bank Spółka Akcyjna Oddział w Polsce', + '272' => 'AS Inbank Spółka Akcyjna - Oddział w Polsce', + '273' => 'China Construction Bank (Europe) S.A. (Spółka Akcyjna) Oddział w Polsce', + '274' => 'MUFG Bank (Europe) N.V. S.A. Oddział w Polsce', + '275' => 'John Deere Bank S.A. Spółka Akcyjna Oddział w Polsce', ); /** @@ -105,7 +100,7 @@ class Payment extends \Faker\Provider\Payment protected static function addBankCodeChecksum($iban, $countryCode = 'PL') { - if ($countryCode != "PL" || strlen($iban) <= 8) { + if ($countryCode != 'PL' || strlen($iban) <= 8) { return $iban; } $checksum = 0; diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/pl_PL/Person.php b/vendor/fzaninotto/faker/src/Faker/Provider/pl_PL/Person.php index c6b2402e..380f4d9f 100644 --- a/vendor/fzaninotto/faker/src/Faker/Provider/pl_PL/Person.php +++ b/vendor/fzaninotto/faker/src/Faker/Provider/pl_PL/Person.php @@ -159,11 +159,12 @@ class Person extends \Faker\Provider\Person for ($i = 6; $i < $length; $i++) { $result[$i] = static::randomDigit(); } - if ($sex == "M") { - $result[$length - 1] |= 1; - } elseif ($sex == "F") { - $result[$length - 1] ^= 1; + + $result[$length - 1] |= 1; + if ($sex == "F") { + $result[$length - 1] -= 1; } + $checksum = 0; for ($i = 0; $i < $length; $i++) { $checksum += $weights[$i] * $result[$i]; diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/pt_BR/PhoneNumber.php b/vendor/fzaninotto/faker/src/Faker/Provider/pt_BR/PhoneNumber.php index 9224b08e..4949eef3 100644 --- a/vendor/fzaninotto/faker/src/Faker/Provider/pt_BR/PhoneNumber.php +++ b/vendor/fzaninotto/faker/src/Faker/Provider/pt_BR/PhoneNumber.php @@ -4,18 +4,31 @@ namespace Faker\Provider\pt_BR; class PhoneNumber extends \Faker\Provider\PhoneNumber { + protected static $landlineFormats = array('2###-####', '3###-####', '4###-####'); - protected static $landlineFormats = array('2###-####', '3###-####'); - + /** + * Since december 2016 all mobile phone numbers in brazil begin with 9 and landlines 2, 3 or 4. + * @link http://www.anatel.gov.br/Portal/exibirPortalPaginaEspecial.do?org.apache.struts.taglib.html.TOKEN=9594e1d11fbc996d52bda44e608bb744&codItemCanal=1794&pastaSelecionada=2984 + */ protected static $cellphoneFormats = array('9####-####'); /** * Generates a 2-digit area code not composed by zeroes. + * @link http://www.anatel.gov.br/legislacao/resolucoes/16-2001/383-resolucao-263. * @return string */ public static function areaCode() { - return static::randomDigitNotNull().static::randomDigitNotNull(); + $areaCodes = array( + '11', '12', '13', '14', '15', '16', '17', '18', '19', '21', '22', '24', + '27', '28', '31', '32', '33', '34', '35', '37', '38', '41', '42', '43', + '44', '45', '46', '47', '48', '49', '51', '53', '54', '55', '61', '62', + '63', '64', '65', '66', '67', '68', '69', '71', '73', '74', '75', '77', + '79', '81', '82', '83', '84', '85', '86', '87', '88', '89', '91', '92', + '93', '94', '95', '96', '97', '98', '99' + ); + + return self::randomElement($areaCodes); } /** diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/ru_RU/Address.php b/vendor/fzaninotto/faker/src/Faker/Provider/ru_RU/Address.php index 6174cedd..aa0d4088 100644 --- a/vendor/fzaninotto/faker/src/Faker/Provider/ru_RU/Address.php +++ b/vendor/fzaninotto/faker/src/Faker/Provider/ru_RU/Address.php @@ -14,55 +14,38 @@ class Address extends \Faker\Provider\Address protected static $buildingNumber = array('##'); protected static $postcode = array('######'); + + /** + * @link https://ru.wikipedia.org/wiki/Общероссийский_классификатор_стран_мира#Список_стран_согласно_Классификатору + */ protected static $country = array( - 'Украина', 'Российская Федерация', 'США', 'Канада', 'Австралия', 'Австрия', - 'Азербайджан', 'Аландские острова', 'Албания', 'Алжир', 'Американские острова Самоа', 'Ангилья', - 'Ангола', 'Андорра', 'Антарктика', 'Антигуа и Барбуда', 'Аргентина', 'Армения', - 'Аруба', 'Афганистан, Исламская Республика', 'Багамы', 'Бангладеш', 'Барбадос', 'Бахрейн', - 'Белиз', 'Белоруссия', 'Бельгия', 'Бермудские Острова', 'Болгария', 'Боливия', - 'Босния и Герцеговина', 'Ботсвана', 'Бразилия', 'Британская территория Индийского океана', - 'Бруней Даруссалам', 'Буркина Фасо', 'Бурунди', 'Бутан', 'Вануату', - 'Великобритания', 'Венгрия', 'Венесуэла', 'Виргинские о-ва, Великобритания', 'Виргинские о-ва, США', - 'Восточный Тимор', 'Вьетнам', 'Габон', 'Гаити', 'Гайана', - 'Гамбия', 'Гана', 'Гваделупа', 'Гватемала', 'Гвинея', - 'Гвинея-Биссау', 'Германия', 'Гибралтар', 'Гонгконг', 'Гондурас', - 'Государство-город Ватикан', 'Гренада', 'Гренландия', 'Греция', 'Грузия', - 'Гуам', 'Дания', 'Джерси', 'Джибути', 'Доминиканская Республика', - 'Египет', 'Замбия', 'Западная Сахара', 'Зимбабве', 'Израиль', - 'Индия', 'Индонезия', 'Иордания', 'Ирак', 'Иран', - 'Ирландия', 'Исландия', 'Испания', 'Италия', 'Йемен', - 'Казахстан, Республика', 'Каймановы Острова', 'Камбоджа', 'Камерун', 'Катар', - 'Кения', 'Кипр', 'Кирибати', 'Китай', 'Кокосовые острова', - 'Колумбия', 'Коморские Острова', 'Конго, Демократическая Республика', 'Конго, Республика', 'Коста-Рика', - 'Кот-д’Ивуар', 'Куба', 'Кувейт', 'Кыргызстан', 'Лаос', - 'Латвия', 'Лесото', 'Либерия', 'Ливан', 'Ливия', - 'Литва', 'Лихтенштейн', 'Люксембург', 'Маврикий', 'Мавритания', - 'Мадагаскар, Республика', 'Майотта', 'Макао', 'Македония, Республика', 'Малави', - 'Малайзия', 'Мали', 'Мальдивы', 'Мальта', 'Марокко', - 'Мартиник', 'Маршалловы Острова', 'Мексика', 'Мелкие отдаленные острова США', 'Мозамбик', - 'Молдова', 'Монако', 'Монголия', 'Монтсеррат', 'Мьянма', - 'Намибия', 'Науру', 'Непал', 'Нигер', 'Нигерия', - 'Нидерландские Антильские острова', 'Нидерланды', 'Никарагуа', 'Ниуэ', 'Новая Зеландия', - 'Новая Каледония', 'Норвегия', 'Объединённые Арабские Эмираты', 'О. Гернси', 'Оман', - 'Острова Зеленого Мыса', 'Острова Кука', 'Острова Теркс И Кайкос', 'Острова Уоллис и Футуна', 'Острова Херд и Макдональд', - 'Остров Буве', 'Остров Доминика', 'Остров Мэн', 'Остров Норфолк', 'Остров Святого Мартина', - 'Остров Святой Елены', 'О. Южная Георгия И Южные Сандвичевы Острова', 'Пакистан', 'Палау', 'Палестина', - 'Панама', 'Папуа-Новая Гвинея', 'Парагвай', 'Перу', 'Питкерн', - 'Польша', 'Португалия', 'Пуэрто-Рико', 'Реюньон', 'Рождественские острова', - 'Руанда', 'Румыния', 'Сальвадор', 'Самоа', 'Сан-Марино', - 'Сан-Томе и Принсипи', 'Саудовская Аравия', 'Свазиленд', 'Северная Корея', 'Северные Марианские Острова', - 'Сейшельские Острова', 'Сен-Бартельми', 'Сенегал', 'Сен-Пьер и Микелон', 'Сент-Винсент и Гренадины', - 'Сент-Киттс и Невис', 'Сент-Люсия', 'Сербия', 'Сербия и Черногория, Государственный Союз', 'Сингапур', - 'Сирия', 'Словацкая республика', 'Словения', 'Соломонские острова', 'Сомали', - 'Судан', 'Суринам', 'Сьерра-Леоне', 'Таджикистан', 'Тайвань', - 'Тайланд', 'Танзания', 'Того', 'Токелау', 'Тонга', - 'Тринидад и Тобаго', 'Тувалу', 'Тунис', 'Туркмения', 'Турция', - 'Уганда', 'Узбекистан', 'Уругвай', 'Фарерские острова', 'Федеративные Штаты Микронезии', - 'Фиджи', 'Филиппины', 'Финляндия', 'Фолклендские о-ва', 'Франция', - 'Французская Гвинея', 'Французская Полинезия', 'Французские Южные Территории', 'Хорватия', 'Чад', - 'Черногория', 'Чешская Республика', 'Чили', 'Швейцария', 'Швеция', - 'Шпицберген и Ян-Майен', 'Шри-Ланка', 'Эквадор', 'Экваториальная Гвинея', 'Эритрея', - 'Эстония', 'Эфиопия', 'Южная Корея', 'Южно-Африканская Республика', 'Ямайка', 'Япония', + 'Абхазия', 'Австралия', 'Австрия', 'Азербайджан', 'Албания', 'Алжир', 'Американское Самоа', 'Ангилья', 'Ангола', 'Андорра', 'Антарктида', 'Антигуа и Барбуда', 'Аргентина', 'Армения', 'Аруба', 'Афганистан', + 'Багамы', 'Бангладеш', 'Барбадос', 'Бахрейн', 'Беларусь', 'Белиз', 'Бельгия', 'Бенин', 'Бермуды', 'Болгария', 'Боливия', 'Бонэйр, Синт-Эстатиус и Саба', 'Босния и Герцеговина', 'Ботсвана', 'Бразилия', 'Британская Территория в Индийском Океане', 'Британские Виргинские Острова', 'Бруней', 'Буркина-Фасо', 'Бурунди', 'Бутан', + 'Вануату', 'Ватикан', 'Венгрия', 'Венесуэла', 'Великобритания', 'Виргинские Острова Соединённых Штатов', 'Вьетнам', + 'Габон', 'Гаити', 'Гайана', 'Гамбия', 'Гана', 'Гваделупа', 'Гватемала', 'Гвинея', 'Гвинея-Бисау', 'Германия', 'Гернси', 'Гибралтар', 'Гондурас', 'Гонконг', 'Гренада', 'Гренландия', 'Греция', 'Грузия', 'Гуам', + 'Дания', 'Демократическая Республика Конго', 'Джерси', 'Джибути', 'Доминика', 'Доминиканская Республика', + 'Египет', + 'Замбия', 'Западная Сахара', 'Зимбабве', + 'Израиль', 'Индия', 'Индонезия', 'Иордания', 'Ирак', 'Иран', 'Ирландия', 'Исландия', 'Испания', 'Италия', + 'Йемен', + 'Кабо-Верде', 'Казахстан', 'Камбоджа', 'Камерун', 'Канада', 'Катар', 'Кения', 'Кипр', 'Киргизия', 'Кирибати', 'Китай', 'Кокосовые острова', 'Колумбия', 'Коморы', 'Конго', 'Корейская Народно-Демократическая Республика', 'Корея', 'Коста-Рика', 'Кот-д\'Ивуар', 'Куба', 'Кувейт', 'Кюрасао', + 'Лаос', 'Латвия', 'Лесото', 'Либерия', 'Ливан', 'Ливия', 'Литва', 'Лихтенштейн', 'Люксембург', + 'Маврикий', 'Мавритания', 'Мадагаскар', 'Майотта', 'Макао', 'Малави', 'Малайзия', 'Мали', 'Малые Тихоокеанские Отдаленные Острова Соединенных Штатов', 'Мальдивы', 'Мальта', 'Марокко', 'Мартиника', 'Маршалловы Острова', 'Мексика', 'Микронезия', 'Мозамбик', 'Молдова', 'Монако', 'Монголия', 'Монтсеррат', 'Мьянма', + 'Намибия', 'Науру', 'Непал', 'Нигер', 'Нигерия', 'Нидерланды', 'Никарагуа', 'Ниуэ', 'Новая Зеландия', 'Новая Каледония', 'Норвегия', + 'Объединенные Арабские Эмираты', 'Оман', 'Острова Кайман', 'Острова Кука', 'Острова Теркс и Кайкос', 'Остров Буве', 'Остров Мэн', 'Остров Норфолк', 'Остров Рождества', 'Остров Херд и Острова Макдональд', + 'Пакистан', 'Палау', 'Палестина', 'Панама', 'Папуа-Новая Гвинея', 'Парагвай', 'Перу', 'Питкерн', 'Польша', 'Португалия', 'Пуэрто-Рико', + 'Республика Македония', 'Реюньон', 'Россия', 'Руанда', 'Румыния', + 'Самоа', 'Сан-Марино', 'Сан-Томе и Принсипи', 'Саудовская Аравия', 'Свазиленд', 'Святая Елена, Остров Вознесения, Тристан-да-кунья', 'Северные Марианские Острова', 'Сейшелы', 'Сен-Бартелеми', 'Сен-Мартен', 'Сенегал', 'Сент-Винсент и Гренадины', 'Сент-Китс и Невис', 'Сент-Люсия', 'Сент-Пьер и Микелон', 'Сербия', 'Сингапур', 'Сирийская Арабская Республика', 'Словакия', 'Словения', 'Соединенные Штаты Америки', 'Соломоновы Острова', 'Сомали', 'Судан', 'Суринам', 'Сьерра-Леоне', + 'Таджикистан', 'Таиланд', 'Тайвань', 'Танзания', 'Тимор-лесте', 'Того', 'Токелау', 'Тонга', 'Тринидад и Тобаго', 'Тувалу', 'Тунис', 'Туркмения', 'Турция', + 'Уганда', 'Узбекистан', 'Украина', 'Уоллис и Футуна', 'Уругвай', + 'Фарерские острова', 'Фиджи', 'Филиппины', 'Финляндия', 'Фолклендские острова', 'Франция', 'Французская Гвиана', 'Французская Полинезия', 'Французские Южные Территории', + 'Хорватия', + 'Центрально-Африканская Республика', + 'Чад', 'Черногория', 'Чехия', 'Чили', + 'Швейцария', 'Швеция', 'Шпицберген и Ян-Майен', 'Шри-Ланка', + 'Эквадор', 'Экваториальная Гвинея', 'Эландские Острова', 'Эль-Сальвадор', 'Эритрея', 'Эстония', 'Эфиопия', + 'Южная Африка', 'Южная Джорджия и Южные Сандвичевы Острова', 'Южная Осетия', 'Южный Судан', + 'Ямайка', 'Япония', ); protected static $region = array( diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/ru_RU/Text.php b/vendor/fzaninotto/faker/src/Faker/Provider/ru_RU/Text.php index b785cfbc..7a989c28 100644 --- a/vendor/fzaninotto/faker/src/Faker/Provider/ru_RU/Text.php +++ b/vendor/fzaninotto/faker/src/Faker/Provider/ru_RU/Text.php @@ -4,6 +4,13 @@ namespace Faker\Provider\ru_RU; class Text extends \Faker\Provider\Text { + public function realText($maxNbChars = 200, $indexSize = 2) + { + $realText = parent::realText($maxNbChars, $indexSize); + + return iconv('UTF-8', 'UTF-8//IGNORE', $realText); + } + /** * From ru.wikisource.org * diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/th_TH/PhoneNumber.php b/vendor/fzaninotto/faker/src/Faker/Provider/th_TH/PhoneNumber.php index 7377363f..c4d5286c 100644 --- a/vendor/fzaninotto/faker/src/Faker/Provider/th_TH/PhoneNumber.php +++ b/vendor/fzaninotto/faker/src/Faker/Provider/th_TH/PhoneNumber.php @@ -22,6 +22,8 @@ class PhoneNumber extends \Faker\Provider\PhoneNumber '08 #### ####', '09# ### ####', '09 #### ####', + '06# ### ####', + '06 #### ####', ); /** diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/tr_TR/Person.php b/vendor/fzaninotto/faker/src/Faker/Provider/tr_TR/Person.php index 2d37d62e..a937377f 100644 --- a/vendor/fzaninotto/faker/src/Faker/Provider/tr_TR/Person.php +++ b/vendor/fzaninotto/faker/src/Faker/Provider/tr_TR/Person.php @@ -2,6 +2,8 @@ namespace Faker\Provider\tr_TR; +use Faker\Calculator\TCNo; + class Person extends \Faker\Provider\Person { /** @@ -94,4 +96,17 @@ class Person extends \Faker\Provider\Person { return static::titleMale(); } + + /** + * National Personal Identity number (tc kimlik no) + * @link https://en.wikipedia.org/wiki/Turkish_Identification_Number + * @return string on format XXXXXXXXXXX + */ + public function tcNo() + { + $randomDigits = static::numerify('#########'); + $checksum = TCNo::checksum($randomDigits); + + return $randomDigits . $checksum; + } } diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/uk_UA/Address.php b/vendor/fzaninotto/faker/src/Faker/Provider/uk_UA/Address.php index dc0091c3..1ff77a47 100644 --- a/vendor/fzaninotto/faker/src/Faker/Provider/uk_UA/Address.php +++ b/vendor/fzaninotto/faker/src/Faker/Provider/uk_UA/Address.php @@ -252,7 +252,7 @@ class Address extends \Faker\Provider\Address 'Тернопіль', 'Харків', 'Херсон', - 'Хмельницьк', + 'Хмельницький', 'Черкаси', 'Чернівці', 'Чернігів' diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/uk_UA/Payment.php b/vendor/fzaninotto/faker/src/Faker/Provider/uk_UA/Payment.php index eaad1c34..81ad024c 100644 --- a/vendor/fzaninotto/faker/src/Faker/Provider/uk_UA/Payment.php +++ b/vendor/fzaninotto/faker/src/Faker/Provider/uk_UA/Payment.php @@ -1,6 +1,6 @@ array( - '桃園市', '中壢市', '大溪鎮', '楊梅鎮', '蘆竹鄉', - '大園鄉', '龜山鄉', '八德市', '龍潭鄉', '平鎮市', - '新屋鄉', '觀音鄉', '復興鄉', + '桃園市' => array( + '桃園區', '中壢區', '大溪區', '楊梅區', '蘆竹區', + '大園區', '龜山區', '八德區', '龍潭區', '平鎮區', + '新屋區', '觀音區', '復興區', ), '新竹縣' => array( '竹北市', '竹東鎮', '新埔鎮', '關西鎮', '湖口鄉', diff --git a/vendor/fzaninotto/faker/src/Faker/Provider/zh_TW/Text.php b/vendor/fzaninotto/faker/src/Faker/Provider/zh_TW/Text.php index ea34445f..887d12bb 100644 --- a/vendor/fzaninotto/faker/src/Faker/Provider/zh_TW/Text.php +++ b/vendor/fzaninotto/faker/src/Faker/Provider/zh_TW/Text.php @@ -15,85 +15,787 @@ class Text extends \Faker\Provider\Text protected static $notBeginPunct = array('、', '。', '」', '』', '!', '?', 'ー', ',', ':', ';'); /** - * Title: 三國演義 Romance of the Three Kingdoms - * Author: 羅貫中 Luo Guanzhong + * Title: 吶喊 Call to Arms (1922) + * Author: 魯迅 Lu Xun * Language: Traditional Chinese - * - * @see http://cls.hs.yzu.edu.tw/san/bin/body.asp?CHNO=001 + * @see https://zh.wikisource.org/wiki/%E5%90%B6%E5%96%8A * @var string */ protected static $baseText = <<<'EOT' -第一回:宴桃園豪傑三結義,斬黃巾英雄首立功 -詞曰:滾滾長江東逝水,浪花淘盡英雄。是非成敗轉頭空:青山依舊在,幾度夕陽紅。白髮漁樵江渚上,慣看秋月春風。一壺濁酒喜相逢:古今多少事, -都付笑談中。話說天下大勢,分久必合,合久必分:周末七國分爭,并入於秦。及秦滅之後,楚、漢分爭,又并入於漢。漢朝自高祖斬白蛇而起義,一統天下。 -後來光武中興,傳至獻帝,遂分為三國。推其致亂之由,殆始於桓、靈二帝。桓帝禁錮善類,崇信宦官。及桓帝崩,靈帝即位,大將軍竇武、太傅陳蕃,共相輔佐。 -時有宦官曹節等弄權,竇武、陳蕃謀誅之,作事不密,反為所害。中涓自此愈橫。建寧二年四月望日,帝御溫德殿。方陞座,殿角狂風驟起,只見一條大青蛇, -從梁上飛將下來,蟠於椅上。帝驚倒,左右急救入宮,百官俱奔避。須臾,蛇不見了。忽然大雷大雨,加以冰雹,落到半夜方止,壞卻房屋無數。建寧四年二月, -洛陽地震;又海水泛溢,沿海居民,盡被大浪捲入海中。光和元年,雌雞化雄。六月朔,黑氣十餘丈,飛入溫德殿中。秋七月,有虹見於玉堂;五原山岸, -盡皆崩裂。種種不祥,非止一端。帝下詔問群臣以災異之由,議郎蔡邕上疏,以為蜺墮雞化,乃婦寺干政之所致,言頗切直。帝覽奏歎息,因起更衣。 -曹節在後竊視,悉宣告左右,遂以他事陷邕於罪,放歸田里。後張讓,趙忠,封諝,段珪,曹節,候覽,蹇碩,程曠,夏惲,郭勝十人朋比為奸,號為「十常侍」。 -帝尊信張讓,呼為「阿父」,朝政日非,以致天下人心思亂,盜賊蜂起。時鉅鹿郡有兄弟三人:一名張角,一名張寶,一名張梁。那張角本是個不第秀才。 -因入山採藥,遇一老人,碧眼童顏,手執藜杖,喚角至一洞中,以天書三卷授之,曰:「此名太平要術。汝得之,當代天宣化,普救世人;若萌異心,必獲惡報。」 -角拜問姓名。老人曰:「吾乃南華老仙也。」言訖,化陣清風而去。角得此書,曉夜攻習,能呼風喚雨,號為太平道人。中平元年正月內,疫氣流行, -張角散施符水,為人治病,自稱大賢良師。角有徒弟五百餘人,雲游四方,皆能書符念咒。次後徒眾日多,角乃立三十六方,ー大方萬餘人,小方六七千ー, -各立渠帥,稱為將軍。訛言「蒼天已死,黃天當立。」又云「歲在甲子,天下大吉。」令人各以白土,書「甲子」二字於家中大門上。青、幽、徐、冀、荊、揚、 -兗、豫八州之人,家家侍奉大賢良師張角名字。角遣其黨馬元義,暗齎金帛,結交中涓封諝,以為內應。角與二弟商議曰:「至難得者,民心也。今民心已順, -若不乘勢取天下,誠為可惜。」遂一面私造黃旗,約期舉事;一面使弟子唐州,馳書報封諝。唐州乃逕赴省中告變。帝召大將軍何進調兵擒馬元義,斬之; -次收封諝等一干人下獄。張角聞知事露,星夜舉兵,自稱天公將軍,ー張寶稱地公將軍,張梁稱人公將軍ー。申言於眾曰:「今漢運將終,大聖人出; -汝等皆宜順從天意,以槳太平。」四方百姓,裹黃巾從張角反者,四五十萬。賊勢浩大,官軍望風而靡。何進奏帝火速降詔,令各處備禦,討賊立功; -一面遣中郎將盧植,皇甫嵩,朱雋,各引精兵,分三路討之。且說張角一軍,前犯幽州界分。幽州太守劉焉,乃江夏竟陵人氏,漢魯恭王之後也; -當時聞得賊兵將至,召校尉鄒靖計議。靖曰:「賊兵眾,我兵寡,明公宜作速招軍應敵。」劉焉然其說,隨即出榜招募義兵。榜文行到涿縣, -乃引出涿縣中一個英雄。那人不甚好讀書;性寬和,寡言語,喜怒不形於色;素有大志,專好結交天下豪傑;生得身長七尺五寸,兩耳垂肩,雙手過膝, -目能自顧其耳,面如冠玉,脣若塗脂;中山靖王劉勝之後,漢景帝閣下玄孫;姓劉,名備,字玄德。昔劉勝之子劉貞,漢武時封涿鹿亭侯,後坐酬金失侯, -因此遺這一枝在涿縣。玄德祖劉雄,父劉弘。弘曾舉孝廉,亦嘗作吏,早喪。玄德幼孤,事母至孝;家貧,販屨織蓆為業。家住本縣樓桑村。其家之東南, -有一大桑樹,高五丈餘,遙望之,童童如車蓋。相者云:「此家必出貴人。」玄德幼時,與鄉中小兒戲於樹下,曰:「我為天子,當乘此車蓋。」 -叔父劉元起奇其言,曰:「此兒非常人也!」因見玄德家貧,常資給之。年十五歲,母使游學,嘗師事鄭玄、盧植;與公孫瓚等為友。及劉焉發榜招軍時, -玄德年己二十八歲矣。當日見了榜文,慨然長歎。隨後一人厲聲言曰:「大丈夫不與國家出力,何故長歎?」玄德回視其人:身長八尺,豹頭環眼,燕頷虎鬚, -聲若巨雷,勢如奔馬。玄德見他形貌異常,問其姓名。其人曰:「某姓張,名飛,字翼德。世居涿郡,頗有莊田,賣酒屠豬,專好結交天下豪傑。 -適纔見公看榜而歎,故此相問。」玄德曰:「我本漢室宗親,姓劉,名備。今聞黃巾倡亂,有志欲破賊安民;恨力不能,故長歎耳。」飛曰:「吾頗有資財, -當招募鄉勇,與公同舉大事,如何?」玄德甚喜,遂與同入村店中飲酒。正飲間,見一大漢,推著一輛車子,到店門首歇了;入店坐下,便喚酒保:「快斟酒來吃, -我待趕入城去投軍。」玄德看其人:身長九尺,髯長二尺:面如重棗,脣若塗脂;丹鳳眼,臥蠶眉:相貌堂堂,威風凜凜。玄德就邀他同坐,叩其姓名。 -其人曰:「吾姓關,名羽,字壽長,後改雲長,河東解良人也。因本處勢豪,倚勢凌人,被吾殺了;逃難江湖,五六年矣。今聞此處招軍破賊,特來應募。」 -玄德遂以己志告之。雲長大喜。同到張飛莊上,共議大事。飛曰:「吾莊後有一桃園,花開正盛;明日當於園中祭告天地,我三人結為兄弟,協力同心, -然後可圖大事。」玄德、雲長、齊聲應曰:「如此甚好。」次日,於桃園中,備下烏牛白馬祭禮等項,三人焚香,再拜而說誓曰:「念劉備、關羽、張飛, -雖然異姓,既結為兄弟,則同心協力,救困扶危;上報國家,下安黎庶;不求同年同月同日生,但願同年同月同日死。皇天后土,實鑒此心。背義忘恩, -天人共戮。」誓畢,拜玄德為兄,關羽次之,張飛為弟。祭罷天地,復宰牛設酒,聚鄉中勇士,得三百餘人,就桃園中痛飲一醉。來日收拾軍器,但恨無馬匹可乘。 -正思慮間,人報「有兩個客人,引一夥伴儅,趕一群馬,投莊上來。」玄德曰:「此天佑我也!」三人出莊迎接。原來二客乃中山大商:一名張世平,一名蘇雙, -每年往北販馬,近因寇發而回。玄德請二人到莊,置酒管待,訴說欲討賊安民之意。二客大喜,願將良馬五十匹相送;又贈金銀五百兩,鑌鐵一千斤,以資器用。 -玄德謝別二客,便命良匠打造雙股劍。雲長造青龍偃月刀,又名冷豔鋸,重八十二斤。張飛造丈八點鋼矛。各置全身鎧甲。共聚鄉勇五百餘人,來見鄒靖。 -鄒靖引見太守劉焉。三人參見畢,各通姓名。玄德說起宗派,劉焉大喜,遂認玄德為姪。不數日,人報黃巾賊將程遠志統兵五萬來犯涿郡。 -劉焉令鄒靖引玄德等三人,統兵五百,前去破敵。玄德等欣然領軍前進,直至大興山下,與賊相見。賊眾皆披髮,以黃巾抹額。當下兩軍相對,玄德出馬, -ー左有雲長,右有翼德ー,揚鞭大罵:「反國逆賊,何不早降!」程遠志大怒,遣副將鄧茂出戰。張飛挺丈八蛇矛直出,手起處,刺中鄧茂心窩,翻身落馬。 -程遠志見折了鄧茂,拍馬舞刀,直取張飛。雲長舞動大刀,縱馬飛迎。程遠志見了,早吃一驚;措手不及,被雲長刀起處,揮為兩段。 -後人有詩讚二人曰:英雄發穎在今朝,一試矛兮一試刀。初出便將威力展,三分好把姓名標。眾賊見程遠志被斬,皆倒戈而走。玄德揮軍追趕,投降者不計其數, -大勝而回。劉焉親自迎接,賞勞軍士。次日,接得青州太守龔景牒文,言黃巾賊圍城將陷,乞賜救援。劉焉與玄德商議。玄德曰:「備願往救之。」 -劉焉令鄒靖將兵五千,同玄德,關,張,投青州來。賊眾見救軍至,分兵混戰。玄德兵寡不勝,退三十里下寨。玄德謂關、張曰、「賊眾我寡,必出奇兵, -方可取勝。」乃分關公引一千軍伏山左,張飛引一千軍伏山右,鳴金為號,齊出接應。次日,玄德與鄒靖,引軍鼓譟而進。賊眾迎戰,玄德引軍便退。 -賊眾乘勢追趕,方過山嶺,玄德軍中一齊鳴金,左右兩軍齊出,玄德麾軍回身復殺。三路夾攻,賊眾大潰。直趕至青州城下,太守龔景亦率民兵出城助戰。 -賊勢大敗,剿戮極多,遂解青州之圍。後人有詩讚玄德曰:運籌決算有神功,二虎還須遜一龍。初出便能垂偉績,自應分鼎在孤窮。龔景犒軍畢,鄒靖欲回。 -玄德曰:「近聞中郎將盧植與賊首張角戰於廣宗,備昔曾師事盧植,欲往助之。」於是鄒靖引軍自回,玄德與關、張引本部五百人投廣宗來。至盧植軍中, -入帳施禮,具道來意。盧植大喜,留在帳前聽調。時張角賊眾十五萬,植兵五萬,相拒於廣宗,未見勝負。植謂玄德曰:「我今圍賊在此,賊弟張梁,張寶在潁川, -與皇甫嵩、朱雋對壘。汝可引本部人馬,我更助汝一千官軍,前去潁川打探消息,約期剿捕。」玄德領命,引軍星夜投潁川來。時皇甫嵩、朱雋領軍拒賊, -賊戰不利,退入長社,依草結營。嵩與雋計曰:「賊依草結營,當用火攻之。」遂令軍士,每人束草一把,暗地埋伏。其夜大風忽起。二更以後,一齊縱火, -嵩與雋各引兵攻擊賊寨,火燄張天,賊眾驚慌,馬不及鞍,人不及甲,四散奔走。殺到天明,張梁、張寶引敗殘軍士,奪路而走。忽見一彪軍馬,盡打紅旗, -當頭來到,截往去路。為首閃出一將,身長七尺,細眼長髯;官拜騎都尉;沛國譙郡人也:姓曹,名操,字孟德。操父曹嵩,本姓夏侯氏;因為中常侍曹騰之養子, -故冒姓曹。曹嵩生操,小字阿瞞,一名吉利。操幼時,好游獵,喜歌舞;有權謀,多機變。操有叔父,見操游蕩無度,嘗怒之,言於曹嵩。嵩責操。 -操忽心生一計:見叔父來,詐倒於地,作中風之狀。叔父驚告嵩,嵩急視之,操故無恙。嵩曰:「叔言汝中風,今己愈乎?」操曰:「兒自來無此病; -因失愛於叔父,故見罔耳。」嵩信其言。後叔父但言操過,嵩並不聽。因此,操得恣意放蕩。時人有橋玄者,謂操曰:「天下將亂,非命世之才,不能濟。 -能安之者,其在君乎?」南陽何顒見操,言:「漢室將亡,安天下者,必此人也。」汝南許劭,有知人之名。操往見之,問曰:「我何如人?」劭不答。 -又問,劭曰:「子治世之能臣,亂世之奸雄也。」操聞言大喜。年二十,舉孝廉,為郎,除洛陽北都尉。初到任,即設五色棒十餘條於縣之四門。有犯禁者, -不避豪貴,皆責之。中常侍蹇碩之叔,提刀夜行,操巡夜拏住,就棒責之。由是,內外莫敢犯者,威名頗震。後為頓丘令。因黃巾起,拜為騎都尉,引馬步軍五千, -前來潁川助戰。正值張梁、張寶敗走,曹操攔住,大殺一陣,斬首萬餘級,奪得旗旛、金鼓馬匹極多。張梁、張寶死戰得脫。操見過皇甫嵩,朱雋, -隨即引兵追襲張梁、張寶去了。卻說玄德引關、張來潁川,聽得喊殺之聲,又望見火光燭天,急引兵來時,賊已敗散。玄德見皇甫嵩,朱雋,其道盧植之意。 -嵩曰:「張梁、張寶勢窮力乏,必投廣宗去依張角。玄德可即星夜往助。」玄德領命,遂引兵復回。到得半路,只見一簇軍馬,護送一輛檻車,車中之囚, -乃盧植也。玄德大驚,滾鞍下馬,問其緣故。植曰:「我圍張角,將次可破;因角用妖術,未能即勝。朝廷差黃門左豐前來體探,問我索取賄賂。 -我答曰:『軍糧尚缺,安有餘錢奉承天使?』左豐挾恨,回奏朝廷,說我高壘不戰,惰慢軍心;因此朝廷震怒,遣中郎將董卓來代將我兵,取我回京問罪。」 -張飛聽罷,大怒,要斬護送軍人,以救盧植。玄德急止之曰:「朝廷自有公論,汝豈可造次?」軍士簇擁盧植去了。關公曰:「盧中郎已被逮,別人領兵, -我等去無所依,不如且回涿郡。」玄德從其言,遂引軍北行。行無二日,忽聞山後喊聲大震。玄德引關、張縱馬上高岡望之,見漢軍大敗,後面漫山塞野, -黃巾蓋地而來,旗上大書「天公將軍」。玄德曰:「此張角也!可速戰!」三人飛馬引軍而出。張角正殺敗董卓,乘勢趕來,忽遇三人衝殺,角軍大亂, -敗走五十餘里。三人救了董卓回寨。卓問三人現居何職。玄德曰:「白身。」卓甚輕之,不為禮。玄德出,張飛大怒曰:「我等親赴血戰,救了這廝, -他卻如此無禮;若不殺之,難消我氣!」便要提刀入帳來殺董卓。正是:人情勢利古猶今,誰識英雄是白身?安得快人如翼德,盡誅世上負心人! -畢竟董卓性命如何,且看下文分解。 +我在年青時候也曾經做過許多夢,後來大半忘卻了,但自己也並不以爲可惜。所謂回憶者,雖說可以使人歡欣,有時也不免使人寂寞,使精神的絲縷還牽著已逝的寂寞的時光,又有什麼意味呢,而我偏苦于不能全忘卻,這不能全忘的一部分,到現在便成了《吶喊》的來由。 +我有四年多,曾經常常,——幾乎是每天,出入于質鋪和藥店裏,年紀可是忘卻了,總之是藥店的櫃臺正和我一樣高,質鋪的是比我高一倍,我從一倍高的櫃臺外送上衣服或首飾去,在侮蔑裡接了錢,再到一樣高的櫃臺上給我久病的父親去買藥。回家之後,又須忙別的事了,因爲開方的醫生是最有名的,以此所用的藥引也奇特:冬天的蘆根,經霜三年的甘蔗,蟋蟀要原對的,結子的平地木,……多不是容易辦到的東西。然而我的父親終于日重一日的亡故了。 +有誰從小康人家而墜入困頓的麼,我以爲在這途路中,大概可以看見世人的真面目;我要到N進K學堂去了,仿佛是想走異路,逃異地,去尋求別樣的人們。我的母親沒有法,辦了八元的川資,說是由我的自便;然而伊哭了,這正是情理中的事,因爲那時讀書應試是正路,所謂學洋務,社會上便以爲是一種走投無路的人,只得將靈魂賣給鬼子,要加倍的奚落而且排斥的,而況伊又看不見自己的兒子了。然而我也顧不得這些事,終于到N去進了K學堂了,在這學堂裏,我纔知道世上還有所謂格致,算學,地理,歷史,繪圖和體操。生理學並不教,但我們卻看到些木版的《全體新論》和《化學衛生論》之類了。我還記得先前的醫生的議論和方藥,和現在所知道的比較起來,便漸漸的悟得中醫不過是一種有意的或無意的騙子,同時又很起了對于被騙的病人和他的家族的同情;而且從譯出的歷史上,又知道了日本維新是大半發端于西方醫學的事實。 +因爲這些幼稚的知識,後來便使我的學籍列在日本一個鄉間的醫學專門學校裏了。我的夢很美滿,預備卒業回來,救治像我父親似的被誤的病人的疾苦,戰爭時候便去當軍醫,一面又促進了國人對于維新的信仰。我已不知道教授微生物學的方法,現在又有了怎樣的進步了,總之那時是用了電影,來顯示微生物的形狀的,因此有時講義的一段落已完,而時間還沒有到,教師便映些風景或時事的畫片給學生看,以用去這多餘的光陰。其時正當日俄戰爭的時候,關于戰事的畫片自然也就比較的多了,我在這一個講堂中,便須常常隨喜我那同學們的拍手和喝采。有一回,我竟在畫片上忽然會見我久違的許多中國人了,一個綁在中間,許多站在左右,一樣是強壯的體格,而顯出麻木的神情。據解說,則綁著的是替俄國做了軍事上的偵探,正要被日軍砍下頭顱來示衆,而圍著的便是來賞鑑這示衆的盛舉的人們。 +這一學年沒有完畢,我已經到了東京了,因爲從那一回以後,我便覺得醫學並非一件緊要事,凡是愚弱的國民,卽使體格如何健全,如何茁壯,也只能做毫無意義的示衆的材料和看客,病死多少是不必以爲不幸的。所以我們的第一要著,是在改變他們的精神,而善于改變精神的是,我那時以爲當然要推文藝,于是想提倡文藝運動了。在東京的留學生很有學法政理化以至警察工業的,但沒有人治文學和美術;可是在冷淡的空氣中,也幸而尋到幾個同志了,此外又邀集了必須的幾個人,商量之後,第一步當然是出雜誌,名目是取“新的生命”的意思,因爲我們那時大抵帶些復古的傾向,所以只謂之《新生》。 +《新生》的出版之期接近了,但最先就隱去了若干擔當文字的人,接着又逃走了資本,結果只剩下不名一錢的三個人。創始時候旣已背時,失敗時候當然無可吿語,而其後卻連這三個人也都爲各自的運命所驅策,不能在一處縱談將來的好夢了,這就是我們的並未產生的《新生》的結局。 +我感到未嘗經驗的無聊,是自此以後的事。我當初是不知其所以然的;後來想,凡有一人的主張,得了贊和,是促其前進的,得了反對,是促其奮鬭的,獨有叫喊于生人中,而生人並無反應,既非贊同,也無反對,如置身毫無邊際的荒原,無可措手的了,這是怎樣的悲哀呵,我于是以我所感到者爲寂寞。 +這寂寞又一天一天的長大起來,如大毒蛇,纏住了我的靈魂了。 +然而我雖然自有無端的悲哀,卻也並不憤懣,因爲這經驗使我反省,看見自己了:就是我決不是一個振臂一呼應者雲集的英雄。 +只是我自己的寂寞是不可不驅除的,因爲這于我太痛苦。我于是用了種種法,來麻醉自己的靈魂,使我沈入于國民中,使我回到古代去,後來也親歷或旁觀過幾樣更寂寞更悲哀的事,都爲我所不願追懷,甘心使他們和我的腦一同消滅在泥土裏的,但我的麻醉法卻也似乎已經奏了功,再沒有青年時候的慷慨激昂的意思了。 +S會館裏有三間屋,相傳是往昔曾在院子裏的槐樹上縊死過一個女人的,現在槐樹已經高不可攀了,而這屋還沒有人住;許多年,我便寓在這屋裏鈔古碑。客中少有人來,古碑中也遇不到什麼問題和主義,而我的生命卻居然暗暗的消去了,這也就是我惟一的願望。夏夜,蚊子多了,便搖著蒲扇坐在槐樹下,從密葉縫裡看那一點一點的青天,晚出的槐蠶又每每冰冷的落在頭頸上。 +那時偶或來談的是一個老朋友金心異,將手提的大皮夾放在破桌上,脫下長衫,對面坐下了,因爲怕狗,似乎心房還在怦怦的跳動。 +“你鈔了這些有什麼用?”有一夜,他翻著我那古碑的鈔本,發了研究的質問了。“沒有什麼用。”“那麼,你鈔他是什麼意思呢?”“沒有什麼意思。”“我想,你可以做點文章……” +我懂得他的意思了,他們正辦《新青年》,然而那時仿佛不特沒有人來贊同,並且也還沒有人來反對,我想,他們許是感到寂寞了,但是說: +“假如一間鐵屋子,是絕無窗戶而萬難破毀的,裏面有許多熟睡的人們,不久都要悶死了,然而是從昏睡入死滅,並不感到就死的悲哀。現在你大嚷起來,驚起了較爲清醒的幾個人,使這不幸的少數者來受無可挽救的臨終的苦楚,你倒以爲對得起他們麼?” +“然而幾個人旣然起來,你不能說決沒有毀壞這鐵屋的希望。” +是的,我雖然自有我的確信,然而說到希望,卻是不能抹殺的,因爲希望是在于將來,決不能以我之必無的證明,來折服了他之所謂可有,于是我終于答應他也做文章了,這便是最初的一篇《狂人日記》。從此以後,便一發而不可收,每寫些小說模樣的文章,以敷衍朋友們的囑托,積久就有了十餘篇。 +在我自己,本以爲現在是已經並非一個切迫而不能已于言的人了,但或者也還未能忘懷于當日自己的寂寞的悲哀罷,所以有時候仍不免吶喊幾聲,聊以慰藉那在寂寞裏奔馳的猛士,使他不憚于前驅。至于我的喊聲是勇猛或是悲哀,是可憎或是可笑,那倒是不暇顧及的;但旣然是吶喊,則當然須聽將令的了,所以我往往不恤用了曲筆,在《藥》的瑜兒的墳上平空添上一個花環,在《明天》裏也不敍單四嫂子竟沒有做到看見兒子的夢,因爲那時的主將是不主張消極的。至于自己,卻也並不願將自以爲苦的寂寞,再來傳染給也如我那年青時候似的正做著好夢的青年。 +這樣說來,我的小說和藝術的距離之遠,也就可想而知了,然而到今日還能蒙着小說的名,甚而至于且有成集的機會,無論如何總不能不說是一件徼幸的事,但徼幸雖使我不安于心,而懸揣人間暫時還有讀者,則究竟也仍然是高興的。 +所以我竟將我的短篇小說結集起來,而且付印了,又因爲上面所說的緣由,便稱之爲《吶喊》。 +魯鎭的酒店的格局,是和別處不同的:都是當街一個曲尺形的大櫃臺,櫃裏面豫備着熱水,可以隨時溫酒。做工的人,傍午傍晚散了工,每每花四文銅錢,買一碗酒,——這是二十多年前的事,現在每碗要漲到十文,——靠櫃外站着,熱熱的喝了休息;倘肯多花一文,便可以買一碟鹽煮筍,或者茴香豆,做下酒物了,如果出到十幾文,那就能買一樣葷菜,但這些顧客,多是短衣幫,大抵沒有這樣闊綽。只有穿長衫的,纔踱進店面隔壁的房子裏,要酒要菜,慢慢地坐喝。 +我從十二歲起,便在鎭口的咸亨酒店裏當夥計,掌櫃說,樣子太傻,怕侍候不了長衫主顧,就在外面做點事罷。外面的短衣主顧,雖然容易說話,但嘮嘮叨叨纏夾不清的也很不少。他們往往要親眼看着黃酒從罎子裏舀出,看過壺子底裏有水沒有,又親看將壺子放在熱水裏,然後放心:在這嚴重監督下,羼水也很爲難。所以過了幾天,掌櫃又說我幹不了這事。幸虧薦頭的情面大,辭退不得,便改爲專管溫酒的一種無聊職務了。 +我從此便整天的站在櫃臺裏,專管我的職務。雖然沒有什麼失職,但總覺得有些單調,有些無聊。掌櫃是一副凶臉孔,主顧也沒有好聲氣,教人活潑不得;只有孔乙己到店,纔可以笑幾聲,所以至今還記得。 +孔乙己是站着喝酒而穿長衫的唯一的人。他身材很高大;青白臉色,皺紋間時常夾些傷痕;一部亂蓬蓬的花白的鬍子。穿的雖然是長衫,可是又髒又破,似乎十多年沒有補,也沒有洗。他對人說話,總是滿口之乎者也,教人半懂不懂的。因爲他姓孔,別人便從描紅紙上的「上大人孔乙己」這半懂不懂的話裏,替他取下一個綽號,叫作孔乙己。孔乙己一到店,所有喝酒的人便都看着他笑,有的叫道,「孔乙己,你臉上又添上新傷疤了!」他不回答,對櫃裏說,「溫兩碗酒,要一碟茴香豆。」便排出九文大錢。他們又故意的高聲嚷道,「你一定又偷了人家的東西了!」孔乙己睜大眼睛說,「你怎麼這樣憑空汚人清白……」「什麼清白?我前天親眼見你偷了何家的書,弔着打。」孔乙己便漲紅了臉,額上的青筋條條綻出,爭辯道,「竊書不能算偷……竊書!……讀書人的事,能算偷麼?」接連便是難懂的話,什麼「君子固窮」,什麼「者乎」之類,引得衆人都哄笑起來:店內外充滿了快活的空氣。 +聽人家背地裏談論,孔乙己原來也讀過書,但終于沒有進學,又不會營生;于是愈過愈窮,弄到將要討飯了。幸而寫得一筆好字,便替人家鈔鈔書,換一碗飯喫。可惜他又有一樣壞脾氣,便是好喝嬾做。坐不到幾天,便連人和書籍紙張筆硯,一齊失蹤。如是幾次,叫他鈔書的人也沒有了。孔乙己沒有法,便免不了偶然做些偷竊的事。但他在我們店裏,品行卻比別人都好,就是從不拖欠;雖然間或沒有現錢,暫時記在粉板上,但不出一月,定然還清,從粉板上拭去了孔乙己的名字。 +孔乙己喝過半碗酒,漲紅的臉色漸漸復了原,旁人便又問道,「孔乙己,你當眞認識字麼?」孔乙己看着問他的人,顯出不屑置辯的神氣。他們便接着說道,「你怎的連半個秀才也撈不到呢?」孔乙己立刻顯出頹唐不安模樣,臉上籠上了一層灰色,嘴裏說些話;這回可是全是之乎者也之類,一些不懂了。在這時候,衆人也都哄笑起來:店內外充滿了快活的空氣。 +在這些時候,我可以附和着笑,掌櫃是決不責備的。而且掌櫃見了孔乙己,也每每這樣問他,引人發笑。孔乙己自己知道不能和他們談天,便只好向孩子說話。有一回對我說道,「你讀過書麼?」我略略點一點頭。他說,「讀過書,……我便考你一考。茴香豆的茴字,怎樣寫的?」我想,討飯一樣的人,也配考我麼?便回過臉去,不再理會。孔乙己等了許久,很懇切的說道,「不能寫罷?……我教給你,記着!這些字應該記着。將來做掌櫃的時候,寫賬要用。」我暗想我和掌櫃的等級還很遠呢,而且我們掌櫃也從不將茴香豆上賬;又好笑,又不耐煩,嬾嬾的答他道,「誰要你教,不是草頭底下一個來回的回字麼?」孔乙己顯出極高興的樣子,將兩個指頭的長指甲敲着櫃臺,點頭說,「對呀對呀!……回字有四樣寫法,你知道麼?」我愈不耐煩了,努着嘴走遠。孔乙己剛用指甲蘸了酒,想在櫃上寫字,見我毫不熱心,便又歎一口氣,顯出極惋惜的樣子。 +有幾回,鄰舍孩子聽得笑聲,也趕熱鬧,圍住了孔乙己。他便給他們茴香豆喫,一人一顆。孩子喫完豆,仍然不散,眼睛都望着碟子。孔乙己着了慌,伸開五指將碟子罩住,彎腰下去說道,「不多了,我已經不多了。」直起身又看一看豆,自己搖頭說,「不多不多!多乎哉?不多也。」於是這一羣孩子都在笑聲裏走散了。 +孔乙己是這樣的使人快活,可是沒有他,別人也便這麼過。 +有一天,大約是中秋前的兩三天,掌櫃正在慢慢的結賬,取下粉板,忽然說,「孔乙己長久沒有來了。還欠十九個錢呢!」我纔也覺得他的確長久沒有來了。一個喝酒的人說道,「他怎麼會來?……他打折了腿了。」掌櫃說,「哦!」「他總仍舊是偷。這一回,是自己發昏,竟偷到丁舉人家裏去了。他家的東西,偷得的麼?」「後來怎麼樣?」「怎麼樣?先寫服辯,後來是打,打了大半夜,再打折了腿。」「後來呢?」「後來打折了腿了。」「打折了怎樣呢?」「怎樣?……誰曉得?許是死了。」掌櫃也不再問,仍然慢慢的算他的賬。 +中秋之後,秋風是一天涼比一天,看看將近初冬;我整天的靠着火,也須穿上棉襖了。一天的下半天,沒有一個顧客,我正合了眼坐着。忽然間聽得一個聲音,「溫一碗酒。」這聲音雖然極低,卻很耳熟。看時又全沒有人。站起來向外一望,那孔乙己便在櫃臺下對了門檻坐着。他臉上黑而且瘦,已經不成樣子;穿一件破夾襖,盤着兩腿,下面墊一個蒲包,用草繩在肩上掛住;見了我,又說道,「溫一碗酒。」掌櫃也伸出頭去,一面說,「孔乙己麼?你還欠十九個錢呢!」孔乙己很頹唐的仰面答道,「這……下回還清罷。這一回是現錢,酒要好。」掌櫃仍然同平常一樣,笑着對他說,「孔乙己,你又偷了東西了!」但他這回卻不十分分辯,單說了一句「不要取笑!」「取笑?要是不偷,怎麼會打斷腿?」孔乙己低聲說道,「跌斷,跌,跌……」他的眼色,很像懇求掌櫃,不要再提。此時已經聚集了幾個人,便和掌櫃都笑了。我溫了酒,端出去,放在門檻上。他從破衣袋裏摸出四文大錢,放在我手裏,見他滿手是泥,原來他便用這手走來的。不一會,他喝完酒,便又在旁人的說笑聲中,坐着用這手慢慢走去了。 +自此以後,又長久沒有看見孔乙己。到了年關,掌櫃取下粉板說,「孔乙己還欠十九個錢呢!」到第二年的端午,又說「孔乙己還欠十九個錢呢!」到中秋可是沒有說,再到年關也沒有看見他。 +我到現在終于沒有見——大約孔乙己的確死了。 +秋天的後半夜,月亮下去了,太陽還沒有出,只剩下一片烏藍的天;除了夜遊的東西,什麽都睡著。華老栓忽然坐起身,擦着火柴,點上遍身油膩的燈盞,茶館的兩間屋子裏,便彌滿了青白的光。 +「小栓的爹,你就去麽?」是一個老女人的聲音。裏邊的小屋子裏,也發出一陣咳嗽。「唔。」老栓一面聽,一面應,一面扣上衣服;伸手過去說,「你給我罷。」 +華大媽在枕頭底下掏了半天,掏出一包洋錢,交給老栓,老栓接了,抖抖的裝入衣袋,又在外面按了兩下;便點上燈籠,吹熄燈盞,走向裏屋子去了。那屋子裏面,正在窸窸窣窣的響,接著便是一通咳嗽。老栓候他平靜下去,才低低的叫道,「小栓……你不要起來。……店麽?你娘會安排的。」 +老栓聽得兒子不再說話,料他安心睡了;便出了門,走到街上。街上黑沈沈的一無所有,只有一條灰白的路,看得分明。燈光照着他的兩腳,一前一後的走。有時也遇到幾隻狗,可是一隻也沒有叫。天氣比屋子裏冷多了;老栓倒覺爽快,彷彿一旦變了少年,得了神通,有給人生命的本領似的,跨步格外高遠。而且路也愈走愈分明,天也愈走愈亮了。 +老栓正在專心走路,忽然吃了一驚,遠遠裏看見一條丁字街,明明白白橫著。他便退了幾步,尋到一家關着門的鋪子,蹩進簷下,靠門立住了。好一會,身上覺得有些發冷。「哼,老頭子。」「倒高興……。」 +老栓又喫一驚,睜眼看時,幾個人從他面前過去了。一個還回頭看他,樣子不甚分明,但很像久餓的人見了食物一般,眼裏閃出一種攫取的光。老栓看看燈籠,已經熄了。按一按衣袋,硬硬的還在。仰起頭兩面一望,只見許多古怪的人,三三兩兩,鬼似的在那裏徘徊;定睛再看,卻也看不出什麼別的奇怪。 +沒有多久,又見幾個兵,在那邊走動;衣服前後的一個大白圓圈,遠地裏也看得清楚,走過面前的,並且看出號衣上暗紅的鑲邊。——一陣腳步聲響,一眨眼,已經擁過了一大簇人。那三三兩兩的人,也忽然合作一堆,潮一般向前趕;將到丁字街口,便突然立住,簇成一個半圓。 +老栓也向那邊看,卻只見一堆人的後背;頸項都伸得很長,彷彿許多鴨,被無形的手揑住了的,向上提着。靜了一會,似乎有點聲音,便又動搖起來,轟的一聲,都向後退;一直散到老栓立着的地方,幾乎將他擠倒了。 +「喂!一手交錢,一手交貨!」一個渾身黑色的人,站在老栓面前,眼光正像兩把刀,刺得老栓縮小了一半。那人一隻大手,向他攤着;一隻手卻撮着一個鮮紅的饅頭,那紅的還是一點一點的往下滴。 +老栓慌忙摸出洋錢,抖抖的想交給他,卻又不敢去接他的東西。那人便焦急起來,嚷道,「怕什麼?怎的不拿!」老栓還躊躇着;黑的人便搶過燈籠,一把扯下紙罩,裹了饅頭,塞與老栓;一手抓過洋錢,揑一揑,轉身去了。嘴裏哼着說,「這老東西……。」 +「這給誰治病的呀?」老栓也似乎聽得有人問他,但他並不答應;他的精神,現在只在一個包上,彷彿抱着一個十世單傳的嬰兒,別的事情,都已置之度外了。他現在要將這包裏的新的生命,移植到他家裏,收穫許多幸福。太陽也出來了;在他面前,顯出一條大道,直到他家中,後面也照見丁字街頭破匾上「古口亭口」這四個黯淡的金字。 +老栓走到家,店面早經收拾乾淨,一排一排的茶桌,滑溜溜的發光。但是沒有客人;只有小栓坐在裏排的桌前吃飯,大粒的汗,從額上滾下,夾襖也帖住了脊心,兩塊肩胛骨高高凸出,印成一個陽文的「八字」。老栓見這樣子,不免皺一皺展開的眉心。他的女人,從竈下急急走出,睜着眼睛,嘴唇有些發抖。「得了麼?」「得了。」 +兩個人一齊走進竈下,商量了一會;華大媽便出去了,不多時,拏着一片老荷葉回來,攤在桌上。老栓也打開燈籠罩,用荷葉重新包了那紅的饅頭。小栓也吃完飯,他的母親慌忙說:「小栓——你坐着,不要到這裏來。」一面整頓了竈火,老栓便把一個碧綠的包,一個紅紅白白的破燈籠,一同塞在竈裏;一陣紅黑的火焰過去時,店屋裏散滿了一種奇怪的香味。 +「好香!你們吃什麼點心呀?」這是駝背五少爺到了。這人每天總在茶館裏過日,來得最早,去得最遲,此時恰恰蹩到臨街的壁角的桌邊,便坐下問話,然而沒有人答應他。「炒米粥麽?」仍然沒有人應。老栓匆匆走出,給他泡上茶。 +「小栓進來罷!」華大媽叫小栓進了裏面的屋子,中間放好一條凳,小栓坐了。他的母親端過一碟烏黑的圓東西,輕輕說:——「喫下去罷,——病便好了。」 +小栓撮起這黑東西,看了一會,似乎拏着自己的性命一般,心裏說不出的奇怪。十分小心的拗開了,焦皮裏面竄出一道白氣,白氣散了,是兩半個白麵的饅頭。——不多工夫,已經全在肚裏了,卻全忘了什麼味;面前只剩下一張空盤。他的旁邊,一面立着他的父親,一面立着他的母親,兩人的眼光,都彷彿要在他身裏注進什麽又要取出什麽似的;便禁不住心跳起來,按着胸膛,又是一陣咳嗽。 +「睡一會罷,——便好了。」 +小栓依他母親的話,咳着睡了。華大媽候他喘氣平靜,才輕輕的給他蓋上了滿幅補釘的夾被。 +店裏坐着許多人,老栓也忙了,提着大銅壺,一趟一趟的給客人沖茶;兩個眼眶,都圍着一圈黑線。 +「老栓,你有些不舒服麽?——你生病麽?」一個花白鬍子的人說。「沒有。」 +「沒有?——我想笑嘻嘻的,原也不像……」花白鬍子便取消了自己的話。 +「老栓只是忙。要是他的兒子……」駝背五少爺話還未完,突然闖進了一個滿臉橫肉的人,披一件玄色布衫,散着紐扣,用很寬的玄色腰帶,胡亂捆在腰間。剛進門,便對老栓嚷道: +「吃了麽?好了麽?老栓,就是運氣了你!你運氣,要不是我信息靈……。」 +老栓一手提了茶壺,一手恭恭敬敬的垂着;笑嘻嘻的聽。滿座的人,也都恭恭敬敬的聽。華大媽也黑着眼眶,笑嘻嘻的送出茶碗茶葉來,加上一個橄欖,老栓便去沖了水。 +「這是包好!這是與眾不同的。你想,趁熱的拏來,趁熱吃下。」橫肉的人只是嚷。 +「真的呢,要沒有康大叔照顧,怎麽會這樣……」華大媽也很感激的謝他。 +「包好,包好!這樣的趁熱吃下。這樣的人血饅頭,什麽癆病都包好!」 +華大媽聽到「癆病」這兩個字,變了一點臉色,似乎有些不高興;但又立刻堆上笑,搭訕着走開了。這康大叔卻沒有覺察,仍然提高了喉嚨只是嚷,嚷得裏面睡着的小栓也合夥咳嗽起來。 +「原來你家小栓碰到了這樣的好運氣了。這病自然一定全好;怪不得老栓整天的笑着呢。」花白鬍子一面說,一面走到康大叔面前,低聲下氣的問道,「康大叔——聽說今天結果的一個犯人,便是夏家的孩子,那是誰的孩子?究竟是什麼事?」 +「誰的?不就是夏四奶奶的兒子麽?那個小傢伙!」康大叔見眾人都聳起耳朵聽他,便格外高興,橫肉塊塊飽綻,越發大聲說,「這小東西不要命,不要就是了。我可是這一回一點沒有得到好處;連剝下來的衣服,都給管牢的紅眼睛阿義拏去了。——第一要算我們栓叔運氣;第二是夏三爺賞了二十五兩雪白的銀子,獨自落腰包,一文不花。」 +小栓慢慢的從小屋子裏走出,兩手按了胸口,不住的咳嗽;走到竈下,盛出一碗冷飯,泡上熱水,坐下便吃。華大媽跟着他走,輕輕的問道,「小栓,你好些麽?——你仍舊只是肚餓?……」 +「包好,包好!」康大叔瞥了小栓一眼,仍然回過臉,對眾人說,「夏三爺真是乖角兒,要是他不先告官,連他滿門抄斬。現在怎樣?銀子!——這小東西也真不成東西!關在牢裏,還要勸牢頭造反。」 +「阿呀,那還了得。」坐在後排的一個二十多歲的人,很現出氣憤模樣。 +「你要曉得紅眼睛阿義是去盤盤底細的,他卻和他攀談了。他說:這大清的天下是我們大家的。你想:這是人話麽?紅眼睛原知道他家裏只有一個老娘,可是沒有料到他竟會那麽窮,搾不出一點油水,已經氣破肚皮了。他還要老虎頭上搔癢,便給他兩個嘴巴!」 +「義哥是一手好拳棒,這兩下,一定夠他受用了。」壁角的駝背忽然高興起來。 +「他這賤骨頭打不怕,還要說可憐可憐哩。」 +花白鬍子的人說,「打了這種東西,有什麽可憐呢?」 +康大叔顯出看他不上的樣子,冷笑着說,「你沒有聽清我的話;看他神氣,是說阿義可憐哩!」 +聽着的人的眼光,忽然有些板滯;話也停頓了。小栓已經吃完飯,吃得滿身流汗,頭上都冒出蒸氣來。 +「阿義可憐——瘋話,簡直是發了瘋了。」花白鬍子恍然大悟似的說。 +「發了瘋了。」二十多歲的人也恍然大悟的說。 +店裏的坐客,便又現出活氣,談笑起來。小栓也趁着熱鬧,拚命咳嗽;康大叔走上前,拍他肩膀說: +「包好!小栓——你不要這麼咳。包好!」 +「瘋了。」駝背五少爺點着頭說。 +西關外靠着城根的地面,本是一塊官地;中間歪歪斜斜一條細路,是貪走便道的人,用鞋底造成的,但卻成了自然的界限。路的左邊,都埋着死刑和瘐斃的人,右邊是窮人的叢塚。兩面都已埋到層層疊疊,宛然闊人家裏祝壽時候的饅頭。 +這一年的清明,分外寒冷;楊柳才吐出半粒米大的新芽。天明未久,華大媽已在右邊的一坐新墳前面,排出四碟菜,一碗飯,哭了一場。化過紙,呆呆的坐在地上;彷彿等候什麽似的,但自己也說不出等候什麽。微風起來,吹動他短髮,確乎比去年白得多了。 +小路上又來了一個女人,也是半白頭髮,襤褸的衣裙;提一個破舊的朱漆圓籃,外掛一串紙錠,三步一歇的走。忽然見華大媽坐在地上看他,便有些躊躇,慘白的臉上,現出些羞愧的顏色;但終於硬着頭皮,走到左邊的一坐墳前,放下了籃子。 +那墳與小栓的墳,一字兒排着,中間只隔一條小路。華大媽看他排好四碟菜,一碗飯,立着哭了一通,化過紙錠;心裏暗暗地想,「這墳裏的也是兒子了。」那老女人徘徊觀望了一回,忽然手腳有些發抖,蹌蹌踉踉退下幾步,瞪着眼只是發怔。 +華大媽見這樣子,生怕他傷心到快要發狂了;便忍不住立起身,跨過小路,低聲對他說,「你這位老奶奶不要傷心了,——我們還是回去罷。」 +那人點一點頭,眼睛仍然向上瞪着;也低聲吃吃的說道,「你看,——看這是什麽呢?」 +華大媽跟了他指頭看去,眼光便到了前面的墳,這墳上草根還沒有全合,露出一塊一塊的黃土,煞是難看。再往上仔細看時,卻不覺也吃一驚;——分明有一圈紅白的花,圍着那尖圓的墳頂。 +他們的眼睛都已老花多年了,但望這紅白的花,卻還能明白看見。花也不很多,圓圓的排成一個圈,不很精神,倒也整齊。華大媽忙看他兒子和別人的墳,卻只有不怕冷的幾點青白小花,零星開着;便覺得心裏忽然感到一種不足和空虛,不願意根究。那老女人又走近幾步,細看了一遍,自言自語的說,「這沒有根,不像自己開的。——這地方有誰來呢?孩子不會來玩;——親戚本家早不來了。——這是怎麼一回事呢?」他想了又想,忽又流下淚來,大聲說道: +「瑜兒,他們都冤枉了你,你還是忘不了,傷心不過,今天特意顯點靈,要我知道麽?」他四面一看,只見一隻烏鴉,站在一株沒有葉的樹上,便接着說,「我知道了。——瑜兒,可憐他們坑了你,他們將來總有報應,天都知道;你閉了眼睛就是了。——你如果真在這裏,聽到我的話,——便教這烏鴉飛上你的墳頂,給我看罷。」 +微風早經停息了;枯草支支直立,有如銅絲。一絲發抖的聲音,在空氣中愈顫愈細,細到沒有,周圍便都是死一般靜。兩人站在枯草叢裏,仰面看那烏鴉;那烏鴉也在筆直的樹枝間,縮着頭,鐵鑄一般站著。 +許多的工夫過去了;上墳的人漸漸增多,幾個老的小的,在土墳間出沒。 +華大媽不知怎的,似乎卸下了一挑重擔,便想到要走;一面勸着說,「我們還是回去罷。」 +那老女人嘆一口氣,無精打采的收起飯菜;又遲疑了一刻,終於慢慢地走了。嘴裏自言自語的說,「這是怎麼一回事呢?……」 +他們走不上二三十步遠,忽聽得背後「啞——」的一聲大叫;兩個人都竦然的回過頭,只見那烏鴉張開兩翅,一挫身,直向着遠處的天空,箭也似的飛去了。 +住在我們後進院子裏的三太太,在夏間買了一對白兔,是給伊的孩子們看的。 +這一對白兔,似乎離娘並不久,雖然是異類,也可以看出他們的天真爛熳來。但也豎直了小小的通紅的長耳朵,動著鼻子,眼睛裏頗現些驚疑的神色,大約究竟覺得人地生疏,沒有在老家時候的安心了。這種東西,倘到廟會日期自己出去買,每個至多不過兩弔錢,而三太太卻花了一元,因為是叫小使上店買來的。 +孩子們自然大得意了,嚷著圍住了看;大人也都圍著看;還有一匹小狗名叫S的也跑來,闖過去一嗅,打了一個噴嚏,退了幾步。三太太吆喝道,「S,聽著,不准你咬他!」於是在他頭上打了一拳,S便退開了,從此並不咬。 +這一對兔總是關在後窗後面的小院子裏的時候多,聽說是因為太喜歡撕壁紙,也常常啃木器腳。這小院子裏有一株野桑樹,桑子落地,他們最愛吃,便連喂他們的菠菜也不吃了。烏鴉喜鵲想要下來時,他們便躬著身子用後腳在地上使勁的一彈,砉的一聲直跳上來,像飛起了一團雪,鴉鵲嚇得趕緊走,這樣的幾回,再也不敢近來了。三太太說,鴉鵲到不打緊,至多也不過搶吃一點食料,可惡的是一匹大黑貓,常在矮牆上惡狠狠的看,這卻要防的,幸而S和貓是對頭,或者還不至於有什麼罷。 +孩子們時時捉他們來玩耍;他們很和氣,豎起耳朵,動著鼻子,馴良的站在小手的圈子裏,但一有空,卻也就溜開去了。他們夜裏的臥榻是一個小木箱,裏面鋪些稻草,就在後窗的房檐下。 +這樣的幾個月之後,他們忽而自己掘土了,掘得非常快,前腳一抓,後腳一踢,不到半天,已經掘成一個深洞。大家都奇怪,後來仔細看時,原來一個的肚子比別一個的大得多了。他們第二天便將乾草和樹葉銜進洞裏去,忙了大半天。 +大家都高興,說又有小兔可看了;三太太便對孩子們下了戒嚴令,從此不許再去捉。我的母親也很喜歡他們家族的繁榮,還說待生下來的離了乳,也要去討兩匹來養在自己的窗外面。 +他們從此便住在自造的洞府裏,有時也出來吃些食,後來不見了,可不知道他們是預先運糧存在裏面呢還是竟不吃。過了十多天,三太太對我說,那兩匹又出來了,大約小兔是生下來又都死掉了,因為雌的一匹的奶非常多,卻並不見有進去哺養孩子的形跡。伊言語之間頗氣憤,然而也沒有法。 +有一天,太陽很溫暖,也沒有風,樹葉都不動,我忽聽得許多人在那裏笑,尋聲看時,卻見許多人都靠著三太太的後窗看:原來有一個小兔,在院子裏跳躍了。這比他的父母買來的時候還小得遠,但也已經能用後腳一彈地,迸跳起來了。孩子們爭著告訴我說,還看見一個小兔到洞口來探一探頭,但是即刻便縮回去了,那該是他的弟弟罷。 +那小的也撿些草葉吃,然而大的似乎不許他,往往夾口的搶去了,而自己並不吃。孩子們笑得響,那小的終於吃驚了,便跳著鑽進洞裏去;大的也跟到洞門口,用前腳推著他的孩子的脊樑,推進之後,又爬開泥土來封了洞。 +從此小院子裏更熱鬧,窗口也時時有人窺探了。 +然而竟又全不見了那小的和大的。這時是連日的陰天,三太太又慮到遭了那大黑貓的毒手的事去。我說不然,那是天氣冷,當然都躲著,太陽一齣,一定出來的。 +太陽出來了,他們卻都不見。於是大家就忘卻了。 +惟有三太太是常在那裏喂他們菠菜的,所以常想到。伊有一回走進窗後的小院子去,忽然在牆角發見了一個別的洞,再看舊洞口,卻依稀的還見有許多爪痕。這爪痕倘說是大兔的,爪該不會有這樣大,伊又疑心到那常在牆上的大黑貓去了,伊於是也就不能不定下發掘的決心了。伊終於出來取了鋤子,一路掘下去,雖然疑心,卻也希望著意外的見了小白兔的,但是待到底,卻只見一堆爛草夾些兔毛,怕還是臨蓐時候所鋪的罷,此外是冷清清的,全沒有什麼雪白的小兔的蹤跡,以及他那隻一探頭未出洞外的弟弟了。 +氣憤和失望和淒涼,使伊不能不再掘那牆角上的新洞了。一動手,那大的兩匹便先竄出洞外面。伊以為他們搬了家了,很高興,然而仍然掘,待見底,那裏面也鋪著草葉和兔毛,而上面卻睡著七個很小的兔,遍身肉紅色,細看時,眼睛全都沒有開。 +一切都明白了,三太太先前的預料果不錯。伊為預防危險起見,便將七個小的都裝在木箱中,搬進自己的房裏,又將大的也捺進箱裏面,勒令伊去哺乳。 +三太太從此不但深恨黑貓,而且頗不以大兔為然了。據說當初那兩個被害之先,死掉的該還有,因為他們生一回,決不至於只兩個,但為了哺乳不勻,不能爭食的就先死了。這大概也不錯的,現在七個之中,就有兩個很瘦弱。所以三太太一有閑空,便捉住母兔,將小兔一個一個輪流的擺在肚子上來喝奶,不准有多少。 +母親對我說,那樣麻煩的養兔法,伊歷來連聽也未曾聽到過,恐怕是可以收入《無雙譜》的。 +白兔的家族更繁榮;大家也又都高興了。 +但自此之後,我總覺得淒涼。夜半在燈下坐著想,那兩條小性命,竟是人不知鬼不覺的早在不知什麼時候喪失了,生物史上不著一些痕跡,並S也不叫一聲。我於是記起舊事來,先前我住在會館裏,清早起身,只見大槐樹下一片散亂的鴿子毛,這明明是膏於鷹吻的了,上午長班來一打掃,便什麼都不見,誰知道曾有一個生命斷送在這裏呢?我又曾路過西四牌樓,看見一匹小狗被馬車軋得快死,待回來時,什麼也不見了,搬掉了罷,過往行人憧憧的走著,誰知道曾有一個生命斷送在這裏呢?夏夜,窗外面,常聽到蒼蠅的悠長的吱吱的叫聲,這一定是給蠅虎咬住了,然而我向來無所容心於其間,而別人並且不聽到…… +假使造物也可以責備,那麼,我以為他實在將生命造得太濫了,毀得太濫了。 +嗥的一聲,又是兩條貓在窗外打起架來。「迅兒!你又在那裏打貓了?」「不,他們自己咬。他那裏會給我打呢。」 +我的母親是素來很不以我的虐待貓為然的,現在大約疑心我要替小兔抱不平,下什麼辣手,便起來探問了。而我在全家的口碑上,卻的確算一個貓敵。我曾經害過貓,平時也常打貓,尤其是在他們配合的時候。但我之所以打的原因並非因為他們配合,是因為他們嚷,嚷到使我睡不著,我以為配合是不必這樣大嚷而特嚷的。 +況且黑貓害了小兔,我更是「師出有名」的了。我覺得母親實在太修善,於是不由的就說出模棱的近乎不以為然的答話來。 +造物太胡鬧,我不能不反抗他了,雖然也許是倒是幫他的忙…… +那黑貓是不能久在矮牆上高視闊步的了,我決定的想,於是又不由的一瞥那藏在書箱裏的一瓶青酸鉀。 +我在倒數上去的二十年中,只看過兩回中國戲,前十年是絕不看,因為沒有看戲的意思和機會,那兩回全在後十年,然而都沒有看出什麼來就走了。 +第一回是民國元年我初到北京的時候,當時一個朋友對我說,北京戲最好,你不去見見世面麽?我想,看戲是有味的,而況在北京呢。於是都興緻勃勃的跑到什麼園,戲文已經開場了,在外面也早聽到鼕鼕地響。我們挨進門,幾個紅的綠的在我的眼前一閃爍,便又看見戲臺下滿是許多頭,再定神四面看,卻見中間也還有幾個空座,擠過去要坐時,又有人對我發議論,我因為耳朵已經喤的響著了,用了心,纔聽到他是說「有人,不行!」。 +我們退到後面,一個辮子很光的卻來領我們到了側面,指出一個地位來。這所謂地位者,原來是一條長凳,然而他那坐板比我的上腿要狹到四分之三,他的腳比我的下腿要長過三分之二。我先是沒有爬上去的勇氣,接著便聯想到私刑拷打的刑具,不由的毛骨悚然的走出了。 +走了許多路,忽聽得我的朋友的聲音道,「究竟怎的?」我回過臉去,原來他也被我帶出來了。他很詫異的說,「怎麼總是走,不答應?」我說,「朋友,對不起,我耳朵只在鼕鼕喤喤的響,並沒有聽到你的話。」 +後來我每一想到,便很以為奇怪,似乎這戲太不好,——否則便是我近來在戲臺下不適於生存了。 +第二回忘記了那一年,總之是募集湖北水災捐而譚叫天還沒有死。捐法是兩元錢買一張戲票,可以到第一舞臺去看戲,扮演的多是名角,其一就是小叫天。我買了一張票,本是對於勸募人聊以塞責的,然而似乎又有好事家乘機對我說了些叫天不可不看的大法要了。我於是忘了前幾年的鼕鼕喤喤之災,竟到第一舞臺去了,但大約一半也因為重價購來的寶票,總得使用了纔舒服。我打聽得叫天出臺是遲的,而第一舞臺卻是新式構造,用不著爭座位,便放了心,延宕到九點鐘纔去,誰料照例,人都滿了,連立足也難,我只得擠在遠處的人叢中看一個老旦在臺上唱。那老旦嘴邊插著兩個點火的紙撚子,旁邊有一個鬼卒,我費盡思量,纔疑心他或者是目連的母親,因為後來又出來了一個和尚。然而我又不知道那名角是誰,就去問擠小在我的左邊的一位胖紳士。他很看不起似的斜瞥了我一眼,說道, 「龔雲甫!」我深愧淺陋而且粗疏,臉上一熱,同時腦裡也制出了決不再問的定章,於是看小旦唱,看花旦唱,看老生唱,看不知什麼角色唱,看一大班人亂打,看兩三個人互打,從九點多到十點,從十點到十一點,從十一點到十一點半,從十一點半到十二點,——然而叫天竟還沒有來。 +我向來沒有這樣忍耐的等待過什麼事物,而況這身邊的胖紳士的吁吁的喘氣,這臺上的鼕鼕喤喤的敲打,紅紅綠綠的晃蕩,加之以十二點,忽而使我省誤到在這裡不適於生存了。我同時便機械的擰轉身子,用力往外只一擠,覺得背後便已滿滿的,大約那彈性的胖紳士早在我的空處胖開了他的右半身了。我後無迴路,自然擠而又擠,終於出了大門。街上除了專等看客的車輛之外,幾乎沒有什麼行人了,大門口卻還有十幾個人昂著頭看戲目,別有一堆人站著並不看什麼,我想:他們大概是看散戲之後出來的女人們的,而叫天卻還沒有來…… +然而夜氣很清爽,真所謂「沁人心脾」,我在北京遇著這樣的好空氣,仿佛這是第一遭了。 +這一夜,就是我對於中國戲告了別的一夜,此後再沒有想到他,即使偶而經過戲園,我們也漠不相關,精神上早已一在天之南一在地之北了。 +但是前幾天,我忽在無意之中看到一本日本文的書,可惜忘記了書名和著者,總之是關於中國戲的。其中有一篇,大意仿佛說,中國戲是大敲,大叫,大跳,使看客頭昏腦眩,很不適於劇場,但若在野外散漫的所在,遠遠的看起來,也自有他的風致。我當時覺著這正是說了在我意中而未曾想到的話,因為我確記得在野外看過很好的戲,到北京以後的連進兩回戲園去,也許還是受了那時的影響哩。可惜我不知道怎麼一來,竟將書名忘卻了。 +至於我看好戲的時候,卻實在已經是「遠哉遙遙」的了,其時恐怕我還不過十一二歲。我們魯鎮的習慣,本來是凡有出嫁的女兒,倘自己還未當家,夏間便大抵回到母家去消夏。那時我的祖母雖然還康建,但母親也已分擔了些家務,所以夏期便不能多日的歸省了,只得在掃墓完畢之後,抽空去住幾天,這時我便每年跟了我的母親住在外祖母的家裡。那地方叫平橋村,是一個離海邊不遠,極偏僻的,臨河的小村莊;住戶不滿三十家,都種田,打魚,只有一家很小的雜貨店。但在我是樂土:因為我在這裡不但得到優待,又可以免念「秩秩斯乾幽幽南山」了。 +和我一同玩的是許多小朋友,因為有了遠客,他們也都從父母那裡得了減少工作的許可,伴我來遊戲。在小村裡,一家的客,幾乎也就是公共的。我們年紀都相仿,但論起行輩來,卻至少是叔子,有幾個還是太公,因為他們合村都同姓,是本家。然而我們是朋友,即使偶而吵鬧起來,打了太公,一村的老老少少,也決沒有一個會想出「犯上」這兩個字來,而他們也百分之九十九不識字。 +我們每天的事情大概是掘蚯蚓,掘來穿在銅絲做的小鉤上,伏在河沿上去釣蝦。蝦是水世界裡的呆子,決不憚用了自己的兩個鉗捧著鉤尖送到嘴裡去的,所以不半天便可以釣到一大碗。這蝦照例是歸我吃的。其次便是一同去放牛,但或者因為高等動物了的緣故罷,黃牛水牛都欺生,敢於欺侮我,因此我也總不敢走近身,只好遠遠地跟著,站著。這時候,小朋友們便不再原諒我會讀「秩秩斯干」,卻全都嘲笑起來了。 +至於我在那裡所第一盼望的,卻在到趙莊去看戲。趙莊是離平橋村五里的較大的村莊;平橋村太小,自己演不起戲,每年總付給趙莊多少錢,算作合做的。當時我並不想到他們為什麼年年要演戲。現在想,那或者是春賽,是社戲了。 +就在我十一二歲時候的這一年,這日期也看看等到了。不料這一年真可惜,在早上就叫不到船。平橋村只有一隻早出晚歸的航船是大船,決沒有留用的道理。其餘的都是小船,不合用;央人到鄰村去問,也沒有,早都給別人定下了。外祖母很氣惱,怪家裡的人不早定,絮叨起來。母親便寬慰伊,說我們魯鎮的戲比小村裡的好得多,一年看幾回,今天就算了。只有我急得要哭,母親卻竭力的囑咐我,說萬不能裝模裝樣,怕又招外祖母生氣,又不准和別人一同去,說是怕外祖母要擔心。 +總之,是完了。到下午,我的朋友都去了,戲已經開場了,我似乎聽到鑼鼓的聲音,而且知道他們在戲臺下買豆漿喝。 +這一天我不釣蝦,東西也少吃。母親很為難,沒有法子想。到晚飯時候,外祖母也終於覺察了,並且說我應當不高興,他們太怠慢,是待客的禮數裡從來沒有的。吃飯之後,看過戲的少年們也都聚攏來了,高高興興的來講戲。只有我不開口;他們都嘆息而且表同情。忽然間,一個最聰明的雙喜大悟似的提議了,他說,「大船?八叔的航船不是回來了麽?」十幾個別的少年也大悟,立刻攛掇起來,說可以坐了這航船和我一同去。我高興了。然而外祖母又怕都是孩子,不可靠;母親又說是若叫大人一同去,他們白天全有工作,要他熬夜,是不合情理的。在這遲疑之中,雙喜可又看出底細來了,便又大聲的說道,「我寫包票!船又大;迅哥兒向來不亂跑;我們又都是識水性的!」 +誠然!這十多個少年,委實沒有一個不會鳧水的,而且兩三個還是弄潮的好手。 +外祖母和母親也相信,便不再駁回,都微笑了。我們立刻一哄的出了門。 +我的很重的心忽而輕鬆了,身體也似乎舒展到說不出的大。一出門,便望見月下的平橋內泊著一隻白篷的航船,大家跳下船,雙喜拔前篙,阿發拔後篙,年幼的都陪我坐在艙中,較大的聚在船尾。母親送出來吩咐「要小心」的時候,我們已經點開船,在橋石上一磕,退後幾尺,即又上前出了橋。於是架起兩支櫓,一支兩人,一里一換,有說笑的,有嚷的,夾著潺潺的船頭激水的聲音,在左右都是碧綠的豆麥田地的河流中,飛一般徑向趙莊前進了。 +兩岸的豆麥和河底的水草所發散出來的清香,夾雜在水氣中撲面的吹來;月色便朦朧在這水氣裡。淡黑的起伏的連山,仿佛是踴躍的鐵的獸脊似的,都遠遠的向船尾跑去了,但我卻還以為船慢。他們換了四回手,漸望見依稀的趙莊,而且似乎聽到歌吹了,還有幾點火,料想便是戲臺,但或者也許是漁火。 +那聲音大概是橫笛,宛轉,悠揚,使我的心也沉靜,然而又自失起來,覺得要和他彌散在含著豆麥蘊藻之香的夜氣裡。 +那火接近了,果然是漁火;我纔記得先前望見的也不是趙莊。那是正對船頭的一叢松柏林,我去年也曾經去遊玩過,還看見破的石馬倒在地下,一個石羊蹲在草裡呢。過了那林,船便彎進了叉港,於是趙莊便真在眼前了。 +最惹眼的是屹立在莊外臨河的空地上的一座戲臺,模胡在遠處的月夜中,和空間幾乎分不出界限,我疑心畫上見過的仙境,就在這裡出現了。這時船走得更快,不多時,在臺上顯出人物來,紅紅綠綠的動,近臺的河裡一望烏黑的是看戲的人家的船篷。 +「近臺沒有什麼空了,我們遠遠的看罷。」阿發說。 +這時船慢了,不久就到,果然近不得台旁,大家只能下了篙,比那正對戲臺的神棚還要遠。其實我們這白篷的航船,本也不願意和烏篷的船在一處,而況沒有空地呢…… +在停船的匆忙中,看見臺上有一個黑的長鬍子的背上插著四張旗,捏著長槍,和一群赤膊的人正打仗。雙喜說,那就是有名的鐵頭老生,能連翻八十四個筋斗,他日裡親自數過的。 +我們便都擠在船頭上看打仗,但那鐵頭老生卻又並不翻筋斗,只有幾個赤膊的人翻,翻了一陣,都進去了,接著走出一個小旦來,咿咿呀呀的唱。雙喜說,「晚上看客少,鐵頭老生也懈了,誰肯顯本領給白地看呢?」我相信這話對,因為其時臺下已經不很有人,鄉下人為了明天的工作,熬不得夜,早都睡覺去了,疏疏朗朗的站著的不過是幾十個本村和鄰村的閑漢。烏篷船裡的那些土財主的家眷固然在,然而他們也不在乎看戲,多半是專到戲臺下來吃糕餅水果和瓜子的。所以簡直可以算白地。 +然而我的意思卻也並不在乎看翻筋斗。我最願意看的是一個人蒙了白布,兩手在頭上捧著一支棒似的蛇頭的蛇精,其次是套了黃布衣跳老虎。但是等了許多時都不見,小旦雖然進去了,立刻又出來了一個很老的小生。我有些疲倦了,託桂生買豆漿去。他去了一刻,回來說,「沒有。賣豆漿的聾子也回去了。日裡倒有,我還喝了兩碗呢。現在去舀一瓢水來給你喝罷。」 +我不喝水,支撐著仍然看,也說不出見了些什麼,只覺得戲子的臉都漸漸的有些稀奇了,那五官漸不明顯,似乎融成一片的再沒有什麼高低。年紀小的幾個多打呵欠了,大的也各管自己談話。忽而一個紅衫的小丑被綁在臺柱子上,給一個花白鬍子的用馬鞭打起來了,大家纔又振作精神的笑著看。在這一夜裡,我以為這實在要算是最好的一折。 +然而老旦終於出臺了。老旦本來是我所最怕的東西,尤其是怕他坐下了唱。這時候,看見大家也都很掃興,纔知道他們的意見是和我一致的。那老旦當初還只是踱來踱去的唱,後來竟在中間的一把交椅上坐下了。我很擔心;雙喜他們卻就破口喃喃的罵。我忍耐的等著,許多工夫,只見那老旦將手一抬,我以為就要站起來了,不料他卻又慢慢的放下在原地方,仍舊唱。全船裡幾個人不住的吁氣,其餘的也打起哈欠來。雙喜終於熬不住了,說道,怕他會唱到天明還不完,還是我們走的好罷。大家立刻都贊成,和開船時候一樣踴躍,三四人徑奔船尾,拔了篙,點退幾丈,迴轉船頭,駕起櫓,罵著老旦,又向那松柏林前進了。 +月還沒有落,仿佛看戲也並不很久似的,而一離趙莊,月光又顯得格外的皎潔。回望戲臺在燈火光中,卻又如初來未到時候一般,又漂渺得像一座仙山樓閣,滿被紅霞罩著了。吹到耳邊來的又是橫笛,很悠揚;我疑心老旦已經進去了,但也不好意思說再回去看。 +不多久,松柏林早在船後了,船行也並不慢,但周圍的黑暗只是濃,可知已經到了深夜。他們一面議論著戲子,或罵,或笑,一面加緊的搖船。這一次船頭的激水聲更其響亮了,那航船,就像一條大白魚背著一群孩子在浪花裡躥,連夜漁的幾個老漁父,也停了艇子看著喝采起來。 +離平橋村還有一里模樣,船行卻慢了,搖船的都說很疲乏,因為太用力,而且許久沒有東西吃。這回想出來的是桂生,說是羅漢豆正旺相,柴火又現成,我們可以偷一點來煮吃。大家都贊成,立刻近岸停了船;岸上的田裡,烏油油的都是結實的羅漢豆。 +「阿阿,阿發,這邊是你家的,這邊是老六一家的,我們偷那一邊的呢?」雙喜先跳下去了,在岸上說。 +我們也都跳上岸。阿發一面跳,一面說道,「且慢,讓我來看一看罷,」他於是往來的摸了一回,直起身來說道,「偷我們的罷,我們的大得多呢。」一聲答應,大家便散開在阿發家的豆田裡,各摘了一大捧,拋入船艙中。雙喜以為再多偷,倘給阿發的娘知道是要哭罵的,於是各人便到六一公公的田裡又各偷了一大捧。 +我們中間幾個年長的仍然慢慢的搖著船,幾個到後艙去生火,年幼的和我都剝豆。不久豆熟了,便任憑航船浮在水面上,都圍起來用手撮著吃。吃完豆,又開船,一面洗器具,豆莢豆殼全拋在河水裡,什麼痕跡也沒有了。雙喜所慮的是用了八公公船上的鹽和柴,這老頭子很細心,一定要知道,會罵的。然而大家議論之後,歸結是不怕。他如果罵,我們便要他歸還去年在岸邊拾去的一枝枯桕樹,而且當面叫他「八癩子」。 +「都回來了!那裡會錯。我原說過寫包票的!」雙喜在船頭上忽而大聲的說。 +我向船頭一望,前面已經是平橋。橋腳上站著一個人,卻是我的母親,雙喜便是對伊說著話。我走出前艙去,船也就進了平橋了,停了船,我們紛紛都上岸。母親頗有些生氣,說是過了三更了,怎麼回來得這樣遲,但也就高興了,笑著邀大家去吃炒米。 +大家都說已經吃了點心,又渴睡,不如及早睡的好,各自回去了。 +第二天,我向午纔起來,並沒有聽到什麼關係八公公鹽柴事件的糾葛,下午仍然去釣蝦。 +「雙喜,你們這班小鬼,昨天偷了我的豆了罷?又不肯好好的摘,蹋壞了不少。」 我抬頭看時,是六一公公棹著小船,賣了豆回來了,船肚裡還有剩下的一堆豆。 +「是的。我們請客。我們當初還不要你的呢。你看,你把我的蝦嚇跑了!」雙喜說。 +六一公公看見我,便停了楫,笑道,「請客?——這是應該的。」於是對我說, 「迅哥兒,昨天的戲可好麽?」 +我點一點頭,說道,「好。」「豆可中吃呢?」我又點一點頭,說道,「很好。」 +不料六一公公竟非常感激起來,將大拇指一翹,得意的說道,「這真是大市鎮裡出來的讀過書的人纔識貨!我的豆種是粒粒挑選過的,鄉下人不識好歹,還說我的豆比不上別人的呢。我今天也要送些給我們的姑奶奶嘗嘗去……」他於是打著楫子過去了。 +待到母親叫我回去吃晚飯的時候,桌上便有一大碗煮熟了的羅漢豆,就是六一公公送給母親和我吃的。聽說他還對母親極口誇獎我,說「小小年紀便有見識,將來一定要中狀元。姑奶奶,你的福氣是可以寫包票的了。」但我吃了豆,卻並沒有昨夜的豆那麼好。 +真的,一直到現在,我實在再沒有吃到那夜似的好豆,——也不再看到那夜似的好戲了。 +方玄綽近來愛說「差不多」這一句話,幾乎成了「口頭禪」似的;而且不但說,的確也盤據在他腦裏了。他最初說的是「都一樣」,後來大約覺得欠穩當了,便改為「差不多」,一直使用到現在。 +他自從發見了這一句平凡的警句以後,雖然引起了不少的新感慨,同時卻也到許多新慰安。譬如看見老輩威壓青年,在先是要憤憤的,但現在卻就轉念道,將來這少年有了兒孫時,大抵也要擺這架子的罷,便再沒有什麼不平了。又如看見兵士打車夫,在先也要憤憤的,但現在也就轉念道,倘使這車夫當了兵,這兵拉了車,大抵也就這麼打,便再也不放在心上了。他這樣想著的時候,有時也疑心是因為自己沒有和惡社會奮鬥的勇氣,所以瞞心昧己的故意造出來的一條逃路,很近於「無是非之心」,遠不如改正了好。然而這意見總反而在他腦裏生長起來。 +他將這「差不多說」最初公表的時候是在北京首善學校的講堂上,其時大概是提起關於歷史上的事情來,於是說到「古今人不相遠」,說到各色人等的「性相近」,終於牽扯到學生和官僚身上,大發其議論道: +「現在社會上時髦的都通行罵官僚,而學生罵得尤利害。然而官僚並不是天生的特別種族,就是平民變就的。現在學生出身的官僚就不少,和老官僚有什麼兩樣呢?『易地則皆然』,思想言論舉動豐采都沒有什麼大區別……便是學生團體新辦的許多事業,不是也已經難免出弊病,大半煙消火滅了麽?差不多的。但中國將來之可慮就在此……」 +散坐在講堂裏的二十多個聽講者,有的悵然了,或者是以為這話對;有的勃然了,大約是以為侮辱了神聖的青年;有幾個卻對他微笑了,大約以為這是他替自己的辯解:因為方玄綽就是兼做官僚的。 +而其實卻是都錯誤。這不過是他的一種新不平;雖說不平,又只是他的一種安分的空論。他自己雖然不知道是因為懶,還是因為無用,總之覺得是一個不肯運動,十分安分守己的人。總長冤他有神經病,只要地位還不至於動搖,他決不開一開口;教員的薪水欠到大半年了,只要別有官俸支持,他也決不開一開口。不但不開口,當教員聯合索薪的時候,他還暗地裏以為欠斟酌,太嚷嚷;直到聽得同寮過分的奚落他們了,這纔略有些小感慨,後來一轉念,這或者因為自己正缺錢,而別的官並不兼做教員的緣故罷,於是就釋然了。 +他雖然也缺錢,但從沒有加入教員的團體內,大家議決罷課,可是不去上課了。政府說「上了課纔給錢」,他纔略恨他們的類乎用果子耍猴子;一個大教育家說道「教員一手挾書包一手要錢不高尚」,他纔對於他的太太正式的發牢騷了。 +「喂,怎麼只有兩盤?」聽了「不高尚說」這一日的晚餐時候,他看著菜蔬說。 +他們是沒有受過新教育的,太太並無學名或雅號,所以也就沒有什麼稱呼了,照老例雖然也可以叫「太太」但他又不願意太守舊,於是就發明瞭一個「喂」字。太太對他卻連「喂」字也沒有,只要臉向著他說話,依據習慣法,他就知道這話是對他而發的。 +「可是上月領來的一成半都完了……昨天的米,也還是好容易纔賒來的呢。」伊站在桌旁臉對著他說。 +「你看,還說教書的要薪水是卑鄙哩。這種東西似乎連人要吃飯,飯要米做,米要錢買這一點粗淺事情都不知道……」 +「對啦。沒有錢怎麼買米,沒有米怎麼煮……」 +他兩頰都鼓起來了,仿佛氣惱這答案正和他的議論「差不多」,近乎隨聲附和模樣;接著便將頭轉向別一面去了,依據習慣法,這是宣告討論中止的表示。 +待到淒風冷雨這一天,教員們因為向政府去索欠薪,在新華門前爛泥裏被國軍打得頭破血出之後,倒居然也發了一點薪水。方玄綽不費舉手之勞的領了錢,酌還些舊債,卻還缺一大筆款,這是因為官俸也頗有些拖欠了。當是時,便是廉吏清官們也漸以為薪之不可不索,而況兼做教員的方玄綽,自然更表同情於學界起來,所以大家主張繼續罷課的時候,他雖然仍未到場,事後卻尤其心悅誠服的確守了公共的決議。 +然而政府竟又付錢,學校也就開課了。但在前幾天,卻有學生總會上一個呈文給政府,說「教員倘若不上課,便要付欠薪。」這雖然並無效,而方玄綽卻忽而記起前回政府所說的「上了課纔給錢」的話來,「差不多」這一個影子在他眼前又一幌,而且並不消滅,於是他便在講堂上公表了。 +準此,可見如果將「差不多說」鍛煉羅織起來,自然也可以判作一種挾帶私心的不平,但總不能說是專為自己做官的辯解。只是每到這些時,他又常常喜歡拉上中國將來的命運之類的問題,一不小心,便連自己也以為是一個憂國的志士;人們是每苦於沒有「自知之明」的。 +但是「差不多」的事實又發生了,政府當初雖只不理那些招人頭痛的教員,後來竟不理到無關痛癢的官吏,欠而又欠,終於逼得先前鄙薄教員要錢的好官,也很有幾員化為索薪大會裏的驍將了。惟有幾種日報上卻很發了些鄙薄譏笑他們的文字。方玄綽也毫不為奇,毫不介意,因為他根據了他的「差不多說」,知道這是新聞記者還未缺少潤筆的緣故,萬一政府或是闊人停了津貼,他們多半也要開大會的。 +他既已表同情於教員的索薪,自然也贊成同寮的索俸,然而他仍安坐在衙門中,照例的並不一同去討債。至於有人疑心他孤高,那可也不過是一種誤解罷了。他自己說,他是自從出世以來,只有人向他來要債,他從沒有向人去討過債,所以這一端是「非其所長」。而且他是不敢見手握經經濟之權的人物,這種人待到失了權勢之後,捧著一本《大乘起信論》講佛學的時候,固然也很是「藹然可親」的了,但還在寶座上時,卻總是一副閻王臉,將別人都當奴才看自以為手操著你們這些窮小子們的生殺之權。他因此不敢見,也不願見他們。這種脾氣,雖然有時連自己也覺得是孤高,但往往同時也疑心這其實是沒本領。 +大家左索右索,總自一節一節的挨過去了,但比起先前來,方玄綽究竟是萬分的拮据,所以使用的小廝和交易的店家不消說,便是方太太對於他也漸漸的缺了敬意,只要看伊近來不很附和,而且常常提出獨創的意見,有些唐突的舉動,也就可以瞭然了。到了陰曆五月初四的午前,他一回來,伊便將一疊賬單塞在他的鼻子跟前,這也是往常所沒有的。 +「一總總得一百八十塊錢纔夠開消……發了麽?」伊並不對著他看的說。 +「哼,我明天不做官了。錢的支票是領來的了,可是索薪大會的代表不發放,先說是沒有同去的人都不發,後來又說是要到他們跟前去親領。他們今天單捏著支票,就變了閻王臉了,我實在怕看見……我錢也不要了,官也不做了,這樣無限量的卑屈……」 +方太太見了這少見的義憤,倒有些愕然了,但也就沉靜下來。 +「我想,還不如去親領罷,這算什麼呢。」伊看著他的臉說。 +「我不去!這是官俸,不是賞錢,照例應該由會計科送來的。」 +「可是不送來又怎麼好呢……哦,昨夜忘記說了,孩子們說那學費,學校裏已經催過好幾次了,說是倘若再不繳……」 +「胡說!做老子的辦事教書都不給錢,兒子去念幾句書倒要錢?」 +伊覺得他已經不很顧忌道理,似乎就要將自己當作校長來出氣,犯不上,便不再言語了。 +兩個默默的吃了午飯。他想了一會,又懊惱的出去了。 +照舊例,近年是每逢節根或年關的前一天,他一定須在夜裏的十二點鐘纔回家,一面走,一面掏著懷中,一面大聲的叫道,「喂,領來了!」於是遞給伊一疊簇新的中交票,臉上很有些得意的形色。誰知道初四這一天卻破了例,他不到七點鐘便回家來。方太太很驚疑,以為他竟已辭了職了,但暗暗地察看他臉上,卻也並不見有什麼格外倒運的神情。「怎麼了?……這樣早?……」伊看定了他說。「發不及了,領不出了,銀行已經關了門,得等初八。」「親領?……」伊惴惴的問。 +「親領這一層也已經取消了,聽說仍舊由會計科分送。可是銀行今天已經關了門,休息三天,得等到初八的上午。」他坐下,眼睛看著地面了,喝過一口茶,纔又慢慢的開口說,「幸而衙門裏也沒有什麼問題了,大約到初八就準有錢……向不相干的親戚朋友去借錢,實在是一件煩難事。我午後硬著頭皮去尋金永生,談了一會,他先恭維我不去索薪,不肯親領,非常之清高,一個人正應該這樣做;待到知道我想要向他通融五十元,就像我在他嘴裏塞了一大把鹽似的,凡有臉上可以打皺的地迫都打起皺來,說房租怎樣的收不起,買賣怎樣的賠本,在同事面前親身領款,也不算什麼的,即刻將我支使出來了。」 +「這樣緊急的節根,誰還肯借出錢去呢。」方太太卻只淡淡的說,並沒有什麼慨然。 +方玄綽低下頭來了,覺得這也無怪其然的,況且自己和金永生本來很疏遠。他接著就記起去年年關的事來,那時有一個同鄉來借十塊錢,他其時明明已經收到了衙門的領款憑單的了,因為死怕這人將來未必會還錢,便裝了副為難的神色,說道衙門裏既然領不到俸錢,學校裏又不發薪水,實在「愛莫能助」,將他空手送走了。他雖然自已並不看見裝了怎樣的臉,但此時卻覺得很局促,嘴唇微微一動,又搖一搖頭。 +然而不多久,他忽而恍然大悟似的發命令了:叫小廝即刻上街去賒一瓶蓮花白。他知道店家希圖明天多還帳,大抵是不敢不賒的,假如不賒,則明天分文不還,正是他們應得的懲罰。蓮花白竟賒來了,他喝了兩杯,青白色的臉上泛了紅,吃完飯,又頗有些高興了,他點上一枝大號哈德門香煙,從桌上抓起一本《嘗試集》來,躺在床上就要看。 +「那麼明天怎麼對付店家呢?」方太太追上去,站在床面前看著他的臉說。「店家?……教他們初八的下半天來。」「我可不能這麼說。他們不相信,不答應的。」「有什麼不相信。他們可以問去,全衙門裏什麼人也沒有領到,都得初八!」他戟著第二個指頭在帳子裏的空中畫了一個半圓,方太太跟著指頭也看了一個半圓,只見這手便去翻開了《嘗試集》。 +方太太見他強橫到出乎情理之外了,也暫時開不得口。 +「我想,這模樣是鬧不下去的,將來總得想點法,做點什麼別的事……」伊終於尋到了別的路,說。「什麼法呢?我『文不像謄錄生,武不像救火兵』,別的做什麼?」「你不是給上海的書鋪子做過文章麽?」 +「上海的書鋪子?買稿要一個一個的算字,空格不算數。你看我做在那裏的白話詩去,空白有多少,怕只值三百大錢一本罷。收版權稅又半年六月沒消息,『遠水救不得近火』,誰耐煩。」「那麼,給這裏的報館裏……」 +「給報館裏?便在這裏很大的報館裏,我靠著一個學生在那裏做編輯的大情面,一千字也就是這幾個錢,即使一早做到夜,能夠養活你們麽?況且我肚子裏也沒有這許多文章。」 +「那麼,過了節怎麼辦呢?」「過了節麽?——仍舊做官……明天店家來要錢,你只要說初八的下午。」 +他又要看《嘗試集》了。方太太怕失了機會,連忙吞吞吐吐的說:「我想,過了節,到了初八,我們……倒不如去買一張彩票……」「胡說!會說出這樣無教育的……」 +這時候,他忽而又記起被金永生支使出來以後的事了。那時他惘惘的走過稻香村,看店門口豎著許多斗大的字的廣告道「頭彩幾萬元」,仿佛記得心裏也一動,或者也許放慢了腳步的罷,但似乎因為捨不得皮夾裏僅存的六角錢,所以竟也毅然決然的走遠了。他臉色一變,方太太料想他是在惱著伊的無教育,便趕緊退開,沒有說完話。方玄綽也沒有說完話,將腰一伸,咿咿嗚嗚的就念《嘗試集》。 +我冒了嚴寒,回到相隔二千餘里,別了二十餘年的故鄉去。 +時候既然是深冬;漸近故鄉時,天氣又陰晦了,冷風吹進船艙中,嗚嗚的響,從蓬隙向外一望,蒼黃的天底下,遠近橫著幾個蕭索的荒村,沒有一些活氣。我的心禁不住悲涼起來了。 +阿!這不是我二十年來時時記得的故鄉? +我所記得的故鄉全不如此。我的故鄉好得多了。但要我記起他的美麗,說出他的佳處來,卻又沒有影像,沒有言辭了。仿佛也就如此。於是我自己解釋說:故鄉本也如此,——雖然沒有進步,也未必有如我所感的悲涼,這只是我自己心情的改變罷了,因為我這次回鄉,本沒有什麼好心緒。 +我這次是專為了別他而來的。我們多年聚族而居的老屋,已經公同賣給別姓了,交屋的期限,只在本年,所以必須趕在正月初一以前,永別了熟識的老屋,而且遠離了熟識的故鄉,搬家到我在謀食的異地去。 +第二日清早晨我到了我家的門口了。瓦楞上許多枯草的斷莖當風抖著,正在說明這老屋難免易主的原因。幾房的本家大約已經搬走了,所以很寂靜。我到了自家的房外,我的母親早已迎著出來了,接著便飛出了八歲的侄兒宏兒。 +我的母親很高興,但也藏著許多淒涼的神情,教我坐下,歇息,喝茶,且不談搬家的事。宏兒沒有見過我,遠遠的對面站著只是看。 +但我們終於談到搬家的事。我說外間的寓所已經租定了,又買了幾件傢具,此外須將家裡所有的木器賣去,再去增添。母親也說好,而且行李也略已齊集,木器不便搬運的,也小半賣去了,只是收不起錢來。 +「你休息一兩天,去拜望親戚本家一回,我們便可以走了。」母親說。 +「是的。」 +「還有閏土,他每到我家來時,總問起你,很想見你一回面。我已經將你到家的大約日期通知他,他也許就要來了。」 +這時候,我的腦裡忽然閃出一幅神異的圖畫來:深藍的天空中掛著一輪金黃的圓月,下麵是海邊的沙地,都種著一望無際的碧綠的西瓜,其間有一個十一二歲的少年,項帶銀圈,手捏一柄鋼叉,向一匹猹盡力的刺去,那猹卻將身一扭,反從他的胯下逃走了。 +這少年便是閏土。我認識他時,也不過十多歲,離現在將有三十年了;那時我的父親還在世,家景也好,我正是一個少爺。那一年,我家是一件大祭祀的值年。這祭祀,說是三十多年才能輪到一回,所以很鄭重;正月裡供祖像,供品很多,祭器很講究,拜的人也很多,祭器也很要防偷去。我家只有一個忙月(我們這裡給人做工的分三種:整年給一定人家做工的叫長工;按日給人做工的叫短工;自己也種地,只在過年過節以及收租時候來給一定人家做工的稱忙月),忙不過來,他便對父親說,可以叫他的兒子閏土來管祭器的。 +我的父親允許了;我也很高興,因為我早聽到閏土這名字,而且知道他和我仿佛年紀,閏月生的,五行缺土,所以他的父親叫他閏土。他是能裝弶捉小鳥雀的。 +我於是日日盼望新年,新年到,閏土也就到了。好容易到了年末,有一日,母親告訴我,閏土來了,我便飛跑的去看。他正在廚房裡,紫色的圓臉,頭戴一頂小氈帽,頸上套一個明晃晃的銀項圈,這可見他的父親十分愛他,怕他死去,所以在神佛面前許下願心,用圈子將他套住了。他見人很怕羞,只是不怕我,沒有旁人的時候,便和我說話,於是不到半日,我們便熟識了。 +我們那時候不知道談些什麼,只記得閏土很高興,說是上城之後,見了許多沒有見過的東西。 +第二日,我便要他捕鳥。他說: +"這不能。須大雪下了才好。我們沙地上,下了雪,我掃出一塊空地來,用短棒支起一個大竹匾,撒下秕穀,看鳥雀來吃時,我遠遠地將縛在棒上的繩子只一拉,那鳥雀就罩在竹匾下了。什麼都有:稻雞,角雞,鵓鴣,藍背……" +我於是又很盼望下雪。 +閏土又對我說: +"現在太冷,你夏天到我們這裡來。我們日裡到海邊撿貝殼去,紅的綠的都有,鬼見怕也有,觀音手也有。晚上我和爹管西瓜去,你也去。" +"管賊麽?" +"不是。走路的人口渴了摘一個瓜吃,我們這裡是不算偷的。要管的是獾豬,刺蝟,猹。月亮底下,你聽,啦啦的響了,猹在咬瓜了。你便捏了胡叉,輕輕地走去……" +我那時並不知道這所謂猹的是怎麼一件東西——便是現在也沒有知道——只是無端的覺得狀如小狗而很兇猛。 +"他不人麽?" +"有胡叉呢。走到了,看見猹了,你便刺。這畜生很伶俐,倒向你奔來,反從胯下竄了。他的皮毛是油一般的滑……" +我素不知道天下有這許多新鮮事:海邊有如許五色的貝殼;西瓜有這樣危險的經歷,我先前單知道他在水果店裡出賣罷了。 +"我們沙地裡,潮汛要來的時候,就有許多跳魚兒只是跳,都有青蛙似的兩個腳……" +阿!閏土的心裡有無窮無盡的希奇的事,都是我往常的朋友所不知道的。他們不知道一些事,閏土在海邊時,他們都和我一樣只看見院子裡高牆上的四角的天空。 +可惜正月過去了,閏土須回家裡去,我急得大哭,他也躲到廚房裡,哭著不肯出門,但終於被他父親帶走了。他後來還托他的父親帶給我一包貝殼和幾支很好看的鳥毛,我也曾送他一兩次東西,但從此沒有再見面。 +現在我的母親提起了他,我這兒時的記憶,忽而全都閃電似的蘇生過來,似乎看到了我的美麗的故鄉了。我應聲說: +"這好極!他,——怎樣?……" +"他?……他景況也很不如意……"母親說著,便向房外看,"這些人又來了。說是買木器,順手也就隨便拿走的,我得去看看。" +母親站起身,出去了。門外有幾個女人的聲音。我便招宏兒走近面前,和他閑話:問他可會寫字,可願意出門。 +"我們坐火車去麽?" +"我們坐火車去。" +"船呢?" +"先坐船,……" +"哈!這模樣了!鬍子這麼長了!"一種尖利的怪聲突然大叫起來。 +我吃了一嚇,趕忙抬起頭,卻見一個凸顴骨,薄嘴唇,五十歲上下的女人站在我面前,兩手搭在髀間,沒有系裙,張著兩腳,正像一個畫圖儀器裡細腳伶仃的圓規。 +我愕然了。 +"不認識了麽?我還抱過你咧!" +我愈加愕然了。幸而我的母親也就進來,從旁說: +"他多年出門,統忘卻了。你該記得罷,"便向著我說,"這是斜對門的楊二嫂,……開豆腐店的。" +哦,我記得了。我孩子時候,在斜對門的豆腐店裡確乎終日坐著一個楊二嫂,人都叫伊"豆腐西施"⑹。但是擦著白粉,顴骨沒有這麼高,嘴唇也沒有這麼薄,而且終日坐著,我也從沒有見過這圓規式的姿勢。那時人說:因為伊,這豆腐店的買賣非常好。但這大約因為年齡的關係,我卻並未蒙著一毫感化,所以竟完全忘卻了。然而圓規很不平,顯出鄙夷的神色,仿佛嗤笑法國人不知道拿破侖,美國人不知道華盛頓似的,冷笑說: +"忘了?這真是貴人眼高……" +"那有這事……我……"我惶恐著,站起來說。 +"那麼,我對你說。迅哥兒,你闊了,搬動又笨重,你還要什麼這些破爛木器,讓我拿去罷。我們小戶人家,用得著。" +"我並有闊哩。我須賣了這些,再去……" +"阿呀呀,你放了道台了,還說不闊?你現在有三房姨太太;出門便是八抬的大轎,還說不闊?嚇,什麼都瞞不過我。" +我知道無話可說了,便閉了口,默默的站著。 +"阿呀阿呀,真是愈有錢,便愈是一毫不肯放鬆,愈是一毫不肯放鬆,便愈有錢……"圓規一面憤憤的迴轉身,一面絮絮的說,慢慢向外走,順便將我母親的一副手套塞在褲腰裡,出去了。 +此後又有近處的本家和親戚來訪問我。我一面應酬,偷空便收拾些行李,這樣的過了三四天。 +一日是天氣很冷的午後,我吃過午飯,坐著喝茶,覺得外面有人進來了,便回頭去看。我看時,不由的非常出驚,慌忙站起身,迎著走去。 +這來的便是閏土。雖然我一見便知道是閏土,但又不是我這記憶上的閏土了。他身材增加了一倍;先前的紫色的圓臉,已經變作灰黃,而且加上了很深的皺紋;眼睛也像他父親一樣,周圍都腫得通紅,這我知道,在海邊種地的人,終日吹著海風,大抵是這樣的。他頭上是一頂破氈帽,身上只一件極薄的棉衣,渾身瑟索著;手裡提著一個紙包和一支長煙管,那手也不是我所記得的紅活圓實的手,卻又粗又笨而且開裂,像是松樹皮了。 +我這時很興奮,但不知道怎麼說才好,只是說: + +"阿!閏土哥,——你來了?……" + +我接著便有許多話,想要連珠一般湧出:角雞,跳魚兒,貝殼,猹,……但又總覺得被什麼擋著似的,單在腦裡面迴旋,吐不出口外去。 + +他站住了,臉上現出歡喜和淒涼的神情;動著嘴唇,卻沒有作聲。他的態度終於恭敬起來了,分明的叫道: +"老爺!……" +我似乎打了一個寒噤;我就知道,我們之間已經隔了一層可悲的厚障壁了。我也說不出話。 +他回過頭去說,"水生,給老爺磕頭。"便拖出躲在背後的孩子來,這正是一個廿年前的閏土,只是黃瘦些,頸子上沒有銀圈罷了。"這是第五個孩子,沒有見過世面,躲躲閃閃……" +母親和宏兒樓來了,他們大約也聽到了聲音。 +"老太太。信是早收到了。我實在喜歡的不得了,知道老爺回來……"閏土說。 +"阿,你怎的這樣客氣起來。你們先前不是哥弟稱呼麽?還是照舊:迅哥兒。"母親高興的說。 +"阿呀,老太太真是……這成什麼規矩。那時是孩子,不懂事……"閏土說著,又叫水生上來打拱,那孩子卻害羞,緊緊的只貼在他背後。 +"他就是水生?第五個?都是生人,怕生也難怪的;還是宏兒和他去走走。"母親說。 +宏兒聽得這話,便來招水生,水生卻鬆鬆爽爽同他一路出去了。母親叫閏土坐,他遲疑了一回,終於就了坐,將長煙管靠在桌旁,遞過紙包來,說: +"冬天沒什麼東西了。這一點乾青豆倒是自家曬在那裡的,請老爺……" +我問問他的景況。他只是搖頭。 +"非常難。第六個孩子也會幫忙了,卻總是吃不夠……又不太平……什麼地方都要錢,沒有規定……收成又壞。種出東西來,挑去賣,總要捐幾回錢,折了本;不去賣,又只能爛掉……" +他只是搖頭;臉上雖然刻著許多皺紋,卻全然不動,仿佛石像一般。他大約只是覺得苦,卻又形容不出,沉默了片時,便拿起煙管來默默的吸煙了。 +母親問他,知道他的家裡事務忙,明天便得回去;又沒有吃過午飯,便叫他自己到廚下炒飯吃去。 +他出去了;母親和我都嘆息他的景況:多子,饑荒,苛稅,兵,匪,官,紳,都苦得他像一個木偶人了。母親對我說,凡是不必搬走的東西,盡可以送他,可以聽他自己去揀擇。 +下午,他揀好了幾件東西:兩條長桌,四個椅子,一副香爐和燭臺,一桿抬秤。他又要所有的草灰(我們這裡煮飯是燒稻草的,那灰,可以做沙地的肥料),待我們啟程的時候,他用船來載去。 +夜間,我們又談些閑天,都是無關緊要的話;第二天早晨,他就領了水生回去了。 +又過了九日,是我們啟程的日期。閏土早晨便到了,水生沒有同來,卻只帶著一個五歲的女兒管船隻。我們終日很忙碌,再沒有談天的工夫。來客也不少,有送行的,有拿東西的,有送行兼拿東西的。待到傍晚我們上船的時候,這老屋裡的所有破舊大小粗細東西,已經一掃而空了。 +我們的船向前走,兩岸的青山在黃昏中,都裝成了深黛顏色,連著退向船後梢去。 +宏兒和我靠著船窗,同看外面模糊的風景,他忽然問道: +"大伯!我們什麼時候回來?" +"回來?你怎麼還沒有走就想回來了。" +"可是,水生約我到他家玩去咧……"他睜著大的黑眼睛,癡癡的想。 +我和母親也都有些惘然,於是又提起閏土來。母親說,那豆腐西施的楊二嫂,自從我家收拾行李以來,本是每日必到的,前天伊在灰堆裡,掏出十多個碗碟來,議論之後,便定說是閏土埋著的,他可以在運灰的時候,一齊搬回家裡去;楊二嫂發見了這件事,自己很以為功,便拿了那狗氣殺(這是我們這裡養雞的器具,木盤上面有著柵欄,內盛食料,雞可以伸進頸子去啄,狗卻不能,只能看著氣死),飛也似的跑了,虧伊裝著這麼高低的小腳,竟跑得這樣快。 +老屋離我愈遠了;故鄉的山水也都漸漸遠離了我,但我卻並不感到怎樣的留戀。我只覺得我四面有看不見的高牆,將我隔成孤身,使我非常氣悶;那西瓜地上的銀項圈的小英雄的影像,我本來十分清楚,現在卻忽地模糊了,又使我非常的悲哀。 +母親和宏兒都睡著了。 +我躺著,聽船底潺潺的水聲,知道我在走我的路。我想:我竟與閏土隔絕到這地步了,但我們的後輩還是一氣,宏兒不是正在想念水生麽。我希望他們不再像我,又大家隔膜起來……然而我又不願意他們因為要一氣,都如我的辛苦展轉而生活,也不願意他們都如閏土的辛苦麻木而生活,也不願意都如別人的辛苦恣睢而生活。他們應該有新的生活,為我們所未經生活過的。 +我想到希望,忽然害怕起來了。閏土要香爐和燭臺的時候,我還暗地裡笑他,以為他總是崇拜偶像,什麼時候都不忘卻。現在我所謂希望,不也是我自己手製的偶像麽?只是他的願望切近,我的願望茫遠罷了。 +我在朦朧中,眼前展開一片海邊碧綠的沙地來,上面深藍的天空中掛著一輪金黃的圓月。我想:希望本是無所謂有,無所謂無的。這正如地上的路;其實地上本沒有路,走的人多了,也便成了路。 +臨河的土場上,太陽漸漸的收了他通黃的光線了。場邊靠河的烏桕樹葉,乾巴巴的纔喘過氣來,幾個花腳蚊子在下面哼著飛舞。面河的農家的煙突裏,逐漸減少了炊煙,女人孩子們都在自己門口的土場上波些水,放下小桌子和矮凳;人知道,這已經是晚飯的時候了。 +老人男人坐在矮凳上,搖著大芭蕉扇閑談,孩子飛也似的跑,或者蹲在烏桕樹下賭玩石子。女人端出烏黑的蒸乾菜和松花黃的米飯,熱蓬蓬冒煙。河裏駛過文人的酒船,文豪見了,大發詩興,說:「無思無慮,這真是田家樂呵!」 +但文豪的話有些不合事實,就因為他們沒有聽到九斤老太的話。這時候,九斤老太正在大怒,拿破芭蕉扇敲著凳腳說: +「我活到七十九歲了,活夠了,不願意眼見這些敗家相,——還是死的好。立刻就要喫飯了,還喫炒豆子,喫窮了一家子!」 +伊的曾孫女兒六斤捏著一把豆,正從對面跑來,見這情形,便直奔河邊,藏在烏桕樹後,伸出雙丫角的小頭,大聲說,「這老不死的!」 +九斤老太雖然高壽,耳朵卻還不很聾,但也沒有聽到孩子的話,仍舊自己說,「這真是一代不如一代!」 +這村莊的習慣有點特別,女人生下孩子,多喜歡用秤稱了輕重,便用斤數當作小名。九斤老太自從慶祝了五十大壽以後,便漸漸的變了不平家,常說伊年青的時候,天氣沒有現在這般熱,豆子也沒有現在這般硬;總之現在的時世是不對了。何況六斤比伊的曾祖,少了三斤,比伊父親七斤,又少了一斤,這真是一條顛撲不破的實例。所以伊又用勁說,「這真是一代不如一代!」 +伊的兒媳七斤嫂子正捧著飯籃走到桌邊,便將飯籃在桌上一摔,憤憤的說,「你老人家又這麼說了。六斤生下來的時候,不是六斤五兩麽?你家的秤又是私秤,加重稱,十八兩秤;用了準十六,我們的六斤該有七斤多哩。我想便是太公和公公,也不見得正是九斤八斤十足,用的秤也許是十四兩……」 +「一代不如一代!」 +七斤嫂還沒有答話,忽然看見七斤從小巷口轉出,便移了方向,對他嚷道,「你這死屍怎麼這時候纔回來,死到那裏去了!不管人家等著你開飯!」 +七斤雖然住在農村,卻早有些飛黃騰達的意思。從他的祖父到他,三代不捏鋤頭柄了;他也照例的幫人撐著航船,每日一回,早晨從魯鎮進城,傍晚又回到魯鎮,因此很知道些時事:例如什麼地方,雷公劈死了蜈蚣精;什麼地方,閨女生了一個夜叉之類。他在村人裏面,的確已經是一名出場人物了。但夏天喫飯不點燈,卻還守著農家習慣,所以回家太遲,是該罵的。 +七斤一手捏著象牙嘴白銅斗六尺多長的湘妃竹煙管,低著頭,慢慢地走來,坐在矮凳上。六斤也趁勢溜出,坐在他身邊,叫他爹爹。七斤沒有應。 +「一代不如一代!」九斤老太說。 +七斤慢慢地抬起頭來,嘆一口氣說,「皇帝坐了龍庭了。」 +七斤嫂呆了一刻,忽而恍然大悟的道,「這可好了,這不是又要皇恩大赦了麽!」 +七斤又嘆一口氣,說,「我沒有辮子。」 +「皇帝要辮子麽?」 +「皇帝要辮子。」 +「你怎麼知道呢?」七斤嫂有些著急,趕忙的問。 +「咸亨酒店裏的人,都說要的。」 +七斤嫂這時從直覺上覺得事情似乎有些不妙了,因為咸亨酒店是消息靈通的所在。伊一轉眼瞥見七斤的光頭,便忍不住動怒,怪他恨他怨他;忽然又絕望起來,裝好一碗飯,搡在七斤的面前道,「還是趕快喫你的飯罷!哭喪著臉,就會長出辮子來麽?」 +太陽收盡了他最末的光線了,水面暗暗地回覆過涼氣來;土場上一片碗筷聲響,人人的脊樑上又都吐出汗粒。七斤嫂喫完三碗飯,偶然抬起頭,心坎裏便禁不住突突地發跳。伊透過烏桕葉,看見又矮又胖的趙七爺正從獨木橋上走來,而且穿著寶藍色竹布的長衫。 +趙七爺是鄰村茂源酒店的主人,又是這三十裏方圓以內的唯一的出色人物兼學問家;因為有學問,所以又有些遺老的臭味。他有十多本金聖嘆批評的《三國志》,時常坐著一個字一個字的讀;他不但能說出五虎將姓名,甚而至於還知道黃忠表字漢昇和馬超表字孟起。革命以後,他便將辮子盤在頂上,像道士一般;常常嘆息說,倘若趙子龍在世,天下便不會亂到這地步了。七斤嫂眼睛好,早望見今天的趙七爺已經不是道士,卻變成光滑頭皮,烏黑髮頂;伊便知道這一定是皇帝坐了龍庭,而且一定須有辮子,而且七斤一定是非常危險。因為趙七爺的這件竹布長衫,輕易是不常穿的,三年以來,只穿過兩次:一次是和他嘔氣的麻子阿四病了的時候,一次是曾經砸爛他酒店的魯大爺死了的時候;現在是第三次了,這一定又是於他有慶,於他的仇家有殃了。 +七斤嫂記得,兩年前七斤喝醉了酒,曾經罵過趙七爺是「賤胎」,所以這時便立刻直覺到七斤的危險,心坎裏突突地發起跳來。 +趙七爺一路走來,坐著喫飯的人都站起身,拿筷子點著自己的飯碗說,「七爺,請在我們這裏用飯!」七爺也一路點頭,說道「請請」,卻一徑走到七斤家的桌旁。七斤們連忙招呼,七爺也微笑著說「請請」,一面細細的研究他們的飯菜。 +「好香的菜乾,——聽到了風聲了麽?」趙七爺站在七斤的後面七斤嫂的對面說。 +「皇帝坐了龍庭了。」七斤說。 +七斤嫂看著七爺的臉,竭力陪笑道,「皇帝已經坐了龍庭,幾時皇恩大赦呢?」 +「皇恩大赦?——大赦是慢慢的總要大赦罷。」七爺說到這裏,聲色忽然嚴厲起來,「但是你家七斤的辮子呢,辮子?這倒是要緊的事。你們知道:長毛時候,留髮不留頭,留頭不留髮,……」 +七斤和他的女人沒有讀過書,不很懂得這古典的奧妙,但覺得有學問的七爺這麼說,事情自然非常重大,無可輓回,便仿佛受了死刑宣告似的,耳朵裏嗡的一聲,再也說不出一句話。 +「一代不如一代,——」九斤老太正在不平,趁這機會,便對趙七爺說,「現在的長毛,只是剪人家的辮子,僧不僧,道不道的。從前的長毛,這樣的麽?我活到七十九歲了,活夠了。從前的長毛是——整匹的紅緞子裹頭,拖下去,拖下去,一直拖到腳跟;王爺是黃緞子,拖下去,黃緞子;紅緞子,黃緞子,—— 我活夠了,七十九歲了。」 +七斤嫂站起身,自言自語的說,「這怎麼好呢?這樣的一班老小,都靠他養活的人,……」 +趙七爺搖頭道,「那也沒法。沒有辮子,該當何罪,書上都一條一條明明白白寫著的。不管他家裏有些什麼人。」 +七斤嫂聽到書上寫著,可真是完全絕望了;自己急得沒法,便忽然又恨到七斤。伊用筷子指著他的鼻尖說,「這死屍自作自受!造反的時候,我本來說,不要撐船了,不要上城了。他偏要死進城去,滾進城去,進城便被人剪去了辮子。從前是絹光烏黑的辮子,現在弄得僧不僧道不道的。這囚徒自作自受,帶累了我們又怎麼說呢?這活死屍的囚徒……」 +村人看見趙七爺到村,都趕緊喫完飯,聚在七斤家飯桌的周圍。七斤自己知道是出場人物,被女人當大眾這樣辱罵,很不雅觀,便只得抬起頭,慢慢地說道: +「你今天說現成話,那時你……」 +「你這活死屍的囚徒……」 +看客中間,八一嫂是心腸最好的人,抱著伊的兩周歲的遺腹子,正在七斤嫂身邊看熱鬧;這時過意不去,連忙解勸說,「七斤嫂,算了罷。人不是神仙,誰知道未來事呢?便是七斤嫂,那時不也說,沒有辮子倒也沒有什麼醜麽?況且衙門裏的大老爺也還沒有告示,……」 +七斤嫂沒有聽完,兩個耳朵早通紅了;便將筷子轉過向來,指著八一嫂的鼻子,說,「阿呀,這是什麼話呵!八一嫂,我自己看來倒還是一個人,會說出這樣昏誕胡塗話麽?那時我是,整整哭了三天,誰都看見;連六斤這小鬼也都哭,……」六斤剛喫完一大碗飯,拿了空碗,伸手去嚷著要添。七斤嫂正沒好氣,便用筷子在伊的雙丫角中間,直紮下去,大喝道,「誰要你來多嘴!你這偷漢的小寡婦!」 +撲的一聲,六斤手裏的空碗落在地上了,恰巧又碰著一塊磚角,立刻破成一個很大的缺口。七斤直跳起來,撿起破碗,合上檢查一回,也喝道,「入娘的!」一巴掌打倒了六斤。六斤躺著哭,九斤老太拉了伊的手,連說著「一代不如一代」,一同走了。 +八一嫂也發怒,大聲說,「七斤嫂,你『恨棒打人』……」 +趙七爺本來是笑著旁觀的;但自從八一嫂說了「衙門裏的大老爺沒有告示」這話以後,卻有些生氣了。這時他已經繞出桌旁,接著說,「『恨棒打人』,算什麼呢。大兵是就要到的。你可知道,這回保駕的是張大帥,張大帥就是燕人張翼德的後代,他一支丈八蛇矛,就有萬夫不當之勇,誰能抵擋他?」他兩手同時捏起空拳,仿佛握著無形的蛇矛模樣,向八一嫂搶進幾步道,「你能抵擋他麽!」 +八一嫂正氣得抱著孩子發抖,忽然見趙七爺滿臉油汗,瞪著眼,準對伊衝過來,便十分害怕,不敢說完話,回身走了。趙七爺也跟著走去,眾人一面怪八一嫂多事,一面讓開路,幾個剪過辮子重新留起的便趕快躲在人叢後面,怕他看見。趙七爺也不細心察訪,通過人叢,忽然轉入烏桕樹後,說道「你能抵擋他麽!」 跨上獨木橋,揚長去了。 +村人們呆呆站著,心裏計算,都覺得自己確乎抵不住張翼德,因此也決定七斤便要沒有性命。七斤既然犯了皇法,想起他往常對人談論城中的新聞的時候,就不該含著長煙管顯出那般驕傲模樣,所以對七斤的犯法,也覺得有些暢快。他們也仿佛想發些議論,卻又覺得沒有什麼議論可發。嗡嗡的一陣亂嚷,蚊子都撞過赤膊身子,闖到烏桕樹下去做市;他們也就慢慢地走散回家,關上門去睡覺。七斤嫂咕噥著,也收了傢伙和桌子矮凳回家,關上門睡覺了。 +七斤將破碗拿回家裏,坐在門檻上吸煙;但非常憂愁,忘卻了吸煙,象牙嘴六尺多長湘妃竹煙管的白銅鬥裏的火光,漸漸發黑了。他心裏但覺得事情似乎十分危急,也想想些方法,想些計畫,但總是非常模糊,貫穿不得:「辮子呢辮子?丈八蛇矛。一代不如一代!皇帝坐龍庭。破的碗須得上城去釘好。誰能抵擋他?書上一條一條寫著。入娘的!……」 +第二日清晨,七斤依舊從魯鎮撐航船進城,傍晚回到魯鎮,又拿著六尺多長的湘妃竹煙管和一個飯碗回村。他在晚飯席上,對九斤老太說,這碗是在城內釘合的,因為缺口大,所以要十六個銅釘,三文一個,一總用了四十八文小錢。 +九斤老太很不高興的說,「一代不如一代,我是活夠了。三文錢一個釘;從前的釘,這樣的麽?從前的釘是……我活了七十九歲了,——」 +此後七斤雖然是照例日日進城,但家景總有些黯淡,村人大抵迴避著,不再來聽他從城內得來的新聞。七斤嫂也沒有好聲氣,還時常叫他「囚徒」。 +過了十多日,七斤從城內回家,看見他的女人非常高興,問他說,「你在城裏可聽到些什麼?」 +「沒有聽到些什麼。」 +「皇帝坐了龍庭沒有呢?」 +「他沒有說。」 +「咸亨酒店裏也沒有人說麽?」 +「也沒人說。」 +「我想皇帝一定是不坐龍庭了。我今天走過趙七爺的店前,看見他又坐著念書了,辮子又盤在頂上了,也沒有穿長衫。」 +「…………」 +「你想,不坐龍庭了罷?」 +「我想,不坐了罷。」 +現在的七斤,是七斤嫂和村人又都早給他相當的尊敬,相當的待遇了。到夏天,他們仍舊在自家門口的土場上喫飯;大家見了,都笑嘻嘻的招呼。九斤老太早已做過八十大壽,仍然不平而且健康。六斤的雙丫角,已經變成一支大辮子了;伊雖然新近裹腳,卻還能幫同七斤嫂做事,捧著十八個銅釘的飯碗,在土場上一瘤一拐的往來。 +星期日的早晨,我揭去一張隔夜的日曆,向著新的那一張上看了又看的說: +“啊,十月十日,——今天原來正是雙十節。這裏卻一點沒有記載!” +我的一位前輩先生N,正走到我的寓裏來談閑天,一聽這話,便很不高興的對我說: +“他們對!他們不記得,你怎樣他;你記得,又怎樣呢?” +這位N先生本來脾氣有點乖張,時常生些無謂的氣,說些不通世故的話。當這時候,我大抵任他自言自語,不贊一辭;他獨自發完議論,也就算了。 +他說: +“我最佩服北京雙十節的情形。早晨,員警到門,吩咐道:『掛旗!』『是,掛旗!』”各家大半懶洋洋的踱出一個國民來,撅起一塊斑駁陸離的洋布。這樣一直到夜,——收了旗關門;幾家偶然忘卻的,便掛到第二天的上午。 +“他們忘卻了紀念,紀念也忘卻了他們!” +“我也是忘卻了紀念的一個人。倘使紀念起來,那第一個雙十節前後的事,便都上我的心頭,使我坐立不穩了。” +“多少故人的臉,都浮在我眼前。幾個少年辛苦奔走了十多年,暗地裏一顆彈丸要了他的性命;幾個少年一擊不中,在監牢裏身受一個多月的苦刑;幾個少年懷著遠志,忽然蹤影全無,連屍首也不知那裏去了。——” +“他們都在社會的冷笑惡罵迫害傾陷裏過了一生;現在他們的墳墓也早在忘卻裏漸漸平塌下去了。” +“我不堪紀念這些事。” +“我們還是記起一點得意的事來談談吧。” +N忽然現出笑容,伸手在自己頭上一摸,高聲說: +“我最得意的是自從第一個雙十節以後,我在路上走,不再被人笑駡了。” +“老兄,你可知道頭髮是我們中國人的寶貝和冤家,古今來多少人在這上頭吃些毫無價值的苦呵!” +“我們的很古的古人,對於頭髮似乎也還看輕。據刑法看來,最要緊的自然是腦袋,所以大辟是上刑;次要便是生殖器了,所以宮刑和幽閉也是一件嚇人的罰;至於髡,那是微乎其微了,然而推想起來,正不知道曾有多少人們因為光著頭皮便被社會踐踏了一生世。” +“我們講革命的時候,大談什麼揚州三日,嘉定屠城,其實也不過一種手段;老實說:那時中國人的反抗,何嘗因為亡國,只是因為拖辮子。” +“頑殺盡了,遺老都壽終了,辮子早留定了,洪楊又鬧起來了。我的祖母曾對我說,那時做百姓才難哩,全留著頭髮的被官兵殺,還是辮子的便被長毛殺!” +“我不知道有多少中國人只因為這不痛不癢的頭髮而吃苦,受難,滅亡。” +N兩眼望著屋樑,似乎想些事,仍然說: +“誰知道頭髮的苦輪到我了。” +“我出去留學,便剪掉了辮子,這並沒有別的奧妙,只為他不太便當罷了。不料有幾位辮子盤在頭頂上的同學們便很厭惡我;監督也大怒,說要停了我的官費,送回中國去。” +“不幾天,這位監督卻自己被人剪去辮子逃走了。去剪的人們裏面,一個便是做《革命軍》的鄒容,這人也因此不能再留學,回到上海來,後來死在西牢裏。你也早忘卻了罷?” +“過了幾年,我的家景大不如前了,非謀點事做便要受餓,只得也回到中國來。我一到上海,便買定一條假辮子,那時是二元的市價,帶著回家。我的母親倒也不說什麼,然而旁人一見面,便都首先研究這辮子,待到知道是假,就一聲冷笑,將我擬為殺頭的罪名;有一位本家,還預備去告官,但後來因為恐怕革命黨的造反或者要成功,這才中止了。” +“我想,假的不如真的直截爽快,我便索性廢了假辮子,穿著西裝在街上走。” +“一路走去,一路便是笑駡的聲音,有的還跟在後面罵:『這冒失鬼!』『假洋鬼子!』” +“我於是不穿洋服了,改了大衫,他們罵得更厲害。” +“在這日暮途窮的時候,我的手裏才添出一支手杖來,拚命的打了幾回,他們漸漸的不罵了。只是走到沒有打過的生地方還是罵。” +“這件事很使我悲哀,至今還時時記得哩。我在留學的時候,曾經看見日報上登載一個遊歷南洋和中國的本多博士的事;這位博士是不懂中國和馬來語的,人問他,你不懂話,怎麼走路呢?他拿起手杖來說,這便是他們的話,他們都懂!我因此氣憤了好幾天,誰知道我竟不知不覺的自己也做了,而且那些人都懂了。……” +“宣統初年,我在本地的中學校做監學,同事是避之惟恐不遠,官僚是防之惟恐不嚴,我終日如坐在冰窖子裏,如站在刑場旁邊,其實並非別的,只因為缺少了一條辮子!” +“有一日,幾個學生忽然走到我的房裏來,說:『先生,我們要剪辮子了。』我說:『不行!』『有辮子好呢,沒有辮子好呢?』『沒有辮子好……』『你怎麼說不行呢?』『犯不上,你們還是不剪上算,——等一等罷。』”他們不說什麼,撅著嘴唇走出房去,然而終於剪掉了。 +“呵!不得了了,人言嘖嘖了;我卻只裝作不知道,一任他們光著頭皮,和許多辮子一齊上講堂。” +“然而這剪辮病傳染了;第三天,師範學堂的學生忽然也剪下了六條辮子,晚上便開除了六個學生。這六個人,留校不能,回家不得,一直挨到第一個雙十節之後又一個多月,才消去了犯罪的火烙印。” +“我呢?也一樣,只是元年冬天到北京,還被人罵過幾次,後來罵我的人也被員警剪去了辮子,我就不再被人辱駡了;但我沒有到鄉間去。”N顯出非常得意模樣,忽而又沉下臉來:“現在你們這些理想家,又在那裏嚷什麼女子剪髮了,又要造出許多毫無所得而痛苦的人!”“現在不是已經有剪掉頭發的女人,因此考不進學校去,或者被學校除了名麼?”“改革嘛,武器在那裏?工讀麼,工廠在那裏?”“仍然留起,嫁給人家做媳婦去:忘卻了一切還是幸福,倘使伊記著些平等自由的話,便要苦痛一生世!”“我要借了阿爾志跋綏夫的話問你們:『你們將黃金時代的出現豫約給這些人們的子孫了,但有什麼給這些人們自己呢?』”“啊,造物的皮鞭沒有到中國的脊樑上時,中國便永遠是這一樣的中國,絕不肯自己改變一隻毫毛!”“你們的嘴裏既然並無毒牙,何以偏要在額上帖起『蝮蛇』兩個大字,引乞丐來打殺?……”N愈說愈離奇了,但一見到我不很願聽的神情,便立刻閉了口,站起來取帽子。我說:“回去麼?”他答道:“是的,天要下雨了。”我默默的送他到門口。他戴上帽子說:“再見!請你恕我打攪,好在明天便不是雙十節,我們統可以忘卻了。” +我從鄉下跑到京城裏,一轉眼已經六年了。其間耳聞目睹的所謂國家大事,算起來也很不少;但在我心裏,都不留什麼痕跡,倘要我尋出這些事的影響來說,便只是增長了我的壞脾氣,——老實說,便是教我一天比一天的看不起人。 +但有一件小事,卻於我有意義,將我從壞脾氣裏拖開,使我至今忘記不得。 +這是民國六年的冬天,大北風颳得正猛,我因為生計關係,不得不一早在路上走。一路幾乎遇不見人,好容易才雇定了一輛人力車,教他拉到S門去。不一會,北風小了,路上浮塵早已刮淨,剩下一條潔白的大道來,車夫也跑得更快。剛近S門,忽而車把上帶著一個人,慢慢地倒了。 +跌倒的是一個女人,花白頭髮,衣服都很破爛。伊從馬路上突然向車前橫截過來;車夫已經讓開道,但伊的破棉背心沒有上扣,微風吹著,向外展開,所以終於兜著車把。幸而車夫早有點停步,否則伊定要栽一個大斤斗,跌到頭破血出了。 +伊伏在地上;車夫便也立住腳。我料定這老女人並沒有傷,又沒有別人看見,便很怪他多事,要自己惹出是非,也誤了我的路。 +我便對他說,"沒有什麼的。走你的罷!" +車夫毫不理會,——或者並沒有聽到,——卻放下車子,扶那老女人慢慢起來,攙著臂膊立定,問伊說:"你怎麼啦?""我摔壞了。" +我想,我眼見你慢慢倒地,怎麼會摔壞呢,裝腔作勢罷了,這真可憎惡。車夫多事,也正是自討苦吃,現在你自己想法去。 +車夫聽了這老女人的話,卻毫不躊躇,仍然攙著伊的臂膊,便一步一步的向前走。我有些詫異,忙看前面,是一所巡警分駐所,大風之後,外面也不見人。這車夫扶著那老女人,便正是向那大門走去。 +我這時突然感到一種異樣的感覺,覺得他滿身灰塵的後影,剎時高大了,而且愈走愈大,須仰視才見。而且他對於我,漸漸的又幾乎變成一種威壓,甚而至於要榨出皮袍下面藏著的"小"來。 +我的活力這時大約有些凝滯了,坐著沒有動,也沒有想,直到看見分駐所裏走出一個巡警,才下了車。 +巡警走近我說,"你自己雇車罷,他不能拉你了。" +我沒有思索的從外套袋裏抓出一大把銅元,交給巡警,說,"請你給他……" +風全住了,路上還很靜。我走著,一面想,幾乎怕敢想到自己。以前的事姑且擱起,這一大把銅元又是什麼意思?獎他麼?我還能裁判車夫麼?我不能回答自己。 +這事到了現在,還是時時記起。我因此也時時煞了苦痛,努力的要想到我自己。幾年來的文治武力,在我早如幼小時候所讀過的"子曰詩云"一般,背不上半句了。獨有這一件小事,卻總是浮在我眼前,有時反更分明,教我慚愧,催我自新,並且增長我的勇氣和希望。 +「沒有聲音,——小東西怎了?」紅鼻子老拱手裏擎了一碗黃酒,說著,向間壁努一努嘴。藍皮阿五便放下酒碗,在他脊梁上用死勁的打了一掌,含含糊糊嚷道:「你……你你又在想心思。……」 +原來魯鎮是僻靜地方,還有些古風:不上一更,大家便都關門睡覺。深更半夜沒有睡的只有兩家:一家是咸亨酒店,幾個酒肉朋友圍著櫃臺,吃喝得正高興;一家便是間壁的單四嫂子,他自從前年守了寡,便須專靠著自己的一雙手紡出綿紗來,養活他自己和他三歲的兒子,所以睡的也遲。 +這幾天,確鑿沒有紡紗的聲音了。但夜深沒有睡的既然只有兩家,這單四嫂子家有聲音,便自然只有老拱們聽到,沒有聲音,也只有老拱們聽到。 +老拱挨了打,仿佛很舒服似的喝了一大口酒,嗚嗚的唱起小曲來。 +這時候,單四嫂子正抱著他的寶兒,坐在床沿上,紡車靜靜的立在地上。黑沉沉的燈光,照著寶兒的臉,緋紅裏帶一點青。單四嫂子心裏計算:神簽也求過了,願心也許過了,單方也吃過了,要是還不見效,怎麼好?——那隻有去診何小仙了。但寶兒也許是日輕夜重,到了明天,太陽一出,熱也會退,氣喘也會平的:這實在是病人常有的事。 +單四嫂子是一個粗笨女人,不明白這「但」字的可怕:許多壞事固然幸虧有了他才變好,許多好事卻也因為有了他都弄糟。夏天夜短,老拱們嗚嗚的唱完了不多時,東方已經發白;不一會,窗縫裏透進了銀白色的曙光。 +單四嫂子等候天明,卻不像別人這樣容易,覺得非常之慢,寶兒的一呼吸,幾乎長過一年。現在居然明亮了;天的明亮,壓倒了燈光,——看見寶兒的鼻翼,已經一放一收的扇動。 +單四嫂子知道不妙,暗暗叫一聲「阿呀!」心裏計算:怎麼好?只有去診何小仙這一條路了。他雖然是粗笨女人,心裏卻有決斷,便站起身,從木柜子里掏出每天節省下來的十三個小銀元和一百八十銅錢,都裝在衣袋里,鎖上門,抱著寶兒直向何家奔過去。 +天氣還早,何家已經坐著四個病人了。他摸出四角銀元,買了號簽,第五個輪到寶兒。何小仙伸開兩個指頭按脈,指甲足有四寸多長,單四嫂子暗地納罕,心裏計算:寶兒該有活命了。但總免不了著急,忍不住要問,便局局促促的說: +「先生,——我家的寶兒什麼病呀?」「他中焦塞著。」「不妨事麽?他……」「先去吃兩帖。」「他喘不過氣來,鼻翅子都扇著呢。」這是火克金……」 +何小仙說了半句話,便閉上眼睛;單四嫂子也不好意思再問。在何小仙對面坐著的一個三十多歲的人,此時已經開好一張藥方,指著紙角上的幾個字說道: +「這第一味保嬰活命丸,須是賈家濟世老店才有!」單四嫂子接過藥方,一面走,一面想。他雖是粗笨女人,卻知道何家與濟世老店與自己的家,正是一個三角點;自然是買了藥回去便宜了。於是又徑向濟世老店奔過去。店夥也翹了長指甲慢慢的看方,慢慢的包藥。單四嫂子抱了寶兒等著;寶兒忽然擎起小手來,用力拔他散亂著的一綹頭髮,這是從來沒有的舉動,單四嫂子怕得發怔。 +太陽早出了。單四嫂子抱了孩子,帶著藥包,越走覺得越重;孩子又不住的掙扎,路也覺得越長。沒奈何坐在路旁一家公館的門檻上,休息了一會,衣服漸漸的冰著肌膚,才知道自己出了一身汗;寶兒卻仿佛睡著了。他再起來慢慢地走,仍然支撐不得,耳朵邊忽然聽得人說: +「單四嫂子,我替你抱勃羅!」似乎是藍皮阿五的聲音。 +他抬頭看時,正是藍皮阿五,睡眼朦朧的跟著他走。 +單四嫂子在這時候,雖然很希望降下一員天將,助他一臂之力,卻不願是阿五。但阿五有些俠氣,無論如何,總是偏要幫忙,所以推讓了一會,終於得了許可了。他便伸開臂膊,從單四嫂子的乳房和孩子之間,直伸下去,抱去了孩子。單四嫂子便覺乳房上發了一條熱,剎時間直熱到臉上和耳根。 +他們兩人離開了二尺五寸多地,一同走著。阿五說些話,單四嫂子卻大半沒有答。走了不多時候,阿五又將孩子還給他,說是昨天與朋友約定的吃飯時候到了;單四嫂子便接了孩子。幸而不遠便是家,早看見對門的王九媽在街邊坐著,遠遠地說話: +「單四嫂子,孩子怎了?——看過先生了麽?」「看是看了。——王九媽,你有年紀,見的多,不如請你老法眼看一看,怎樣……」「唔……」「怎樣……?」「唔……」王九媽端詳了一番,把頭點了兩點,搖了兩搖。 +寶兒吃下藥,已經是午後了。單四嫂子留心看他神情,似乎仿佛平穩了不少;到得下午,忽然睜開眼叫一聲「媽!」又仍然合上眼,像是睡去了。他睡了一刻,額上鼻尖都沁出一粒一粒的汗珠,單四嫂子輕輕一摸,膠水般粘著手;慌忙去摸胸口,便禁不住嗚咽起來。 +寶兒的呼吸從平穩到沒有,單四嫂子的聲音也就從嗚咽變成號啕。這時聚集了幾堆人:門內是王九媽藍皮阿五之類,門外是咸亨的掌柜和紅鼻老拱之類。王九媽便發命令,燒了一串紙錢;又將兩條板凳和五件衣服作抵,替單四嫂子借了兩塊洋錢,給幫忙的人備飯。 +第一個問題是棺木。單四嫂子還有一副銀耳環和一支裹金的銀簪,都交給了咸亨的掌柜,托他作一個保,半現半賒的買一具棺木。藍皮阿五也伸出手來,很願意自告奮勇;王九媽卻不許他,只准他明天抬棺材的差使,阿五罵了一聲「老畜生」,怏怏的努了嘴站著。掌柜便自去了;晚上回來,說棺木須得現做,後半夜才成功。 +掌柜回來的時候,幫忙的人早吃過飯;因為魯鎮還有些古風,所以不上一更,便都回家睡覺了。只有阿五還靠著咸亨的櫃臺喝酒,老拱也嗚嗚的唱。 +這時候,單四嫂子坐在床沿上哭著,寶兒在床上躺著,紡車靜靜的在地上立著。許多工夫,單四嫂子的眼淚宣告完結了,眼睛張得很大,看看四面的情形,覺得奇怪:所有的都是不會有的事。他心裏計算:不過是夢罷了,這些事都是夢。明天醒過來,自己好好的睡在床上,寶兒也好好的睡在自己身邊。他也醒過來,叫一聲「媽」,生龍活虎似的跳去玩了。 +老拱的歌聲早經寂靜,咸亨也熄了燈。單四嫂子張著眼,總不信所有的事。——雞也叫了;東方漸漸發白,窗縫裏透進了銀白色的曙光。 +銀白的曙光又漸漸顯出緋紅,太陽光接著照到屋脊。單四嫂子張著眼,呆呆坐著;聽得打門聲音,才吃了一嚇,跑出去開門。門外一個不認識的人,背了一件東西;後面站著王九媽。 +哦,他們背了棺材來了。 +下半天,棺木才合上蓋:因為單四嫂子哭一回,看一回,總不肯死心塌地的蓋上;幸虧王九媽等得不耐煩,氣憤憤的跑上前,一把拖開他,才七手八腳的蓋上了。 +但單四嫂子待他的寶兒,實在已經盡了心,再沒有什麼缺陷。昨天燒過一串紙錢,上午又燒了四十九捲《大悲咒》;收斂的時候,給他穿上頂新的衣裳,平日喜歡的玩意兒,——一個泥人,兩個小木碗,兩個玻璃瓶,——都放在枕頭旁邊。後來王九媽掐著指頭子細推敲,也終於想不出一些什麼缺陷。 +這日里,藍皮阿五簡直整天沒有到;咸亨掌柜便替單四嫂子雇了兩名腳夫,每名二百另十個大錢,抬棺木到義冢地上安放。王九媽又幫他煮了飯,凡是動過手開過口的人都吃了飯。太陽漸漸顯出要落山的顏色;吃過飯的人也不覺都顯出要回家的顏色,——於是他們終於都回了家。 +單四嫂子很覺得頭眩,歇息了一會,倒居然有點平穩了。但他接連著便覺得很異樣:遇到了平生沒有遇到過的事,不像會有的事,然而的確出現了。他越想越奇,又感到一件異樣的事——這屋子忽然太靜了。 +他站起身,點上燈火,屋子越顯得靜。他昏昏的走去關上門,回來坐在床沿上,紡車靜靜的立在地上。他定一定神,四面一看,更覺得坐立不得,屋子不但太靜,而且也太大了,東西也太空了。太大的屋子四麵包圍著他,太空的東西四面壓著他,叫他喘氣不得。 +他現在知道他的寶兒確乎死了;不願意見這屋子,吹熄了燈,躺著。他一面哭,一面想:想那時候,自己紡著棉紗,寶兒坐在身邊吃茴香豆,瞪著一雙小黑眼睛想了一刻,便說,「媽!爹賣餛飩,我大了也賣餛飩,賣許多許多錢,——我都給你。」那時候,真是連紡出的棉紗,也仿佛寸寸都有意思,寸寸都活著。但現在怎麼了?現在的事,單四嫂子卻實在沒有想到什麼。——我早經說過:他是粗笨女人。他能想出什麼呢?他單覺得這屋子太靜,太大,太空罷了。 +但單四嫂子雖然粗笨,卻知道還魂是不能有的事,他的寶兒也的確不能再見了。嘆一口氣,自言自語的說,「寶兒,你該還在這裏,你給我夢裏見見罷。」於是合上眼,想趕快睡去,會他的寶兒,苦苦的呼吸通過了靜和大和空虛,自己聽得明白。 +單四嫂子終於朦朦朧朧的走入睡鄉,全屋子都很靜。這時紅鼻子老拱的小曲,也早經唱完;蹌蹌踉踉出了咸亨,卻又提尖了喉嚨,唱道: +「我的冤家呀!——可憐你,——孤另另的……」 +藍皮阿五便伸手揪住了老拱的肩頭,兩個人七歪八斜的笑著擠著走去。 +單四嫂子早睡著了,老拱們也走了,咸亨也關上門了。這時的魯鎮,便完全落在寂靜里。只有那暗夜為想變成明天,卻仍在這寂靜里奔波;另有幾條狗,也躲在暗地裏嗚嗚的叫。 +陳士成看過縣考的榜、回到家裏的時候,已經是下午了。他去得本很早,一見榜,便先在這上面尋陳字。陳字也不少,似乎也都爭先恐後的跳進他眼睛裏來,然而接著的卻全不是士成這兩個字。他於是重新再在十二張榜的圓圖裏細細地搜尋,看的人全已散盡了,而陳士成在榜上終於沒有見,單站在試院的照壁的面前。 +涼風雖然拂拂的吹動他斑白的短髮,初冬的太陽卻還是很溫和的來曬他。但他似乎被太陽曬得頭暈了,臉色越加變成灰白,從勞乏的紅腫的兩眼裏,發出古怪的閃光。這時他其實早已不看到什麼牆上的榜文了,只見有許多烏黑的圓圈,在眼前泛泛的遊走。 +雋了秀才,上省去鄉試,一徑聯捷上去,……紳士們既然千方百計的來攀親,人們又都像看見神明似的敬畏,深悔先前的輕薄,發昏,……趕走了租住在自己破宅門裏的雜姓——那是不勞說趕,自己就搬的,——屋宇全新了,門口是旗竿和扁額,……要清高可以做京官,否則不如謀外放。……他平日安排停當的前程,這時候又像受潮的糖塔一般,剎時倒塌,只剩下一堆碎片了。他不自覺的旋轉了覺得渙散了身軀,惘惘的走向歸家的路。 +他剛到自己的房門口,七個學童便一齊放開喉嚨,吱的念起書來。他大吃一驚,耳朵邊似乎敲了一聲磬,只見七個頭拖了小辮子在眼前幌,幌得滿房,黑圈子也夾著跳舞。他坐下了,他們送上晚課來,臉上都顯出小覷他的神色。 +「回去罷。」他遲疑了片時,這才悲慘的說。 +他們胡亂的包了書包,挾著,一溜煙跑走了。 +陳士成還看見許多小頭夾著黑圓圈在眼前跳舞,有時雜亂,有時也擺成異樣的陣圖,然而漸漸的減少了,模胡了。 +「這回又完了!」 +他大吃一驚,直跳起來,分明就在耳邊的話,回過頭去卻並沒有什麼人,仿佛又聽得嗡的敲了一聲磬,自己的嘴也說道: +「這回又完了!」 +他忽而舉起一隻手來,屈指計數著想,十一,十三回,連今年是十六回,竟沒有一個考官懂得文章,有眼無珠,也是可憐的事,便不由嘻嘻的失了笑。然而他憤然了,驀地從書包布底下抽出謄真的制藝和試帖來,拿著往外走,剛近房門,卻看見滿眼都明亮,連一群雞也正在笑他,便禁不住心頭突突的狂跳,只好縮回裏面了。 +他又就了坐,眼格外的閃爍;他目睹著許多東西,然而很模胡,——是倒塌了的糖塔一般的前程躺在他面前,這前程又只是廣大起來,阻住了他的一切路。 +別家的炊煙早消歇了,碗筷也洗過了,而陳士成還不去做飯。寓在這裏的雜姓是知道老例的,凡遇到縣考的年頭,看見發榜後的這樣的眼光,不如及早關了門,不要多管事。最先就絕了人聲,接著是陸續的熄了燈火,獨有月亮,卻緩緩的出現在寒夜的空中。 +空中青碧到如一片海,略有些浮雲,仿佛有誰將粉筆洗在筆洗裏似的搖曳。月亮對著陳士成註下寒冷的光波來,當初也不過像是一面新磨的鐵鏡罷了,而這鏡卻詭秘的照透了陳士成的全身,就在他身上映出鐵的月亮的影。 +他還在房外的院子裏徘徊,眼裏頗清靜了,四近也寂靜。但這寂靜忽又無端的紛擾起來,他耳邊又確鑿聽到急促的低聲說: +「左彎右彎……」 +他聳然了,傾耳聽時,那聲音卻又提高的複述道:「右彎!」 +他記得了。這院子,是他家還未如此雕零的時候,一到夏天的夜間,夜夜和他的祖母在此納涼的院子。那時他不過十歲有零的孩子,躺在竹榻上,祖母便坐在榻旁邊,講給他有趣的故事聽。伊說是曾經聽得伊的祖母說,陳氏的祖宗是巨富的,這屋子便是祖基,祖宗埋著無數的銀子,有福氣的子孫一定會得到的罷,然而至今還沒有現。至於處所,那是藏在一個謎語的中間: +「左彎右彎,前走後走,量金量銀不論斗。」 +對於這謎語,陳士成便在平時,本也常常暗地裏加以揣測的,可惜大抵剛以為可以通,卻又立刻覺得不合了。有一回,他確有把握,知道這是在租給唐家的房底下的了,然而總沒有前去發掘的勇氣;過了幾時,可又覺得太不相像了。至於他自己房子裏的幾個掘過的舊痕跡,那卻全是先前幾回下第以後的發了怔忡的舉動,後來自己一看到,也還感到慚愧而且羞人。 +但今天鐵的光罩住了陳士成,又軟軟的來勸他了,他或者偶一遲疑,便給他正經的證明,又加上陰森的摧逼,使他不得不又向自己的房裏轉過眼光去。 +白光如一柄白團扇,搖搖擺擺的閃起在他房裏了。 +「也終於在這裏!」 +他說著,獅子似的趕快走進那房裏去,但跨進裏面的時候,便不見了白光的影蹤,只有莽蒼蒼的一間舊房,和幾個破書桌都沒在昏暗裏。他爽然的站著,慢慢的再定睛,然而白光卻分明的又起來了,這回更廣大,比硫黃火更白凈,比朝霧更霏微,而且便在靠東牆的一張書桌下。 +陳士成獅子似的奔到門後邊,伸手去摸鋤頭,撞著一條黑影。他不知怎的有些怕了,張惶的點了燈,看鋤頭無非倚著。他移開桌子,用鋤頭一氣掘起四塊大方磚,蹲身一看,照例是黃澄澄的細沙,揎了袖爬開細沙,便露出下面的黑土來。他極小心的,幽靜的,一鋤一鋤往下掘,然而深夜究竟太寂靜了,尖鐵觸土的聲音,總是鈍重的不肯瞞人的發響。 +土坑深到二尺多了,並不見有甕口,陳士成正心焦,一聲脆響,頗震得手腕痛,鋤尖碰到什麼堅硬的東西了;他急忙拋下鋤頭,摸索著看時,一塊大方磚在下麵。他的心抖得很利害,聚精會神的挖起那方磚來,下麵也滿是先前一樣的黑土,爬鬆了許多土,下麵似乎還無窮。但忽而又觸著堅硬的小東西了,圓的,大約是一個銹銅錢;此外也還有幾片破碎的磁片。 +陳士成心裏仿佛覺得空虛了,渾身流汗,急躁的只爬搔;這其間,心在空中一抖動,又觸著一種古怪的小東西了,這似乎約略有些馬掌形的,但觸手很鬆脆。他又聚精會神的挖起那東西來,謹慎的撮著,就燈光下仔細看時,那東西斑斑剝剝的像是爛骨頭,上面還帶著一排零落不全的牙齒。他已經誤到這許是下巴骨了,而那下巴骨也便在他手裏索索的動彈起來,而且笑吟吟的顯出笑影,終於聽得他開口道: +「這回又完了!」 +他慄然的發了大冷,同時也放了手,下巴骨輕飄飄的回到坑底裏不多久,他也就逃到院子裏了。他偷看房裏面,燈火如此輝煌,下巴骨如此嘲笑,異乎尋常的怕人,便再不敢向那邊看。他躲在遠處的簷下的陰影裏,覺得較為安全了;但在這平安中,忽而耳朵邊又聽得竊竊的低聲說: +「這裏沒有……到山裏去……」 +陳士成似乎記得白天在街上也曾聽得有人說這種話,他不待再聽完,已經恍然大悟了。他突然仰面向天,月亮已向西高峰這方面隱去,遠想離城三十五里的西高峰正在眼前,朝笏一般黑魆魆的挺立著,周圍便放出浩大閃爍的白光來。 +而且這白光又遠遠的就在前面了。 +「是的,到山裏去!」 +他決定的想,慘然的奔出去了。幾回的開門之後,門裏面便再不聞一些聲息。燈火結了大燈花照著空屋和坑洞,畢畢剝剝的炸了幾聲之後,便漸漸的縮小以至於無有,那是殘油已經燒盡了。 +「開城門來~~」 +含著大希望的恐怖的悲聲,遊絲似的在西關門前的黎明中,戰戰兢兢的叫喊。 +第二天的日中,有人在離西門十五里的萬流湖裏看見一個浮屍,當即傳揚開去,終於傳到地保的耳朵裏了,便叫鄉下人撈將上來。那是一個男屍,五十多歲,「身中面白無鬚」,渾身也沒有什麼衣褲。或者說這就是陳士成。但鄰居懶得去看,也並無屍親認領,於是經縣委員相驗之後,便由地保埋了。至於死因,那當然是沒有問題的,剝取死屍的衣服本來是常有的事,夠不上疑心到謀害去:而且仵作也證明是生前的落水,因為他確鑿曾在水底裏掙命,所以十個指甲裏都滿嵌著河底泥。 +有鬼似的。 +然而要做這一篇速朽的文章,纔下筆,便感到萬分的困難了。第一是文章的名目。孔子曰,“名不正則言不順”。這原是應該極註意的。傳的名目很繁多:列傳,自傳,內傳,外傳,別傳,家傳,小傳……,而可惜都不合。“列傳”麽,這一篇並非和許多闊人排在“正史”裏;“自傳”麽,我又並非就是阿Q。說是“外傳”,“內傳”在那裏呢?倘用“內傳”,阿Q又決不是神仙。“別傳”呢,阿Q實在未曾有大總統上諭宣付國史館立“本傳”——雖說英國正史上並無“博徒列傳”,而文豪迭更司也做過《博徒別傳》這一部書,但文豪則可,在我輩卻不可。其次是“家傳”,則我既不知與阿Q是否同宗,也未曾受他子孫的拜託;或“小傳”,則阿Q又更無別的“大傳”了。總而言之,這一篇也便是“本傳”,但從我的文章著想,因為文體卑下,是“引車賣漿者流”所用的話,所以不敢僭稱,便從不入三教九流的小說家所謂“閑話休題言歸正傳”這一句套話裏,取出“正傳”兩個字來,作為名目,即使與古人所撰《書法正傳》的“正傳”字面上很相混,也顧不得了。 +第二,立傳的通例,開首大抵該是“某,字某,某地人也”,而我並不知道阿Q姓什麼。有一回,他似乎是姓趙,但第二日便模糊了。那是趙太爺的兒子進了秀才的時候,鑼聲鏜鏜的報到村裏來,阿Q正喝了兩碗黃酒,便手舞足蹈的說,這於他也很光采,因為他和趙太爺原來是本家,細細的排起來他還比秀才長三輩呢。其時幾個旁聽人倒也肅然的有些起敬了。那知道第二天,地保便叫阿Q到趙太爺家裏去;太爺一見,滿臉濺朱,喝道: +“阿Q,你這渾小子!你說我是你的本家麽?”阿Q不開口。趙太爺愈看愈生氣了,搶進幾步說:“你敢胡說!我怎麼會有你這樣的本家?你姓趙麽?”阿Q不開口,想往後退了;趙太爺跳過去,給了他一個嘴巴。 +“你怎麼會姓趙!——你那裏配姓趙!” +阿Q並沒有抗辯他確鑿姓趙,只用手摸著左頰,和地保退出去了;外面又被地保訓斥了一番,謝了地保二百文酒錢。知道的人都說阿Q太荒唐,自己去招打;他大約未必姓趙,即使真姓趙,有趙太爺在這裏,也不該如此胡說的。此後便再沒有人提起他的氏族來,所以我終於不知道阿Q究竟什麼姓。 +第三,我又不知道阿Q的名字是怎麼寫的。他活著的時候,人都叫他阿Quei,死了以後,便沒有一個人再叫阿Quei了,那裏還會有“著之竹帛”的事。若論“著之竹帛”,這篇文章要算第一次,所以先遇著了這第一個難關。我曾仔細想:阿Quei,阿桂還是阿貴呢?倘使他號月亭,或者在八月間做過生日,那一定是阿桂了;而他既沒有號——也許有號,只是沒有人知道他,——又未嘗散過生日徵文的帖子:寫作阿桂,是武斷的。又倘使他有一位老兄或令弟叫阿富,那一定是阿貴了;而他又只是一個人:寫作阿貴,也沒有佐證的。其餘音Quei的偏僻字樣,更加湊不上了。先前,我也曾問過趙太爺的兒子茂才先生,誰料博雅如此公,竟也茫然,但據結論說,是因為陳獨秀辦了《新青年》提倡洋字,所以國粹淪亡,無可查考了。我的最後的手段,只有托一個同鄉去查阿Q犯事的案卷,八個月之後纔有回信,說案卷裏並無與阿Quei的聲音相近的人。我雖不知道是真沒有,還是沒有查,然而也再沒有別的方法了。生怕註音字母還未通行,只好用了“洋字”,照英國流行的拼法寫他為阿Quei,略作阿Q。這近於盲從《新青年》,自己也很抱歉,但茂才公尚且不知,我還有什麼好辦法呢。 +第四,是阿Q的籍貫了。倘他姓趙,則據現在好稱郡望的老例,可以照《郡名百家姓》上的註解,說是“隴西天水人也”,但可惜這姓是不甚可靠的,因此籍貫也就有些決不定。他雖然多住未莊,然而也常常宿在別處,不能說是未莊人,即使說是“未莊人也”,也仍然有乖史法的。 +我所聊以自慰的,是還有一個“阿”字非常正確,絕無附會假借的缺點,頗可以就正於通人。至於其餘,卻都非淺學所能穿鑿,只希望有“歷史癖與考據癖”的胡適之先生的門人們,將來或者能夠尋出許多新端緒來,但是我這《阿Q正傳》到那時卻又怕早經消滅了。 +阿Q不獨是姓名籍貫有些渺茫,連他先前的“行狀”也渺茫。因為未莊的人們之於阿Q,只要他幫忙,只拿他玩笑,從來沒有留心他的“行狀”的。而阿Q自己也不說,獨有和別人口角的時候,間或瞪著眼睛道: +“我先前——比你闊的多啦!你算是什麼東西!” +阿Q沒有家,住在未莊的土穀祠裏;也沒有固定的職業,只給人家做短工,割麥便割麥,舂米便舂米,撐船便撐船。工作略長久時,他也或住在臨時主人的家裏,但一完就走了。所以,人們忙碌的時候,也還記起阿Q來,然而記起的是做工,並不是“行狀”;一閑空,連阿Q都早忘卻,更不必說“行狀”了。只是有一回,有一個老頭子頌揚說:“阿Q真能做!”這時阿Q赤著膊,懶洋洋的瘦伶仃的正在他面前,別人也摸不著這話是真心還是譏笑,然而阿Q很喜歡。 +阿Q又很自尊,所有未莊的居民,全不在他眼神裏,甚而至於對於兩位“文童”也有以為不值一笑的神情。夫文童者,將來恐怕要變秀才者也;趙太爺錢太爺大受居民的尊敬,除有錢之外,就因為都是文童的爹爹,而阿Q在精神上獨不表格外的崇奉,他想:我的兒子會闊得多啦!加以進了幾回城,阿Q自然更自負,然而他又很鄙薄城裏人,譬如用三尺三寸寬的木板做成的凳子,未莊人叫“長凳”,他也叫“長凳”,城裏人卻叫“條凳”,他想:這是錯的,可笑!油煎大頭魚,未莊都加上半寸長的蔥葉,城裏卻加上切細的蔥絲,他想:這也是錯的,可笑!然而未莊人真是不見世面的可笑的鄉下人呵,他們沒有見過城裏的煎魚! +阿Q“先前闊”,見識高,而且“真能做”,本來幾乎是一個“完人”了,但可惜他體質上還有一些缺點。最惱人的是在他頭皮上,頗有幾處不知於何時的癩瘡疤。這雖然也在他身上,而看阿Q的意思,倒也似乎以為不足貴的,因為他諱說“癩”以及一切近於“賴”的音,後來推而廣之,“光”也諱,“亮”也諱,再後來,連“燈”“燭”都諱了。一犯諱,不問有心與無心,阿Q便全疤通紅的發起怒來,估量了對手,口訥的他便罵,氣力小的他便打;然而不知怎麼一回事,總還是阿Q吃虧的時候多。於是他漸漸的變換了方針,大抵改為怒目而視了。 +誰知道阿Q採用怒目主義之後,未莊的閑人們便愈喜歡玩笑他。一見面,他們便假作吃驚的說: +“噲,亮起來了。” +阿Q照例的發了怒,他怒目而視了。 +“原來有保險燈在這裏!”他們並不怕。 +阿Q沒有法,只得另外想出報複的話來: +“你還不配……”這時候,又仿佛在他頭上的是一種高尚的光容的癩頭瘡,並非平常的癩頭瘡了;但上文說過,阿Q是有見識的,他立刻知道和“犯忌”有點抵觸,便不再往底下說。 +閒人還不完,只撩他,於是終而至於打。阿Q在形式上打敗了,被人揪住黃辮子,在壁上碰了四五個響頭,閒人這纔心滿意足的得勝的走了,阿Q站了一刻,心裏想,“我總算被兒子打了,現在的世界真不像樣……”於是也心滿意足的得勝的走了。 +阿Q想在心裏的,後來每每說出口來,所以凡是和阿Q玩笑的人們,幾乎全知道他有這一種精神上的勝利法,此後每逢揪住他黃辮子的時候,人就先一著對他說: +“阿Q,這不是兒子打老子,是人打畜生。自己說:人打畜生!” +阿Q兩隻手都捏住了自己的辮根,歪著頭,說道: +“打蟲豸,好不好?我是蟲豸——還不放麽?” +但雖然是蟲豸,閒人也並不放,仍舊在就近什麼地方給他碰了五六個響頭,這纔心滿意足的得勝的走了,他以為阿Q這回可遭了瘟。然而不到十秒鐘,阿Q也心滿意足的得勝的走了,他覺得他是第一個能夠自輕自賤的人,除了“自輕自賤”不算外,餘下的就是“第一個”。狀元不也是“第一個”麽?“你算是什麼東西”呢!? +阿Q以如是等等妙法剋服怨敵之後,便愉快的跑到酒店裏喝幾碗酒,又和別人調笑一通,口角一通,又得了勝,愉快的回到土穀祠,放倒頭睡著了。假使有錢,他便去押牌寶,一堆人蹲在地面上,阿Q即汗流滿面的夾在這中間,聲音他最響: +“青龍四百!” +“咳~~開~~啦!”樁家揭開盒子蓋,也是汗流滿面的唱。“天門啦~~角回啦~~!人和穿堂空在那裏啦~~!阿Q的銅錢拿過來~~! +“穿堂一百——一百五十!” +阿Q的錢便在這樣的歌吟之下,漸漸的輸入別個汗流滿面的人物的腰間。他終於只好擠出堆外,站在後面看,替別人著急,一直到散場,然後戀戀的回到土穀祠,第二天,腫著眼睛去工作。 +但真所謂“塞翁失馬安知非福”罷,阿Q不幸而贏了一回,他倒幾乎失敗了。 +這是未莊賽神的晚上。這晚上照例有一臺戲,戲臺左近,也照例有許多的賭攤。做戲的鑼鼓,在阿Q耳朵裏仿佛在十里之外;他只聽得樁家的歌唱了。他贏而又贏,銅錢變成角洋,角洋變成大洋,大洋又成了疊。他興高采烈得非常:“天門兩塊!” +他不知道誰和誰為什麼打起架來了。罵聲打聲腳步聲,昏頭昏腦的一大陣,他纔爬起來,賭攤不見了,人們也不見了,身上有幾處很似乎有些痛,似乎也挨了幾拳幾腳似的,幾個人詫異的對他看。他如有所失的走進土穀祠,定一定神,知道他的一堆洋錢不見了。趕賽會的賭攤多不是本村人,還到那裏去尋根柢呢? +很白很亮的一堆洋錢!而且是他的——現在不見了!說是算被兒子拿去了罷,總還是忽忽不樂;說自己是蟲豸罷,也還是忽忽不樂:他這回纔有些感到失敗的苦痛了。 +但他立刻轉敗為勝了。他擎起右手,用力的在自己臉上連打了兩個嘴巴,熱剌剌的有些痛;打完之後,便心平氣和起來,似乎打的是自己,被打的是別一個自己,不久也就仿佛是自己打了別個一般,——雖然還有些熱剌剌,——心滿意足的得勝的躺下了。他睡著了。 +然而阿Q雖然常優勝,卻直待蒙趙太爺打他嘴巴之後,這纔出了名。 +他付過地保二百文酒錢,憤憤的躺下了,後來想:“現在的世界太不成話,兒子打老子……”於是忽而想到趙太爺的威風,而現在是他的兒子了,便自己也漸漸的得意起來,爬起身,唱著《小孤孀上墳》到酒店去。這時候,他又覺得趙太爺高人一等了。 +說也怪,從此之後,果然大家也仿佛格外尊敬他。這在阿Q,或者以為因為他是趙太爺的父親,而其實也不然。未莊通例,倘如阿七打阿八,或者李四打張三,向來本不算口碑。一上口碑,則打的既有名,被打的也就托庇有了名。至於錯在阿Q,那自然是不必說。所以者何?就因為趙太爺是不會錯的。但他既然錯,為什麼大家又仿佛格外尊敬他呢?這可難解,穿鑿起來說,或者因為阿Q說是趙太爺的本家,雖然挨了打,大家也還怕有些真,總不如尊敬一些穩當。否則,也如孔廟裏的太牢一般,雖然與豬羊一樣,同是畜生,但既經聖人下箸,先儒們便不敢妄動了。 +阿Q此後倒得意了許多年。 +有一年的春天,他醉醺醺的在街上走,在牆根的日光下,看見王胡在那裏赤著膊捉蝨子,他忽然覺得身上也癢起來了。這王胡,又癩又胡,別人都叫他王癩胡,阿Q卻刪去了一個癩字,然而非常渺視他。阿Q的意思,以為癩是不足為奇的,只有這一部絡腮鬍子,實在太新奇,令人看不上眼。他於是併排坐下去了。倘是別的閑人們,阿Q本不敢大意坐下去。但這王胡旁邊,他有什麼怕呢?老實說:他肯坐下去,簡直還是抬舉他。 +阿Q也脫下破夾襖來,翻檢了一回,不知道因為新洗呢還是因為粗心,許多工夫,只捉到三四個。他看那王胡,卻是一個又一個,兩個又三個,只放在嘴裏畢畢剝剝的響。 +阿Q最初是失望,後來卻不平了:看不上眼的王胡尚且那麼多,自己倒反這樣少,這是怎樣的大失體統的事呵!他很想尋一兩個大的,然而竟沒有,好容易纔捉到一個中的,恨恨的塞在厚嘴唇裏,狠命一咬,劈的一聲,又不及王胡的響。 +他癩瘡疤塊塊通紅了,將衣服摔在地上,吐一口唾沫,說: +“這毛蟲!” +“癩皮狗,你罵誰?”王胡輕蔑的抬起眼來說。 +阿Q近來雖然比較的受人尊敬,自己也更高傲些,但和那些打慣的閑人們見面還膽怯,獨有這回卻非常武勇了。這樣滿臉鬍子的東西,也敢出言無狀麽? +“誰認便罵誰!”他站起來,兩手叉在腰間說。 +“你的骨頭癢了麽?”王胡也站起來,披上衣服說。 +阿Q以為他要逃了,搶進去就是一拳。這拳頭還未達到身上,已經被他抓住了,只一拉,阿Q蹌蹌踉踉的跌進去,立刻又被王胡扭住了辮子,要拉到牆上照例去碰頭。 +“‘君子動口不動手’!”阿Q歪著頭說。 +王胡似乎不是君子,並不理會,一連給他碰了五下,又用力的一推,至於阿Q跌出六尺多遠,這纔滿足的去了。 +在阿Q的記憶上,這大約要算是生平第一件的屈辱,因為王胡以絡腮鬍子的缺點,向來只被他奚落,從沒有奚落他,更不必說動手了。而他現在竟動手,很意外,難道真如市上所說,皇帝已經停了,不要秀才和舉人了,因此趙家減了威風,因此他們也便小覷了他麽? +阿Q無可適從的站著。 +遠遠的走來了一個人,他的對頭又到了。這也是阿Q最厭惡的一個人,就是錢太爺的大兒子。他先前跑上城裏去進洋學堂,不知怎麼又跑到東洋去了,半年之後他回到家裏來,腿也直了,辮子也不見了,他的母親大哭了十幾場,他的老婆跳了三回井。後來,他的母親到處說,“這辮子是被壞人灌醉了酒剪去了。本來可以做大官,現在只好等留長再說了。”然而阿Q不肯信,偏稱他“假洋鬼子”,也叫作“裏通外國的人”,一見他,一定在肚子裏暗暗的咒罵。 +阿Q尤其“深惡而痛絕之”的,是他的一條假辮子。辮子而至於假,就是沒有了做人的資格;他的老婆不跳第四回井,也不是好女人。 +這“假洋鬼子”近來了。 +“禿兒。驢……”阿Q歷來本只在肚子裏罵,沒有出過聲,這回因為正氣忿,因為要報仇,便不由的輕輕的說出來了。 +不料這禿兒卻拿著一支黃漆的棍子——就是阿Q所謂哭喪棒——大蹋步走了過來。阿Q在這剎那,便知道大約要打了,趕緊抽緊筋骨,聳了肩膀等候著,果然,拍的一聲,似乎確鑿打在自己頭上了。 +“我說他!”阿Q指著近旁的一個孩子,分辯說。 +拍!拍拍! +在阿Q的記憶上,這大約要算是生平第二件的屈辱。幸而拍拍的響了之後,於他倒似乎完結了一件事,反而覺得輕鬆些,而且“忘卻”這一件祖傳的寶貝也發生了效力,他慢慢的走,將到酒店門口,早已有些高興了。 +但對面走來了靜修庵裏的小尼姑。阿Q便在平時,看見伊也一定要唾罵,而況在屈辱之後呢?他於是發生了回憶,又發生了敵愾了。 +“我不知道我今天為什麼這樣晦氣,原來就因為見了你!”他想。 +他迎上去,大聲的吐一口唾沫: +“咳,呸!” +小尼姑全不睬,低了頭只是走。阿Q走近伊身旁,突然伸出手去摩著伊新剃的頭皮,呆笑著,說: +“禿兒!快回去,和尚等著你……” +“你怎麼動手動腳……”尼姑滿臉通紅的說,一面趕快走。 +酒店裏的人大笑了。阿Q看見自己的勛業得了賞識,便愈加興高采烈起來: +“和尚動得,我動不得?”他扭住伊的面頰。 +酒店裏的人大笑了。阿Q更得意,而且為了滿足那些賞鑒家起見,再用力的一擰,纔放手。 +他這一戰,早忘卻了王胡,也忘卻了假洋鬼子,似乎對於今天的一切“晦氣”都報了仇;而且奇怪,又仿佛全身比拍拍的響了之後輕鬆,飄飄然的似乎要飛去了。 +“這斷子絕孫的阿Q!”遠遠地聽得小尼姑的帶哭的聲音。 +“哈哈哈!”阿Q十分得意的笑。 +“哈哈哈!”酒店裏的人也九分得意的笑。 +有人說:有些勝利者,願意敵手如虎,如鷹,他纔感得勝利的歡喜;假使如羊,如小雞,他便反覺得勝利的無聊。又有些勝利者,當剋服一切之後,看見死的死了,降的降了,“臣誠惶誠恐死罪死罪”,他於是沒有了敵人,沒有了對手,沒有了朋友,只有自己在上,一個,孤另另,淒涼,寂寞,便反而感到了勝利的悲哀。然而我們的阿Q卻沒有這樣乏,他是永遠得意的:這或者也是中國精神文明冠於全球的一個證據了。 +看那,他飄飄然的似乎要飛去了! +然而這一次的勝利,卻又使他有些異樣。他飄飄然的飛了大半天,飄進土穀祠,照例應該躺下便打鼾。誰知道這一晚,他很不容易合眼,他覺得自己的大拇指和第二指有點古怪:仿佛比平常滑膩些。不知道是小尼姑的臉上有一點滑膩的東西粘在他指上,還是他的指頭在小尼姑臉上磨得滑膩了?…… +“斷子絕孫的阿Q!” +阿Q的耳朵裏又聽到這句話。他想:不錯,應該有一個女人,斷子絕孫便沒有人供一碗飯,……應該有一個女人。夫“不孝有三無後為大”,而“若敖之鬼餒而”,也是一件人生的大哀,所以他那思想,其實是樣樣合於聖經賢傳的,只可惜後來有些“不能收其放心”了。 +“女人,女人!……”他想。 +“……和尚動得……女人,女人!……女人!”他又想。 +我們不能知道這晚上阿Q在什麼時候纔打鼾。但大約他從此總覺得指頭有些滑膩,所以他從此總有些飄飄然;“女……”他想。 +即此一端,我們便可以知道女人是害人的東西。 +中國的男人,本來大半都可以做聖賢,可惜全被女人毀掉了。商是妲己鬧亡的;周是褒姒弄壞的;秦……雖然史無明文,我們也假定他因為女人,大約未必十分錯;而董卓可是的確給貂蟬害死了。 +阿Q本來也是正人,我們雖然不知道他曾蒙什麼明師指授過,但他對於“男女之大防”卻歷來非常嚴;也很有排斥異端——如小尼姑及假洋鬼子之類——的正氣。他的學說是:凡尼姑,一定與和尚私通;一個女人在外面走,一定想引誘野男人;一男一女在那裏講話,一定要有勾當了。為懲治他們起見,所以他往往怒目而視,或者大聲說幾句“誅心”話,或者在冷僻處,便從後面擲一塊小石頭。 +誰知道他將到“而立”之年,竟被小尼姑害得飄飄然了。這飄飄然的精神,在禮教上是不應該有的,——所以女人真可惡,假使小尼姑的臉上不滑膩,阿Q便不至於被蠱,又假使小尼姑的臉上蓋一層布,阿Q便也不至於被蠱了,——他五六年前,曾在戲臺下的人叢中擰過一個女人的大腿,但因為隔一層褲,所以此後並不飄飄然,——而小尼姑並不然,這也足見異端之可惡。 +“女……”阿Q想。 +他對於以為“一定想引誘野男人”的女人,時常留心看,然而伊並不對他笑。他對於和他講話的女人,也時常留心聽,然而伊又並不提起關於什麼勾當的話來。哦,這也是女人可惡之一節:伊們全都要裝“假正經”的。 +這一天,阿Q在趙太爺家裏舂了一天米,吃過晚飯,便坐在廚房裏吸旱煙。倘在別家,吃過晚飯本可以回去的了,但趙府上晚飯早,雖說定例不准掌燈,一吃完便睡覺,然而偶然也有一些例外:其一,是趙大爺未進秀才的時候,准其點燈讀文章;其二,便是阿Q來做短工的時候,准其點燈舂米。因為這一條例外,所以阿Q在動手舂米之前,還坐在廚房裏吸旱煙。 +吳媽,是趙太爺家裏唯一的女僕,洗完了碗碟,也就在長凳上坐下了,而且和阿Q談閑天: +“太太兩天沒有吃飯哩,因為老爺要買一個小的……” +女人……吳媽……這小孤孀……”阿Q想。 +“我們的少奶奶是八月裏要生孩子了……” +“女人……”阿Q想。 +阿Q放下煙管,站了起來。 +“我們的少奶奶……”吳媽還嘮叨說。 +“我和你困覺,我和你困覺!”阿Q忽然搶上去,對伊跪下了。 +一剎時中很寂然。 +“阿呀!”吳媽楞了一息,突然發抖,大叫著往外跑,且跑且嚷,似乎後來帶哭了。 +阿Q對了牆壁跪著也發楞,於是兩手扶著空板凳,慢慢的站起來,仿佛覺得有些糟。他這時確也有些忐忑了,慌張的將煙管插在褲帶上,就想去舂米。蓬的一聲,頭上著了很粗的一下,他急忙迴轉身去,那秀才便拿了一支大竹杠站在他面前。 +“你反了,……你這……” +大竹杠又向他劈下來了。阿Q兩手去抱頭,拍的正打在指節上,這可很有些痛。他衝出廚房門,仿佛背上又著了一下似的。 +“忘八蛋!”秀才在後面用了官話這樣罵。 +阿Q奔入舂米場,一個人站著,還覺得指頭痛,還記得“忘八蛋”,因為這話是未莊的鄉下人從來不用,專是見過官府的闊人用的,所以格外怕,而印象也格外深。但這時,他那“女……”的思想卻也沒有了。而且打罵之後,似乎一件事也已經收束,倒反覺得一無掛礙似的,便動手去舂米。舂了一會,他熱起來了,又歇了手脫衣服。 +脫下衣服的時候,他聽得外面很熱鬧,阿Q生平本來最愛看熱鬧,便即尋聲走出去了。尋聲漸漸的尋到趙太爺的內院裏,雖然在昏黃中,卻辨得出許多人,趙府一家連兩日不吃飯的太太也在內,還有間壁的鄒七嫂,真正本家的趙白眼,趙司晨。 +少奶奶正拖著吳媽走出下房來,一面說: +“你到外面來,……不要躲在自己房裏想……” +“誰不知道你正經,……短見是萬萬尋不得的。”鄒七嫂也從旁說。 +吳媽只是哭,夾些話,卻不甚聽得分明。 +阿Q想:“哼,有趣,這小孤孀不知道鬧著什麼玩意兒了?”他想打聽,走近趙司晨的身邊。這時他猛然間看見趙大爺向他奔來,而且手裏捏著一支大竹杠。他看見這一支大竹杠,便猛然間悟到自己曾經被打,和這一場熱鬧似乎有點相關。他翻身便走,想逃回舂米場,不圖這支竹杠阻了他的去路,於是他又翻身便走,自然而然的走出後門,不多工夫,已在土穀祠內了。 +阿Q坐了一會,皮膚有些起粟,他覺得冷了,因為雖在春季,而夜間頗有餘寒,尚不宜於赤膊。他也記得布衫留在趙家,但倘若去取,又深怕秀才的竹杠。然而地保進來了。 +“阿Q,你的媽媽的!你連趙家的用人都調戲起來,簡直是造反。害得我晚上沒有覺睡,你的媽媽的!……” +如是云云的教訓了一通,阿Q自然沒有話。臨末,因為在晚上,應該送地保加倍酒錢四百文,阿Q正沒有現錢,便用一頂氈帽做抵押,並且訂定了五條件: +一 明天用紅燭——要一斤重的——一對,香一封,到趙府上去賠罪。 +二 趙府上請道士祓除縊鬼,費用由阿Q負擔。 +三 阿Q從此不准踏進趙府的門檻。四 吳媽此後倘有不測,惟阿Q是問。 +五 阿Q不准再去索取工錢和布衫。 +阿Q自然都答應了,可惜沒有錢。幸而已經春天,棉被可以無用,便質了二千大錢,履行條約。赤膊磕頭之後,居然還剩幾文,他也不再贖氈帽,統統喝了酒了。但趙家也並不燒香點燭,因為太太拜佛的時候可以用,留著了。那破布衫是大半做了少奶奶八月間生下來的孩子的襯尿布,那小半破爛的便都做了吳媽的鞋底。 +第五章 生計問題[编辑 +阿Q禮畢之後,仍舊回到土穀祠,太陽下去了,漸漸覺得世上有些古怪。他仔細一想,終於省悟過來:其原因蓋在自己的赤膊。他記得破夾襖還在,便披在身上,躺倒了,待張開眼睛,原來太陽又已經照在西牆上頭了。他坐起身,一面說道,“媽媽的……” +他起來之後,也仍舊在街上逛,雖然不比赤膊之有切膚之痛,卻又漸漸的覺得世上有些古怪了。仿佛從這一天起,未莊的女人們忽然都怕了羞,伊們一見阿Q走來,便個個躲進門裏去。甚而至於將近五十歲的鄒七嫂,也跟著別人亂鑽,而且將十一歲的女兒都叫進去了。阿Q很以為奇,而且想:“這些東西忽然都學起小姐模樣來了。這娼婦們……” +,卻是許多日以後的事。其一,酒店不肯賒欠了;其二,管土穀祠的老頭子說些廢話,似乎叫他走;其三,他雖然記不清多少日,但確乎有許多日,沒有一個人來叫他做短工。酒店不賒,熬著也罷了;老頭子催他走,嚕囌一通也就算了;只是沒有人來叫他做短工,卻使阿Q肚子餓:這委實是一件非常“媽媽的”的事情。 +阿Q忍不下去了,他只好到老主顧的家裏去探問,——但獨不許踏進趙府的門檻,——然而情形也異樣:一定走出一個男人來,現了十分煩厭的相貌,像回覆乞丐一般的搖手道: +“沒有沒有!你出去!” +阿Q愈覺得稀奇了。他想,這些人家向來少不了要幫忙,不至於現在忽然都無事,這總該有些蹊蹺在裏面了。他留心打聽,纔知道他們有事都去叫小Don。這小D,是一個窮小子,又瘦又乏,在阿Q的眼睛裏,位置是在王胡之下的,誰料這小子竟謀了他的飯碗去。所以阿Q這一氣,更與平常不同,當氣憤憤的走著的時候,忽然將手一揚,唱道: +“我手執鋼鞭將你打!……” +幾天之後,他竟在錢府的照壁前遇見了小D。“仇人相見分外眼明”,阿Q便迎上去,小D也站住了。 +“畜生!”阿Q怒目而視的說,嘴角上飛出唾沫來。 +“我是蟲豸,好麽?……”小D說。 +這謙遜反使阿Q更加憤怒起來,但他手裏沒有鋼鞭,於是只得撲上去,伸手去拔小D的辮子。小D一手護住了自己的辮根,一手也來拔阿Q的辮子,阿Q便也將空著的一隻手護住了自己的辮根。從先前的阿Q看來,,小D本來是不足齒數的,但他近來挨了餓,又瘦又乏已經不下於小D,所以便成了勢均力敵的現象,四隻手拔著兩顆頭,都彎了腰,在錢家粉牆上映出一個藍色的虹形,至於半點鐘之久了。 +“好了,好了!”看的人們說,大約是解勸的。 +“好,好!”看的人們說,不知道是解勸,是頌揚,還是煽動。 +然而他們都不聽。阿Q進三步,小D便退三步,都站著;小D進三步,阿Q便退三步,又都站著。大約半點鐘,——未莊少有自鳴鐘,所以很難說,或者二十分,——他們的頭髮裏便都冒煙,額上便都流汗,阿Q的手放鬆了,在同一瞬間,小D的手也正放鬆了,同時直起,同時退開,都擠出人叢去。 +“記著罷,媽媽的……”阿Q回過頭去說。 +“媽媽的,記著罷……”小D也回過頭來說。 +這一場“龍虎鬥”似乎並無勝敗,也不知道看的人可滿足,都沒有發什麼議論,而阿Q卻仍然沒有人來叫他做短工。 +有一日很溫和,微風拂拂的頗有些夏意了,阿Q卻覺得寒冷起來,但這還可擔當,第一倒是肚子餓。棉被,氈帽,布衫,早已沒有了,其次就賣了棉襖;現在有褲子,卻萬不可脫的;有破夾襖,又除了送人做鞋底之外,決定賣不出錢。他早想在路上拾得一註錢,但至今還沒有見;他想在自己的破屋裏忽然尋到一註錢,慌張的四顧,但屋內是空虛而且瞭然。於是他決計出門求食去了。 +他在路上走著要“求食”,看見熟識的酒店,看見熟識的饅頭,但他都走過了,不但沒有暫停,而且並不想要。他所求的不是這類東西了;他求的是什麼東西,他自己不知道。 +未莊本不是大村鎮,不多時便走盡了。村外多是水田,滿眼是新秧的嫩綠,夾著幾個圓形的活動的黑點,便是耕田的農夫。阿Q並不賞鑒這田家樂,卻只是走,因為他直覺的知道這與他的“求食”之道是很遼遠的。但他終於走到靜修庵的牆外了。 +庵周圍也是水田,粉牆突出在新綠裏,後面的低土牆裏是菜園。阿Q遲疑了一會,四面一看,並沒有人。他便爬上這矮牆去,扯著何首烏藤,但泥土仍然簌簌的掉,阿Q的腳也索索的抖;終於攀著桑樹枝,跳到裏面了。裏面真是鬱鬱蔥蔥,但似乎並沒有黃酒饅頭,以及此外可吃的之類。靠西牆是竹叢,下麵許多筍,只可惜都是並未煮熟的,還有油菜早經結子,芥菜已將開花,小白菜也很老了。 +阿Q仿佛文童落第似的覺得很冤屈,他慢慢走近園門去,忽而非常驚喜了,這分明是一畦老蘿蔔。他於是蹲下便拔,而門口突然伸出一個很圓的頭來,又即縮回去了,這分明是小尼姑。小尼姑之流是阿Q本來視若草芥的,但世事須“退一步想”,所以他便趕緊拔起四個蘿蔔,擰下青葉,兜在大襟裏。然而老尼姑已經出來了。 +“阿彌陀佛,阿Q,你怎麼跳進園裏來偷蘿蔔!……阿呀,罪過呵,阿唷,阿彌陀佛!……” +“我什麼時候跳進你的園裏來偷蘿蔔?”阿Q且看且走的說。 +“現在……這不是?”老尼姑指著他的衣兜。 +“這是你的?你能叫得他答應你麽?你……” +阿Q沒有說完話,拔步便跑;追來的是一匹很肥大的黑狗。這本來在前門的,不知怎的到後園來了。黑狗哼而且追,已經要咬著阿Q的腿,幸而從衣兜裏落下一個蘿蔔來,那狗給一嚇,略略一停,阿Q已經爬上桑樹,跨到土牆,連人和蘿蔔都滾出牆外面了。只剩著黑狗還在對著桑樹嗥,老尼姑念著佛。 +阿Q怕尼姑又放出黑狗來,拾起蘿蔔便走,沿路又撿了幾塊小石頭,但黑狗卻並不再現。阿Q於是拋了石塊,一面走一面吃,而且想道,這裏也沒有什麼東西尋,不如進城去…… +待三個蘿蔔吃完時,他已經打定了進城的主意了。 +第六章 從中興到末路[编辑] +在未莊再看見阿Q出現的時候,是剛過了這年的中秋。人們都驚異,說是阿Q回來了,於是又回上去想道,他先前那裏去了呢?阿Q前幾回的上城,大抵早就興高采烈的對人說,但這一次卻並不,所以也沒有一個人留心到。他或者也曾告訴過管土穀祠的老頭子,然而未莊老例,只有趙太爺、錢太爺和秀才大爺上城纔算一件事。假洋鬼子尚且不足數,何況是阿Q:因此老頭子也就不替他宣傳,而未莊的社會上也就無從知道了。 +但阿Q這回的回來,卻與先前大不同,確乎很值得驚異。天色將黑,他睡眼蒙朧的在酒店門前出現了,他走近櫃臺,從腰間伸出手來,滿把是銀的和銅的,在櫃上一扔說,“現錢!打酒來!”穿的是新夾襖,看去腰間還掛著一個大搭連,沉鈿鈿的將褲帶墜成了很彎很彎的弧線。未莊老例,看見略有些醒目的人物,是與其慢也寧敬的,現在雖然明知道是阿Q,但因為和破夾襖的阿Q有些兩樣了,古人云,“士別三日便當刮目相待”,所以堂倌,掌櫃,酒客,路人,便自然顯出一種凝而且敬的形態來。掌櫃既先之以點頭,又繼之以談話: +“豁,阿Q,你回來了!” +“回來了。” +“發財發財,你是——在……” +“上城去了!” +這一件新聞,第二天便傳遍了全未莊。人人都願意知道現錢和新夾襖的阿Q的中興史,所以在酒店裏,茶館裏,廟簷下,便漸漸的探聽出來了。這結果,是阿Q得了新敬畏。 +據阿Q說,他是在舉人老爺家裏幫忙。這一節,聽的人都肅然了。這老爺本姓白,但因為合城裏只有他一個舉人,所以不必再冠姓,說起舉人來就是他。這也不獨在未莊是如此,便是一百里方圓之內也都如此,人們幾乎多以為他的姓名就叫舉人老爺的了。在這人的府上幫忙,那當然是可敬的。但據阿Q又說,他卻不高興再幫忙了,因為這舉人老爺實在太“媽媽的”了。這一節,聽的人都嘆息而且快意,因為阿Q本不配在舉人老爺家裏幫忙,而不幫忙是可惜的。 +據阿Q說,他的回來,似乎也由於不滿意城裏人,這就在他們將長凳稱為條凳,而且煎魚用蔥絲,加以最近觀察所得的缺點,是女人的走路也扭得不很好。然而也偶有大可佩服的地方,即如未莊的鄉下人不過打三十二張的竹牌,只有假洋鬼子能夠叉“麻醬”,城裏卻連小烏龜子都叉得精熟的。什麼假洋鬼子,只要放在城裏的十幾歲的小烏龜子的手裏,也就立刻是“小鬼見閻王”。這一節,聽的人都赧然了。 +“你們可看見過殺頭麽?”阿Q說,“咳,好看。殺革命黨。唉,好看好看,……”他搖搖頭,將唾沫飛在正對面的趙司晨的臉上。這一節,聽的人都凜然了。但阿Q又四面一看,忽然揚起右手,照著伸長脖子聽得出神的王胡的後項窩上直劈下去道: +“嚓!” +王胡驚得一跳,同時電光石火似的趕快縮了頭,而聽的人又都悚然而且欣然了。從此王胡瘟頭瘟腦的許多日,並且再不敢走近阿Q的身邊;別的人也一樣。 +阿Q這時在未莊人眼睛裏的地位,雖不敢說超過趙太爺,但謂之差不多,大約也就沒有什麼語病的了。 +然而不多久,這阿Q的大名忽又傳遍了未莊的閨中。雖然未莊只有錢趙兩姓是大屋,此外十之九都是淺閨,但閨中究竟是閨中,所以也算得一件神異。女人們見面時一定說,鄒七嫂在阿Q那裏買了一條藍綢裙,舊固然是舊的,但只化了九角錢。還有趙白眼的母親,——一說是趙司晨的母親,待考,——也買了一件孩子穿的大紅洋紗衫,七成新,只用三百大錢九二串。於是伊們都眼巴巴的想見阿Q,缺綢裙的想問他買綢裙,要洋紗衫的想問他買洋紗衫,不但見了不逃避,有時阿Q已經走過了,也還要追上去叫住他,問道: +“阿Q,你還有綢裙麽?沒有?紗衫也要的,有罷?” +後來這終於從淺閨傳進深閨裏去了。因為鄒七嫂得意之餘,將伊的綢裙請趙太太去鑒賞,趙太太又告訴了趙太爺而且著實恭維了一番。趙太爺便在晚飯桌上,和秀才大爺討論,以為阿Q實在有些古怪,我們門窗應該小心些;但他的東西,不知道可還有什麼可買,也許有點好東西罷。加以趙太太也正想買一件價廉物美的皮背心。於是家族決議,便托鄒七嫂即刻去尋阿Q,而且為此新闢了第三種的例外:這晚上也姑且特准點油燈。 +油燈幹了不少了,阿Q還不到。趙府的全眷都很焦急,打著呵欠,或恨阿Q太飄忽,或怨鄒七嫂不上緊。趙太太還怕他因為春天的條件不敢來,而趙太爺以為不足慮:因為這是“我”去叫他的。果然,到底趙太爺有見識,阿Q終於跟著鄒七嫂進來了。“他只說沒有沒有,我說你自己當面說去,他還要說,我說……”鄒七嫂氣喘吁吁的走著說。 +“太爺!”阿Q似笑非笑的叫了一聲,在簷下站住了。 +“阿Q,聽說你在外面發財,”趙太爺踱開去,眼睛打量著他的全身,一面說。“那很好,那很好的。這個,……聽說你有些舊東西,……可以都拿來看一看,……這也並不是別的,因為我倒要……”“我對鄒七嫂說過了。都完了。”“完了?”趙太爺不覺失聲的說,“那裏會完得這樣快呢?”“那是朋友的,本來不多。他們買了些,……”“總該還有一點罷。”“現在,只剩了一張門幕了。”“就拿門幕來看看罷。”趙太太慌忙說。 +“那麼,明天拿來就是,”趙太爺卻不甚熱心了。“阿Q,你以後有什麼東西的時候,你儘先送來給我們看,……” +“價錢決不會比別家出得少!”秀才說。秀才娘子忙一瞥阿Q的臉,看他感動了沒有。 +“我要一件皮背心。”趙太太說。 +阿Q雖然答應著,卻懶洋洋的出去了,也不知道他是否放在心上。這使趙太爺很失望,氣憤而且擔心,至於停止了打呵欠。秀才對於阿Q的態度也很不平,於是說,這忘八蛋要提防,或者不如吩咐地保,不許他住在未莊。但趙太爺以為不然,說這也怕要結怨,況且做這路生意的大概是“老鷹不吃窩下食”,本村倒不必擔心的;只要自己夜裏警醒點就是了。秀才聽了這“庭訓”,非常之以為然,便即刻撤銷了驅逐阿Q的提議,而且叮囑鄒七嫂,請伊千萬不要向人提起這一段話。 +但第二日,鄒七嫂便將那藍裙去染了皂,又將阿Q可疑之點傳揚出去了,可是確沒有提起秀才要驅逐他這一節。然而這已經於阿Q很不利。最先,地保尋上門了,取了他的門幕去,阿Q說是趙太太要看的,而地保也不還並且要議定每月的孝敬錢。其次,是村人對於他的敬畏忽而變相了,雖然還不敢來放肆,卻很有遠避的神情,而這神情和先前的防他來“嚓”的時候又不同,頗混著“敬而遠之”的分子了。 +只有一班閑人們卻還要尋根究底的去探阿Q的底細。阿Q也並不諱飾,傲然的說出他的經驗來。從此他們纔知道,他不過是一個小腳色,不但不能上牆,並且不能進洞,只站在洞外接東西。有一夜,他剛纔接到一個包,正手再進去,不一會,只聽得裏面大嚷起來,他便趕緊跑,連夜爬出城,逃回未莊來了,從此不敢再去做。然而這故事卻於阿Q更不利,村人對於阿Q的“敬而遠之”者,本因為怕結怨,誰料他不過是一個不敢再偷的偷兒呢?這實在是“斯亦不足畏也矣”。 +第七章 革命[编辑] +宣統三年九月十四日——即阿Q將搭連賣給趙白眼的這一天——三更四點,有一隻大烏篷船到了趙府上的河埠頭。這船從黑魆魆中盪來,鄉下人睡得熟,都沒有知道;出去時將近黎明,卻很有幾個看見的了。據探頭探腦的調查來的結果,知道那竟是舉人老爺的船! +那船便將大不安載給了未莊,不到正午,全村的人心就很動搖。船的使命,趙家本來是很秘密的,但茶坊酒肆裏卻都說,革命黨要進城,舉人老爺到我們鄉下來逃難了。惟有鄒七嫂不以為然,說那不過是幾口破衣箱,舉人老爺想來寄存的,卻已被趙太爺回覆轉去。其實舉人老爺和趙秀才素不相能,在理本不能有“共患難”的情誼,況且鄒七嫂又和趙家是鄰居,見聞較為切近,所以大概該是伊對的。 +阿Q的耳朵裏,本來早聽到過革命黨這一句話,今年又親眼見過殺掉革命黨。但他有一種不知從那裏來的意見,以為革命黨便是造反,造反便是與他為難,所以一向是“深惡而痛絕之”的。殊不料這卻使百里聞名的舉人老爺有這樣怕,於是他未免也有些“神往”了,況且未莊的一群鳥男女的慌張的神情,也使阿Q更快意。 +“革命也好罷,”阿Q想,“革這夥媽媽的的命,太可惡!太可恨!……便是我,也要投降革命黨了。” +阿Q近來用度窘,大約略略有些不平;加以午間喝了兩碗空肚酒,愈加醉得快,一面想一面走,便又飄飄然起來。不知怎麼一來,忽而似乎革命黨便是自己,未莊人卻都是他的俘虜了。他得意之餘,禁不住大聲的嚷道: +“造反了!造反了!” +未莊人都用了驚懼的眼光對他看。這一種可憐的眼光,是阿Q從來沒有見過的,一見之下,又使他舒服得如六月裏喝了雪水。他更加高興的走而且喊道: +“好,……我要什麼就是什麼,我歡喜誰就是誰。得得,鏘鏘!悔不該,酒醉錯斬了鄭賢弟,悔不該,呀呀呀……得得,鏘鏘,得,鏘令鏘!我手執鋼鞭將你打……” +趙府上的兩位男人和兩個真本家,也正站在大門口論革命。阿Q沒有見,昂了頭直唱過去。“得得,……” +“老Q,”趙太爺怯怯的迎著低聲的叫。“鏘鏘,”阿Q料不到他的名字會和“老”字聯結起來,以為是一句別的話,與己無幹,只是唱。“得,鏘,鏘令鏘,鏘!”“老Q。”“悔不該……” +“阿Q!”秀才只得直呼其名了。 +阿Q這纔站住,歪著頭問道,“什麼?” +“老Q,…現在……”趙太爺卻又沒有話,“現在……發財麽?” +“發財?自然。要什麼就是什麼……” +“阿……Q哥,像我們這樣窮朋友是不要緊的……”趙白眼惴惴的說,似乎想探革命黨的口風。 +“窮朋友?你總比我有錢。”阿Q說著自去了。 +大家都憮然,沒有話。趙太爺父子回家,晚上商量到點燈。趙白眼回家,便從腰間扯下搭連來,交給他女人藏在箱底裏。 +阿Q飄飄然的飛了一通,回到土穀祠,酒已經醒透了。這晚上,管祠的老頭子也意外的和氣,請他喝茶;阿Q便向他要了兩個餅,吃完之後,又要了一支點過的四兩燭和一個樹燭臺,點起來,獨自躺在自己的小屋裏。他說不出的新鮮而且高興,燭火像元夜似的閃閃的跳,他的思想也迸跳起來了: +“造反?有趣,……來了一陣白盔白甲的革命黨,都拿著板刀,鋼鞭,炸彈,洋炮,三尖兩刃刀,鉤鐮槍,走過土穀祠,叫道,‘阿Q!同去同去!’於是一同去。…… +“這時未莊的一夥鳥男女纔好笑哩,跪下叫道,‘阿Q,饒命!’誰聽他!第一個該死的是小D和趙太爺,還有秀才,還有假洋鬼子,……留幾條麽?王胡本來還可留,但也不要了。…… +“東西,……直走進去打開箱子來:元寶,洋錢,洋紗衫,……秀才娘子的一張寧式床先搬到土穀祠,此外便擺了錢家的桌椅,——或者也就用趙家的罷。自己是不動手的了,叫小D來搬,要搬得快,搬得不快打嘴巴。…… +“趙司晨的妹子真醜。鄒七嫂的女兒過幾年再說。假洋鬼子的老婆會和沒有辮子的男人睡覺,嚇,不是好東西!秀才的老婆是眼胞上有疤的。……吳媽長久不見了,不知道在那裏,——可惜腳太大。” +阿Q沒有想得十分停當,已經發了鼾聲,四兩燭還只點去了小半寸,紅焰焰的光照著他張開的嘴。 +“荷荷!”阿Q忽而大叫起來,抬了頭倉皇的四顧,待到看見四兩燭,卻又倒頭睡去了。 +第二天他起得很遲,走出街上看時,樣樣都照舊。他也仍然肚餓,他想著,想不起什麼來;但他忽而似乎有了主意了,慢慢的跨開步,有意無意的走到靜修庵。 +庵和春天時節一樣靜,白的牆壁和漆黑的門。他想了一想,前去打門,一隻狗在裏面叫。他急急拾了幾塊斷磚,再上去較為用力的打,打到黑門上生出許多麻點的時候,纔聽得有人來開門。 +阿Q連忙捏好磚頭,擺開馬步,準備和黑狗來開戰。但庵門只開了一條縫,並無黑狗從中衝出,望進去只有一個老尼姑。 +“你又來什麼事?”伊大吃一驚的說。 +“革命了……你知道?……”阿Q說得很含糊。 +“革命革命,革過一革的,……你們要革得我們怎麼樣呢?”老尼姑兩眼通紅的說。 +“什麼?……”阿Q詫異了。 +“你不知道,他們已經來革過了!” +“誰?……”阿Q更其詫異了。 +“那秀才和洋鬼子!” +阿Q很出意外,不由的一錯愕;老尼姑見他失了銳氣,便飛速的關了門,阿Q再推時,牢不可開,再打時,沒有回答了。 +那還是上午的事。趙秀才消息靈,一知道革命黨已在夜間進城,便將辮子盤在頂上,一早去拜訪那歷來也不相能的錢洋鬼子。這是“咸與維新”的時候了,所以他們便談得很投機,立刻成了情投意合的同志,也相約去革命。他們想而又想,纔想出靜修庵裏有一塊“皇帝萬歲萬萬歲”的龍牌,是應該趕緊革掉的,於是又立刻同到庵裏去革命。因為老尼姑來阻擋,說了三句話,他們便將伊當作滿政府,在頭上很給了不少的棍子和栗鑿。尼姑待他們走後,定了神來檢點,龍牌固然已經碎在地上了,而且又不見了觀音娘娘座前的一個宣德爐。 +這事阿Q後來纔知道。他頗悔自己睡著,但也深怪他們不來招呼他。他又退一步想道: +“難道他們還沒有知道我已經投降了革命黨麽?” +第八章 不准革命[编辑] +未莊的人心日見其安靜了。據傳來的消息,知道革命黨雖然進了城,倒還沒有什麼大異樣。知縣大老爺還是原官,不過改稱了什麼,而且舉人老爺也做了什麼——這些名目,未莊人都說不明白——官,帶兵的也還是先前的老把總。只有一件可怕的事是另有幾個不好的革命黨夾在裏面搗亂,第二天便動手剪辮子,聽說那鄰村的航船七斤便著了道兒,弄得不像人樣子了。但這卻還不算大恐怖,因為未莊人本來少上城,即使偶有想進城的,也就立刻變了計,碰不著這危險。阿Q本也想進城去尋他的老朋友,一得這消息,也只得作罷了。 +但未莊也不能說是無改革。幾天之後,將辮子盤在頂上的逐漸增加起來了,早經說過,最先自然是茂才公,其次便是趙司晨和趙白眼,後來是阿Q。倘在夏天,大家將辮子盤在頭頂上或者打一個結,本不算什麼稀奇事,但現在是暮秋,所以這“秋行夏令”的情形,在盤辮家不能不說是萬分的英斷,而在未莊也不能說無關於改革了。 +趙司晨腦後空蕩盪的走來,看見的人大嚷說, +“豁,革命黨來了!” +阿Q聽到了很羡慕。他雖然早知道秀才盤辮的大新聞,但總沒有想到自己可以照樣做,現在看見趙司晨也如此,纔有了學樣的意思,定下實行的決心。他用一支竹筷將辮子盤在頭頂上,遲疑多時,這纔放膽的走去。 +他在街上走,人也看他,然而不說什麼話,阿Q當初很不快,後來便很不平。他近來很容易鬧脾氣了;其實他的生活,倒也並不比造反之前反艱難,人見他也客氣,店鋪也不說要現錢。而阿Q總覺得自己太失意:既然革了命,不應該只是這樣的。況且有一回看見小D,愈使他氣破肚皮了。 +小D也將辮子盤在頭頂上了,而且也居然用一支竹筷。阿Q萬料不到他也敢這樣做,自己也決不准他這樣做!小D是什麼東西呢?他很想即刻揪住他,拗斷他的竹筷,放下他的辮子,並且批他幾個嘴巴,聊且懲罰他忘了生辰八字,也敢來做革命黨的罪。但他終於饒放了,單是怒目而視的吐一口唾沫道“呸!” +這幾日裏,進城去的只有一個假洋鬼子。趙秀才本也想靠著寄存箱子的淵源,親身去拜訪舉人老爺的,但因為有剪辮的危險,所以也中止了。他寫了一封“黃傘格”的信,托假洋鬼子帶上城,而且托他給自己紹介紹介,去進自由黨。假洋鬼子回來時,向秀才討還了四塊洋錢,秀才便有一塊銀桃子掛在大襟上了;未莊人都驚服,說這是柿油黨的頂子,抵得一個翰林;趙太爺因此也驟然大闊,遠過於他兒子初雋秀才的時候,所以目空一切,見了阿Q,也就很有些不放在眼裏了。 +阿Q正在不平,又時時刻刻感著冷落,一聽得這銀桃子的傳說,他立即悟出自己之所以冷落的原因了:要革命,單說投降,是不行的;盤上辮子,也不行的;第一著仍然要和革命黨去結識。他生平所知道的革命黨只有兩個,城裏的一個早已“嚓”的殺掉了,現在只剩了一個假洋鬼子。他除卻趕緊去和假洋鬼子商量之外,再沒有別的道路了。 +錢府的大門正開著,阿Q便怯怯的躄進去。他一到裏面,很吃了驚,只見假洋鬼子正站在院子的中央,一身烏黑的大約是洋衣,身上也掛著一塊銀桃子,手裏是阿Q曾經領教過的棍子,已經留到一尺多長的辮子都拆開了披在肩背上,蓬頭散髮的像一個劉海仙。對面挺直的站著趙白眼和三個閑人,正在必恭必敬的聽說話。 +阿Q輕輕的走近了,站在趙白眼的背後,心裏想招呼,卻不知道怎麼說纔好:叫他假洋鬼子固然是不行的了,洋人也不妥,革命黨也不妥,或者就應該叫洋先生了罷。 +洋先生卻沒有見他,因為白著眼睛講得正起勁: +“我是性急的,所以我們見面,我總是說:洪哥!我們動手罷!他卻總說道No!——這是洋話,你們不懂的。否則早已成功了。然而這正是他做事小心的地方。他再三再四的請我上湖北,我還沒有肯。誰願意在這小縣城裏做事情。……” +“唔,……這個……”阿Q候他略停,終於用十二分的勇氣開口了,但不知道因為什麼,又並不叫他洋先生。 +聽著說話的四個人都吃驚的回顧他。洋先生也纔看見: +“什麼?” +“我……” +“出去!” +“我要投……” +“滾出去!”洋先生揚起哭喪棒來了。 +趙白眼和閑人們便都吆喝道:“先生叫你滾出去,你還不聽麽!” +阿Q將手向頭上一遮,不自覺的逃出門外;洋先生倒也沒有追。他快跑了六十多步,這纔慢慢的走,於是心裏便湧起了憂愁:洋先生不准他革命,他再沒有別的路;從此決不能望有白盔白甲的人來叫他,他所有的抱負,志向,希望,前程,全被一筆勾銷了。至於閑人們傳揚開去,給小D王胡等輩笑話,倒是還在其次的事。 +他似乎從來沒有經驗過這樣的無聊。他對於自己的盤辮子,仿佛也覺得無意味,要侮蔑;為報仇起見,很想立刻放下辮子來,但也沒有竟放。他遊到夜間,賒了兩碗酒,喝下肚去,漸漸的高興起來了,思想裏纔又出現白盔白甲的碎片。 +有一天,他照例的混到夜深,待酒店要關門,纔踱回土穀祠去。 +拍,吧~~! +他忽而聽得一種異樣的聲音,又不是爆竹。阿Q本來是愛看熱鬧,愛管閑事的,便在暗中直尋過去。似乎前面有些腳步聲;他正聽,猛然間一個人從對面逃來了。阿Q一看見,便趕緊翻身跟著逃。那人轉彎,阿Q也轉彎,那人站住了,阿Q也站住。他看後面並無什麼,看那人便是小D。 +“什麼?”阿Q不平起來了。 +“趙……趙家遭搶了!”小D氣喘吁吁的說。 +阿Q的心怦怦的跳了。小D說了便走;阿Q卻逃而又停的兩三回。但他究竟是做過“這路生意”,格外膽大,於是躄出路角,仔細的聽,似乎有些嚷嚷,又仔細的看,似乎許多白盔白甲的人,絡繹的將箱子抬出了,器具抬出了,秀才娘子的寧式床也抬出了,但是不分明,他還想上前,兩隻腳卻沒有動。 +這一夜沒有月,未莊在黑暗裏很寂靜,寂靜到像羲皇時候一般太平。阿Q站著看到自己發煩,也似乎還是先前一樣,在那裏來來往往的搬,箱子抬出了,器具抬出了,秀才娘子的寧式床也抬出了,……抬得他自己有些不信他的眼睛了。但他決計不再上前,卻回到自己的祠裏去了。 +土穀祠裏更漆黑;他關好大門,摸進自己的屋子裏。他躺了好一會,這纔定了神,而且發出關於自己的思想來:白盔白甲的人明明到了,並不來打招呼,搬了許多好東西,又沒有自己的份,——這全是假洋鬼子可惡,不准我造反,否則,這次何至於沒有我的份呢?阿Q越想越氣,終於禁不住滿心痛恨起來,毒毒的點一點頭:“不准我造反,只准你造反?媽媽的假洋鬼子,——好,你造反!造反是殺頭的罪名呵,我總要告一狀,看你抓進縣裏去殺頭,——滿門抄斬,——嚓!嚓!” +第九章 大團圓[编辑] +趙家遭搶之後,未莊人大抵很快意而且恐慌,阿Q也很快意而且恐慌。但四天之後,阿Q在半夜裏忽被抓進縣城裏去了。那時恰是暗夜,一隊兵,一隊團丁,一隊員警,五個偵探,悄悄地到了未莊,乘昏暗圍住土穀祠,正對門架好機關槍;然而阿Q不衝出。許多時沒有動靜,把總焦急起來了,懸了二十千的賞,纔有兩個團丁冒了險,逾垣進去,裏應外合,一擁而入,將阿Q抓出來;直待擒出祠外面的機關槍左近,他纔有些清醒了。 +到進城,已經是正午,阿Q見自己被攙進一所破衙門,轉了五六個彎,便推在一間小屋裏。他剛剛一蹌踉,那用整株的木料做成的柵欄門便跟著他的腳跟闔上了,其餘的三面都是牆壁,仔細看時,屋角上還有兩個人。 +阿Q雖然有些忐忑,卻並不很苦悶,因為他那土穀祠裏的臥室,也並沒有比這間屋子更高明。那兩個也仿佛是鄉下人,漸漸和他兜搭起來了,一個說是舉人老爺要追他祖父欠下來的陳租,一個不知道為了什麼事。他們問阿Q,阿Q爽利的答道,“因為我想造反。” +他下半天便又被抓出柵欄門去了,到得大堂,上面坐著一個滿頭剃得精光的老頭子。阿Q疑心他是和尚,但看見下麵站著一排兵,兩旁又站著十幾個長衫人物,也有滿頭剃得精光像這老頭子的,也有將一尺來長的頭髮披在背後像那假洋鬼子的,都是一臉橫肉,怒目而視的看他;他便知道這人一定有些來歷,膝關節立刻自然而然的寬鬆,便跪了下去了。 +“站著說!不要跪!”長衫人物都吆喝說。 +阿Q雖然似乎懂得,但總覺得站不住,身不由己的蹲了下去,而且終於趁勢改為跪下了。 +“奴隸性!……”長衫人物又鄙夷似的說,但也沒有叫他起來。 +“你從實招來罷,免得吃苦。我早都知道了。招了可以放你。”那光頭的老頭子看定了阿Q的臉,沉靜的清楚的說。 +“招罷!”長衫人物也大聲說。 +“我本來要……來投……”阿Q胡裏胡塗的想了一通,這纔斷斷續續的說。 +“那麼,為什麼不來的呢?”老頭子和氣的問。 +“假洋鬼子不准我!” +“胡說此刻說,也遲了。現在你的同黨在那裏?” +“什麼?…… +“那一晚打劫趙家的一夥人。” +“他們沒有來叫我。他們自己搬走了。”阿Q提起來便憤憤。 +“走到那裏去了呢?說出來便放你了。”老頭子更和氣了。 +“我不知道,……他們沒有來叫我……” +然而老頭子使了一個眼色,阿Q便又被抓進柵欄門裏了。他第二次抓出柵欄門,是第二天的上午。 +大堂的情形都照舊。上面仍然坐著光頭的老頭子,阿Q也仍然下了跪。 +老頭子和氣的問道,“你還有什麼話說麽?” +阿Q一想,沒有話,便回答說,“沒有。” +於是一個長衫人物拿了一張紙,並一支筆送到阿Q的面前,要將筆塞在他手裏。阿Q這時很吃驚,幾乎“魂飛魄散”了:因為他的手和筆相關,這回是初次。他正不知怎樣拿;那人卻又指著一處地方教他畫花押。 +“我……我……不認得字。”阿Q一把抓住了筆,惶恐而且慚愧的說。 +“那麼,便宜你,畫一個圓圈!” +阿Q要畫圓圈了,那手捏著筆卻只是抖。於是那人替他將紙鋪在地上,阿Q伏下去,使盡了平生的力氣畫圓圈。他生怕被人笑話,立志要畫得圓,但這可惡的筆不但很沉重,並且不聽話,剛剛一抖一抖的幾乎要合縫,卻又向外一聳,畫成瓜子模樣了。 +阿Q正羞愧自己畫得不圓,那人卻不計較,早已掣了紙筆去,許多人又將他第二次抓進柵欄門。 +他第二次進了柵欄,倒也並不十分懊惱。他以為人生天地之間,大約本來有時要抓進抓出,有時要在紙上畫圓圈的,惟有圈而不圓,卻是他“行狀”上的一個汙點。但不多時也就釋然了,他想:孫子纔畫得很圓的圓圈呢。於是他睡著了。 +然而這一夜,舉人老爺反而不能睡:他和把總嘔了氣了。舉人老爺主張第一要追贓,把總主張第一要示眾。把總近來很不將舉人老爺放在眼裏了,拍案打凳的說道,“懲一儆百!你看,我做革命黨還不上二十天,搶案就是十幾件,全不破案,我的面子在那裏?破了案,你又來迂。不成!這是我管的!”舉人老爺窘急了,然而還堅持,說是倘若不追贓,他便立刻辭了幫辦民政的職務。而把總卻道,“請便罷!”於是舉人老爺在這一夜竟沒有睡,但幸第二天倒也沒有辭。 +阿Q第三次抓出柵欄門的時候,便是舉人老爺睡不著的那一夜的明天的上午了。他到了大堂,上面還坐著照例的光頭老頭子;阿Q也照例的下了跪。 +老頭子很和氣的問道,“你還有什麼話麽?” +阿Q一想,沒有話,便回答說,“沒有。” +許多長衫和短衫人物,忽然給他穿上一件洋布的白背心,上面有些黑字。阿Q很氣苦:因為這很像是帶孝,而帶孝是晦氣的。然而同時他的兩手反縛了,同時又被一直抓出衙門外去了。 +阿Q被抬上了一輛沒有蓬的車,幾個短衣人物也和他同坐在一處。這車立刻走動了,前面是一班背著洋炮的兵們和團丁,兩旁是許多張著嘴的看客,後面怎樣,阿Q沒有見。但他突然覺到了:這豈不是去殺頭麽?他一急,兩眼發黑,耳朵裏喤的一聲,似乎發昏了。然而他又沒有全發昏,有時雖然著急,有時卻也泰然;他意思之間,似乎覺得人生天地間,大約本來有時也未免要殺頭的。 +他還認得路,於是有些詫異了:怎麼不向著法場走呢?他不知道這是在遊街,在示眾。但即使知道也一樣,他不過便以為人生天地間,大約本來有時也未免要遊街要示眾罷了 +他省悟了,這是繞到法場去的路,這一定是“嚓”的去殺頭。他惘惘的向左右看,全跟著馬蟻似的人,而在無意中,卻在路旁的人叢中發見了一個吳媽。很久違,伊原來在城裏做工了。阿Q忽然很羞愧自己沒志氣:竟沒有唱幾句戲。他的思想仿佛旋風似的在腦裏一迴旋:《小孤孀上墳》欠堂皇,《龍虎鬥》裏的“悔不該……”也太乏,還是“手執鋼鞭將你打”罷。他同時想手一揚,纔記得這兩手原來都捆著,於是“手執鋼鞭”也不唱了。 +“過了二十年又是一個……”阿Q在百忙中,“無師自通”的說出半句從來不說的話。 +“好!!!”從人叢裏,便發出豺狼的嗥叫一般的聲音來。 +車子不住的前行,阿Q在喝采聲中,輪轉眼睛去看吳媽,似乎伊一向並沒有見他,卻只是出神的看著兵們背上的洋炮。 +阿Q於是再看那些喝采的人們 +這剎那中,他的思想又仿佛旋風似的在腦裏一迴旋了。四年之前,他曾在山腳下遇見一隻餓狼,永是不近不遠的跟定他,要吃他的肉。他那時嚇得幾乎要死,幸而手裏有一柄斫柴刀,纔得仗這壯了膽,支持到未莊;可是永遠記得那狼眼睛,又凶又怯,閃閃的像兩顆鬼火,似乎遠遠的來穿透了他的皮肉。而這回他又看見從來沒有見過的更可怕的眼睛了,又鈍又鋒利,不但已經咀嚼了他的話,並且還要咀嚼他皮肉以外的東西,永是不近不遠的跟他走。 +這些睛們似乎連成一氣,已經在那裏咬他的靈魂。 +“救命,……” +然而阿Q沒有說。他早就兩眼發黑,耳朵裏嗡的一聲,覺得全身仿佛微塵似的迸散了。 +至於當時的影響,最大的倒反在舉人老爺,因為終於沒有追贓,他全家都號啕了。其次是趙府,非特秀才因為上城去報官,被不好的革命黨剪了辮子,而且又破費了二十千的賞錢,所以全家也號啕了。從這一天以來,他們便漸漸的都發生了遺老的氣味。 +至於輿論,在未莊是無異議,自然都說阿Q壞,被槍斃便是他的壞的證據:不壞又何至於被槍斃呢?而城裏的輿論卻不佳,他們多半不滿足,以為槍斃並無殺頭這般好看;而且那是怎樣的一個可笑的死囚呵,游了那麼久的街,竟沒有唱一句戲:他們白跟一趟了。 EOT; protected static $encoding = 'UTF-8'; diff --git a/vendor/fzaninotto/faker/test/Faker/Calculator/IbanTest.php b/vendor/fzaninotto/faker/test/Faker/Calculator/IbanTest.php index 12fe8e6d..197048e5 100644 --- a/vendor/fzaninotto/faker/test/Faker/Calculator/IbanTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Calculator/IbanTest.php @@ -3,8 +3,9 @@ namespace Faker\Test\Calculator; use Faker\Calculator\Iban; +use PHPUnit\Framework\TestCase; -class IbanTest extends \PHPUnit_Framework_TestCase +class IbanTest extends TestCase { public function checksumProvider() diff --git a/vendor/fzaninotto/faker/test/Faker/Calculator/InnTest.php b/vendor/fzaninotto/faker/test/Faker/Calculator/InnTest.php index 4dfb8802..71d9193f 100644 --- a/vendor/fzaninotto/faker/test/Faker/Calculator/InnTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Calculator/InnTest.php @@ -3,8 +3,9 @@ namespace Faker\Test\Calculator; use Faker\Calculator\Inn; +use PHPUnit\Framework\TestCase; -class InnTest extends \PHPUnit_Framework_TestCase +class InnTest extends TestCase { public function checksumProvider() diff --git a/vendor/fzaninotto/faker/test/Faker/Calculator/LuhnTest.php b/vendor/fzaninotto/faker/test/Faker/Calculator/LuhnTest.php index 9eb30b5d..2e814144 100644 --- a/vendor/fzaninotto/faker/test/Faker/Calculator/LuhnTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Calculator/LuhnTest.php @@ -3,8 +3,9 @@ namespace Faker\Test\Calculator; use Faker\Calculator\Luhn; +use PHPUnit\Framework\TestCase; -class LuhnTest extends \PHPUnit_Framework_TestCase +class LuhnTest extends TestCase { public function checkDigitProvider() diff --git a/vendor/fzaninotto/faker/test/Faker/DefaultGeneratorTest.php b/vendor/fzaninotto/faker/test/Faker/DefaultGeneratorTest.php index 262243d1..fa9eb852 100644 --- a/vendor/fzaninotto/faker/test/Faker/DefaultGeneratorTest.php +++ b/vendor/fzaninotto/faker/test/Faker/DefaultGeneratorTest.php @@ -3,20 +3,21 @@ namespace Faker\Test; use Faker\DefaultGenerator; +use PHPUnit\Framework\TestCase; -class DefaultGeneratorTest extends \PHPUnit_Framework_TestCase +class DefaultGeneratorTest extends TestCase { public function testGeneratorReturnsNullByDefault() { $generator = new DefaultGenerator; - $this->assertSame(null, $generator->value); + $this->assertNull($generator->value); } public function testGeneratorReturnsDefaultValueForAnyPropertyGet() { $generator = new DefaultGenerator(123); $this->assertSame(123, $generator->foo); - $this->assertNotSame(null, $generator->bar); + $this->assertNotNull($generator->bar); } public function testGeneratorReturnsDefaultValueForAnyMethodCall() diff --git a/vendor/fzaninotto/faker/test/Faker/GeneratorTest.php b/vendor/fzaninotto/faker/test/Faker/GeneratorTest.php index e437292a..f15df441 100644 --- a/vendor/fzaninotto/faker/test/Faker/GeneratorTest.php +++ b/vendor/fzaninotto/faker/test/Faker/GeneratorTest.php @@ -3,8 +3,9 @@ namespace Faker\Test; use Faker\Generator; +use PHPUnit\Framework\TestCase; -class GeneratorTest extends \PHPUnit_Framework_TestCase +class GeneratorTest extends TestCase { public function testAddProviderGivesPriorityToNewlyAddedProvider() { @@ -19,7 +20,7 @@ class GeneratorTest extends \PHPUnit_Framework_TestCase $generator = new Generator; $provider = new FooProvider(); $generator->addProvider($provider); - $this->assertTrue(is_callable($generator->getFormatter('fooFormatter'))); + $this->assertInternalType('callable', $generator->getFormatter('fooFormatter')); } public function testGetFormatterReturnsCorrectFormatter() diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/AddressTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/AddressTest.php index 5a5f66d4..c7f1814c 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/AddressTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/AddressTest.php @@ -4,8 +4,9 @@ namespace Faker\Test\Provider; use Faker\Generator; use Faker\Provider\Address; +use PHPUnit\Framework\TestCase; -class AddressTest extends \PHPUnit_Framework_TestCase +class AddressTest extends TestCase { private $faker; diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/BarcodeTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/BarcodeTest.php index 1373b2b5..16ca3cd8 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/BarcodeTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/BarcodeTest.php @@ -4,8 +4,9 @@ namespace Faker\Test\Provider; use Faker\Generator; use Faker\Provider\Barcode; +use PHPUnit\Framework\TestCase; -class BarcodeTest extends \PHPUnit_Framework_TestCase +class BarcodeTest extends TestCase { private $faker; diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/BaseTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/BaseTest.php index 313b0021..e619d5be 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/BaseTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/BaseTest.php @@ -3,33 +3,35 @@ namespace Faker\Test\Provider; use Faker\Provider\Base as BaseProvider; +use PHPUnit\Framework\TestCase; +use Traversable; -class BaseTest extends \PHPUnit_Framework_TestCase +class BaseTest extends TestCase { public function testRandomDigitReturnsInteger() { - $this->assertTrue(is_integer(BaseProvider::randomDigit())); + $this->assertInternalType('integer', BaseProvider::randomDigit()); } public function testRandomDigitReturnsDigit() { - $this->assertTrue(BaseProvider::randomDigit() >= 0); - $this->assertTrue(BaseProvider::randomDigit() < 10); + $this->assertGreaterThanOrEqual(0, BaseProvider::randomDigit()); + $this->assertLessThan(10, BaseProvider::randomDigit()); } public function testRandomDigitNotNullReturnsNotNullDigit() { - $this->assertTrue(BaseProvider::randomDigitNotNull() > 0); - $this->assertTrue(BaseProvider::randomDigitNotNull() < 10); + $this->assertGreaterThan(0, BaseProvider::randomDigitNotNull()); + $this->assertLessThan(10, BaseProvider::randomDigitNotNull()); } public function testRandomDigitNotReturnsValidDigit() { for ($i = 0; $i <= 9; $i++) { - $this->assertTrue(BaseProvider::randomDigitNot($i) >= 0); - $this->assertTrue(BaseProvider::randomDigitNot($i) < 10); - $this->assertTrue(BaseProvider::randomDigitNot($i) !== $i); + $this->assertGreaterThanOrEqual(0, BaseProvider::randomDigitNot($i)); + $this->assertLessThan(10, BaseProvider::randomDigitNot($i)); + $this->assertNotSame(BaseProvider::randomDigitNot($i), $i); } } @@ -51,14 +53,14 @@ class BaseTest extends \PHPUnit_Framework_TestCase public function testRandomNumberReturnsInteger() { - $this->assertTrue(is_integer(BaseProvider::randomNumber())); - $this->assertTrue(is_integer(BaseProvider::randomNumber(5, false))); + $this->assertInternalType('integer', BaseProvider::randomNumber()); + $this->assertInternalType('integer', BaseProvider::randomNumber(5, false)); } public function testRandomNumberReturnsDigit() { - $this->assertTrue(BaseProvider::randomNumber(3) >= 0); - $this->assertTrue(BaseProvider::randomNumber(3) < 1000); + $this->assertGreaterThanOrEqual(0, BaseProvider::randomNumber(3)); + $this->assertLessThan(1000, BaseProvider::randomNumber(3)); } public function testRandomNumberAcceptsStrictParamToEnforceNumberSize() @@ -98,7 +100,7 @@ class BaseTest extends \PHPUnit_Framework_TestCase public function testRandomLetterReturnsString() { - $this->assertTrue(is_string(BaseProvider::randomLetter())); + $this->assertInternalType('string', BaseProvider::randomLetter()); } public function testRandomLetterReturnsSingleLetter() @@ -109,12 +111,12 @@ class BaseTest extends \PHPUnit_Framework_TestCase public function testRandomLetterReturnsLowercaseLetter() { $lowercaseLetters = 'abcdefghijklmnopqrstuvwxyz'; - $this->assertTrue(strpos($lowercaseLetters, BaseProvider::randomLetter()) !== false); + $this->assertNotFalse(strpos($lowercaseLetters, BaseProvider::randomLetter())); } public function testRandomAsciiReturnsString() { - $this->assertTrue(is_string(BaseProvider::randomAscii())); + $this->assertInternalType('string', BaseProvider::randomAscii()); } public function testRandomAsciiReturnsSingleCharacter() @@ -125,7 +127,7 @@ class BaseTest extends \PHPUnit_Framework_TestCase public function testRandomAsciiReturnsAsciiCharacter() { $lowercaseLetters = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'; - $this->assertTrue(strpos($lowercaseLetters, BaseProvider::randomAscii()) !== false); + $this->assertNotFalse(strpos($lowercaseLetters, BaseProvider::randomAscii())); } public function testRandomElementReturnsNullWhenArrayEmpty() @@ -133,6 +135,11 @@ class BaseTest extends \PHPUnit_Framework_TestCase $this->assertNull(BaseProvider::randomElement(array())); } + public function testRandomElementReturnsNullWhenCollectionEmpty() + { + $this->assertNull(BaseProvider::randomElement(new Collection(array()))); + } + public function testRandomElementReturnsElementFromArray() { $elements = array('23', 'e', 32, '#'); @@ -145,6 +152,12 @@ class BaseTest extends \PHPUnit_Framework_TestCase $this->assertContains(BaseProvider::randomElement($elements), $elements); } + public function testRandomElementReturnsElementFromCollection() + { + $collection = new Collection(array('one', 'two', 'three')); + $this->assertContains(BaseProvider::randomElement($collection), $collection); + } + public function testShuffleReturnsStringWhenPassedAStringArgument() { $this->assertInternalType('string', BaseProvider::shuffle('foo')); @@ -553,3 +566,7 @@ class BaseTest extends \PHPUnit_Framework_TestCase $this->assertContainsOnly('string', $allowDuplicates); } } + +class Collection extends \ArrayObject +{ +} diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/BiasedTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/BiasedTest.php index 1f7a99ac..cce3dc0a 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/BiasedTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/BiasedTest.php @@ -3,14 +3,15 @@ namespace Faker\Test\Provider; use Faker\Provider\Biased; use Faker\Generator; +use PHPUnit\Framework\TestCase; -class BiasedTest extends \PHPUnit_Framework_TestCase +class BiasedTest extends TestCase { const MAX = 10; const NUMBERS = 25000; protected $generator; protected $results = array(); - + protected function setUp() { $this->generator = new Generator(); @@ -18,14 +19,14 @@ class BiasedTest extends \PHPUnit_Framework_TestCase $this->results = array_fill(1, self::MAX, 0); } - + public function performFake($function) { for($i = 0; $i < self::NUMBERS; $i++) { $this->results[$this->generator->biasedNumberBetween(1, self::MAX, $function)]++; } } - + public function testUnbiased() { $this->performFake(array('\Faker\Provider\Biased', 'unbiased')); @@ -40,7 +41,7 @@ class BiasedTest extends \PHPUnit_Framework_TestCase $this->assertLessThan(self::NUMBERS * $assumed * 1.05, $amount, "Value was more than 5 percent over the expected value"); } } - + public function testLinearHigh() { $this->performFake(array('\Faker\Provider\Biased', 'linearHigh')); @@ -54,7 +55,7 @@ class BiasedTest extends \PHPUnit_Framework_TestCase $this->assertLessThan(self::NUMBERS * $assumed * 1.1, $amount, "Value was more than 10 percent over the expected value"); } } - + public function testLinearLow() { $this->performFake(array('\Faker\Provider\Biased', 'linearLow')); diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/ColorTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/ColorTest.php index f73831b1..ff5edac2 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/ColorTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/ColorTest.php @@ -3,8 +3,9 @@ namespace Faker\Test\Provider; use Faker\Provider\Color; +use PHPUnit\Framework\TestCase; -class ColorTest extends \PHPUnit_Framework_TestCase +class ColorTest extends TestCase { public function testHexColor() diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/CompanyTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/CompanyTest.php index ac26c5a0..28ce0eb4 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/CompanyTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/CompanyTest.php @@ -5,8 +5,9 @@ namespace Faker\Test\Provider; use Faker\Generator; use Faker\Provider\Company; use Faker\Provider\Lorem; +use PHPUnit\Framework\TestCase; -class CompanyTest extends \PHPUnit_Framework_TestCase +class CompanyTest extends TestCase { /** * @var Generator diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/DateTimeTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/DateTimeTest.php index 91b17f81..ec3ad867 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/DateTimeTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/DateTimeTest.php @@ -3,27 +3,77 @@ namespace Faker\Test\Provider; use Faker\Provider\DateTime as DateTimeProvider; +use PHPUnit\Framework\TestCase; -class DateTimeTest extends \PHPUnit_Framework_TestCase +class DateTimeTest extends TestCase { public function setUp() { - $this->originalTz = date_default_timezone_get(); $this->defaultTz = 'UTC'; - date_default_timezone_set($this->defaultTz); + DateTimeProvider::setDefaultTimezone($this->defaultTz); } public function tearDown() { - date_default_timezone_set($this->originalTz); + DateTimeProvider::setDefaultTimezone(); + } + + public function testPreferDefaultTimezoneOverSystemTimezone() + { + /** + * Set the system timezone to something *other* than the timezone used + * in setUp(). + */ + $originalSystemTimezone = date_default_timezone_get(); + $systemTimezone = 'Antarctica/Vostok'; + date_default_timezone_set($systemTimezone); + + /** + * Get a new date/time value and assert that it prefers the default + * timezone over the system timezone. + */ + $date = DateTimeProvider::dateTime(); + $this->assertNotSame($systemTimezone, $date->getTimezone()->getName()); + $this->assertSame($this->defaultTz, $date->getTimezone()->getName()); + + /** + * Restore the system timezone. + */ + date_default_timezone_set($originalSystemTimezone); + } + + public function testUseSystemTimezoneWhenDefaultTimezoneIsNotSet() + { + /** + * Set the system timezone to something *other* than the timezone used + * in setUp() *and* reset the default timezone. + */ + $originalSystemTimezone = date_default_timezone_get(); + $originalDefaultTimezone = DateTimeProvider::getDefaultTimezone(); + $systemTimezone = 'Antarctica/Vostok'; + date_default_timezone_set($systemTimezone); + DateTimeProvider::setDefaultTimezone(); + + /** + * Get a new date/time value and assert that it uses the system timezone + * and not the system timezone. + */ + $date = DateTimeProvider::dateTime(); + $this->assertSame($systemTimezone, $date->getTimezone()->getName()); + $this->assertNotSame($this->defaultTz, $date->getTimezone()->getName()); + + /** + * Restore the system timezone. + */ + date_default_timezone_set($originalSystemTimezone); } public function testUnixTime() { $timestamp = DateTimeProvider::unixTime(); $this->assertInternalType('int', $timestamp); - $this->assertTrue($timestamp >= 0); - $this->assertTrue($timestamp <= time()); + $this->assertGreaterThanOrEqual(0, $timestamp); + $this->assertLessThanOrEqual(time(), $timestamp); } public function testDateTime() @@ -186,7 +236,7 @@ class DateTimeTest extends \PHPUnit_Framework_TestCase public function testFixedSeedWithMaximumTimestamp() { - $max = '2018-03-01 12:00:00'; + $max = '2118-03-01 12:00:00'; mt_srand(1); $unixTime = DateTimeProvider::unixTime($max); diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/HtmlLoremTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/HtmlLoremTest.php index f40e0a28..f7814faf 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/HtmlLoremTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/HtmlLoremTest.php @@ -4,8 +4,9 @@ namespace Faker\Test\Provider; use Faker\Generator; use Faker\Provider\HtmlLorem; +use PHPUnit\Framework\TestCase; -class HtmlLoremTest extends \PHPUnit_Framework_TestCase +class HtmlLoremTest extends TestCase { public function testProvider() diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/ImageTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/ImageTest.php index 12109d19..c73992ce 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/ImageTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/ImageTest.php @@ -3,8 +3,9 @@ namespace Faker\Test\Provider; use Faker\Provider\Image; +use PHPUnit\Framework\TestCase; -class ImageTest extends \PHPUnit_Framework_TestCase +class ImageTest extends TestCase { public function testImageUrlUses640x680AsTheDefaultSize() { @@ -45,7 +46,7 @@ class ImageTest extends \PHPUnit_Framework_TestCase public function testDownloadWithDefaults() { - $url = "http://www.lorempixel.com/"; + $url = "http://lorempixel.com/"; $curlPing = curl_init($url); curl_setopt($curlPing, CURLOPT_TIMEOUT, 5); curl_setopt($curlPing, CURLOPT_CONNECTTIMEOUT, 5); diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/InternetTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/InternetTest.php index 11ad2c6e..93fe7b48 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/InternetTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/InternetTest.php @@ -7,8 +7,9 @@ use Faker\Provider\Company; use Faker\Provider\Internet; use Faker\Provider\Lorem; use Faker\Provider\Person; +use PHPUnit\Framework\TestCase; -class InternetTest extends \PHPUnit_Framework_TestCase +class InternetTest extends TestCase { /** * @var Generator diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/LocalizationTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/LocalizationTest.php index 347b1351..6cfcc891 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/LocalizationTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/LocalizationTest.php @@ -3,8 +3,9 @@ namespace Faker\Test\Provider; use Faker\Factory; +use PHPUnit\Framework\TestCase; -class LocalizationTest extends \PHPUnit_Framework_TestCase +class LocalizationTest extends TestCase { public function testLocalizedNameProvidersDoNotThrowErrors() { diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/LoremTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/LoremTest.php index 62785d43..16d98891 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/LoremTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/LoremTest.php @@ -3,8 +3,9 @@ namespace Faker\Test\Provider; use Faker\Provider\Lorem; +use PHPUnit\Framework\TestCase; -class LoremTest extends \PHPUnit_Framework_TestCase +class LoremTest extends TestCase { /** * @expectedException \InvalidArgumentException diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/MiscellaneousTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/MiscellaneousTest.php index 8e39eb2c..6a29cd55 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/MiscellaneousTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/MiscellaneousTest.php @@ -3,8 +3,9 @@ namespace Faker\Test\Provider; use Faker\Provider\Miscellaneous; +use PHPUnit\Framework\TestCase; -class MiscellaneousTest extends \PHPUnit_Framework_TestCase +class MiscellaneousTest extends TestCase { public function testBoolean() { diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/PaymentTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/PaymentTest.php index 773b7227..966b9d63 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/PaymentTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/PaymentTest.php @@ -9,8 +9,9 @@ use Faker\Provider\Base as BaseProvider; use Faker\Provider\DateTime as DateTimeProvider; use Faker\Provider\Payment as PaymentProvider; use Faker\Provider\Person as PersonProvider; +use PHPUnit\Framework\TestCase; -class PaymentTest extends \PHPUnit_Framework_TestCase +class PaymentTest extends TestCase { private $faker; @@ -47,14 +48,15 @@ class PaymentTest extends \PHPUnit_Framework_TestCase public function testCreditCardTypeReturnsValidVendorName() { - $this->assertTrue(in_array($this->faker->creditCardType, array('Visa', 'MasterCard', 'American Express', 'Discover Card'))); + $this->assertContains($this->faker->creditCardType, array('Visa', 'Visa Retired', 'MasterCard', 'American Express', 'Discover Card')); } public function creditCardNumberProvider() { return array( array('Discover Card', '/^6011\d{12}$/'), - array('Visa', '/^4\d{12,15}$/'), + array('Visa', '/^4\d{15}$/'), + array('Visa Retired', '/^4\d{12}$/'), array('MasterCard', '/^(5[1-5]|2[2-7])\d{14}$/') ); } diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/PersonTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/PersonTest.php index a8d1c0f2..f53076f7 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/PersonTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/PersonTest.php @@ -4,8 +4,9 @@ namespace Faker\Test\Provider; use Faker\Provider\Person; use Faker\Generator; +use PHPUnit\Framework\TestCase; -class PersonTest extends \PHPUnit_Framework_TestCase +class PersonTest extends TestCase { /** * @dataProvider firstNameProvider diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/PhoneNumberTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/PhoneNumberTest.php index f73bda88..520ecea3 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/PhoneNumberTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/PhoneNumberTest.php @@ -5,8 +5,9 @@ namespace Faker\Test\Provider; use Faker\Generator; use Faker\Calculator\Luhn; use Faker\Provider\PhoneNumber; +use PHPUnit\Framework\TestCase; -class PhoneNumberTest extends \PHPUnit_Framework_TestCase +class PhoneNumberTest extends TestCase { /** diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/ProviderOverrideTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/ProviderOverrideTest.php index 7fa046ba..61d7d63a 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/ProviderOverrideTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/ProviderOverrideTest.php @@ -6,6 +6,7 @@ namespace Faker\Test\Provider; use Faker; +use PHPUnit\Framework\TestCase; /** * Class ProviderOverrideTest @@ -16,7 +17,7 @@ use Faker; * locale specific provider (can) has specific implementations. The goal of this test is to test the common denominator * and to try to catch possible invalid multi-byte sequences. */ -class ProviderOverrideTest extends \PHPUnit_Framework_TestCase +class ProviderOverrideTest extends TestCase { /** * Constants with regular expression patterns for testing the output. diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/TextTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/TextTest.php index 3baf49f3..a43d8d43 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/TextTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/TextTest.php @@ -3,8 +3,9 @@ namespace Faker\Test\Provider; use Faker\Provider\en_US\Text; use Faker\Generator; +use PHPUnit\Framework\TestCase; -class TextTest extends \PHPUnit_Framework_TestCase +class TextTest extends TestCase { public function testTextMaxLength() { diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/UserAgentTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/UserAgentTest.php index b45b9f86..5ba2459c 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/UserAgentTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/UserAgentTest.php @@ -3,8 +3,9 @@ namespace Faker\Test\Provider; use Faker\Provider\UserAgent; +use PHPUnit\Framework\TestCase; -class UserAgentTest extends \PHPUnit_Framework_TestCase +class UserAgentTest extends TestCase { public function testRandomUserAgent() { diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/UuidTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/UuidTest.php index 22f9efb7..5c639cac 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/UuidTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/UuidTest.php @@ -4,8 +4,9 @@ namespace Faker\Test\Provider; use Faker\Generator; use Faker\Provider\Uuid as BaseProvider; +use PHPUnit\Framework\TestCase; -class UuidTest extends \PHPUnit_Framework_TestCase +class UuidTest extends TestCase { public function testUuidReturnsUuid() { @@ -15,6 +16,9 @@ class UuidTest extends \PHPUnit_Framework_TestCase public function testUuidExpectedSeed() { + if (pack('L', 0x6162797A) == pack('N', 0x6162797A)) { + $this->markTestSkipped('Big Endian'); + } $faker = new Generator(); $faker->seed(123); $this->assertEquals("8e2e0c84-50dd-367c-9e66-f3ab455c78d6", BaseProvider::uuid()); diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/ar_JO/InternetTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/ar_JO/InternetTest.php index d323f1e7..33d70c43 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/ar_JO/InternetTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/ar_JO/InternetTest.php @@ -6,8 +6,9 @@ use Faker\Generator; use Faker\Provider\fi_FI\Person; use Faker\Provider\fi_FI\Internet; use Faker\Provider\fi_FI\Company; +use PHPUnit\Framework\TestCase; -class InternetTest extends \PHPUnit_Framework_TestCase +class InternetTest extends TestCase { /** diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/ar_SA/InternetTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/ar_SA/InternetTest.php index 3765a107..8059f000 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/ar_SA/InternetTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/ar_SA/InternetTest.php @@ -6,8 +6,9 @@ use Faker\Generator; use Faker\Provider\ar_SA\Person; use Faker\Provider\ar_SA\Internet; use Faker\Provider\ar_SA\Company; +use PHPUnit\Framework\TestCase; -class InternetTest extends \PHPUnit_Framework_TestCase +class InternetTest extends TestCase { /** diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/at_AT/PaymentTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/at_AT/PaymentTest.php index afc8c27b..f62dae81 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/at_AT/PaymentTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/at_AT/PaymentTest.php @@ -4,8 +4,9 @@ namespace Faker\Test\Provider\at_AT; use Faker\Generator; use Faker\Provider\at_AT\Payment; +use PHPUnit\Framework\TestCase; -class PaymentTest extends \PHPUnit_Framework_TestCase +class PaymentTest extends TestCase { /** diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/bg_BG/PaymentTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/bg_BG/PaymentTest.php index 31c6325c..b5645f9b 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/bg_BG/PaymentTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/bg_BG/PaymentTest.php @@ -4,8 +4,9 @@ namespace Faker\Test\Provider\bg_BG; use Faker\Generator; use Faker\Provider\bg_BG\Payment; +use PHPUnit\Framework\TestCase; -class PaymentTest extends \PHPUnit_Framework_TestCase +class PaymentTest extends TestCase { /** diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/bn_BD/PersonTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/bn_BD/PersonTest.php index 606599ff..e82fe8b7 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/bn_BD/PersonTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/bn_BD/PersonTest.php @@ -4,8 +4,9 @@ namespace Faker\Test\Provider\bn_BD; use Faker\Generator; use Faker\Provider\bn_BD\Person; +use PHPUnit\Framework\TestCase; -class PersonTest extends \PHPUnit_Framework_TestCase +class PersonTest extends TestCase { public function setUp() { diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/cs_CZ/PersonTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/cs_CZ/PersonTest.php index 40023cfe..0b198725 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/cs_CZ/PersonTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/cs_CZ/PersonTest.php @@ -5,8 +5,9 @@ namespace Faker\Test\Provider\cs_CZ; use Faker\Generator; use Faker\Provider\cs_CZ\Person; use Faker\Provider\Miscellaneous; +use PHPUnit\Framework\TestCase; -class PersonTest extends \PHPUnit_Framework_TestCase +class PersonTest extends TestCase { public function testBirthNumber() { @@ -14,7 +15,7 @@ class PersonTest extends \PHPUnit_Framework_TestCase $faker->addProvider(new Person($faker)); $faker->addProvider(new Miscellaneous($faker)); - for ($i = 0; $i < 1000; $i++) { + for ($i = 0; $i < 1000; $i++) { $birthNumber = $faker->birthNumber(); $birthNumber = str_replace('/', '', $birthNumber); diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/da_DK/InternetTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/da_DK/InternetTest.php index ddbdd7af..43c09be4 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/da_DK/InternetTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/da_DK/InternetTest.php @@ -6,8 +6,9 @@ use Faker\Generator; use Faker\Provider\da_DK\Person; use Faker\Provider\da_DK\Internet; use Faker\Provider\da_DK\Company; +use PHPUnit\Framework\TestCase; -class InternetTest extends \PHPUnit_Framework_TestCase +class InternetTest extends TestCase { /** diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/de_AT/InternetTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/de_AT/InternetTest.php index 91ce5ca5..1d778eea 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/de_AT/InternetTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/de_AT/InternetTest.php @@ -6,8 +6,9 @@ use Faker\Generator; use Faker\Provider\de_AT\Person; use Faker\Provider\de_AT\Internet; use Faker\Provider\de_AT\Company; +use PHPUnit\Framework\TestCase; -class InternetTest extends \PHPUnit_Framework_TestCase +class InternetTest extends TestCase { /** diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/de_AT/PhoneNumberTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/de_AT/PhoneNumberTest.php index 2d61ad5e..7cc6e6b1 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/de_AT/PhoneNumberTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/de_AT/PhoneNumberTest.php @@ -4,8 +4,9 @@ namespace Faker\Test\Provider\de_AT; use Faker\Generator; use Faker\Provider\de_AT\PhoneNumber; +use PHPUnit\Framework\TestCase; -class PhoneNumberTest extends \PHPUnit_Framework_TestCase +class PhoneNumberTest extends TestCase { /** diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/de_CH/AddressTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/de_CH/AddressTest.php index 2f2de276..668f2117 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/de_CH/AddressTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/de_CH/AddressTest.php @@ -5,8 +5,9 @@ namespace Faker\Test\Provider\de_CH; use Faker\Generator; use Faker\Provider\de_CH\Address; use Faker\Provider\de_CH\Person; +use PHPUnit\Framework\TestCase; -class AddressTest extends \PHPUnit_Framework_TestCase +class AddressTest extends TestCase { /** diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/de_CH/InternetTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/de_CH/InternetTest.php index 907af210..31dcc552 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/de_CH/InternetTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/de_CH/InternetTest.php @@ -6,8 +6,9 @@ use Faker\Generator; use Faker\Provider\de_CH\Person; use Faker\Provider\de_CH\Internet; use Faker\Provider\de_CH\Company; +use PHPUnit\Framework\TestCase; -class InternetTest extends \PHPUnit_Framework_TestCase +class InternetTest extends TestCase { /** diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/de_CH/PhoneNumberTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/de_CH/PhoneNumberTest.php index 0c5f9379..5102297c 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/de_CH/PhoneNumberTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/de_CH/PhoneNumberTest.php @@ -4,8 +4,9 @@ namespace Faker\Test\Provider\de_CH; use Faker\Generator; use Faker\Provider\de_CH\PhoneNumber; +use PHPUnit\Framework\TestCase; -class PhoneNumberTest extends \PHPUnit_Framework_TestCase +class PhoneNumberTest extends TestCase { /** diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/de_DE/InternetTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/de_DE/InternetTest.php index 8d39ff08..a15f3664 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/de_DE/InternetTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/de_DE/InternetTest.php @@ -6,8 +6,9 @@ use Faker\Generator; use Faker\Provider\de_DE\Person; use Faker\Provider\de_DE\Internet; use Faker\Provider\de_DE\Company; +use PHPUnit\Framework\TestCase; -class InternetTest extends \PHPUnit_Framework_TestCase +class InternetTest extends TestCase { /** diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/en_AU/AddressTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/en_AU/AddressTest.php index ef8e9f2e..b2f72e8b 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/en_AU/AddressTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/en_AU/AddressTest.php @@ -4,8 +4,9 @@ namespace Faker\Provider\en_AU; use Faker\Generator; use Faker\Provider\en_AU\Address; +use PHPUnit\Framework\TestCase; -class AddressTest extends \PHPUnit_Framework_TestCase +class AddressTest extends TestCase { /** diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/en_CA/AddressTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/en_CA/AddressTest.php index fb17c09f..6b1ece72 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/en_CA/AddressTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/en_CA/AddressTest.php @@ -4,8 +4,9 @@ namespace Faker\Provider\en_CA; use Faker\Generator; use Faker\Provider\en_CA\Address; +use PHPUnit\Framework\TestCase; -class AddressTest extends \PHPUnit_Framework_TestCase +class AddressTest extends TestCase { /** diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/en_GB/AddressTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/en_GB/AddressTest.php index 0bad562e..762e11a8 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/en_GB/AddressTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/en_GB/AddressTest.php @@ -3,8 +3,9 @@ namespace Faker\Provider\en_GB; use Faker\Generator; +use PHPUnit\Framework\TestCase; -class AddressTest extends \PHPUnit_Framework_TestCase +class AddressTest extends TestCase { /** diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/en_IN/AddressTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/en_IN/AddressTest.php index a5e965b2..125cbdf0 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/en_IN/AddressTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/en_IN/AddressTest.php @@ -4,8 +4,9 @@ namespace Faker\Provider\en_IN; use Faker\Generator; use Faker\Provider\en_IN\Address; +use PHPUnit\Framework\TestCase; -class AddressTest extends \PHPUnit_Framework_TestCase +class AddressTest extends TestCase { /** diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/en_NG/AddressTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/en_NG/AddressTest.php index 912de541..27c591b7 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/en_NG/AddressTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/en_NG/AddressTest.php @@ -4,8 +4,9 @@ namespace Faker\Provider\ng_NG; use Faker\Generator; use Faker\Provider\en_NG\Address; +use PHPUnit\Framework\TestCase; -class AddressTest extends \PHPUnit_Framework_TestCase +class AddressTest extends TestCase { /** @@ -53,4 +54,4 @@ class AddressTest extends \PHPUnit_Framework_TestCase $this->assertInternalType('string', $region); } -} \ No newline at end of file +} diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/en_NG/InternetTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/en_NG/InternetTest.php index fd1a0e76..6ebc620f 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/en_NG/InternetTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/en_NG/InternetTest.php @@ -5,8 +5,9 @@ namespace Faker\Test\Provider\ng_NG; use Faker\Generator; use Faker\Provider\en_NG\Person; use Faker\Provider\en_NG\Internet; +use PHPUnit\Framework\TestCase; -class InternetTest extends \PHPUnit_Framework_TestCase +class InternetTest extends TestCase { /** diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/en_NG/PersonTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/en_NG/PersonTest.php index 50760a43..2180e36e 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/en_NG/PersonTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/en_NG/PersonTest.php @@ -4,8 +4,9 @@ namespace Faker\Test\Provider\ng_NG; use Faker\Generator; use Faker\Provider\en_NG\Person; +use PHPUnit\Framework\TestCase; -class PersonTest extends \PHPUnit_Framework_TestCase +class PersonTest extends TestCase { /** * @var Generator diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/en_NG/PhoneNumberTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/en_NG/PhoneNumberTest.php index a8997e6c..c591b8ab 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/en_NG/PhoneNumberTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/en_NG/PhoneNumberTest.php @@ -4,8 +4,9 @@ namespace Faker\Test\Provider\ng_NG; use Faker\Generator; use Faker\Provider\en_NG\PhoneNumber; +use PHPUnit\Framework\TestCase; -class PhoneNumberTest extends \PHPUnit_Framework_TestCase +class PhoneNumberTest extends TestCase { public function setUp() { diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/en_NZ/PhoneNumberTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/en_NZ/PhoneNumberTest.php index f8a8f6cf..14b145c7 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/en_NZ/PhoneNumberTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/en_NZ/PhoneNumberTest.php @@ -4,8 +4,9 @@ namespace Faker\Test\Provider\en_NZ; use Faker\Generator; use Faker\Provider\en_NZ\PhoneNumber; +use PHPUnit\Framework\TestCase; -class PhoneNumberTest extends \PHPUnit_Framework_TestCase +class PhoneNumberTest extends TestCase { /** diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/en_PH/AddressTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/en_PH/AddressTest.php index d3b4682b..19367a49 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/en_PH/AddressTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/en_PH/AddressTest.php @@ -4,8 +4,9 @@ namespace Faker\Test\Provider\en_PH; use Faker\Generator; use Faker\Provider\en_PH\Address; +use PHPUnit\Framework\TestCase; -class AddressTest extends \PHPUnit_Framework_TestCase +class AddressTest extends TestCase { /** diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/en_SG/AddressTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/en_SG/AddressTest.php index a62e1c6d..abc62aac 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/en_SG/AddressTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/en_SG/AddressTest.php @@ -4,8 +4,9 @@ namespace Faker\Test\Provider\en_SG; use Faker\Factory; use Faker\Provider\en_SG\Address; +use PHPUnit\Framework\TestCase; -class AddressTest extends \PHPUnit_Framework_TestCase +class AddressTest extends TestCase { public function setUp() { diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/en_SG/PhoneNumberTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/en_SG/PhoneNumberTest.php index 9b72d14a..c8bb13f8 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/en_SG/PhoneNumberTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/en_SG/PhoneNumberTest.php @@ -4,8 +4,9 @@ namespace Faker\Test\Provider\en_SG; use Faker\Factory; use Faker\Provider\en_SG\PhoneNumber; +use PHPUnit\Framework\TestCase; -class PhoneNumberTest extends \PHPUnit_Framework_TestCase +class PhoneNumberTest extends TestCase { private $faker; diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/en_UG/AddressTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/en_UG/AddressTest.php index 484b125b..571d93fb 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/en_UG/AddressTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/en_UG/AddressTest.php @@ -4,8 +4,9 @@ namespace Faker\Test\Provider\en_UG; use Faker\Generator; use Faker\Provider\en_UG\Address; +use PHPUnit\Framework\TestCase; -class AddressTest extends \PHPUnit_Framework_TestCase +class AddressTest extends TestCase { /** diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/en_US/PaymentTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/en_US/PaymentTest.php index d17593fe..ec82691b 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/en_US/PaymentTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/en_US/PaymentTest.php @@ -4,8 +4,9 @@ namespace Faker\Provider\en_US; use Faker\Generator; +use PHPUnit\Framework\TestCase; -class PaymentTest extends \PHPUnit_Framework_TestCase +class PaymentTest extends TestCase { /** * @var Generator diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/en_US/PersonTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/en_US/PersonTest.php index 544a7b38..3ddb38b2 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/en_US/PersonTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/en_US/PersonTest.php @@ -4,8 +4,9 @@ namespace Faker\Test\Provider\en_US; use Faker\Provider\en_US\Person; use Faker\Generator; +use PHPUnit\Framework\TestCase; -class PersonTest extends \PHPUnit_Framework_TestCase +class PersonTest extends TestCase { /** diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/en_US/PhoneNumberTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/en_US/PhoneNumberTest.php index ae2951a5..a54ff882 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/en_US/PhoneNumberTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/en_US/PhoneNumberTest.php @@ -4,8 +4,9 @@ namespace Faker\Test\Provider\en_US; use Faker\Generator; use Faker\Provider\en_US\PhoneNumber; +use PHPUnit\Framework\TestCase; -class PhoneNumberTest extends \PHPUnit_Framework_TestCase +class PhoneNumberTest extends TestCase { /** diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/en_ZA/CompanyTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/en_ZA/CompanyTest.php index 678a3886..0e51d492 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/en_ZA/CompanyTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/en_ZA/CompanyTest.php @@ -4,8 +4,9 @@ namespace Faker\Test\Provider\en_ZA; use Faker\Generator; use Faker\Provider\en_ZA\Company; +use PHPUnit\Framework\TestCase; -class CompanyTest extends \PHPUnit_Framework_TestCase +class CompanyTest extends TestCase { private $faker; @@ -23,4 +24,4 @@ class CompanyTest extends \PHPUnit_Framework_TestCase $this->assertEquals(14, strlen($companyRegNo)); $this->assertRegExp('#^\d{4}/\d{6}/\d{2}$#', $companyRegNo); } -} \ No newline at end of file +} diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/en_ZA/InternetTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/en_ZA/InternetTest.php index 7edd63f9..02c29404 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/en_ZA/InternetTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/en_ZA/InternetTest.php @@ -6,8 +6,9 @@ use Faker\Generator; use Faker\Provider\en_ZA\Person; use Faker\Provider\en_ZA\Internet; use Faker\Provider\en_ZA\Company; +use PHPUnit\Framework\TestCase; -class InternetTest extends \PHPUnit_Framework_TestCase +class InternetTest extends TestCase { /** diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/en_ZA/PersonTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/en_ZA/PersonTest.php index 557ec8fc..d7973e72 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/en_ZA/PersonTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/en_ZA/PersonTest.php @@ -5,8 +5,9 @@ namespace Faker\Test\Provider\en_ZA; use Faker\Generator; use Faker\Provider\en_ZA\Person; use Faker\Provider\DateTime; +use PHPUnit\Framework\TestCase; -class PersonTest extends \PHPUnit_Framework_TestCase +class PersonTest extends TestCase { private $faker; @@ -44,4 +45,25 @@ class PersonTest extends \PHPUnit_Framework_TestCase $this->assertContains($genderDigit, array('0', '1', '2', '3', '4')); } + + public function testLicenceCode() + { + $validLicenceCodes = array('A', 'A1', 'B', 'C', 'C1', 'C2', 'EB', 'EC', 'EC1', 'I', 'L', 'L1'); + + $this->assertContains($this->faker->licenceCode, $validLicenceCodes); + } + + public function testMaleTitles() + { + $validMaleTitles = array('Mr.', 'Dr.', 'Prof.', 'Rev.', 'Hon.'); + + $this->assertContains(Person::titleMale(), $validMaleTitles); + } + + public function testFemaleTitles() + { + $validateFemaleTitles = array('Mrs.', 'Ms.', 'Miss', 'Dr.', 'Prof.', 'Rev.', 'Hon.'); + + $this->assertContains(Person::titleFemale(), $validateFemaleTitles); + } } diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/en_ZA/PhoneNumberTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/en_ZA/PhoneNumberTest.php index bfb516a4..37b781b5 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/en_ZA/PhoneNumberTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/en_ZA/PhoneNumberTest.php @@ -4,8 +4,9 @@ namespace Faker\Test\Provider\en_ZA; use Faker\Generator; use Faker\Provider\en_ZA\PhoneNumber; +use PHPUnit\Framework\TestCase; -class PhoneNumberTest extends \PHPUnit_Framework_TestCase +class PhoneNumberTest extends TestCase { private $faker; @@ -62,4 +63,4 @@ class PhoneNumberTest extends \PHPUnit_Framework_TestCase $this->assertRegExp('/^(\+27|27)?(\()?0?([6][0-4]|[7][1-9]|[8][1-9])(\))?( |-|\.|_)?(\d{3})( |-|\.|_)?(\d{4})/', $number); } } -} \ No newline at end of file +} diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/es_ES/PaymentTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/es_ES/PaymentTest.php index 344ce236..e636544b 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/es_ES/PaymentTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/es_ES/PaymentTest.php @@ -4,8 +4,9 @@ namespace Faker\Test\Provider\es_ES; use Faker\Generator; use Faker\Provider\es_ES\Payment; +use PHPUnit\Framework\TestCase; -class PaymentTest extends \PHPUnit_Framework_TestCase +class PaymentTest extends TestCase { /** * @var Generator diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/es_ES/PersonTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/es_ES/PersonTest.php index 55360bac..e29f3f90 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/es_ES/PersonTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/es_ES/PersonTest.php @@ -4,8 +4,9 @@ namespace Faker\Test\Provider\es_ES; use Faker\Generator; use Faker\Provider\es_ES\Person; +use PHPUnit\Framework\TestCase; -class PersonTest extends \PHPUnit_Framework_TestCase +class PersonTest extends TestCase { public function setUp() { @@ -35,4 +36,11 @@ class PersonTest extends \PHPUnit_Framework_TestCase return strtoupper($letter) === $map[((int) $number) % 23]; } + + public function testLicenceCode() + { + $validLicenceCodes = array('AM', 'A1', 'A2', 'A','B', 'B+E', 'C1', 'C1+E', 'C', 'C+E', 'D1', 'D1+E', 'D', 'D+E'); + + $this->assertContains($this->faker->licenceCode, $validLicenceCodes); + } } diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/es_ES/TextTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/es_ES/TextTest.php index 75bfee5f..a8ae3486 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/es_ES/TextTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/es_ES/TextTest.php @@ -4,8 +4,9 @@ namespace Faker\Test\Provider\es_ES; use Faker\Generator; use Faker\Provider\es_ES\Text; +use PHPUnit\Framework\TestCase; -class TextTest extends \PHPUnit_Framework_TestCase +class TextTest extends TestCase { /** * @var Generator diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/es_PE/PersonTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/es_PE/PersonTest.php index 666ed2bf..60149387 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/es_PE/PersonTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/es_PE/PersonTest.php @@ -4,8 +4,9 @@ namespace Faker\Test\Provider\es_PE; use Faker\Generator; use Faker\Provider\es_PE\Person; +use PHPUnit\Framework\TestCase; -class PersonTest extends \PHPUnit_Framework_TestCase +class PersonTest extends TestCase { /** * @var Generator diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/fi_FI/InternetTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/fi_FI/InternetTest.php index 3f0e5067..6009bbd1 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/fi_FI/InternetTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/fi_FI/InternetTest.php @@ -6,8 +6,9 @@ use Faker\Generator; use Faker\Provider\fi_FI\Person; use Faker\Provider\fi_FI\Internet; use Faker\Provider\fi_FI\Company; +use PHPUnit\Framework\TestCase; -class InternetTest extends \PHPUnit_Framework_TestCase +class InternetTest extends TestCase { /** diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/fi_FI/PersonTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/fi_FI/PersonTest.php index 6c77097e..b979666e 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/fi_FI/PersonTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/fi_FI/PersonTest.php @@ -5,8 +5,9 @@ namespace Faker\Test\Provider\fi_FI; use Faker\Generator; use Faker\Provider\DateTime; use Faker\Provider\fi_FI\Person; +use PHPUnit\Framework\TestCase; -class PersonTest extends \PHPUnit_Framework_TestCase +class PersonTest extends TestCase { /** @var Generator */ protected $faker; @@ -43,18 +44,25 @@ class PersonTest extends \PHPUnit_Framework_TestCase public function testPersonalIdentityNumberGeneratesCompliantNumbers() { - for ($i = 0; $i < 10; $i++) { - $birthdate = $this->faker->dateTimeBetween('1800-01-01 00:00:00', '1899-12-31 23:59:59'); - $pin = $this->faker->personalIdentityNumber($birthdate); - $this->assertRegExp('/^[0-9]{6}\+[0-9]{3}[0-9ABCDEFHJKLMNPRSTUVWXY]$/', $pin); + if (strtotime('1800-01-01 00:00:00')) { + $min="1900"; + $max="2099"; + for ($i = 0; $i < 10; $i++) { + $birthdate = $this->faker->dateTimeBetween('1800-01-01 00:00:00', '1899-12-31 23:59:59'); + $pin = $this->faker->personalIdentityNumber($birthdate, NULL, true); + $this->assertRegExp('/^[0-9]{6}\+[0-9]{3}[0-9ABCDEFHJKLMNPRSTUVWXY]$/', $pin); + } + } else { // timestamp limit for 32-bit computer + $min="1902"; + $max="2037"; } for ($i = 0; $i < 10; $i++) { - $birthdate = $this->faker->dateTimeBetween('1900-01-01 00:00:00', '1999-12-31 23:59:59'); + $birthdate = $this->faker->dateTimeBetween("$min-01-01 00:00:00", '1999-12-31 23:59:59'); $pin = $this->faker->personalIdentityNumber($birthdate); $this->assertRegExp('/^[0-9]{6}-[0-9]{3}[0-9ABCDEFHJKLMNPRSTUVWXY]$/', $pin); } for ($i = 0; $i < 10; $i++) { - $birthdate = $this->faker->dateTimeBetween('2000-01-01 00:00:00', '2099-12-31 23:59:59'); + $birthdate = $this->faker->dateTimeBetween('2000-01-01 00:00:00', "$max-12-31 23:59:59"); $pin = $this->faker->personalIdentityNumber($birthdate); $this->assertRegExp('/^[0-9]{6}A[0-9]{3}[0-9ABCDEFHJKLMNPRSTUVWXY]$/', $pin); } diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/fr_BE/PaymentTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/fr_BE/PaymentTest.php index 46c1cd77..6944c55f 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/fr_BE/PaymentTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/fr_BE/PaymentTest.php @@ -4,8 +4,9 @@ namespace Faker\Test\Provider\fr_BE; use Faker\Generator; use Faker\Provider\fr_BE\Payment; +use PHPUnit\Framework\TestCase; -class PaymentTest extends \PHPUnit_Framework_TestCase +class PaymentTest extends TestCase { /** * @var Generator diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/fr_CH/AddressTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/fr_CH/AddressTest.php index f589c1f8..217ac9f6 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/fr_CH/AddressTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/fr_CH/AddressTest.php @@ -5,8 +5,9 @@ namespace Faker\Test\Provider\fr_CH; use Faker\Generator; use Faker\Provider\fr_CH\Address; use Faker\Provider\fr_CH\Person; +use PHPUnit\Framework\TestCase; -class AddressTest extends \PHPUnit_Framework_TestCase +class AddressTest extends TestCase { /** diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/fr_CH/InternetTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/fr_CH/InternetTest.php index 2f20871a..f4e94848 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/fr_CH/InternetTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/fr_CH/InternetTest.php @@ -6,8 +6,9 @@ use Faker\Generator; use Faker\Provider\fr_CH\Person; use Faker\Provider\fr_CH\Internet; use Faker\Provider\fr_CH\Company; +use PHPUnit\Framework\TestCase; -class InternetTest extends \PHPUnit_Framework_TestCase +class InternetTest extends TestCase { /** diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/fr_CH/PhoneNumberTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/fr_CH/PhoneNumberTest.php index 1f3fc20f..7bfcca76 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/fr_CH/PhoneNumberTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/fr_CH/PhoneNumberTest.php @@ -4,8 +4,9 @@ namespace Faker\Test\Provider\fr_CH; use Faker\Generator; use Faker\Provider\fr_CH\PhoneNumber; +use PHPUnit\Framework\TestCase; -class PhoneNumberTest extends \PHPUnit_Framework_TestCase +class PhoneNumberTest extends TestCase { /** diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/fr_FR/CompanyTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/fr_FR/CompanyTest.php index 5486cf9d..83e54d92 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/fr_FR/CompanyTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/fr_FR/CompanyTest.php @@ -5,8 +5,9 @@ namespace Faker\Test\Provider\fr_FR; use Faker\Calculator\Luhn; use Faker\Generator; use Faker\Provider\fr_FR\Company; +use PHPUnit\Framework\TestCase; -class CompanyTest extends \PHPUnit_Framework_TestCase +class CompanyTest extends TestCase { private $faker; diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/fr_FR/PersonTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/fr_FR/PersonTest.php index b5bc8056..8c5fc654 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/fr_FR/PersonTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/fr_FR/PersonTest.php @@ -4,8 +4,9 @@ namespace Faker\Test\Provider\fr_FR; use Faker\Generator; use Faker\Provider\fr_FR\Person; +use PHPUnit\Framework\TestCase; -class PersonTest extends \PHPUnit_Framework_TestCase +class PersonTest extends TestCase { private $faker; @@ -21,13 +22,13 @@ class PersonTest extends \PHPUnit_Framework_TestCase $nir = $this->faker->nir(\Faker\Provider\Person::GENDER_MALE); $this->assertStringStartsWith('1', $nir); } - + public function testNIRReturnsTheRightPattern() { $nir = $this->faker->nir; $this->assertRegExp("/^[12]\d{5}[0-9A-B]\d{8}$/", $nir); } - + public function testNIRFormattedReturnsTheRightPattern() { $nir = $this->faker->nir(null, true); diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/id_ID/PersonTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/id_ID/PersonTest.php index abd039f0..5ebfeee4 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/id_ID/PersonTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/id_ID/PersonTest.php @@ -4,8 +4,9 @@ namespace Faker\Test\Provider\id_ID; use Faker\Generator; use Faker\Provider\id_ID\Person; +use PHPUnit\Framework\TestCase; -class PersonTest extends \PHPUnit_Framework_TestCase +class PersonTest extends TestCase { public function setUp() { diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/it_CH/AddressTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/it_CH/AddressTest.php index 76122532..0f0df5e9 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/it_CH/AddressTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/it_CH/AddressTest.php @@ -5,8 +5,9 @@ namespace Faker\Test\Provider\it_CH; use Faker\Generator; use Faker\Provider\it_CH\Address; use Faker\Provider\it_CH\Person; +use PHPUnit\Framework\TestCase; -class AddressTest extends \PHPUnit_Framework_TestCase +class AddressTest extends TestCase { /** diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/it_CH/InternetTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/it_CH/InternetTest.php index 16616c70..d46f6b7d 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/it_CH/InternetTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/it_CH/InternetTest.php @@ -6,8 +6,9 @@ use Faker\Generator; use Faker\Provider\it_CH\Person; use Faker\Provider\it_CH\Internet; use Faker\Provider\it_CH\Company; +use PHPUnit\Framework\TestCase; -class InternetTest extends \PHPUnit_Framework_TestCase +class InternetTest extends TestCase { /** diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/it_CH/PhoneNumberTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/it_CH/PhoneNumberTest.php index d3f17b8a..5cda5345 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/it_CH/PhoneNumberTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/it_CH/PhoneNumberTest.php @@ -4,8 +4,9 @@ namespace Faker\Test\Provider\it_CH; use Faker\Generator; use Faker\Provider\it_CH\PhoneNumber; +use PHPUnit\Framework\TestCase; -class PhoneNumberTest extends \PHPUnit_Framework_TestCase +class PhoneNumberTest extends TestCase { /** diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/it_IT/CompanyTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/it_IT/CompanyTest.php index 7bef3fae..33977e13 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/it_IT/CompanyTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/it_IT/CompanyTest.php @@ -4,8 +4,9 @@ namespace Faker\Test\Provider\it_IT; use Faker\Generator; use Faker\Provider\it_IT\Company; +use PHPUnit\Framework\TestCase; -class CompanyTest extends \PHPUnit_Framework_TestCase +class CompanyTest extends TestCase { public function setUp() { @@ -19,5 +20,5 @@ class CompanyTest extends \PHPUnit_Framework_TestCase $vatId = $this->faker->vatId(); $this->assertRegExp('/^IT[0-9]{11}$/', $vatId); } - + } diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/it_IT/PersonTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/it_IT/PersonTest.php index 5d0dc231..3e7b1a4f 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/it_IT/PersonTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/it_IT/PersonTest.php @@ -4,8 +4,9 @@ namespace Faker\Test\Provider\it_IT; use Faker\Generator; use Faker\Provider\it_IT\Person; +use PHPUnit\Framework\TestCase; -class PersonTest extends \PHPUnit_Framework_TestCase +class PersonTest extends TestCase { public function setUp() { @@ -19,5 +20,5 @@ class PersonTest extends \PHPUnit_Framework_TestCase $taxId = $this->faker->taxId(); $this->assertRegExp('/^[a-zA-Z]{6}[0-9]{2}[a-zA-Z][0-9]{2}[a-zA-Z][0-9]{3}[a-zA-Z]$/', $taxId); } - + } diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/ja_JP/InternetTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/ja_JP/InternetTest.php index 355567a5..b4a19fde 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/ja_JP/InternetTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/ja_JP/InternetTest.php @@ -4,8 +4,9 @@ namespace Faker\Test\Provider\ja_JP; use Faker\Generator; use Faker\Provider\ja_JP\Internet; +use PHPUnit\Framework\TestCase; -class InternetTest extends \PHPUnit_Framework_TestCase +class InternetTest extends TestCase { public function testUserName() { diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/ja_JP/PersonTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/ja_JP/PersonTest.php index d64ac043..e7854826 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/ja_JP/PersonTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/ja_JP/PersonTest.php @@ -4,8 +4,9 @@ namespace Faker\Test\Provider\ja_JP; use Faker\Generator; use Faker\Provider\ja_JP\Person; +use PHPUnit\Framework\TestCase; -class PersonTest extends \PHPUnit_Framework_TestCase +class PersonTest extends TestCase { public function testKanaNameMaleReturns() { diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/ja_JP/PhoneNumberTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/ja_JP/PhoneNumberTest.php index d90d9743..158718a7 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/ja_JP/PhoneNumberTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/ja_JP/PhoneNumberTest.php @@ -4,8 +4,9 @@ namespace Faker\Test\Provider\ja_JP; use Faker\Generator; use Faker\Provider\ja_JP\PhoneNumber; +use PHPUnit\Framework\TestCase; -class PhoneNumberTest extends \PHPUnit_Framework_TestCase +class PhoneNumberTest extends TestCase { public function testPhoneNumber() { diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/kk_KZ/CompanyTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/kk_KZ/CompanyTest.php index 779e73a6..b6a3c061 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/kk_KZ/CompanyTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/kk_KZ/CompanyTest.php @@ -3,8 +3,9 @@ namespace Faker\Test\Provider\kk_KZ; use Faker\Generator; use Faker\Provider\kk_KZ\Company; +use PHPUnit\Framework\TestCase; -class CompanyTest extends \PHPUnit_Framework_TestCase +class CompanyTest extends TestCase { /** diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/kk_KZ/PersonTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/kk_KZ/PersonTest.php index 0f2f981c..c5657352 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/kk_KZ/PersonTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/kk_KZ/PersonTest.php @@ -4,8 +4,9 @@ namespace Faker\Test\Provider\kk_KZ; use Faker\Generator; use Faker\Provider\DateTime; use Faker\Provider\kk_KZ\Person; +use PHPUnit\Framework\TestCase; -class PersonTest extends \PHPUnit_Framework_TestCase +class PersonTest extends TestCase { /** @@ -24,6 +25,6 @@ class PersonTest extends \PHPUnit_Framework_TestCase $individualIdentificationNumber = $this->faker->individualIdentificationNumber($birthDate); $controlDigit = Person::checkSum($individualIdentificationNumber); - $this->assertTrue($controlDigit === (int)substr($individualIdentificationNumber, 11, 1)); + $this->assertSame($controlDigit, (int)substr($individualIdentificationNumber, 11, 1)); } } diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/mn_MN/PersonTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/mn_MN/PersonTest.php index f3c9572e..232f8f4b 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/mn_MN/PersonTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/mn_MN/PersonTest.php @@ -4,8 +4,9 @@ namespace Faker\Test\Provider\mn_MN; use Faker\Generator; use Faker\Provider\mn_MN\Person; +use PHPUnit\Framework\TestCase; -class PersonTest extends \PHPUnit_Framework_TestCase +class PersonTest extends TestCase { public function testName() { diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/nl_BE/PaymentTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/nl_BE/PaymentTest.php index 9216de75..e8441033 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/nl_BE/PaymentTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/nl_BE/PaymentTest.php @@ -4,8 +4,9 @@ namespace Faker\Test\Provider\nl_BE; use Faker\Generator; use Faker\Provider\nl_BE\Payment; +use PHPUnit\Framework\TestCase; -class PaymentTest extends \PHPUnit_Framework_TestCase +class PaymentTest extends TestCase { /** * @var Generator diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/nl_NL/CompanyTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/nl_NL/CompanyTest.php index 4775b14e..6d5484ce 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/nl_NL/CompanyTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/nl_NL/CompanyTest.php @@ -4,8 +4,9 @@ namespace Faker\Test\Provider\nl_NL; use Faker\Generator; use Faker\Provider\nl_NL\Company; +use PHPUnit\Framework\TestCase; -class CompanyTest extends \PHPUnit_Framework_TestCase +class CompanyTest extends TestCase { private $faker; diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/pl_PL/AddressTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/pl_PL/AddressTest.php index 9bdc0515..bbfdf4d3 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/pl_PL/AddressTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/pl_PL/AddressTest.php @@ -3,8 +3,9 @@ namespace Faker\Provider\pl_PL; use Faker\Generator; +use PHPUnit\Framework\TestCase; -class AddressTest extends \PHPUnit_Framework_TestCase +class AddressTest extends TestCase { /** * @var Generator diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/pt_BR/CompanyTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/pt_BR/CompanyTest.php index f59142bd..b0feecac 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/pt_BR/CompanyTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/pt_BR/CompanyTest.php @@ -4,8 +4,9 @@ namespace Faker\Test\Provider\pt_BR; use Faker\Generator; use Faker\Provider\pt_BR\Company; +use PHPUnit\Framework\TestCase; -class CompanyTest extends \PHPUnit_Framework_TestCase +class CompanyTest extends TestCase { public function setUp() diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/pt_BR/PersonTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/pt_BR/PersonTest.php index 767c1887..0b8318dd 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/pt_BR/PersonTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/pt_BR/PersonTest.php @@ -4,8 +4,9 @@ namespace Faker\Test\Provider\pt_BR; use Faker\Generator; use Faker\Provider\pt_BR\Person; +use PHPUnit\Framework\TestCase; -class PersonTest extends \PHPUnit_Framework_TestCase +class PersonTest extends TestCase { public function setUp() diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/pt_PT/AddressTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/pt_PT/AddressTest.php index 7db5b68f..3783fd52 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/pt_PT/AddressTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/pt_PT/AddressTest.php @@ -5,8 +5,9 @@ namespace Faker\Test\Provider\pt_PT; use Faker\Generator; use Faker\Provider\pt_PT\Address; use Faker\Provider\pt_PT\Person; +use PHPUnit\Framework\TestCase; -class AddressTest extends \PHPUnit_Framework_TestCase +class AddressTest extends TestCase { /** diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/pt_PT/PersonTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/pt_PT/PersonTest.php index 9bfb7a2f..662f12a7 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/pt_PT/PersonTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/pt_PT/PersonTest.php @@ -4,8 +4,9 @@ namespace Faker\Test\Provider\pt_PT; use Faker\Generator; use Faker\Provider\pt_PT\Person; +use PHPUnit\Framework\TestCase; -class PersonTest extends \PHPUnit_Framework_TestCase +class PersonTest extends TestCase { public function setUp() diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/pt_PT/PhoneNumberTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/pt_PT/PhoneNumberTest.php index 04b2f63d..fd5d3194 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/pt_PT/PhoneNumberTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/pt_PT/PhoneNumberTest.php @@ -4,8 +4,9 @@ namespace Faker\Test\Provider\pt_PT; use Faker\Generator; use Faker\Provider\pt_PT\PhoneNumber; +use PHPUnit\Framework\TestCase; -class PhoneNumberTest extends \PHPUnit_Framework_TestCase +class PhoneNumberTest extends TestCase { public function setUp() { diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/ro_RO/PersonTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/ro_RO/PersonTest.php index 2777f770..2c7fadce 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/ro_RO/PersonTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/ro_RO/PersonTest.php @@ -5,8 +5,9 @@ namespace Faker\Test\Provider\ro_RO; use Faker\Generator; use Faker\Provider\DateTime; use Faker\Provider\ro_RO\Person; +use PHPUnit\Framework\TestCase; -class PersonTest extends \PHPUnit_Framework_TestCase +class PersonTest extends TestCase { const TEST_CNP_REGEX = '/^[1-9][0-9]{2}(?:0[1-9]|1[012])(?:0[1-9]|[12][0-9]|3[01])(?:0[1-9]|[123][0-9]|4[0-6]|5[12])[0-9]{3}[0-9]$/'; @@ -15,22 +16,19 @@ class PersonTest extends \PHPUnit_Framework_TestCase * */ protected $faker; - protected $originalTz; public function setUp() { - $this->originalTz = @date_default_timezone_get(); - date_default_timezone_set('Europe/Bucharest'); - $faker = new Generator(); $faker->addProvider(new DateTime($faker)); $faker->addProvider(new Person($faker)); + $faker->setDefaultTimezone('Europe/Bucharest'); $this->faker = $faker; } public function tearDown() { - date_default_timezone_set($this->originalTz); + $this->faker->setDefaultTimezone(); } public function invalidGenderProvider() diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/ro_RO/PhoneNumberTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/ro_RO/PhoneNumberTest.php index 8a406da9..b7965cd8 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/ro_RO/PhoneNumberTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/ro_RO/PhoneNumberTest.php @@ -4,8 +4,9 @@ namespace Faker\Test\Provider\ro_RO; use Faker\Generator; use Faker\Provider\ro_RO\PhoneNumber; +use PHPUnit\Framework\TestCase; -class PhoneNumberTest extends \PHPUnit_Framework_TestCase +class PhoneNumberTest extends TestCase { public function setUp() { diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/ru_RU/CompanyTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/ru_RU/CompanyTest.php index 08dd2477..8fbcf265 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/ru_RU/CompanyTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/ru_RU/CompanyTest.php @@ -4,8 +4,9 @@ namespace Faker\Test\Provider\ru_RU; use Faker\Generator; use Faker\Provider\ru_RU\Company; +use PHPUnit\Framework\TestCase; -class CompanyTest extends \PHPUnit_Framework_TestCase +class CompanyTest extends TestCase { /** * @var Generator diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/sv_SE/PersonTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/sv_SE/PersonTest.php index 623723a6..584998da 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/sv_SE/PersonTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/sv_SE/PersonTest.php @@ -5,8 +5,9 @@ namespace Faker\Test\Provider\sv_SE; use Faker\Calculator\Luhn; use Faker\Generator; use Faker\Provider\sv_SE\Person; +use PHPUnit\Framework\TestCase; -class PersonTest extends \PHPUnit_Framework_TestCase +class PersonTest extends TestCase { /** @var Generator */ protected $faker; diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/uk_UA/AddressTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/uk_UA/AddressTest.php index a3e38d73..4c4a0612 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/uk_UA/AddressTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/uk_UA/AddressTest.php @@ -4,8 +4,9 @@ namespace Faker\Test\Provider\uk_UA; use Faker\Generator; use Faker\Provider\uk_UA\Address; +use PHPUnit\Framework\TestCase; -class AddressTest extends \PHPUnit_Framework_TestCase +class AddressTest extends TestCase { /** diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/uk_UA/PersonTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/uk_UA/PersonTest.php index 5d73d725..a8d70f69 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/uk_UA/PersonTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/uk_UA/PersonTest.php @@ -4,8 +4,9 @@ namespace Faker\Test\Provider\uk_UA; use Faker\Generator; use Faker\Provider\uk_UA\Person; +use PHPUnit\Framework\TestCase; -class PersonTest extends \PHPUnit_Framework_TestCase +class PersonTest extends TestCase { public function testFirstNameMaleReturns() { diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/uk_UA/PhoneNumberTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/uk_UA/PhoneNumberTest.php index 13620c72..f7f9f14b 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/uk_UA/PhoneNumberTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/uk_UA/PhoneNumberTest.php @@ -4,8 +4,9 @@ namespace Faker\Test\Provider\uk_UA; use Faker\Generator; use Faker\Provider\uk_UA\PhoneNumber; +use PHPUnit\Framework\TestCase; -class PhoneNumberTest extends \PHPUnit_Framework_TestCase +class PhoneNumberTest extends TestCase { /** diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/zh_TW/CompanyTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/zh_TW/CompanyTest.php index 329c3a8a..f2134b9b 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/zh_TW/CompanyTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/zh_TW/CompanyTest.php @@ -4,8 +4,9 @@ namespace Faker\Test\Provider\zh_TW; use Faker\Generator; use Faker\Provider\zh_TW\Company; +use PHPUnit\Framework\TestCase; -class CompanyTest extends \PHPUnit_Framework_TestCase +class CompanyTest extends TestCase { /** * @var Generator diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/zh_TW/PersonTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/zh_TW/PersonTest.php index 1ba05a53..167d0fa0 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/zh_TW/PersonTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/zh_TW/PersonTest.php @@ -4,8 +4,9 @@ namespace Faker\Test\Provider\zh_TW; use Faker\Generator; use Faker\Provider\zh_TW\Person; +use PHPUnit\Framework\TestCase; -class PersonTest extends \PHPUnit_Framework_TestCase +class PersonTest extends TestCase { /** * @var Generator diff --git a/vendor/fzaninotto/faker/test/Faker/Provider/zh_TW/TextTest.php b/vendor/fzaninotto/faker/test/Faker/Provider/zh_TW/TextTest.php index 5bcabe44..ab56f83c 100644 --- a/vendor/fzaninotto/faker/test/Faker/Provider/zh_TW/TextTest.php +++ b/vendor/fzaninotto/faker/test/Faker/Provider/zh_TW/TextTest.php @@ -2,7 +2,9 @@ namespace Faker\Test\Provider\zh_TW; -class TextTest extends \PHPUnit_Framework_TestCase +use PHPUnit\Framework\TestCase; + +class TextTest extends TestCase { private $textClass; diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Console/stubs/make/views/auth/login.stub b/vendor/laravel/framework/src/Illuminate/Auth/Console/stubs/make/views/auth/login.stub index 9fd12a7b..474be66e 100644 --- a/vendor/laravel/framework/src/Illuminate/Auth/Console/stubs/make/views/auth/login.stub +++ b/vendor/laravel/framework/src/Illuminate/Auth/Console/stubs/make/views/auth/login.stub @@ -41,9 +41,11 @@
-
-
diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Console/stubs/make/views/layouts/app.stub b/vendor/laravel/framework/src/Illuminate/Auth/Console/stubs/make/views/layouts/app.stub index f6e81e3d..6dba26cd 100644 --- a/vendor/laravel/framework/src/Illuminate/Auth/Console/stubs/make/views/layouts/app.stub +++ b/vendor/laravel/framework/src/Illuminate/Auth/Console/stubs/make/views/layouts/app.stub @@ -15,7 +15,7 @@ - + diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Recaller.php b/vendor/laravel/framework/src/Illuminate/Auth/Recaller.php index 4545a3bc..5809f1e8 100644 --- a/vendor/laravel/framework/src/Illuminate/Auth/Recaller.php +++ b/vendor/laravel/framework/src/Illuminate/Auth/Recaller.php @@ -21,7 +21,7 @@ class Recaller */ public function __construct($recaller) { - $this->recaller = $recaller; + $this->recaller = @unserialize($recaller, ['allowed_classes' => false]) ?: $recaller; } /** diff --git a/vendor/laravel/framework/src/Illuminate/Auth/SessionGuard.php b/vendor/laravel/framework/src/Illuminate/Auth/SessionGuard.php index 25b5b229..343dbf0b 100644 --- a/vendor/laravel/framework/src/Illuminate/Auth/SessionGuard.php +++ b/vendor/laravel/framework/src/Illuminate/Auth/SessionGuard.php @@ -128,10 +128,8 @@ class SessionGuard implements StatefulGuard, SupportsBasicAuth // First we will try to load the user using the identifier in the session if // one exists. Otherwise we will check for a "remember me" cookie in this // request, and if one exists, attempt to retrieve the user using that. - if (! is_null($id)) { - if ($this->user = $this->provider->retrieveById($id)) { - $this->fireAuthenticatedEvent($this->user); - } + if (! is_null($id) && $this->user = $this->provider->retrieveById($id)) { + $this->fireAuthenticatedEvent($this->user); } // If the user is null, but we decrypt a "recaller" cookie we can attempt to @@ -541,7 +539,7 @@ class SessionGuard implements StatefulGuard, SupportsBasicAuth * * @param string $password * @param string $attribute - * @return null|bool + * @return bool|null */ public function logoutOtherDevices($password, $attribute = 'password') { @@ -549,9 +547,13 @@ class SessionGuard implements StatefulGuard, SupportsBasicAuth return; } - return tap($this->user()->forceFill([ + $result = tap($this->user()->forceFill([ $attribute => Hash::make($password), ]))->save(); + + $this->queueRecallerCookie($this->user()); + + return $result; } /** diff --git a/vendor/laravel/framework/src/Illuminate/Cache/Repository.php b/vendor/laravel/framework/src/Illuminate/Cache/Repository.php index de06b9ca..46ab4fba 100755 --- a/vendor/laravel/framework/src/Illuminate/Cache/Repository.php +++ b/vendor/laravel/framework/src/Illuminate/Cache/Repository.php @@ -172,7 +172,7 @@ class Repository implements CacheContract, ArrayAccess */ public function pull($key, $default = null) { - return tap($this->get($key, $default), function ($value) use ($key) { + return tap($this->get($key, $default), function () use ($key) { $this->forget($key); }); } @@ -419,7 +419,7 @@ class Repository implements CacheContract, ArrayAccess throw new BadMethodCallException('This cache store does not support tagging.'); } - $cache = $this->store->tags($names); + $cache = $this->store->tags(is_array($names) ? $names : func_get_args()); if (! is_null($this->events)) { $cache->setEventDispatcher($this->events); diff --git a/vendor/laravel/framework/src/Illuminate/Console/Application.php b/vendor/laravel/framework/src/Illuminate/Console/Application.php index aa3ac182..e836f71c 100755 --- a/vendor/laravel/framework/src/Illuminate/Console/Application.php +++ b/vendor/laravel/framework/src/Illuminate/Console/Application.php @@ -166,6 +166,8 @@ class Application extends SymfonyApplication implements ApplicationContract * @param array $parameters * @param \Symfony\Component\Console\Output\OutputInterface|null $outputBuffer * @return int + * + * @throws \Symfony\Component\Console\Exception\CommandNotFoundException */ public function call($command, array $parameters = [], $outputBuffer = null) { diff --git a/vendor/laravel/framework/src/Illuminate/Console/Command.php b/vendor/laravel/framework/src/Illuminate/Console/Command.php index 203d2a1f..787856a8 100755 --- a/vendor/laravel/framework/src/Illuminate/Console/Command.php +++ b/vendor/laravel/framework/src/Illuminate/Console/Command.php @@ -130,13 +130,8 @@ class Command extends SymfonyCommand // After parsing the signature we will spin through the arguments and options // and set them on this command. These will already be changed into proper // instances of these "InputArgument" and "InputOption" Symfony classes. - foreach ($arguments as $argument) { - $this->getDefinition()->addArgument($argument); - } - - foreach ($options as $option) { - $this->getDefinition()->addOption($option); - } + $this->getDefinition()->addArguments($arguments); + $this->getDefinition()->addOptions($options); } /** @@ -246,7 +241,7 @@ class Command extends SymfonyCommand * Get the value of a command argument. * * @param string|null $key - * @return string|array + * @return string|array|null */ public function argument($key = null) { @@ -282,7 +277,7 @@ class Command extends SymfonyCommand * Get the value of a command option. * * @param string|null $key - * @return string|array + * @return string|array|null */ public function option($key = null) { @@ -320,7 +315,7 @@ class Command extends SymfonyCommand * * @param string $question * @param string|null $default - * @return string + * @return mixed */ public function ask($question, $default = null) { @@ -333,7 +328,7 @@ class Command extends SymfonyCommand * @param string $question * @param array $choices * @param string|null $default - * @return string + * @return mixed */ public function anticipate($question, array $choices, $default = null) { @@ -346,7 +341,7 @@ class Command extends SymfonyCommand * @param string $question * @param array $choices * @param string|null $default - * @return string + * @return mixed */ public function askWithCompletion($question, array $choices, $default = null) { @@ -362,7 +357,7 @@ class Command extends SymfonyCommand * * @param string $question * @param bool $fallback - * @return string + * @return mixed */ public function secret($question, $fallback = true) { @@ -422,7 +417,7 @@ class Command extends SymfonyCommand * Write a string as information output. * * @param string $string - * @param null|int|string $verbosity + * @param int|string|null $verbosity * @return void */ public function info($string, $verbosity = null) @@ -435,7 +430,7 @@ class Command extends SymfonyCommand * * @param string $string * @param string $style - * @param null|int|string $verbosity + * @param int|string|null $verbosity * @return void */ public function line($string, $style = null, $verbosity = null) @@ -449,7 +444,7 @@ class Command extends SymfonyCommand * Write a string as comment output. * * @param string $string - * @param null|int|string $verbosity + * @param int|string|null $verbosity * @return void */ public function comment($string, $verbosity = null) @@ -461,7 +456,7 @@ class Command extends SymfonyCommand * Write a string as question output. * * @param string $string - * @param null|int|string $verbosity + * @param int|string|null $verbosity * @return void */ public function question($string, $verbosity = null) @@ -473,7 +468,7 @@ class Command extends SymfonyCommand * Write a string as error output. * * @param string $string - * @param null|int|string $verbosity + * @param int|string|null $verbosity * @return void */ public function error($string, $verbosity = null) @@ -485,7 +480,7 @@ class Command extends SymfonyCommand * Write a string as warning output. * * @param string $string - * @param null|int|string $verbosity + * @param int|string|null $verbosity * @return void */ public function warn($string, $verbosity = null) diff --git a/vendor/laravel/framework/src/Illuminate/Console/Parser.php b/vendor/laravel/framework/src/Illuminate/Console/Parser.php index 92753119..75cea481 100644 --- a/vendor/laravel/framework/src/Illuminate/Console/Parser.php +++ b/vendor/laravel/framework/src/Illuminate/Console/Parser.php @@ -35,6 +35,8 @@ class Parser * * @param string $expression * @return string + * + * @throws \InvalidArgumentException */ protected static function name($expression) { diff --git a/vendor/laravel/framework/src/Illuminate/Contracts/Validation/Validator.php b/vendor/laravel/framework/src/Illuminate/Contracts/Validation/Validator.php index 3404df2a..3815921c 100644 --- a/vendor/laravel/framework/src/Illuminate/Contracts/Validation/Validator.php +++ b/vendor/laravel/framework/src/Illuminate/Contracts/Validation/Validator.php @@ -23,7 +23,7 @@ interface Validator extends MessageProvider /** * Add conditions to a given field based on a Closure. * - * @param string $attribute + * @param string|array $attribute * @param string|array $rules * @param callable $callback * @return $this diff --git a/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php b/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php index 5c289af0..1036a082 100644 --- a/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php +++ b/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php @@ -25,6 +25,13 @@ class EncryptCookies */ protected $except = []; + /** + * Indicates if cookies should be serialized. + * + * @var bool + */ + protected static $serialize = false; + /** * Create a new CookieGuard instance. * @@ -73,7 +80,7 @@ class EncryptCookies } try { - $request->cookies->set($key, $this->decryptCookie($cookie)); + $request->cookies->set($key, $this->decryptCookie($key, $cookie)); } catch (DecryptException $e) { $request->cookies->set($key, null); } @@ -85,14 +92,15 @@ class EncryptCookies /** * Decrypt the given cookie and return the value. * + * @param string $name * @param string|array $cookie * @return string|array */ - protected function decryptCookie($cookie) + protected function decryptCookie($name, $cookie) { return is_array($cookie) ? $this->decryptArray($cookie) - : $this->encrypter->decrypt($cookie); + : $this->encrypter->decrypt($cookie, static::serialized($name)); } /** @@ -107,7 +115,7 @@ class EncryptCookies foreach ($cookie as $key => $value) { if (is_string($value)) { - $decrypted[$key] = $this->encrypter->decrypt($value); + $decrypted[$key] = $this->encrypter->decrypt($value, static::serialized($key)); } } @@ -128,7 +136,7 @@ class EncryptCookies } $response->headers->setCookie($this->duplicate( - $cookie, $this->encrypter->encrypt($cookie->getValue()) + $cookie, $this->encrypter->encrypt($cookie->getValue(), static::serialized($cookie->getName())) )); } @@ -161,4 +169,15 @@ class EncryptCookies { return in_array($name, $this->except); } + + /** + * Determine if the cookie contents should be serialized. + * + * @param string $name + * @return bool + */ + public static function serialized($name) + { + return static::$serialize; + } } diff --git a/vendor/laravel/framework/src/Illuminate/Database/Concerns/BuildsQueries.php b/vendor/laravel/framework/src/Illuminate/Database/Concerns/BuildsQueries.php index 1051f2c9..c712bbef 100644 --- a/vendor/laravel/framework/src/Illuminate/Database/Concerns/BuildsQueries.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Concerns/BuildsQueries.php @@ -83,7 +83,7 @@ trait BuildsQueries * @param mixed $value * @param callable $callback * @param callable $default - * @return mixed + * @return mixed|$this */ public function when($value, $callback, $default = null) { @@ -113,7 +113,7 @@ trait BuildsQueries * @param mixed $value * @param callable $callback * @param callable $default - * @return mixed + * @return mixed|$this */ public function unless($value, $callback, $default = null) { diff --git a/vendor/laravel/framework/src/Illuminate/Database/Concerns/ManagesTransactions.php b/vendor/laravel/framework/src/Illuminate/Database/Concerns/ManagesTransactions.php index 1b731242..995327d5 100644 --- a/vendor/laravel/framework/src/Illuminate/Database/Concerns/ManagesTransactions.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Concerns/ManagesTransactions.php @@ -26,7 +26,7 @@ trait ManagesTransactions // catch any exception we can rollback this transaction so that none of this // gets actually persisted to a database or stored in a permanent fashion. try { - return tap($callback($this), function ($result) { + return tap($callback($this), function () { $this->commit(); }); } @@ -166,6 +166,8 @@ trait ManagesTransactions * * @param int|null $toLevel * @return void + * + * @throws \Exception */ public function rollBack($toLevel = null) { @@ -183,7 +185,11 @@ trait ManagesTransactions // Next, we will actually perform this rollback within this database and fire the // rollback event. We will also set the current transaction level to the given // level that was passed into this method so it will be right from here out. - $this->performRollBack($toLevel); + try { + $this->performRollBack($toLevel); + } catch (Exception $e) { + $this->handleRollBackException($e); + } $this->transactions = $toLevel; @@ -207,6 +213,22 @@ trait ManagesTransactions } } + /** + * Handle an exception from a rollback. + * + * @param \Exception $e + * + * @throws \Exception + */ + protected function handleRollBackException($e) + { + if ($this->causedByLostConnection($e)) { + $this->transactions = 0; + } + + throw $e; + } + /** * Get the number of active transactions. * diff --git a/vendor/laravel/framework/src/Illuminate/Database/Connection.php b/vendor/laravel/framework/src/Illuminate/Database/Connection.php index 379256ec..ee73f0dd 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Connection.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Connection.php @@ -552,7 +552,7 @@ class Connection implements ConnectionInterface // Now we'll execute this callback and capture the result. Once it has been // executed we will restore the value of query logging and give back the - // value of hte callback so the original callers can have the results. + // value of the callback so the original callers can have the results. $result = $callback(); $this->loggingQueries = $loggingQueries; diff --git a/vendor/laravel/framework/src/Illuminate/Database/Connectors/ConnectionFactory.php b/vendor/laravel/framework/src/Illuminate/Database/Connectors/ConnectionFactory.php index 564a9018..d998a418 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Connectors/ConnectionFactory.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Connectors/ConnectionFactory.php @@ -11,7 +11,6 @@ use Illuminate\Database\SQLiteConnection; use Illuminate\Database\PostgresConnection; use Illuminate\Database\SqlServerConnection; use Illuminate\Contracts\Container\Container; -use Illuminate\Contracts\Debug\ExceptionHandler; class ConnectionFactory { @@ -182,9 +181,7 @@ class ConnectionFactory try { return $this->createConnector($config)->connect($config); } catch (PDOException $e) { - if (count($hosts) - 1 === $key && $this->container->bound(ExceptionHandler::class)) { - $this->container->make(ExceptionHandler::class)->report($e); - } + continue; } } diff --git a/vendor/laravel/framework/src/Illuminate/Database/Connectors/SQLiteConnector.php b/vendor/laravel/framework/src/Illuminate/Database/Connectors/SQLiteConnector.php index 28f90915..ae8e4e76 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Connectors/SQLiteConnector.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Connectors/SQLiteConnector.php @@ -31,7 +31,7 @@ class SQLiteConnector extends Connector implements ConnectorInterface // as the developer probably wants to know if the database exists and this // SQLite driver will not throw any exception if it does not by default. if ($path === false) { - throw new InvalidArgumentException("Database (${config['database']}) does not exist."); + throw new InvalidArgumentException("Database ({$config['database']}) does not exist."); } return $this->createConnection("sqlite:{$path}", $config, $options); diff --git a/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/FreshCommand.php b/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/FreshCommand.php index 17501a28..f23d7654 100644 --- a/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/FreshCommand.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/FreshCommand.php @@ -50,6 +50,7 @@ class FreshCommand extends Command $this->call('migrate', [ '--database' => $database, '--path' => $this->input->getOption('path'), + '--realpath' => $this->input->getOption('realpath'), '--force' => true, ]); diff --git a/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateMakeCommand.php b/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateMakeCommand.php index aafd973f..cb6ff823 100644 --- a/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateMakeCommand.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateMakeCommand.php @@ -84,11 +84,7 @@ class MigrateMakeCommand extends BaseCommand // "create" in the name. This will allow us to provide a convenient way // of creating migrations that create new tables for the application. if (! $table) { - if (preg_match('/^create_(\w+)_table$/', $name, $matches)) { - $table = $matches[1]; - - $create = true; - } + [$table, $create] = TableGuesser::guess($name); } // Now we are ready to write the migration out to disk. Once we've written diff --git a/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/RefreshCommand.php b/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/RefreshCommand.php index 866b2133..8041483e 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/RefreshCommand.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/RefreshCommand.php @@ -61,6 +61,7 @@ class RefreshCommand extends Command $this->call('migrate', [ '--database' => $database, '--path' => $path, + '--realpath' => $this->input->getOption('realpath'), '--force' => $force, ]); @@ -83,6 +84,7 @@ class RefreshCommand extends Command $this->call('migrate:rollback', [ '--database' => $database, '--path' => $path, + '--realpath' => $this->input->getOption('realpath'), '--step' => $step, '--force' => $force, ]); @@ -101,6 +103,7 @@ class RefreshCommand extends Command $this->call('migrate:reset', [ '--database' => $database, '--path' => $path, + '--realpath' => $this->input->getOption('realpath'), '--force' => $force, ]); } diff --git a/vendor/laravel/framework/src/Illuminate/Database/DetectsLostConnections.php b/vendor/laravel/framework/src/Illuminate/Database/DetectsLostConnections.php index 8e3ec7d1..f929dc63 100644 --- a/vendor/laravel/framework/src/Illuminate/Database/DetectsLostConnections.php +++ b/vendor/laravel/framework/src/Illuminate/Database/DetectsLostConnections.php @@ -34,6 +34,7 @@ trait DetectsLostConnections 'reset by peer', 'Physical connection is not usable', 'TCP Provider: Error code 0x68', + 'Name or service not known', ]); } } diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php index 2e5466b3..4afe01ba 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php @@ -68,7 +68,7 @@ class Builder */ protected $passthru = [ 'insert', 'insertGetId', 'getBindings', 'toSql', - 'exists', 'doesntExist', 'count', 'min', 'max', 'avg', 'sum', 'getConnection', + 'exists', 'doesntExist', 'count', 'min', 'max', 'avg', 'average', 'sum', 'getConnection', ]; /** @@ -152,12 +152,12 @@ class Builder */ public function withoutGlobalScopes(array $scopes = null) { - if (is_array($scopes)) { - foreach ($scopes as $scope) { - $this->withoutGlobalScope($scope); - } - } else { - $this->scopes = []; + if (! is_array($scopes)) { + $scopes = array_keys($this->scopes); + } + + foreach ($scopes as $scope) { + $this->withoutGlobalScope($scope); } return $this; @@ -312,7 +312,7 @@ class Builder * * @param mixed $id * @param array $columns - * @return \Illuminate\Database\Eloquent\Model|\Illuminate\Database\Eloquent\Collection + * @return \Illuminate\Database\Eloquent\Model|\Illuminate\Database\Eloquent\Collection|static|static[] * * @throws \Illuminate\Database\Eloquent\ModelNotFoundException */ @@ -543,7 +543,7 @@ class Builder // and error prone. We don't want constraints because we add eager ones. $relation = Relation::noConstraints(function () use ($name) { try { - return $this->getModel()->{$name}(); + return $this->getModel()->newInstance()->$name(); } catch (BadMethodCallException $e) { throw RelationNotFoundException::make($this->getModel(), $name); } @@ -612,7 +612,7 @@ class Builder * * @param int $count * @param callable $callback - * @param string $column + * @param string|null $column * @param string|null $alias * @return bool */ diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Collection.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Collection.php index ad2a7a11..11177e38 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Collection.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Collection.php @@ -361,9 +361,7 @@ class Collection extends BaseCollection implements QueueableCollection */ public function makeHidden($attributes) { - return $this->each(function ($model) use ($attributes) { - $model->addHidden($attributes); - }); + return $this->each->addHidden($attributes); } /** @@ -374,9 +372,7 @@ class Collection extends BaseCollection implements QueueableCollection */ public function makeVisible($attributes) { - return $this->each(function ($model) use ($attributes) { - $model->makeVisible($attributes); - }); + return $this->each->makeVisible($attributes); } /** diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasRelationships.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasRelationships.php index e4b69bc9..53666b6e 100644 --- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasRelationships.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasRelationships.php @@ -495,7 +495,7 @@ trait HasRelationships } /** - * Instantiate a new HasManyThrough relationship. + * Instantiate a new MorphToMany relationship. * * @param \Illuminate\Database\Eloquent\Builder $query * @param \Illuminate\Database\Eloquent\Model $parent diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/QueriesRelationships.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/QueriesRelationships.php index 5f2ec2da..08e5323e 100644 --- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/QueriesRelationships.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/QueriesRelationships.php @@ -3,9 +3,11 @@ namespace Illuminate\Database\Eloquent\Concerns; use Closure; +use RuntimeException; use Illuminate\Support\Str; use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Query\Expression; +use Illuminate\Database\Eloquent\Relations\MorphTo; use Illuminate\Database\Eloquent\Relations\Relation; use Illuminate\Database\Query\Builder as QueryBuilder; @@ -29,6 +31,10 @@ trait QueriesRelationships $relation = $this->getRelationWithoutConstraints($relation); + if ($relation instanceof MorphTo) { + throw new RuntimeException('has() and whereHas() do not support MorphTo relationships.'); + } + // If we only need to check for the existence of the relation, then we can optimize // the subquery to only run a "where exists" clause instead of this full "count" // clause. This will make these queries run much faster compared with a count. diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/FactoryBuilder.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/FactoryBuilder.php index 3005cb68..150f2ef3 100644 --- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/FactoryBuilder.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/FactoryBuilder.php @@ -117,6 +117,17 @@ class FactoryBuilder return $this; } + /** + * Set the state to be applied to the model. + * + * @param string $state + * @return $this + */ + public function state($state) + { + return $this->states([$state]); + } + /** * Set the states to be applied to the model. * diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php index 85a69815..719bd3c6 100644 --- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php @@ -746,7 +746,7 @@ abstract class Model implements ArrayAccess, Arrayable, Jsonable, JsonSerializab // If the model has an incrementing key, we can use the "insertGetId" method on // the query builder, which will give us back the final inserted ID for this // table from the database. Not all tables have to be incrementing though. - $attributes = $this->attributes; + $attributes = $this->getAttributes(); if ($this->getIncrementing()) { $this->insertAndSetId($query, $attributes); diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/BelongsTo.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/BelongsTo.php index 7ba395bb..3259bdcd 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/BelongsTo.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/BelongsTo.php @@ -274,7 +274,7 @@ class BelongsTo extends Relation $query->getModel()->setTable($hash); return $query->whereColumn( - $hash.'.'.$query->getModel()->getKeyName(), '=', $this->getQualifiedForeignKey() + $hash.'.'.$this->ownerKey, '=', $this->getQualifiedForeignKey() ); } 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 f39e9059..c848e703 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/BelongsToMany.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/BelongsToMany.php @@ -288,7 +288,7 @@ class BelongsToMany extends Relation * Specify the custom pivot model to use for the relationship. * * @param string $class - * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany + * @return $this */ public function using($class) { @@ -301,7 +301,7 @@ class BelongsToMany extends Relation * Specify the custom pivot accessor to use for the relationship. * * @param string $accessor - * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany + * @return $this */ public function as($accessor) { @@ -317,7 +317,7 @@ class BelongsToMany extends Relation * @param string $operator * @param mixed $value * @param string $boolean - * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany + * @return $this */ public function wherePivot($column, $operator = null, $value = null, $boolean = 'and') { @@ -333,7 +333,7 @@ class BelongsToMany extends Relation * @param mixed $values * @param string $boolean * @param bool $not - * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany + * @return $this */ public function wherePivotIn($column, $values, $boolean = 'and', $not = false) { @@ -348,7 +348,7 @@ class BelongsToMany extends Relation * @param string $column * @param string $operator * @param mixed $value - * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany + * @return $this */ public function orWherePivot($column, $operator = null, $value = null) { @@ -362,7 +362,7 @@ class BelongsToMany extends Relation * * @param string $column * @param mixed $value - * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany + * @return $this */ public function withPivotValue($column, $value = null) { @@ -388,7 +388,7 @@ class BelongsToMany extends Relation * * @param string $column * @param mixed $values - * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany + * @return $this */ public function orWherePivotIn($column, $values) { @@ -568,10 +568,10 @@ class BelongsToMany extends Relation // First we'll add the proper select columns onto the query so it is run with // the proper columns. Then, we will get the results and hydrate out pivot // models with the result of those columns as a separate model relation. - $columns = $this->query->getQuery()->columns ? [] : $columns; - $builder = $this->query->applyScopes(); + $columns = $builder->getQuery()->columns ? [] : $columns; + $models = $builder->addSelect( $this->shouldSelect($columns) )->getModels(); @@ -592,7 +592,7 @@ class BelongsToMany extends Relation * Get the select columns for the relation query. * * @param array $columns - * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany + * @return array */ protected function shouldSelect(array $columns = ['*']) { @@ -796,7 +796,7 @@ class BelongsToMany extends Relation { $model->save(['touch' => false]); - $this->attach($model->getKey(), $pivotAttributes, $touch); + $this->attach($model, $pivotAttributes, $touch); return $model; } @@ -836,7 +836,7 @@ class BelongsToMany extends Relation // accomplish this which will insert the record and any more attributes. $instance->save(['touch' => false]); - $this->attach($instance->getKey(), $joining, $touch); + $this->attach($instance, $joining, $touch); return $instance; } @@ -926,7 +926,7 @@ class BelongsToMany extends Relation * * @param mixed $createdAt * @param mixed $updatedAt - * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany + * @return $this */ public function withTimestamps($createdAt = null, $updatedAt = null) { diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Concerns/InteractsWithPivotTable.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Concerns/InteractsWithPivotTable.php index 5c488aee..093e7e4e 100644 --- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Concerns/InteractsWithPivotTable.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Concerns/InteractsWithPivotTable.php @@ -474,11 +474,11 @@ trait InteractsWithPivotTable protected function parseIds($value) { if ($value instanceof Model) { - return [$value->getKey()]; + return [$value->{$this->relatedKey}]; } if ($value instanceof Collection) { - return $value->modelKeys(); + return $value->pluck($this->relatedKey)->all(); } if ($value instanceof BaseCollection) { @@ -496,7 +496,7 @@ trait InteractsWithPivotTable */ protected function parseId($value) { - return $value instanceof Model ? $value->getKey() : $value; + return $value instanceof Model ? $value->{$this->relatedKey} : $value; } /** diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasManyThrough.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasManyThrough.php index b0a02cc9..e1ecb120 100644 --- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasManyThrough.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasManyThrough.php @@ -135,9 +135,7 @@ class HasManyThrough extends Relation */ public function throughParentSoftDeletes() { - return in_array(SoftDeletes::class, class_uses_recursive( - get_class($this->throughParent) - )); + return in_array(SoftDeletes::class, class_uses_recursive($this->throughParent)); } /** @@ -427,6 +425,16 @@ class HasManyThrough extends Relation return $this->prepareQueryBuilder()->chunk($count, $callback); } + /** + * Get a generator for the given query. + * + * @return \Generator + */ + public function cursor() + { + return $this->prepareQueryBuilder()->cursor(); + } + /** * Execute a callback over each item while chunking. * @@ -453,8 +461,10 @@ class HasManyThrough extends Relation */ protected function prepareQueryBuilder($columns = ['*']) { - return $this->query->applyScopes()->addSelect( - $this->shouldSelect($this->query->getQuery()->columns ? [] : $columns) + $builder = $this->query->applyScopes(); + + return $builder->addSelect( + $this->shouldSelect($builder->getQuery()->columns ? [] : $columns) ); } @@ -500,7 +510,7 @@ class HasManyThrough extends Relation $query->getModel()->setTable($hash); return $query->select($columns)->whereColumn( - $parentQuery->getQuery()->from.'.'.$query->getModel()->getKeyName(), '=', $this->getQualifiedFirstKeyName() + $parentQuery->getQuery()->from.'.'.$this->localKey, '=', $this->getQualifiedFirstKeyName() ); } diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphTo.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphTo.php index 46e7d8c7..e737a130 100644 --- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphTo.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphTo.php @@ -223,6 +223,36 @@ class MorphTo extends BelongsTo return $this->parent->setRelation($this->relation, null); } + /** + * Touch all of the related models for the relationship. + * + * @return void + */ + public function touch() + { + if (! is_null($this->ownerKey)) { + parent::touch(); + } + } + + /** + * Remove all or passed registered global scopes. + * + * @param array|null $scopes + * @return $this + */ + public function withoutGlobalScopes(array $scopes = null) + { + $this->getQuery()->withoutGlobalScopes($scopes); + + $this->macroBuffer[] = [ + 'method' => __FUNCTION__, + 'parameters' => [$scopes], + ]; + + return $this; + } + /** * Get the foreign key "type" name. * diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Relation.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Relation.php index ae6ddbf4..b310ea76 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Relation.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Relation.php @@ -223,7 +223,7 @@ abstract class Relation { return collect($models)->map(function ($value) use ($key) { return $key ? $value->getAttribute($key) : $value->getKey(); - })->values()->unique()->sort()->all(); + })->values()->unique(null, true)->sort()->all(); } /** diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/SoftDeletes.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/SoftDeletes.php index ab81a4d4..d8b73630 100644 --- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/SoftDeletes.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/SoftDeletes.php @@ -76,9 +76,7 @@ trait SoftDeletes $columns[$this->getUpdatedAtColumn()] = $this->fromDateTime($time); } - if ($query->update($columns)) { - $this->syncOriginal(); - } + $query->update($columns); } /** diff --git a/vendor/laravel/framework/src/Illuminate/Database/Grammar.php b/vendor/laravel/framework/src/Illuminate/Database/Grammar.php index 9f6d3ed0..38525653 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Grammar.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Grammar.php @@ -58,7 +58,7 @@ abstract class Grammar // If the value being wrapped has a column alias we will need to separate out // the pieces so we can wrap each of the segments of the expression on its // own, and then join these both back together using the "as" connector. - if (strpos(strtolower($value), ' as ') !== false) { + if (stripos($value, ' as ') !== false) { return $this->wrapAliasedValue($value, $prefixAlias); } diff --git a/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php b/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php index 11e42b80..bed58b66 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php @@ -480,6 +480,16 @@ class Migrator return $this->paths; } + /** + * Get the default connection name. + * + * @return string + */ + public function getConnection() + { + return $this->connection; + } + /** * Set the default connection name. * diff --git a/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php b/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php index a1ec0f9c..a078deb9 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php @@ -319,7 +319,7 @@ class Builder */ protected function parseSub($query) { - if ($query instanceof self) { + if ($query instanceof self || $query instanceof EloquentBuilder) { return [$query->toSql(), $query->getBindings()]; } elseif (is_string($query)) { return [$query, []]; @@ -1389,7 +1389,7 @@ class Builder { $type = $not ? 'NotExists' : 'Exists'; - $this->wheres[] = compact('type', 'operator', 'query', 'boolean'); + $this->wheres[] = compact('type', 'query', 'boolean'); $this->addBinding($query->getBindings(), 'where'); @@ -1415,7 +1415,7 @@ class Builder $this->wheres[] = compact('type', 'columns', 'operator', 'values', 'boolean'); - $this->addBinding($values); + $this->addBinding($this->cleanBindings($values)); return $this; } @@ -2057,7 +2057,7 @@ class Builder protected function withoutSelectAliases(array $columns) { return array_map(function ($column) { - return is_string($column) && ($aliasPosition = strpos(strtolower($column), ' as ')) !== false + return is_string($column) && ($aliasPosition = stripos($column, ' as ')) !== false ? substr($column, 0, $aliasPosition) : $column; }, $columns); } @@ -2084,7 +2084,7 @@ class Builder * @param int $count * @param callable $callback * @param string $column - * @param string $alias + * @param string|null $alias * @return bool */ public function chunkById($count, callable $callback, $column = 'id', $alias = null) diff --git a/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/Grammar.php b/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/Grammar.php index 488cdb6e..ac21bdea 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/Grammar.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/Grammar.php @@ -490,9 +490,11 @@ class Grammar extends BaseGrammar */ protected function whereRowValues(Builder $query, $where) { + $columns = $this->columnize($where['columns']); + $values = $this->parameterize($where['values']); - return '('.implode(', ', $where['columns']).') '.$where['operator'].' ('.$values.')'; + return '('.$columns.') '.$where['operator'].' ('.$values.')'; } /** @@ -905,7 +907,7 @@ class Grammar extends BaseGrammar // If the value being wrapped has a column alias we will need to separate out // the pieces so we can wrap each of the segments of the expression on its // own, and then join these both back together using the "as" connector. - if (strpos(strtolower($value), ' as ') !== false) { + if (stripos($value, ' as ') !== false) { return $this->wrapAliasedValue($value, $prefixAlias); } @@ -930,6 +932,17 @@ class Grammar extends BaseGrammar throw new RuntimeException('This database engine does not support JSON operations.'); } + /** + * Wrap the given JSON path. + * + * @param string $value + * @return string + */ + protected function wrapJsonPath($value) + { + return '\'$."'.str_replace('->', '"."', $value).'"\''; + } + /** * Determine if the given string is a JSON selector. * diff --git a/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/MySqlGrammar.php b/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/MySqlGrammar.php index 5ab3f42d..38ac9cb3 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/MySqlGrammar.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/MySqlGrammar.php @@ -276,7 +276,7 @@ class MySqlGrammar extends Grammar { $joins = ' '.$this->compileJoins($query, $query->joins); - $alias = strpos(strtolower($table), ' as ') !== false + $alias = stripos($table, ' as ') !== false ? explode(' as ', $table)[1] : $table; return trim("delete {$alias} from {$table}{$joins} {$where}"); @@ -301,11 +301,15 @@ class MySqlGrammar extends Grammar */ protected function wrapJsonSelector($value) { - $path = explode('->', $value); + $delimiter = str_contains($value, '->>') + ? '->>' + : '->'; + + $path = explode($delimiter, $value); $field = $this->wrapSegments(explode('.', array_shift($path))); - return sprintf('%s->\'$.%s\'', $field, collect($path)->map(function ($part) { + return sprintf('%s'.$delimiter.'\'$.%s\'', $field, collect($path)->map(function ($part) { return '"'.$part.'"'; })->implode('.')); } diff --git a/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/SQLiteGrammar.php b/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/SQLiteGrammar.php index 60973ae6..e28313b7 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/SQLiteGrammar.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/SQLiteGrammar.php @@ -273,4 +273,23 @@ class SQLiteGrammar extends Grammar 'delete from '.$this->wrapTable($query->from) => [], ]; } + + /** + * Wrap the given JSON selector. + * + * @param string $value + * @return string + */ + protected function wrapJsonSelector($value) + { + $parts = explode('->', $value, 2); + + $field = $this->wrap($parts[0]); + + $path = count($parts) > 1 ? ', '.$this->wrapJsonPath($parts[1]) : ''; + + $selector = 'json_extract('.$field.$path.')'; + + return $selector; + } } 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 a09dd294..215fa313 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/SqlServerGrammar.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/SqlServerGrammar.php @@ -103,6 +103,20 @@ class SqlServerGrammar extends Grammar return 'cast('.$this->wrap($where['column']).' as date) '.$where['operator'].' '.$value; } + /** + * Compile a "where time" clause. + * + * @param \Illuminate\Database\Query\Builder $query + * @param array $where + * @return string + */ + protected function whereTime(Builder $query, $where) + { + $value = $this->parameter($where['value']); + + return 'cast('.$this->wrap($where['column']).' as time) '.$where['operator'].' '.$value; + } + /** * Compile a "JSON contains" statement into SQL. * @@ -185,7 +199,7 @@ class SqlServerGrammar extends Grammar { $constraint = $this->compileRowConstraint($query); - return "select * from ({$sql}) as temp_table where row_num {$constraint}"; + return "select * from ({$sql}) as temp_table where row_num {$constraint} order by row_num"; } /** @@ -298,7 +312,7 @@ class SqlServerGrammar extends Grammar { $joins = ' '.$this->compileJoins($query, $query->joins); - $alias = strpos(strtolower($table), ' as ') !== false + $alias = stripos($table, ' as ') !== false ? explode(' as ', $table)[1] : $table; return trim("delete {$alias} from {$table}{$joins} {$where}"); @@ -364,7 +378,7 @@ class SqlServerGrammar extends Grammar { $table = $alias = $this->wrapTable($table); - if (strpos(strtolower($table), '] as [') !== false) { + if (stripos($table, '] as [') !== false) { $alias = '['.explode('] as [', $table)[1]; } @@ -458,17 +472,6 @@ class SqlServerGrammar extends Grammar return 'json_value('.$field.', '.$this->wrapJsonPath($parts[0]).')'; } - /** - * Wrap the given JSON path. - * - * @param string $value - * @return string - */ - protected function wrapJsonPath($value) - { - return '\'$."'.str_replace('->', '"."', $value).'"\''; - } - /** * Wrap a table in keyword identifiers. * diff --git a/vendor/laravel/framework/src/Illuminate/Database/Schema/Blueprint.php b/vendor/laravel/framework/src/Illuminate/Database/Schema/Blueprint.php index 05fba8f1..33b4ab01 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Schema/Blueprint.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Schema/Blueprint.php @@ -1062,7 +1062,7 @@ class Blueprint * Create a new point column on the table. * * @param string $column - * @param null|int $srid + * @param int|null $srid * @return \Illuminate\Support\Fluent */ public function point($column, $srid = null) diff --git a/vendor/laravel/framework/src/Illuminate/Database/Schema/Builder.php b/vendor/laravel/framework/src/Illuminate/Database/Schema/Builder.php index db9dc965..33907b4c 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Schema/Builder.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Schema/Builder.php @@ -69,7 +69,7 @@ class Builder { $table = $this->connection->getTablePrefix().$table; - return count($this->connection->select( + return count($this->connection->selectFromWriteConnection( $this->grammar->compileTableExists(), [$table] )) > 0; } @@ -130,7 +130,7 @@ class Builder */ public function getColumnListing($table) { - $results = $this->connection->select($this->grammar->compileColumnListing( + $results = $this->connection->selectFromWriteConnection($this->grammar->compileColumnListing( $this->connection->getTablePrefix().$table )); diff --git a/vendor/laravel/framework/src/Illuminate/Events/CallQueuedListener.php b/vendor/laravel/framework/src/Illuminate/Events/CallQueuedListener.php index a66b4f99..be0fee3a 100644 --- a/vendor/laravel/framework/src/Illuminate/Events/CallQueuedListener.php +++ b/vendor/laravel/framework/src/Illuminate/Events/CallQueuedListener.php @@ -96,7 +96,7 @@ class CallQueuedListener implements ShouldQueue */ protected function setJobInstanceIfNecessary(Job $job, $instance) { - if (in_array(InteractsWithQueue::class, class_uses_recursive(get_class($instance)))) { + if (in_array(InteractsWithQueue::class, class_uses_recursive($instance))) { $instance->setJob($job); } diff --git a/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php b/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php index 65bd61ba..b458500e 100644 --- a/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php +++ b/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php @@ -452,10 +452,8 @@ class Filesystem */ public function moveDirectory($from, $to, $overwrite = false) { - if ($overwrite && $this->isDirectory($to)) { - if (! $this->deleteDirectory($to)) { - return false; - } + if ($overwrite && $this->isDirectory($to) && ! $this->deleteDirectory($to)) { + return false; } return @rename($from, $to) === true; @@ -553,6 +551,27 @@ class Filesystem return true; } + /** + * Remove all of the directories within a given directory. + * + * @param string $directory + * @return bool + */ + public function deleteDirectories($directory) + { + $allDirectories = $this->directories($directory); + + if (! empty($allDirectories)) { + foreach ($allDirectories as $directoryName) { + $this->deleteDirectory($directoryName); + } + + return true; + } + + return false; + } + /** * Empty the specified directory of all files and folders. * diff --git a/vendor/laravel/framework/src/Illuminate/Filesystem/FilesystemAdapter.php b/vendor/laravel/framework/src/Illuminate/Filesystem/FilesystemAdapter.php index 66c65af8..40024f21 100644 --- a/vendor/laravel/framework/src/Illuminate/Filesystem/FilesystemAdapter.php +++ b/vendor/laravel/framework/src/Illuminate/Filesystem/FilesystemAdapter.php @@ -204,7 +204,7 @@ class FilesystemAdapter implements FilesystemContract, CloudFilesystemContract */ public function putFileAs($path, $file, $name, $options = []) { - $stream = fopen($file->getRealPath(), 'r+'); + $stream = fopen($file->getRealPath(), 'r'); // Next, we will format the path of the file and store the file using a stream since // they provide better performance than alternatives. Once we write the file this diff --git a/vendor/laravel/framework/src/Illuminate/Filesystem/FilesystemManager.php b/vendor/laravel/framework/src/Illuminate/Filesystem/FilesystemManager.php index 67b7d8a8..7897352c 100644 --- a/vendor/laravel/framework/src/Illuminate/Filesystem/FilesystemManager.php +++ b/vendor/laravel/framework/src/Illuminate/Filesystem/FilesystemManager.php @@ -220,7 +220,7 @@ class FilesystemManager implements FactoryContract $config += ['version' => 'latest']; if ($config['key'] && $config['secret']) { - $config['credentials'] = Arr::only($config, ['key', 'secret']); + $config['credentials'] = Arr::only($config, ['key', 'secret', 'token']); } return $config; @@ -236,7 +236,7 @@ class FilesystemManager implements FactoryContract { $client = new Rackspace($config['endpoint'], [ 'username' => $config['username'], 'apiKey' => $config['key'], - ]); + ], $config['options'] ?? []); $root = $config['root'] ?? null; diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Application.php b/vendor/laravel/framework/src/Illuminate/Foundation/Application.php index 2ec344ef..f3b7cf7f 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.6.26'; + const VERSION = '5.6.38'; /** * The base path for the Laravel installation. diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Auth/AuthenticatesUsers.php b/vendor/laravel/framework/src/Illuminate/Foundation/Auth/AuthenticatesUsers.php index 652f2ea3..5e4e43de 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Auth/AuthenticatesUsers.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Auth/AuthenticatesUsers.php @@ -116,7 +116,7 @@ trait AuthenticatesUsers */ protected function authenticated(Request $request, $user) { - $user->updateAPI(); + // } /** @@ -156,7 +156,18 @@ trait AuthenticatesUsers $request->session()->invalidate(); - return redirect('/'); + return $this->loggedOut($request) ?: redirect('/'); + } + + /** + * The user has logged out of the application. + * + * @param \Illuminate\Http\Request $request + * @return mixed + */ + protected function loggedOut(Request $request) + { + // } /** diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Auth/SendsPasswordResetEmails.php b/vendor/laravel/framework/src/Illuminate/Foundation/Auth/SendsPasswordResetEmails.php index edab2112..fd946ca9 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Auth/SendsPasswordResetEmails.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Auth/SendsPasswordResetEmails.php @@ -70,9 +70,9 @@ trait SendsPasswordResetEmails */ protected function sendResetLinkFailedResponse(Request $request, $response) { - return back()->withErrors( - ['email' => trans($response)] - ); + return back() + ->withInput($request->only('email')) + ->withErrors(['email' => trans($response)]); } /** diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/ConfigCacheCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/ConfigCacheCommand.php index edd85ee5..275b672d 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/ConfigCacheCommand.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/ConfigCacheCommand.php @@ -2,6 +2,8 @@ namespace Illuminate\Foundation\Console; +use Throwable; +use LogicException; use Illuminate\Console\Command; use Illuminate\Filesystem\Filesystem; use Illuminate\Contracts\Console\Kernel as ConsoleKernelContract; @@ -52,11 +54,20 @@ class ConfigCacheCommand extends Command $this->call('config:clear'); $config = $this->getFreshConfiguration(); + $configPath = $this->laravel->getCachedConfigPath(); $this->files->put( - $this->laravel->getCachedConfigPath(), 'files->delete($configPath); + + throw new LogicException('Your configuration files are not serializable.', 0, $e); + } + $this->info('Configuration cached successfully!'); } diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/ModelMakeCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/ModelMakeCommand.php index 071b5288..61062901 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/ModelMakeCommand.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/ModelMakeCommand.php @@ -84,6 +84,10 @@ class ModelMakeCommand extends GeneratorCommand { $table = Str::plural(Str::snake(class_basename($this->argument('name')))); + if ($this->option('pivot')) { + $table = Str::singular($table); + } + $this->call('make:migration', [ 'name' => "create_{$table}_table", '--create' => $table, diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/bootstrap-stubs/_variables.scss b/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/bootstrap-stubs/_variables.scss index 70ecfdb3..6799fc45 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/bootstrap-stubs/_variables.scss +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/bootstrap-stubs/_variables.scss @@ -1,8 +1,20 @@ // Body -$body-bg: #f5f8fa; +$body-bg: #f8fafc; // Typography -$font-family-sans-serif: "Raleway", sans-serif; +$font-family-sans-serif: "Nunito", sans-serif; $font-size-base: 0.9rem; $line-height-base: 1.6; + +// Colors +$blue: #3490dc; +$indigo: #6574cd; +$purple: #9561e2; +$pink: #f66D9b; +$red: #e3342f; +$orange: #f6993f; +$yellow: #ffed4a; +$green: #38c172; +$teal: #4dc0b5; +$cyan: #6cb2eb; diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/bootstrap-stubs/app.scss b/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/bootstrap-stubs/app.scss index 0077cb14..f42e7986 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/bootstrap-stubs/app.scss +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/Presets/bootstrap-stubs/app.scss @@ -1,9 +1,9 @@ // Fonts -@import url("https://fonts.googleapis.com/css?family=Raleway:300,400,600"); +@import url('https://fonts.googleapis.com/css?family=Nunito'); // Variables -@import "variables"; +@import 'variables'; // Bootstrap @import '~bootstrap/scss/bootstrap'; diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/ViewClearCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/ViewClearCommand.php index 6f3e23ff..251e3937 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/ViewClearCommand.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/ViewClearCommand.php @@ -46,6 +46,8 @@ class ViewClearCommand extends Command * Execute the console command. * * @return void + * + * @throws \RuntimeException */ public function handle() { diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/observer.stub b/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/observer.stub index 33d672bb..84355ba5 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/observer.stub +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/observer.stub @@ -7,7 +7,7 @@ use NamespacedDummyModel; class DummyClass { /** - * Handle to the DocDummyModel "created" event. + * Handle the DocDummyModel "created" event. * * @param \NamespacedDummyModel $dummyModel * @return void @@ -38,4 +38,26 @@ class DummyClass { // } + + /** + * Handle the DocDummyModel "restored" event. + * + * @param \NamespacedDummyModel $dummyModel + * @return void + */ + public function restored(DummyModel $dummyModel) + { + // + } + + /** + * Handle the DocDummyModel "force deleted" event. + * + * @param \NamespacedDummyModel $dummyModel + * @return void + */ + public function forceDeleted(DummyModel $dummyModel) + { + // + } } diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/policy.stub b/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/policy.stub index a1fddcff..300d0ac6 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/policy.stub +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/policy.stub @@ -56,4 +56,28 @@ class DummyClass { // } + + /** + * Determine whether the user can restore the DocDummyModel. + * + * @param \NamespacedDummyUserModel $user + * @param \NamespacedDummyModel $dummyModel + * @return mixed + */ + public function restore(DummyUser $user, DummyModel $dummyModel) + { + // + } + + /** + * Determine whether the user can permanently delete the DocDummyModel. + * + * @param \NamespacedDummyUserModel $user + * @param \NamespacedDummyModel $dummyModel + * @return mixed + */ + public function forceDelete(DummyUser $user, DummyModel $dummyModel) + { + // + } } diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php b/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php index 9889eb01..c8fe8ab8 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php @@ -162,7 +162,7 @@ class Handler implements ExceptionHandlerContract * * @param \Illuminate\Http\Request $request * @param \Exception $e - * @return \Symfony\Component\HttpFoundation\Response + * @return \Illuminate\Http\Response|\Symfony\Component\HttpFoundation\Response */ public function render($request, Exception $e) { diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/views/layout.blade.php b/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/views/layout.blade.php index 27513d0b..50616e93 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/views/layout.blade.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/views/layout.blade.php @@ -8,14 +8,14 @@ @yield('title') - + - - - -

BankAccount

-
    -... 3 / 3 (100%)
  • ✓ Balance is initially zero
  • -
  • ✓ Balance cannot become negative
  • -
  • ✓ Balance cannot become negative
  • -
- - - -Time: %s, Memory: %s - -OK (3 tests, 3 assertions) diff --git a/vendor/phpunit/phpunit/tests/TextUI/testdox-text.phpt b/vendor/phpunit/phpunit/tests/TextUI/testdox-text.phpt deleted file mode 100644 index f6bda8d1..00000000 --- a/vendor/phpunit/phpunit/tests/TextUI/testdox-text.phpt +++ /dev/null @@ -1,25 +0,0 @@ ---TEST-- -phpunit --testdox-text php://stdout BankAccountTest ../_files/BankAccountTest.php ---FILE-- - - - - - - - - - - - - -Time: %s, Memory: %s - -There was 1 error: - -1) vendor\project\StatusTest::testError -RuntimeException:%s - -%s%eStatusTest.php:%d - --- - -There was 1 warning: - -1) vendor\project\StatusTest::testWarning - -%s%eStatusTest.php:%d - --- - -There was 1 failure: - -1) vendor\project\StatusTest::testFailure -Failed asserting that false is true. - -%s%eStatusTest.php:%d - --- - -There was 1 risky test: - -1) vendor\project\StatusTest::testRisky -This test did not perform any assertions - -ERRORS! -Tests: 7, Assertions: 2, Errors: 1, Failures: 1, Warnings: 1, Skipped: 1, Incomplete: 1, Risky: 1. diff --git a/vendor/phpunit/phpunit/tests/TextUI/testdox.phpt b/vendor/phpunit/phpunit/tests/TextUI/testdox.phpt deleted file mode 100644 index 7812667c..00000000 --- a/vendor/phpunit/phpunit/tests/TextUI/testdox.phpt +++ /dev/null @@ -1,22 +0,0 @@ ---TEST-- -phpunit --testdox BankAccountTest ../_files/BankAccountTest.php ---FILE-- - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Util; - -use PHPUnit\Framework\TestCase; - -class ConfigurationGeneratorTest extends TestCase -{ - public function testGeneratesConfigurationCorrectly(): void - { - $generator = new ConfigurationGenerator; - - $this->assertEquals( - ' - - - - tests - - - - - - src - - - -', - $generator->generateDefaultConfiguration( - 'X.Y.Z', - 'vendor/autoload.php', - 'tests', - 'src' - ) - ); - } -} diff --git a/vendor/phpunit/phpunit/tests/Util/ConfigurationTest.php b/vendor/phpunit/phpunit/tests/Util/ConfigurationTest.php deleted file mode 100644 index 7019f85b..00000000 --- a/vendor/phpunit/phpunit/tests/Util/ConfigurationTest.php +++ /dev/null @@ -1,572 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Util; - -use PHPUnit\Framework\Exception; -use PHPUnit\Framework\TestCase; -use PHPUnit\Runner\TestSuiteSorter; -use PHPUnit\TextUI\ResultPrinter; - -class ConfigurationTest extends TestCase -{ - /** - * @var Configuration - */ - protected $configuration; - - protected function setUp(): void - { - $this->configuration = Configuration::getInstance( - \dirname(__DIR__) . \DIRECTORY_SEPARATOR . '_files' . \DIRECTORY_SEPARATOR . 'configuration.xml' - ); - } - - public function testExceptionIsThrownForNotExistingConfigurationFile(): void - { - $this->expectException(Exception::class); - - Configuration::getInstance('not_existing_file.xml'); - } - - public function testShouldReadColorsWhenTrueInConfigurationFile(): void - { - $configurationFilename = \dirname(__DIR__) . \DIRECTORY_SEPARATOR . '_files' . \DIRECTORY_SEPARATOR . 'configuration.colors.true.xml'; - $configurationInstance = Configuration::getInstance($configurationFilename); - $configurationValues = $configurationInstance->getPHPUnitConfiguration(); - - $this->assertEquals(ResultPrinter::COLOR_AUTO, $configurationValues['colors']); - } - - public function testShouldReadColorsWhenFalseInConfigurationFile(): void - { - $configurationFilename = \dirname(__DIR__) . \DIRECTORY_SEPARATOR . '_files' . \DIRECTORY_SEPARATOR . 'configuration.colors.false.xml'; - $configurationInstance = Configuration::getInstance($configurationFilename); - $configurationValues = $configurationInstance->getPHPUnitConfiguration(); - - $this->assertEquals(ResultPrinter::COLOR_NEVER, $configurationValues['colors']); - } - - public function testShouldReadColorsWhenEmptyInConfigurationFile(): void - { - $configurationFilename = \dirname(__DIR__) . \DIRECTORY_SEPARATOR . '_files' . \DIRECTORY_SEPARATOR . 'configuration.colors.empty.xml'; - $configurationInstance = Configuration::getInstance($configurationFilename); - $configurationValues = $configurationInstance->getPHPUnitConfiguration(); - - $this->assertEquals(ResultPrinter::COLOR_NEVER, $configurationValues['colors']); - } - - public function testShouldReadColorsWhenInvalidInConfigurationFile(): void - { - $configurationFilename = \dirname(__DIR__) . \DIRECTORY_SEPARATOR . '_files' . \DIRECTORY_SEPARATOR . 'configuration.colors.invalid.xml'; - $configurationInstance = Configuration::getInstance($configurationFilename); - $configurationValues = $configurationInstance->getPHPUnitConfiguration(); - - $this->assertEquals(ResultPrinter::COLOR_NEVER, $configurationValues['colors']); - } - - public function testInvalidConfigurationGeneratesValidationErrors(): void - { - $configurationFilename = \dirname(__DIR__) . \DIRECTORY_SEPARATOR . '_files' . \DIRECTORY_SEPARATOR . 'configuration.colors.invalid.xml'; - $configurationInstance = Configuration::getInstance($configurationFilename); - - $this->assertTrue($configurationInstance->hasValidationErrors()); - $this->assertArraySubset([1 => ["Element 'phpunit', attribute 'colors': 'Something else' is not a valid value of the atomic type 'xs:boolean'."]], $configurationInstance->getValidationErrors()); - } - - public function testNonIntegerValueReturnsDefault(): void - { - $configurationFilename = \dirname(__DIR__) . \DIRECTORY_SEPARATOR . '_files' . \DIRECTORY_SEPARATOR . 'configuration.columns.default.xml'; - $configurationInstance = Configuration::getInstance($configurationFilename); - $configurationValues = $configurationInstance->getPHPUnitConfiguration(); - - $this->assertEquals(80, $configurationValues['columns']); - } - - /** - * @dataProvider configurationRootOptionsProvider - * - * @param bool|int|string $expected - */ - public function testConfigurationRootOptions(string $optionName, string $optionValue, $expected): void - { - $tmpFilename = \sys_get_temp_dir() . \DIRECTORY_SEPARATOR . 'phpunit.' . $optionName . \uniqid() . '.xml'; - $xml = "" . \PHP_EOL; - \file_put_contents($tmpFilename, $xml); - - $configurationInstance = Configuration::getInstance($tmpFilename); - $this->assertFalse($configurationInstance->hasValidationErrors(), 'option causes validation error'); - - $configurationValues = $configurationInstance->getPHPUnitConfiguration(); - $this->assertEquals($expected, $configurationValues[$optionName]); - - @\unlink($tmpFilename); - } - - public function configurationRootOptionsProvider(): array - { - return [ - ['executionOrder', 'default', TestSuiteSorter::ORDER_DEFAULT], - ['executionOrder', 'random', TestSuiteSorter::ORDER_RANDOMIZED], - ['executionOrder', 'reverse', TestSuiteSorter::ORDER_REVERSED], - ['columns', 'max', 'max'], - ['stopOnFailure', 'true', true], - ['stopOnWarning', 'true', true], - ['stopOnIncomplete', 'true', true], - ['stopOnRisky', 'true', true], - ['stopOnSkipped', 'true', true], - ['failOnWarning', 'true', true], - ['failOnRisky', 'true', true], - ['disableCodeCoverageIgnore', 'true', true], - ['processIsolation', 'true', true], - ['testSuiteLoaderFile', '/path/to/file', '/path/to/file'], - ['reverseDefectList', 'true', true], - ['registerMockObjectsFromTestArgumentsRecursively', 'true', true], - ]; - } - - public function testFilterConfigurationIsReadCorrectly(): void - { - $this->assertEquals( - [ - 'whitelist' => [ - 'addUncoveredFilesFromWhitelist' => true, - 'processUncoveredFilesFromWhitelist' => false, - 'include' => [ - 'directory' => [ - 0 => [ - 'path' => '/path/to/files', - 'prefix' => '', - 'suffix' => '.php', - 'group' => 'DEFAULT' - ], - ], - 'file' => [ - 0 => '/path/to/file', - 1 => '/path/to/file', - ], - ], - 'exclude' => [ - 'directory' => [ - 0 => [ - 'path' => '/path/to/files', - 'prefix' => '', - 'suffix' => '.php', - 'group' => 'DEFAULT' - ], - ], - 'file' => [ - 0 => '/path/to/file', - ], - ], - ], - ], - $this->configuration->getFilterConfiguration() - ); - } - - public function testGroupConfigurationIsReadCorrectly(): void - { - $this->assertEquals( - [ - 'include' => [ - 0 => 'name', - ], - 'exclude' => [ - 0 => 'name', - ], - ], - $this->configuration->getGroupConfiguration() - ); - } - - public function testTestdoxGroupConfigurationIsReadCorrectly(): void - { - $this->assertEquals( - [ - 'include' => [ - 0 => 'name', - ], - 'exclude' => [ - 0 => 'name', - ], - ], - $this->configuration->getTestdoxGroupConfiguration() - ); - } - - public function testListenerConfigurationIsReadCorrectly(): void - { - $dir = __DIR__; - $includePath = \ini_get('include_path'); - - \ini_set('include_path', $dir . \PATH_SEPARATOR . $includePath); - - $this->assertEquals( - [ - 0 => [ - 'class' => 'MyListener', - 'file' => '/optional/path/to/MyListener.php', - 'arguments' => [ - 0 => [ - 0 => 'Sebastian', - ], - 1 => 22, - 2 => 'April', - 3 => 19.78, - 4 => null, - 5 => new \stdClass, - 6 => \dirname(__DIR__) . \DIRECTORY_SEPARATOR . '_files' . \DIRECTORY_SEPARATOR . 'MyTestFile.php', - 7 => \dirname(__DIR__) . \DIRECTORY_SEPARATOR . '_files' . \DIRECTORY_SEPARATOR . 'MyRelativePath', - 8 => true, - ], - ], - [ - 'class' => 'IncludePathListener', - 'file' => __FILE__, - 'arguments' => [] - ], - [ - 'class' => 'CompactArgumentsListener', - 'file' => '/CompactArgumentsListener.php', - 'arguments' => [ - 0 => 42, - 1 => false, - ], - ], - ], - $this->configuration->getListenerConfiguration() - ); - - \ini_set('include_path', $includePath); - } - - public function testExtensionConfigurationIsReadCorrectly(): void - { - $dir = __DIR__; - $includePath = \ini_get('include_path'); - - \ini_set('include_path', $dir . \PATH_SEPARATOR . $includePath); - - $this->assertEquals( - [ - 0 => [ - 'class' => 'MyExtension', - 'file' => '/optional/path/to/MyExtension.php', - 'arguments' => [ - 0 => [ - 0 => 'Sebastian', - ], - 1 => 22, - 2 => 'April', - 3 => 19.78, - 4 => null, - 5 => new \stdClass, - 6 => \dirname(__DIR__) . \DIRECTORY_SEPARATOR . '_files' . \DIRECTORY_SEPARATOR . 'MyTestFile.php', - 7 => \dirname(__DIR__) . \DIRECTORY_SEPARATOR . '_files' . \DIRECTORY_SEPARATOR . 'MyRelativePath', - ], - ], - [ - 'class' => 'IncludePathExtension', - 'file' => __FILE__, - 'arguments' => [] - ], - [ - 'class' => 'CompactArgumentsExtension', - 'file' => '/CompactArgumentsExtension.php', - 'arguments' => [ - 0 => 42 - ], - ], - ], - $this->configuration->getExtensionConfiguration() - ); - - \ini_set('include_path', $includePath); - } - - public function testLoggingConfigurationIsReadCorrectly(): void - { - $this->assertEquals( - [ - 'lowUpperBound' => '50', - 'highLowerBound' => '90', - 'coverage-html' => '/tmp/report', - 'coverage-clover' => '/tmp/clover.xml', - 'coverage-crap4j' => '/tmp/crap4j.xml', - 'crap4jThreshold' => 50, - 'coverage-text' => '/tmp/coverage.txt', - 'coverageTextShowUncoveredFiles' => true, - 'coverageTextShowOnlySummary' => true, - 'json' => '/tmp/logfile.json', - 'plain' => '/tmp/logfile.txt', - 'tap' => '/tmp/logfile.tap', - 'junit' => '/tmp/logfile.xml', - 'testdox-html' => '/tmp/testdox.html', - 'testdox-text' => '/tmp/testdox.txt', - 'testdox-xml' => '/tmp/testdox.xml' - ], - $this->configuration->getLoggingConfiguration() - ); - } - - public function testPHPConfigurationIsReadCorrectly(): void - { - $this->assertEquals( - [ - 'include_path' => [ - \dirname(__DIR__) . \DIRECTORY_SEPARATOR . '_files' . \DIRECTORY_SEPARATOR . '.', - '/path/to/lib' - ], - 'ini' => ['foo' => ['value' => 'bar']], - 'const' => ['FOO' => ['value' => false], 'BAR' => ['value' => true]], - 'var' => ['foo' => ['value' => false]], - 'env' => ['foo' => ['value' => true], 'bar' => ['value' => 'true', 'verbatim' => true], 'foo_force' => ['value' => 'forced', 'force' => true]], - 'post' => ['foo' => ['value' => 'bar']], - 'get' => ['foo' => ['value' => 'bar']], - 'cookie' => ['foo' => ['value' => 'bar']], - 'server' => ['foo' => ['value' => 'bar']], - 'files' => ['foo' => ['value' => 'bar']], - 'request'=> ['foo' => ['value' => 'bar']], - ], - $this->configuration->getPHPConfiguration() - ); - } - - /** - * @backupGlobals enabled - */ - public function testPHPConfigurationIsHandledCorrectly(): void - { - $this->configuration->handlePHPConfiguration(); - - $path = \dirname(__DIR__) . \DIRECTORY_SEPARATOR . '_files' . \DIRECTORY_SEPARATOR . '.' . \PATH_SEPARATOR . '/path/to/lib'; - $this->assertStringStartsWith($path, \ini_get('include_path')); - $this->assertFalse(\FOO); - $this->assertTrue(\BAR); - $this->assertFalse($GLOBALS['foo']); - $this->assertTrue((bool) $_ENV['foo']); - $this->assertEquals(1, \getenv('foo')); - $this->assertEquals('bar', $_POST['foo']); - $this->assertEquals('bar', $_GET['foo']); - $this->assertEquals('bar', $_COOKIE['foo']); - $this->assertEquals('bar', $_SERVER['foo']); - $this->assertEquals('bar', $_FILES['foo']); - $this->assertEquals('bar', $_REQUEST['foo']); - } - - /** - * @backupGlobals enabled - * - * @see https://github.com/sebastianbergmann/phpunit/issues/1181 - */ - public function testHandlePHPConfigurationDoesNotOverwrittenExistingEnvArrayVariables(): void - { - $_ENV['foo'] = false; - $this->configuration->handlePHPConfiguration(); - - $this->assertFalse($_ENV['foo']); - $this->assertEquals('forced', \getenv('foo_force')); - } - - /** - * @backupGlobals enabled - * - * @see https://github.com/sebastianbergmann/phpunit/issues/2353 - */ - public function testHandlePHPConfigurationDoesForceOverwrittenExistingEnvArrayVariables(): void - { - $_ENV['foo_force'] = false; - $this->configuration->handlePHPConfiguration(); - - $this->assertEquals('forced', $_ENV['foo_force']); - $this->assertEquals('forced', \getenv('foo_force')); - } - - /** - * @backupGlobals enabled - * - * @see https://github.com/sebastianbergmann/phpunit/issues/1181 - */ - public function testHandlePHPConfigurationDoesNotOverriteVariablesFromPutEnv(): void - { - \putenv('foo=putenv'); - $this->configuration->handlePHPConfiguration(); - - $this->assertEquals('putenv', $_ENV['foo']); - $this->assertEquals('putenv', \getenv('foo')); - } - - /** - * @backupGlobals enabled - * - * @see https://github.com/sebastianbergmann/phpunit/issues/1181 - */ - public function testHandlePHPConfigurationDoesOverwriteVariablesFromPutEnvWhenForced(): void - { - \putenv('foo_force=putenv'); - $this->configuration->handlePHPConfiguration(); - - $this->assertEquals('forced', $_ENV['foo_force']); - $this->assertEquals('forced', \getenv('foo_force')); - } - - public function testPHPUnitConfigurationIsReadCorrectly(): void - { - $this->assertEquals( - [ - 'backupGlobals' => true, - 'backupStaticAttributes' => false, - 'beStrictAboutChangesToGlobalState' => false, - 'bootstrap' => '/path/to/bootstrap.php', - 'cacheTokens' => false, - 'columns' => 80, - 'colors' => 'never', - 'stderr' => false, - 'convertDeprecationsToExceptions' => true, - 'convertErrorsToExceptions' => true, - 'convertNoticesToExceptions' => true, - 'convertWarningsToExceptions' => true, - 'forceCoversAnnotation' => false, - 'stopOnFailure' => false, - 'stopOnWarning' => false, - 'reportUselessTests' => false, - 'strictCoverage' => false, - 'disallowTestOutput' => false, - 'enforceTimeLimit' => false, - 'extensionsDirectory' => '/tmp', - 'printerClass' => 'PHPUnit\TextUI\ResultPrinter', - 'testSuiteLoaderClass' => 'PHPUnit\Runner\StandardTestSuiteLoader', - 'defaultTestSuite' => 'My Test Suite', - 'verbose' => false, - 'timeoutForSmallTests' => 1, - 'timeoutForMediumTests' => 10, - 'timeoutForLargeTests' => 60, - 'beStrictAboutResourceUsageDuringSmallTests' => false, - 'disallowTodoAnnotatedTests' => false, - 'failOnWarning' => false, - 'failOnRisky' => false, - 'ignoreDeprecatedCodeUnitsFromCodeCoverage' => false, - 'executionOrder' => 0, - 'resolveDependencies' => false - ], - $this->configuration->getPHPUnitConfiguration() - ); - } - - public function testXincludeInConfiguration(): void - { - $configurationWithXinclude = Configuration::getInstance( - \dirname(__DIR__) . \DIRECTORY_SEPARATOR . '_files' . \DIRECTORY_SEPARATOR . 'configuration_xinclude.xml' - ); - - $this->assertConfigurationEquals( - $this->configuration, - $configurationWithXinclude - ); - } - - /** - * @ticket 1311 - */ - public function testWithEmptyConfigurations(): void - { - $emptyConfiguration = Configuration::getInstance( - \dirname(__DIR__) . \DIRECTORY_SEPARATOR . '_files' . \DIRECTORY_SEPARATOR . 'configuration_empty.xml' - ); - - $logging = $emptyConfiguration->getLoggingConfiguration(); - $this->assertEmpty($logging); - - $php = $emptyConfiguration->getPHPConfiguration(); - $this->assertEmpty($php['include_path']); - - $phpunit = $emptyConfiguration->getPHPUnitConfiguration(); - $this->assertArrayNotHasKey('bootstrap', $phpunit); - $this->assertArrayNotHasKey('testSuiteLoaderFile', $phpunit); - $this->assertArrayNotHasKey('printerFile', $phpunit); - - $suite = $emptyConfiguration->getTestSuiteConfiguration(); - $this->assertEmpty($suite->getGroups()); - - $filter = $emptyConfiguration->getFilterConfiguration(); - $this->assertEmpty($filter['whitelist']['include']['directory']); - $this->assertEmpty($filter['whitelist']['include']['file']); - $this->assertEmpty($filter['whitelist']['exclude']['directory']); - $this->assertEmpty($filter['whitelist']['exclude']['file']); - } - - public function testGetTestSuiteNamesReturnsTheNamesIfDefined(): void - { - $configuration = Configuration::getInstance( - \dirname(__DIR__) . \DIRECTORY_SEPARATOR . '_files' . \DIRECTORY_SEPARATOR . 'configuration.suites.xml' - ); - - $names = $configuration->getTestSuiteNames(); - - $this->assertEquals(['Suite One', 'Suite Two'], $names); - } - - public function testTestSuiteConfigurationForASingleFileInASuite(): void - { - $configuration = Configuration::getInstance( - \dirname(__DIR__) . \DIRECTORY_SEPARATOR . '_files' . \DIRECTORY_SEPARATOR . 'configuration.one-file-suite.xml' - ); - - $config = $configuration->getTestSuiteConfiguration(); - $tests = $config->tests(); - - $this->assertCount(1, $tests); - } - - /** - * Asserts that the values in $actualConfiguration equal $expectedConfiguration. - * - * @throws Exception - * @throws \PHPUnit\Framework\ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - protected function assertConfigurationEquals(Configuration $expectedConfiguration, Configuration $actualConfiguration): void - { - $this->assertEquals( - $expectedConfiguration->getFilterConfiguration(), - $actualConfiguration->getFilterConfiguration() - ); - - $this->assertEquals( - $expectedConfiguration->getGroupConfiguration(), - $actualConfiguration->getGroupConfiguration() - ); - - $this->assertEquals( - $expectedConfiguration->getListenerConfiguration(), - $actualConfiguration->getListenerConfiguration() - ); - - $this->assertEquals( - $expectedConfiguration->getLoggingConfiguration(), - $actualConfiguration->getLoggingConfiguration() - ); - - $this->assertEquals( - $expectedConfiguration->getPHPConfiguration(), - $actualConfiguration->getPHPConfiguration() - ); - - $this->assertEquals( - $expectedConfiguration->getPHPUnitConfiguration(), - $actualConfiguration->getPHPUnitConfiguration() - ); - - $this->assertEquals( - $expectedConfiguration->getTestSuiteConfiguration(), - $actualConfiguration->getTestSuiteConfiguration() - ); - } -} diff --git a/vendor/phpunit/phpunit/tests/Util/GetoptTest.php b/vendor/phpunit/phpunit/tests/Util/GetoptTest.php deleted file mode 100644 index be9ae975..00000000 --- a/vendor/phpunit/phpunit/tests/Util/GetoptTest.php +++ /dev/null @@ -1,214 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Util; - -use PHPUnit\Framework\Exception; -use PHPUnit\Framework\TestCase; - -class GetoptTest extends TestCase -{ - public function testItIncludeTheLongOptionsAfterTheArgument(): void - { - $args = [ - 'command', - 'myArgument', - '--colors', - ]; - $actual = Getopt::getopt($args, '', ['colors==']); - - $expected = [ - [ - [ - '--colors', - null, - ], - ], - [ - 'myArgument', - ], - ]; - - $this->assertEquals($expected, $actual); - } - - public function testItIncludeTheShortOptionsAfterTheArgument(): void - { - $args = [ - 'command', - 'myArgument', - '-v', - ]; - $actual = Getopt::getopt($args, 'v'); - - $expected = [ - [ - [ - 'v', - null, - ], - ], - [ - 'myArgument', - ], - ]; - - $this->assertEquals($expected, $actual); - } - - public function testShortOptionUnrecognizedException(): void - { - $args = [ - 'command', - 'myArgument', - '-v', - ]; - - $this->expectException(Exception::class); - $this->expectExceptionMessage('unrecognized option -- v'); - - Getopt::getopt($args, ''); - } - - public function testShortOptionRequiresAnArgumentException(): void - { - $args = [ - 'command', - 'myArgument', - '-f', - ]; - - $this->expectException(Exception::class); - $this->expectExceptionMessage('option requires an argument -- f'); - - Getopt::getopt($args, 'f:'); - } - - public function testShortOptionHandleAnOptionalValue(): void - { - $args = [ - 'command', - 'myArgument', - '-f', - ]; - $actual = Getopt::getopt($args, 'f::'); - $expected = [ - [ - [ - 'f', - null, - ], - ], - [ - 'myArgument', - ], - ]; - $this->assertEquals($expected, $actual); - } - - public function testLongOptionIsAmbiguousException(): void - { - $args = [ - 'command', - '--col', - ]; - - $this->expectException(Exception::class); - $this->expectExceptionMessage('option --col is ambiguous'); - - Getopt::getopt($args, '', ['columns', 'colors']); - } - - public function testLongOptionUnrecognizedException(): void - { - // the exception 'unrecognized option --option' is not thrown - // if the there are not defined extended options - $args = [ - 'command', - '--foo', - ]; - - $this->expectException(Exception::class); - $this->expectExceptionMessage('unrecognized option --foo'); - - Getopt::getopt($args, '', ['colors']); - } - - public function testLongOptionRequiresAnArgumentException(): void - { - $args = [ - 'command', - '--foo', - ]; - - $this->expectException(Exception::class); - $this->expectExceptionMessage('option --foo requires an argument'); - - Getopt::getopt($args, '', ['foo=']); - } - - public function testLongOptionDoesNotAllowAnArgumentException(): void - { - $args = [ - 'command', - '--foo=bar', - ]; - - $this->expectException(Exception::class); - $this->expectExceptionMessage("option --foo doesn't allow an argument"); - - Getopt::getopt($args, '', ['foo']); - } - - public function testItHandlesLongParametesWithValues(): void - { - $command = 'command parameter-0 --exec parameter-1 --conf config.xml --optn parameter-2 --optn=content-of-o parameter-n'; - $args = \explode(' ', $command); - unset($args[0]); - $expected = [ - [ - ['--exec', null], - ['--conf', 'config.xml'], - ['--optn', null], - ['--optn', 'content-of-o'], - ], - [ - 'parameter-0', - 'parameter-1', - 'parameter-2', - 'parameter-n', - ], - ]; - $actual = Getopt::getopt($args, '', ['exec', 'conf=', 'optn==']); - $this->assertEquals($expected, $actual); - } - - public function testItHandlesShortParametesWithValues(): void - { - $command = 'command parameter-0 -x parameter-1 -c config.xml -o parameter-2 -ocontent-of-o parameter-n'; - $args = \explode(' ', $command); - unset($args[0]); - $expected = [ - [ - ['x', null], - ['c', 'config.xml'], - ['o', null], - ['o', 'content-of-o'], - ], - [ - 'parameter-0', - 'parameter-1', - 'parameter-2', - 'parameter-n', - ], - ]; - $actual = Getopt::getopt($args, 'xc:o::'); - $this->assertEquals($expected, $actual); - } -} diff --git a/vendor/phpunit/phpunit/tests/Util/GlobalStateTest.php b/vendor/phpunit/phpunit/tests/Util/GlobalStateTest.php deleted file mode 100644 index c2a2ecc4..00000000 --- a/vendor/phpunit/phpunit/tests/Util/GlobalStateTest.php +++ /dev/null @@ -1,35 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Util; - -use PHPUnit\Framework\TestCase; - -class GlobalStateTest extends TestCase -{ - public function testIncludedFilesAsStringSkipsVfsProtocols(): void - { - $dir = __DIR__; - $files = [ - 'phpunit', // The 0 index is not used - $dir . '/ConfigurationTest.php', - $dir . '/GlobalStateTest.php', - 'vfs://' . $dir . '/RegexTest.php', - 'phpvfs53e46260465c7://' . $dir . '/TestTest.php', - 'file://' . $dir . '/XmlTest.php' - ]; - - $this->assertEquals( - "require_once '" . $dir . "/ConfigurationTest.php';\n" . - "require_once '" . $dir . "/GlobalStateTest.php';\n" . - "require_once 'file://" . $dir . "/XmlTest.php';\n", - GlobalState::processIncludedFilesAsString($files) - ); - } -} diff --git a/vendor/phpunit/phpunit/tests/Util/JsonTest.php b/vendor/phpunit/phpunit/tests/Util/JsonTest.php deleted file mode 100644 index 04eaf7aa..00000000 --- a/vendor/phpunit/phpunit/tests/Util/JsonTest.php +++ /dev/null @@ -1,86 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Util; - -use PHPUnit\Framework\TestCase; - -class JsonTest extends TestCase -{ - /** - * @dataProvider canonicalizeProvider - * - * @throws \PHPUnit\Framework\ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public function testCanonicalize($actual, $expected, $expectError): void - { - [$error, $canonicalized] = Json::canonicalize($actual); - $this->assertEquals($expectError, $error); - - if (!$expectError) { - $this->assertEquals($expected, $canonicalized); - } - } - - /** - * @return array - */ - public function canonicalizeProvider() - { - return [ - ['{"name":"John","age":"35"}', '{"age":"35","name":"John"}', false], - ['{"name":"John","age":"35","kids":[{"name":"Petr","age":"5"}]}', '{"age":"35","kids":[{"age":"5","name":"Petr"}],"name":"John"}', false], - ['"name":"John","age":"35"}', '{"age":"35","name":"John"}', true], - ]; - } - - /** - * @dataProvider prettifyProvider - * - * @throws \PHPUnit\Framework\Exception - * @throws \PHPUnit\Framework\ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public function testPrettify($actual, $expected): void - { - $this->assertEquals($expected, Json::prettify($actual)); - } - - /** - * @return array - */ - public function prettifyProvider() - { - return [ - ['{"name":"John","age": "5"}', "{\n \"name\": \"John\",\n \"age\": \"5\"\n}"], - ]; - } - - /** - * @dataProvider prettifyExceptionProvider - * @expectedException \PHPUnit\Framework\Exception - * @expectedExceptionMessage Cannot prettify invalid json - */ - public function testPrettifyException($json): void - { - Json::prettify($json); - } - - /** - * @return array - */ - public function prettifyExceptionProvider() - { - return [ - ['"name":"John","age": "5"}'], - [''], - ]; - } -} diff --git a/vendor/phpunit/phpunit/tests/Util/PHP/AbstractPhpProcessTest.php b/vendor/phpunit/phpunit/tests/Util/PHP/AbstractPhpProcessTest.php deleted file mode 100644 index 5544a098..00000000 --- a/vendor/phpunit/phpunit/tests/Util/PHP/AbstractPhpProcessTest.php +++ /dev/null @@ -1,120 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Util\PHP; - -use PHPUnit\Framework\TestCase; - -class AbstractPhpProcessTest extends TestCase -{ - /** - * @var AbstractPhpProcess|\PHPUnit\Framework\MockObject\MockObject - */ - private $phpProcess; - - protected function setUp(): void - { - $this->phpProcess = $this->getMockForAbstractClass(AbstractPhpProcess::class); - } - - protected function tearDown(): void - { - $this->phpProcess = null; - } - - public function testShouldNotUseStderrRedirectionByDefault(): void - { - $this->assertFalse($this->phpProcess->useStderrRedirection()); - } - - public function testShouldDefinedIfUseStderrRedirection(): void - { - $this->phpProcess->setUseStderrRedirection(true); - - $this->assertTrue($this->phpProcess->useStderrRedirection()); - } - - public function testShouldDefinedIfDoNotUseStderrRedirection(): void - { - $this->phpProcess->setUseStderrRedirection(false); - - $this->assertFalse($this->phpProcess->useStderrRedirection()); - } - - public function testShouldUseGivenSettingsToCreateCommand(): void - { - $settings = [ - 'allow_url_fopen=1', - 'auto_append_file=', - 'display_errors=1', - ]; - - $expectedCommandFormat = '%s -d %callow_url_fopen=1%c -d %cauto_append_file=%c -d %cdisplay_errors=1%c'; - $actualCommand = $this->phpProcess->getCommand($settings); - - $this->assertStringMatchesFormat($expectedCommandFormat, $actualCommand); - } - - public function testShouldRedirectStderrToStdoutWhenDefined(): void - { - $this->phpProcess->setUseStderrRedirection(true); - - $expectedCommandFormat = '%s 2>&1'; - $actualCommand = $this->phpProcess->getCommand([]); - - $this->assertStringMatchesFormat($expectedCommandFormat, $actualCommand); - } - - public function testShouldUseArgsToCreateCommand(): void - { - $this->phpProcess->setArgs('foo=bar'); - - $expectedCommandFormat = '%s -- foo=bar'; - $actualCommand = $this->phpProcess->getCommand([]); - - $this->assertStringMatchesFormat($expectedCommandFormat, $actualCommand); - } - - public function testShouldHaveFileToCreateCommand(): void - { - $argumentEscapingCharacter = \DIRECTORY_SEPARATOR === '\\' ? '"' : '\''; - $expectedCommandFormat = \sprintf('%%s -%%c %1$sfile.php%1$s', $argumentEscapingCharacter); - $actualCommand = $this->phpProcess->getCommand([], 'file.php'); - - $this->assertStringMatchesFormat($expectedCommandFormat, $actualCommand); - } - - public function testStdinGetterAndSetter(): void - { - $this->phpProcess->setStdin('foo'); - - $this->assertEquals('foo', $this->phpProcess->getStdin()); - } - - public function testArgsGetterAndSetter(): void - { - $this->phpProcess->setArgs('foo=bar'); - - $this->assertEquals('foo=bar', $this->phpProcess->getArgs()); - } - - public function testEnvGetterAndSetter(): void - { - $this->phpProcess->setEnv(['foo' => 'bar']); - - $this->assertEquals(['foo' => 'bar'], $this->phpProcess->getEnv()); - } - - public function testTimeoutGetterAndSetter(): void - { - $this->phpProcess->setTimeout(30); - - $this->assertEquals(30, $this->phpProcess->getTimeout()); - } -} diff --git a/vendor/phpunit/phpunit/tests/Util/RegularExpressionTest.php b/vendor/phpunit/phpunit/tests/Util/RegularExpressionTest.php deleted file mode 100644 index 6d5494e9..00000000 --- a/vendor/phpunit/phpunit/tests/Util/RegularExpressionTest.php +++ /dev/null @@ -1,56 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Util; - -use PHPUnit\Framework\TestCase; - -class RegularExpressionTest extends TestCase -{ - public function validRegexpProvider() - { - return [ - ['#valid regexp#', 'valid regexp', 1], - [';val.*xp;', 'valid regexp', 1], - ['/val.*xp/i', 'VALID REGEXP', 1], - ['/a val.*p/', 'valid regexp', 0], - ]; - } - - public function invalidRegexpProvider() - { - return [ - ['valid regexp', 'valid regexp'], - [';val.*xp', 'valid regexp'], - ['val.*xp/i', 'VALID REGEXP'], - ]; - } - - /** - * @dataProvider validRegexpProvider - * - * @throws \Exception - * @throws \PHPUnit\Framework\ExpectationFailedException - */ - public function testValidRegex($pattern, $subject, $return): void - { - $this->assertEquals($return, RegularExpression::safeMatch($pattern, $subject)); - } - - /** - * @dataProvider invalidRegexpProvider - * - * @throws \Exception - * @throws \PHPUnit\Framework\ExpectationFailedException - */ - public function testInvalidRegex($pattern, $subject): void - { - $this->assertFalse(RegularExpression::safeMatch($pattern, $subject)); - } -} diff --git a/vendor/phpunit/phpunit/tests/Util/TestDox/CliTestDoxPrinterTest.php b/vendor/phpunit/phpunit/tests/Util/TestDox/CliTestDoxPrinterTest.php deleted file mode 100644 index 6429459d..00000000 --- a/vendor/phpunit/phpunit/tests/Util/TestDox/CliTestDoxPrinterTest.php +++ /dev/null @@ -1,209 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Util\TestDox; - -use Exception; -use PHPUnit\Framework\AssertionFailedError; -use PHPUnit\Framework\TestCase; -use PHPUnit\Framework\Warning; - -final class CliTestDoxPrinterTest extends TestCase -{ - /** - * @var TestableCliTestDoxPrinter - */ - private $printer; - - /** - * @var TestableCliTestDoxPrinter - */ - private $verbosePrinter; - - protected function setUp(): void - { - $this->printer = new TestableCliTestDoxPrinter; - $this->verbosePrinter = new TestableCliTestDoxPrinter(null, true); - } - - protected function tearDown(): void - { - $this->printer = null; - $this->verbosePrinter = null; - } - - public function testPrintsTheClassNameOfTheTestClass(): void - { - $this->printer->startTest($this); - $this->printer->endTest($this, 0); - - $this->assertStringStartsWith('PHPUnit\Util\TestDox\CliTestDoxPrinter', $this->printer->getBuffer()); - } - - public function testPrintsThePrettifiedMethodName(): void - { - $this->printer->startTest($this); - $this->printer->endTest($this, 0.001); - - $this->assertContains('Prints the prettified method name', $this->printer->getBuffer()); - } - - public function testPrintsCheckMarkForSuccessfulTest(): void - { - $this->printer->startTest($this); - $this->printer->endTest($this, 0.001); - - $this->assertContains('✔', $this->printer->getBuffer()); - } - - public function testDoesNotPrintAdditionalInformationForSuccessfulTest(): void - { - $this->printer->startTest($this); - $this->printer->endTest($this, 0.001); - - $this->assertNotContains('│', $this->printer->getBuffer()); - } - - public function testPrintsCrossForTestWithError(): void - { - $this->printer->startTest($this); - $this->printer->addError($this, new Exception(), 0); - $this->printer->endTest($this, 0.001); - - $this->assertContains('✘', $this->printer->getBuffer()); - } - - public function testPrintsAdditionalInformationForTestWithError(): void - { - $this->printer->startTest($this); - $this->printer->addError($this, new Exception(), 0); - $this->printer->endTest($this, 0.001); - - $this->assertContains('│', $this->printer->getBuffer()); - } - - public function testPrintsCrossForTestWithWarning(): void - { - $this->printer->startTest($this); - $this->printer->addWarning($this, new Warning(), 0); - $this->printer->endTest($this, 0.001); - - $this->assertContains('✘', $this->printer->getBuffer()); - } - - public function testPrintsAdditionalInformationForTestWithWarning(): void - { - $this->printer->startTest($this); - $this->printer->addWarning($this, new Warning(), 0); - $this->printer->endTest($this, 0.001); - - $this->assertContains('│', $this->printer->getBuffer()); - } - - public function testPrintsCrossForTestWithFailure(): void - { - $this->printer->startTest($this); - $this->printer->addFailure($this, new AssertionFailedError(), 0); - $this->printer->endTest($this, 0.001); - - $this->assertContains('✘', $this->printer->getBuffer()); - } - - public function testPrintsAdditionalInformationForTestWithFailure(): void - { - $this->printer->startTest($this); - $this->printer->addFailure($this, new AssertionFailedError(), 0); - $this->printer->endTest($this, 0.001); - - $this->assertContains('│', $this->printer->getBuffer()); - } - - public function testPrintsEmptySetSymbolForTestWithFailure(): void - { - $this->printer->startTest($this); - $this->printer->addIncompleteTest($this, new Exception(), 0); - $this->printer->endTest($this, 0.001); - - $this->assertContains('∅', $this->printer->getBuffer()); - } - - public function testDoesNotPrintAdditionalInformationForIncompleteTestByDefault(): void - { - $this->printer->startTest($this); - $this->printer->addIncompleteTest($this, new Exception(), 0); - $this->printer->endTest($this, 0.001); - - $this->assertNotContains('│', $this->printer->getBuffer()); - } - - public function testPrintsAdditionalInformationForIncompleteTestInVerboseMode(): void - { - $this->verbosePrinter->startTest($this); - $this->verbosePrinter->addIncompleteTest($this, new Exception('E_X_C_E_P_T_I_O_N'), 0); - $this->verbosePrinter->endTest($this, 0.001); - - $this->assertContains('│', $this->verbosePrinter->getBuffer()); - $this->assertContains('E_X_C_E_P_T_I_O_N', $this->verbosePrinter->getBuffer()); - } - - public function testPrintsRadioactiveSymbolForRiskyTest(): void - { - $this->printer->startTest($this); - $this->printer->addRiskyTest($this, new Exception(), 0); - $this->printer->endTest($this, 0.001); - - $this->assertContains('☢', $this->printer->getBuffer()); - } - - public function testDoesNotPrintAdditionalInformationForRiskyTestByDefault(): void - { - $this->printer->startTest($this); - $this->printer->addRiskyTest($this, new Exception(), 0); - $this->printer->endTest($this, 0.001); - - $this->assertNotContains('│', $this->printer->getBuffer()); - } - - public function testPrintsAdditionalInformationForRiskyTestInVerboseMode(): void - { - $this->verbosePrinter->startTest($this); - $this->verbosePrinter->addRiskyTest($this, new Exception(), 0); - $this->verbosePrinter->endTest($this, 0.001); - - $this->assertContains('│', $this->verbosePrinter->getBuffer()); - } - - public function testPrintsArrowForSkippedTest(): void - { - $this->printer->startTest($this); - $this->printer->addSkippedTest($this, new Exception(), 0); - $this->printer->endTest($this, 0.001); - - $this->assertContains('→', $this->printer->getBuffer()); - } - - public function testDoesNotPrintAdditionalInformationForSkippedTestByDefault(): void - { - $this->printer->startTest($this); - $this->printer->addSkippedTest($this, new Exception(), 0); - $this->printer->endTest($this, 0.001); - - $this->assertNotContains('│', $this->printer->getBuffer()); - } - - public function testPrintsAdditionalInformationForSkippedTestInVerboseMode(): void - { - $this->verbosePrinter->startTest($this); - $this->verbosePrinter->addSkippedTest($this, new Exception('S_K_I_P_P_E_D'), 0); - $this->verbosePrinter->endTest($this, 0.001); - - $this->assertContains('│', $this->verbosePrinter->getBuffer()); - $this->assertContains('S_K_I_P_P_E_D', $this->verbosePrinter->getBuffer()); - } -} diff --git a/vendor/phpunit/phpunit/tests/Util/TestDox/NamePrettifierTest.php b/vendor/phpunit/phpunit/tests/Util/TestDox/NamePrettifierTest.php deleted file mode 100644 index 1c215bff..00000000 --- a/vendor/phpunit/phpunit/tests/Util/TestDox/NamePrettifierTest.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 PHPUnit\Util\TestDox; - -use PHPUnit\Framework\TestCase; - -class NamePrettifierTest extends TestCase -{ - /** - * @var NamePrettifier - */ - private $namePrettifier; - - protected function setUp(): void - { - $this->namePrettifier = new NamePrettifier; - } - - protected function tearDown(): void - { - $this->namePrettifier = null; - } - - public function testTitleHasSensibleDefaults(): void - { - $this->assertEquals('Foo', $this->namePrettifier->prettifyTestClass('FooTest')); - $this->assertEquals('Foo', $this->namePrettifier->prettifyTestClass('TestFoo')); - $this->assertEquals('Foo', $this->namePrettifier->prettifyTestClass('TestFooTest')); - $this->assertEquals('Foo', $this->namePrettifier->prettifyTestClass('Test\FooTest')); - $this->assertEquals('Foo', $this->namePrettifier->prettifyTestClass('Tests\FooTest')); - } - - public function testTestNameIsConvertedToASentence(): void - { - $this->assertEquals('This is a test', $this->namePrettifier->prettifyTestMethod('testThisIsATest')); - $this->assertEquals('This is a test', $this->namePrettifier->prettifyTestMethod('testThisIsATest2')); - $this->assertEquals('This is a test', $this->namePrettifier->prettifyTestMethod('this_is_a_test')); - $this->assertEquals('This is a test', $this->namePrettifier->prettifyTestMethod('test_this_is_a_test')); - $this->assertEquals('Foo for bar is 0', $this->namePrettifier->prettifyTestMethod('testFooForBarIs0')); - $this->assertEquals('Foo for baz is 1', $this->namePrettifier->prettifyTestMethod('testFooForBazIs1')); - $this->assertEquals('This has a 123 in its name', $this->namePrettifier->prettifyTestMethod('testThisHasA123InItsName')); - $this->assertEquals('', $this->namePrettifier->prettifyTestMethod('test')); - } - - /** - * @ticket 224 - */ - public function testTestNameIsNotGroupedWhenNotInSequence(): void - { - $this->assertEquals('Sets redirect header on 301', $this->namePrettifier->prettifyTestMethod('testSetsRedirectHeaderOn301')); - $this->assertEquals('Sets redirect header on 302', $this->namePrettifier->prettifyTestMethod('testSetsRedirectHeaderOn302')); - } -} diff --git a/vendor/phpunit/phpunit/tests/Util/TestTest.php b/vendor/phpunit/phpunit/tests/Util/TestTest.php deleted file mode 100644 index a9873e12..00000000 --- a/vendor/phpunit/phpunit/tests/Util/TestTest.php +++ /dev/null @@ -1,1031 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Util; - -use PharIo\Version\VersionConstraint; -use PHPUnit\Framework\CodeCoverageException; -use PHPUnit\Framework\Exception; -use PHPUnit\Framework\TestCase; -use PHPUnit\Framework\Warning; - -class TestTest extends TestCase -{ - /** - * @todo Split up in separate tests - */ - public function testGetExpectedException(): void - { - $this->assertArraySubset( - ['class' => 'FooBarBaz', 'code' => null, 'message' => ''], - Test::getExpectedException(\ExceptionTest::class, 'testOne') - ); - - $this->assertArraySubset( - ['class' => 'Foo_Bar_Baz', 'code' => null, 'message' => ''], - Test::getExpectedException(\ExceptionTest::class, 'testTwo') - ); - - $this->assertArraySubset( - ['class' => 'Foo\Bar\Baz', 'code' => null, 'message' => ''], - Test::getExpectedException(\ExceptionTest::class, 'testThree') - ); - - $this->assertArraySubset( - ['class' => 'ほげ', 'code' => null, 'message' => ''], - Test::getExpectedException(\ExceptionTest::class, 'testFour') - ); - - $this->assertArraySubset( - ['class' => 'Class', 'code' => 1234, 'message' => 'Message'], - Test::getExpectedException(\ExceptionTest::class, 'testFive') - ); - - $this->assertArraySubset( - ['class' => 'Class', 'code' => 1234, 'message' => 'Message'], - Test::getExpectedException(\ExceptionTest::class, 'testSix') - ); - - $this->assertArraySubset( - ['class' => 'Class', 'code' => 'ExceptionCode', 'message' => 'Message'], - Test::getExpectedException(\ExceptionTest::class, 'testSeven') - ); - - $this->assertArraySubset( - ['class' => 'Class', 'code' => 0, 'message' => 'Message'], - Test::getExpectedException(\ExceptionTest::class, 'testEight') - ); - - $this->assertArraySubset( - ['class' => 'Class', 'code' => \ExceptionTest::ERROR_CODE, 'message' => \ExceptionTest::ERROR_MESSAGE], - Test::getExpectedException(\ExceptionTest::class, 'testNine') - ); - - $this->assertArraySubset( - ['class' => 'Class', 'code' => null, 'message' => ''], - Test::getExpectedException(\ExceptionTest::class, 'testSingleLine') - ); - - $this->assertArraySubset( - ['class' => 'Class', 'code' => \My\Space\ExceptionNamespaceTest::ERROR_CODE, 'message' => \My\Space\ExceptionNamespaceTest::ERROR_MESSAGE], - Test::getExpectedException(\My\Space\ExceptionNamespaceTest::class, 'testConstants') - ); - - // Ensure the Class::CONST expression is only evaluated when the constant really exists - $this->assertArraySubset( - ['class' => 'Class', 'code' => 'ExceptionTest::UNKNOWN_CODE_CONSTANT', 'message' => 'ExceptionTest::UNKNOWN_MESSAGE_CONSTANT'], - Test::getExpectedException(\ExceptionTest::class, 'testUnknownConstants') - ); - - $this->assertArraySubset( - ['class' => 'Class', 'code' => 'My\Space\ExceptionNamespaceTest::UNKNOWN_CODE_CONSTANT', 'message' => 'My\Space\ExceptionNamespaceTest::UNKNOWN_MESSAGE_CONSTANT'], - Test::getExpectedException(\My\Space\ExceptionNamespaceTest::class, 'testUnknownConstants') - ); - } - - public function testGetExpectedRegExp(): void - { - $this->assertArraySubset( - ['message_regex' => '#regex#'], - Test::getExpectedException(\ExceptionTest::class, 'testWithRegexMessage') - ); - - $this->assertArraySubset( - ['message_regex' => '#regex#'], - Test::getExpectedException(\ExceptionTest::class, 'testWithRegexMessageFromClassConstant') - ); - - $this->assertArraySubset( - ['message_regex' => 'ExceptionTest::UNKNOWN_MESSAGE_REGEX_CONSTANT'], - Test::getExpectedException(\ExceptionTest::class, 'testWithUnknowRegexMessageFromClassConstant') - ); - } - - /** - * @dataProvider requirementsProvider - * - * @throws Warning - * @throws \PHPUnit\Framework\ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public function testGetRequirements($test, $result): void - { - $this->assertEquals( - $result, - Test::getRequirements(\RequirementsTest::class, $test) - ); - } - - public function requirementsProvider() - { - return [ - ['testOne', []], - ['testTwo', ['PHPUnit' => ['version' => '1.0', 'operator' => '']]], - ['testThree', ['PHP' => ['version' => '2.0', 'operator' => '']]], - ['testFour', [ - 'PHPUnit' => ['version' => '2.0', 'operator' => ''], - 'PHP' => ['version' => '1.0', 'operator' => ''], - ]], - ['testFive', ['PHP' => ['version' => '5.4.0RC6', 'operator' => '']]], - ['testSix', ['PHP' => ['version' => '5.4.0-alpha1', 'operator' => '']]], - ['testSeven', ['PHP' => ['version' => '5.4.0beta2', 'operator' => '']]], - ['testEight', ['PHP' => ['version' => '5.4-dev', 'operator' => '']]], - ['testNine', ['functions' => ['testFunc']]], - ['testTen', ['extensions' => ['testExt']]], - ['testEleven', [ - 'OS' => 'SunOS', - 'OSFAMILY' => 'Solaris', - ]], - [ - 'testSpace', - [ - 'extensions' => ['spl'], - 'OS' => '.*', - ], - ], - [ - 'testAllPossibleRequirements', - [ - 'PHP' => ['version' => '99-dev', 'operator' => ''], - 'PHPUnit' => ['version' => '9-dev', 'operator' => ''], - 'OS' => 'DOESNOTEXIST', - 'functions' => [ - 'testFuncOne', - 'testFuncTwo', - ], - 'setting' => [ - 'not_a_setting' => 'Off' - ], - 'extensions' => [ - 'testExtOne', - 'testExtTwo', - 'testExtThree', - ], - 'extension_versions' => [ - 'testExtThree' => ['version' => '2.0', 'operator' => ''], - ], - ], - ], - ['testSpecificExtensionVersion', - [ - 'extension_versions' => ['testExt' => ['version' => '1.8.0', 'operator' => '']], - 'extensions' => ['testExt'] - ] - ], - ['testPHPVersionOperatorLessThan', - [ - 'PHP' => ['version' => '5.4', 'operator' => '<'] - ] - ], - ['testPHPVersionOperatorLessThanEquals', - [ - 'PHP' => ['version' => '5.4', 'operator' => '<='] - ] - ], - ['testPHPVersionOperatorGreaterThan', - [ - 'PHP' => ['version' => '99', 'operator' => '>'] - ] - ], - ['testPHPVersionOperatorGreaterThanEquals', - [ - 'PHP' => ['version' => '99', 'operator' => '>='] - ] - ], - ['testPHPVersionOperatorEquals', - [ - 'PHP' => ['version' => '5.4', 'operator' => '='] - ] - ], - ['testPHPVersionOperatorDoubleEquals', - [ - 'PHP' => ['version' => '5.4', 'operator' => '=='] - ] - ], - ['testPHPVersionOperatorBangEquals', - [ - 'PHP' => ['version' => '99', 'operator' => '!='] - ] - ], - ['testPHPVersionOperatorNotEquals', - [ - 'PHP' => ['version' => '99', 'operator' => '<>'] - ] - ], - ['testPHPVersionOperatorNoSpace', - [ - 'PHP' => ['version' => '99', 'operator' => '>='] - ] - ], - ['testPHPUnitVersionOperatorLessThan', - [ - 'PHPUnit' => ['version' => '1.0', 'operator' => '<'] - ] - ], - ['testPHPUnitVersionOperatorLessThanEquals', - [ - 'PHPUnit' => ['version' => '1.0', 'operator' => '<='] - ] - ], - ['testPHPUnitVersionOperatorGreaterThan', - [ - 'PHPUnit' => ['version' => '99', 'operator' => '>'] - ] - ], - ['testPHPUnitVersionOperatorGreaterThanEquals', - [ - 'PHPUnit' => ['version' => '99', 'operator' => '>='] - ] - ], - ['testPHPUnitVersionOperatorEquals', - [ - 'PHPUnit' => ['version' => '1.0', 'operator' => '='] - ] - ], - ['testPHPUnitVersionOperatorDoubleEquals', - [ - 'PHPUnit' => ['version' => '1.0', 'operator' => '=='] - ] - ], - ['testPHPUnitVersionOperatorBangEquals', - [ - 'PHPUnit' => ['version' => '99', 'operator' => '!='] - ] - ], - ['testPHPUnitVersionOperatorNotEquals', - [ - 'PHPUnit' => ['version' => '99', 'operator' => '<>'] - ] - ], - ['testPHPUnitVersionOperatorNoSpace', - [ - 'PHPUnit' => ['version' => '99', 'operator' => '>='] - ] - ], - ['testExtensionVersionOperatorLessThanEquals', - [ - 'extensions' => ['testExtOne'], - 'extension_versions' => ['testExtOne' => ['version' => '1.0', 'operator' => '<=']] - ] - ], - ['testExtensionVersionOperatorGreaterThan', - [ - 'extensions' => ['testExtOne'], - 'extension_versions' => ['testExtOne' => ['version' => '99', 'operator' => '>']] - ] - ], - ['testExtensionVersionOperatorGreaterThanEquals', - [ - 'extensions' => ['testExtOne'], - 'extension_versions' => ['testExtOne' => ['version' => '99', 'operator' => '>=']] - ] - ], - ['testExtensionVersionOperatorEquals', - [ - 'extensions' => ['testExtOne'], - 'extension_versions' => ['testExtOne' => ['version' => '1.0', 'operator' => '=']] - ] - ], - ['testExtensionVersionOperatorDoubleEquals', - [ - 'extensions' => ['testExtOne'], - 'extension_versions' => ['testExtOne' => ['version' => '1.0', 'operator' => '==']] - ] - ], - ['testExtensionVersionOperatorBangEquals', - [ - 'extensions' => ['testExtOne'], - 'extension_versions' => ['testExtOne' => ['version' => '99', 'operator' => '!=']] - ] - ], - ['testExtensionVersionOperatorNotEquals', - [ - 'extensions' => ['testExtOne'], - 'extension_versions' => ['testExtOne' => ['version' => '99', 'operator' => '<>']] - ] - ], - ['testExtensionVersionOperatorNoSpace', - [ - 'extensions' => ['testExtOne'], - 'extension_versions' => ['testExtOne' => ['version' => '99', 'operator' => '>=']] - ] - ] - ]; - } - - /** - * @dataProvider requirementsWithVersionConstraintsProvider - * - * @throws Exception - * @throws Warning - * @throws \PHPUnit\Framework\ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public function testGetRequirementsWithVersionConstraints($test, array $result): void - { - $requirements = Test::getRequirements(\RequirementsTest::class, $test); - - foreach ($result as $type => $expected_requirement) { - $this->assertArrayHasKey( - "{$type}_constraint", - $requirements - ); - $this->assertArrayHasKey( - 'constraint', - $requirements["{$type}_constraint"] - ); - $this->assertInstanceOf( - VersionConstraint::class, - $requirements["{$type}_constraint"]['constraint'] - ); - $this->assertSame( - $expected_requirement['constraint'], - $requirements["{$type}_constraint"]['constraint']->asString() - ); - } - } - - public function requirementsWithVersionConstraintsProvider() - { - return [ - [ - 'testVersionConstraintTildeMajor', - [ - 'PHP' => [ - 'constraint' => '~1.0' - ], - 'PHPUnit' => [ - 'constraint' => '~2.0' - ] - ] - ], - [ - 'testVersionConstraintCaretMajor', - [ - 'PHP' => [ - 'constraint' => '^1.0' - ], - 'PHPUnit' => [ - 'constraint' => '^2.0' - ] - ] - ], - [ - 'testVersionConstraintTildeMinor', - [ - 'PHP' => [ - 'constraint' => '~3.4.7' - ], - 'PHPUnit' => [ - 'constraint' => '~4.7.1' - ] - ] - ], - [ - 'testVersionConstraintCaretMinor', - [ - 'PHP' => [ - 'constraint' => '^7.0.17' - ], - 'PHPUnit' => [ - 'constraint' => '^4.7.1' - ] - ] - ], - [ - 'testVersionConstraintCaretOr', - [ - 'PHP' => [ - 'constraint' => '^5.6 || ^7.0' - ], - 'PHPUnit' => [ - 'constraint' => '^5.0 || ^6.0' - ] - ] - ], - [ - 'testVersionConstraintTildeOr', - [ - 'PHP' => [ - 'constraint' => '~5.6.22 || ~7.0.17' - ], - 'PHPUnit' => [ - 'constraint' => '^5.0.5 || ^6.0.6' - ] - ] - ], - [ - 'testVersionConstraintTildeOrCaret', - [ - 'PHP' => [ - 'constraint' => '~5.6.22 || ^7.0' - ], - 'PHPUnit' => [ - 'constraint' => '~5.6.22 || ^7.0' - ] - ] - ], - [ - 'testVersionConstraintCaretOrTilde', - [ - 'PHP' => [ - 'constraint' => '^5.6 || ~7.0.17' - ], - 'PHPUnit' => [ - 'constraint' => '^5.6 || ~7.0.17' - ] - ] - ], - [ - 'testVersionConstraintRegexpIgnoresWhitespace', - [ - 'PHP' => [ - 'constraint' => '~5.6.22 || ~7.0.17' - ], - 'PHPUnit' => [ - 'constraint' => '~5.6.22 || ~7.0.17' - ] - ] - ] - ]; - } - - /** - * @dataProvider requirementsWithInvalidVersionConstraintsThrowsExceptionProvider - * - * @throws Warning - */ - public function testGetRequirementsWithInvalidVersionConstraintsThrowsException($test): void - { - $this->expectException(Warning::class); - Test::getRequirements(\RequirementsTest::class, $test); - } - - public function requirementsWithInvalidVersionConstraintsThrowsExceptionProvider() - { - return [ - ['testVersionConstraintInvalidPhpConstraint'], - ['testVersionConstraintInvalidPhpUnitConstraint'] - ]; - } - - public function testGetRequirementsMergesClassAndMethodDocBlocks(): void - { - $expectedAnnotations = [ - 'PHP' => ['version' => '5.4', 'operator' => ''], - 'PHPUnit' => ['version' => '3.7', 'operator' => ''], - 'OS' => 'WINNT', - 'functions' => [ - 'testFuncClass', - 'testFuncMethod', - ], - 'extensions' => [ - 'testExtClass', - 'testExtMethod', - ] - ]; - - $this->assertEquals( - $expectedAnnotations, - Test::getRequirements(\RequirementsClassDocBlockTest::class, 'testMethod') - ); - } - - /** - * @dataProvider missingRequirementsProvider - * - * @throws Warning - * @throws \PHPUnit\Framework\ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public function testGetMissingRequirements($test, $result): void - { - $this->assertEquals( - $result, - Test::getMissingRequirements(\RequirementsTest::class, $test) - ); - } - - public function missingRequirementsProvider() - { - return [ - ['testOne', []], - ['testNine', ['Function testFunc is required.']], - ['testTen', ['Extension testExt is required.']], - ['testAlwaysSkip', ['PHPUnit >= 1111111 is required.']], - ['testAlwaysSkip2', ['PHP >= 9999999 is required.']], - ['testAlwaysSkip3', ['Operating system matching /DOESNOTEXIST/i is required.']], - ['testAllPossibleRequirements', [ - 'PHP >= 99-dev is required.', - 'PHPUnit >= 9-dev is required.', - 'Operating system matching /DOESNOTEXIST/i is required.', - 'Function testFuncOne is required.', - 'Function testFuncTwo is required.', - 'Setting "not_a_setting" must be "Off".', - 'Extension testExtOne is required.', - 'Extension testExtTwo is required.', - 'Extension testExtThree >= 2.0 is required.', - ]], - ['testPHPVersionOperatorLessThan', ['PHP < 5.4 is required.']], - ['testPHPVersionOperatorLessThanEquals', ['PHP <= 5.4 is required.']], - ['testPHPVersionOperatorGreaterThan', ['PHP > 99 is required.']], - ['testPHPVersionOperatorGreaterThanEquals', ['PHP >= 99 is required.']], - ['testPHPVersionOperatorNoSpace', ['PHP >= 99 is required.']], - ['testPHPVersionOperatorEquals', ['PHP = 5.4 is required.']], - ['testPHPVersionOperatorDoubleEquals', ['PHP == 5.4 is required.']], - ['testPHPUnitVersionOperatorLessThan', ['PHPUnit < 1.0 is required.']], - ['testPHPUnitVersionOperatorLessThanEquals', ['PHPUnit <= 1.0 is required.']], - ['testPHPUnitVersionOperatorGreaterThan', ['PHPUnit > 99 is required.']], - ['testPHPUnitVersionOperatorGreaterThanEquals', ['PHPUnit >= 99 is required.']], - ['testPHPUnitVersionOperatorEquals', ['PHPUnit = 1.0 is required.']], - ['testPHPUnitVersionOperatorDoubleEquals', ['PHPUnit == 1.0 is required.']], - ['testPHPUnitVersionOperatorNoSpace', ['PHPUnit >= 99 is required.']], - ['testExtensionVersionOperatorLessThan', ['Extension testExtOne < 1.0 is required.']], - ['testExtensionVersionOperatorLessThanEquals', ['Extension testExtOne <= 1.0 is required.']], - ['testExtensionVersionOperatorGreaterThan', ['Extension testExtOne > 99 is required.']], - ['testExtensionVersionOperatorGreaterThanEquals', ['Extension testExtOne >= 99 is required.']], - ['testExtensionVersionOperatorEquals', ['Extension testExtOne = 1.0 is required.']], - ['testExtensionVersionOperatorDoubleEquals', ['Extension testExtOne == 1.0 is required.']], - ['testExtensionVersionOperatorNoSpace', ['Extension testExtOne >= 99 is required.']], - ['testVersionConstraintTildeMajor', [ - 'PHP version does not match the required constraint ~1.0.', - 'PHPUnit version does not match the required constraint ~2.0.' - ]], - ['testVersionConstraintCaretMajor', [ - 'PHP version does not match the required constraint ^1.0.', - 'PHPUnit version does not match the required constraint ^2.0.' - ]] - ]; - } - - /** - * @todo This test does not really test functionality of \PHPUnit\Util\Test - */ - public function testGetProvidedDataRegEx(): void - { - $result = \preg_match(Test::REGEX_DATA_PROVIDER, '@dataProvider method', $matches); - $this->assertEquals(1, $result); - $this->assertEquals('method', $matches[1]); - - $result = \preg_match(Test::REGEX_DATA_PROVIDER, '@dataProvider class::method', $matches); - $this->assertEquals(1, $result); - $this->assertEquals('class::method', $matches[1]); - - $result = \preg_match(Test::REGEX_DATA_PROVIDER, '@dataProvider namespace\class::method', $matches); - $this->assertEquals(1, $result); - $this->assertEquals('namespace\class::method', $matches[1]); - - $result = \preg_match(Test::REGEX_DATA_PROVIDER, '@dataProvider namespace\namespace\class::method', $matches); - $this->assertEquals(1, $result); - $this->assertEquals('namespace\namespace\class::method', $matches[1]); - - $result = \preg_match(Test::REGEX_DATA_PROVIDER, '@dataProvider メソッド', $matches); - $this->assertEquals(1, $result); - $this->assertEquals('メソッド', $matches[1]); - } - - /** - * Check if all data providers are being merged. - */ - public function testMultipleDataProviders(): void - { - $dataSets = Test::getProvidedData(\MultipleDataProviderTest::class, 'testOne'); - - $this->assertCount(9, $dataSets); - - $aCount = 0; - $bCount = 0; - $cCount = 0; - - for ($i = 0; $i < 9; $i++) { - $aCount += $dataSets[$i][0] != null ? 1 : 0; - $bCount += $dataSets[$i][1] != null ? 1 : 0; - $cCount += $dataSets[$i][2] != null ? 1 : 0; - } - - $this->assertEquals(3, $aCount); - $this->assertEquals(3, $bCount); - $this->assertEquals(3, $cCount); - } - - public function testMultipleYieldIteratorDataProviders(): void - { - $dataSets = Test::getProvidedData(\MultipleDataProviderTest::class, 'testTwo'); - - $this->assertCount(9, $dataSets); - - $aCount = 0; - $bCount = 0; - $cCount = 0; - - for ($i = 0; $i < 9; $i++) { - $aCount += $dataSets[$i][0] != null ? 1 : 0; - $bCount += $dataSets[$i][1] != null ? 1 : 0; - $cCount += $dataSets[$i][2] != null ? 1 : 0; - } - - $this->assertEquals(3, $aCount); - $this->assertEquals(3, $bCount); - $this->assertEquals(3, $cCount); - } - - public function testWithVariousIterableDataProviders(): void - { - $dataSets = Test::getProvidedData(\VariousIterableDataProviderTest::class, 'test'); - - $this->assertEquals([ - ['A'], - ['B'], - ['C'], - ['D'], - ['E'], - ['F'], - ['G'], - ['H'], - ['I'], - ], $dataSets); - } - - public function testTestWithEmptyAnnotation(): void - { - $result = Test::getDataFromTestWithAnnotation("/**\n * @anotherAnnotation\n */"); - $this->assertNull($result); - } - - public function testTestWithSimpleCase(): void - { - $result = Test::getDataFromTestWithAnnotation('/** - * @testWith [1] - */'); - $this->assertEquals([[1]], $result); - } - - public function testTestWithMultiLineMultiParameterCase(): void - { - $result = Test::getDataFromTestWithAnnotation('/** - * @testWith [1, 2] - * [3, 4] - */'); - $this->assertEquals([[1, 2], [3, 4]], $result); - } - - public function testTestWithVariousTypes(): void - { - $result = Test::getDataFromTestWithAnnotation('/** - * @testWith ["ab"] - * [true] - * [null] - */'); - $this->assertEquals([['ab'], [true], [null]], $result); - } - - public function testTestWithAnnotationAfter(): void - { - $result = Test::getDataFromTestWithAnnotation('/** - * @testWith [1] - * [2] - * @annotation - */'); - $this->assertEquals([[1], [2]], $result); - } - - public function testTestWithSimpleTextAfter(): void - { - $result = Test::getDataFromTestWithAnnotation('/** - * @testWith [1] - * [2] - * blah blah - */'); - $this->assertEquals([[1], [2]], $result); - } - - public function testTestWithCharacterEscape(): void - { - $result = Test::getDataFromTestWithAnnotation('/** - * @testWith ["\"", "\""] - */'); - $this->assertEquals([['"', '"']], $result); - } - - public function testTestWithThrowsProperExceptionIfDatasetCannotBeParsed(): void - { - $this->expectException(Exception::class); - $this->expectExceptionMessageRegExp('/^The data set for the @testWith annotation cannot be parsed:/'); - - Test::getDataFromTestWithAnnotation('/** - * @testWith [s] - */'); - } - - public function testTestWithThrowsProperExceptionIfMultiLineDatasetCannotBeParsed(): void - { - $this->expectException(Exception::class); - $this->expectExceptionMessageRegExp('/^The data set for the @testWith annotation cannot be parsed:/'); - - Test::getDataFromTestWithAnnotation('/** - * @testWith ["valid"] - * [invalid] - */'); - } - - /** - * @todo Not sure what this test tests (name is misleading at least) - */ - public function testParseAnnotation(): void - { - $this->assertEquals( - ['Foo', 'ほげ'], - Test::getDependencies(\get_class($this), 'methodForTestParseAnnotation') - ); - } - - /** - * @depends Foo - * @depends ほげ - * - * @todo Remove fixture from test class - */ - public function methodForTestParseAnnotation(): void - { - } - - public function testParseAnnotationThatIsOnlyOneLine(): void - { - $this->assertEquals( - ['Bar'], - Test::getDependencies(\get_class($this), 'methodForTestParseAnnotationThatIsOnlyOneLine') - ); - } - - /** @depends Bar */ - public function methodForTestParseAnnotationThatIsOnlyOneLine(): void - { - // TODO Remove fixture from test class - } - - /** - * @dataProvider getLinesToBeCoveredProvider - * - * @throws CodeCoverageException - * @throws \PHPUnit\Framework\ExpectationFailedException - * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException - */ - public function testGetLinesToBeCovered($test, $lines): void - { - if (\strpos($test, 'Namespace') === 0) { - $expected = [ - TEST_FILES_PATH . 'NamespaceCoveredClass.php' => $lines - ]; - } elseif ($test === 'CoverageCoversOverridesCoversNothingTest') { - $expected = [TEST_FILES_PATH . 'CoveredClass.php' => $lines]; - } elseif ($test === 'CoverageNoneTest') { - $expected = []; - } elseif ($test === 'CoverageNothingTest') { - $expected = false; - } elseif ($test === 'CoverageFunctionTest') { - $expected = [ - TEST_FILES_PATH . 'CoveredFunction.php' => $lines - ]; - } else { - $expected = [TEST_FILES_PATH . 'CoveredClass.php' => $lines]; - } - - $this->assertEquals( - $expected, - Test::getLinesToBeCovered( - $test, - 'testSomething' - ) - ); - } - - public function testGetLinesToBeCovered2(): void - { - $this->expectException(CodeCoverageException::class); - - Test::getLinesToBeCovered( - 'NotExistingCoveredElementTest', - 'testOne' - ); - } - - public function testGetLinesToBeCovered3(): void - { - $this->expectException(CodeCoverageException::class); - - Test::getLinesToBeCovered( - 'NotExistingCoveredElementTest', - 'testTwo' - ); - } - - public function testGetLinesToBeCovered4(): void - { - $this->expectException(CodeCoverageException::class); - - Test::getLinesToBeCovered( - 'NotExistingCoveredElementTest', - 'testThree' - ); - } - - public function testGetLinesToBeCoveredSkipsNonExistentMethods(): void - { - $this->assertSame( - [], - Test::getLinesToBeCovered( - 'NotExistingCoveredElementTest', - 'methodDoesNotExist' - ) - ); - } - - public function testTwoCoversDefaultClassAnnotationsAreNotAllowed(): void - { - $this->expectException(CodeCoverageException::class); - - Test::getLinesToBeCovered( - 'CoverageTwoDefaultClassAnnotations', - 'testSomething' - ); - } - - public function testFunctionParenthesesAreAllowed(): void - { - $this->assertSame( - [TEST_FILES_PATH . 'CoveredFunction.php' => \range(10, 12)], - Test::getLinesToBeCovered( - 'CoverageFunctionParenthesesTest', - 'testSomething' - ) - ); - } - - public function testFunctionParenthesesAreAllowedWithWhitespace(): void - { - $this->assertSame( - [TEST_FILES_PATH . 'CoveredFunction.php' => \range(10, 12)], - Test::getLinesToBeCovered( - 'CoverageFunctionParenthesesWhitespaceTest', - 'testSomething' - ) - ); - } - - public function testMethodParenthesesAreAllowed(): void - { - $this->assertSame( - [TEST_FILES_PATH . 'CoveredClass.php' => \range(29, 33)], - Test::getLinesToBeCovered( - 'CoverageMethodParenthesesTest', - 'testSomething' - ) - ); - } - - public function testMethodParenthesesAreAllowedWithWhitespace(): void - { - $this->assertSame( - [TEST_FILES_PATH . 'CoveredClass.php' => \range(29, 33)], - Test::getLinesToBeCovered( - 'CoverageMethodParenthesesWhitespaceTest', - 'testSomething' - ) - ); - } - - public function testNamespacedFunctionCanBeCoveredOrUsed(): void - { - $this->assertEquals( - [ - TEST_FILES_PATH . 'NamespaceCoveredFunction.php' => \range(12, 15) - ], - Test::getLinesToBeCovered( - \CoverageNamespacedFunctionTest::class, - 'testFunc' - ) - ); - } - - public function getLinesToBeCoveredProvider() - { - return [ - [ - 'CoverageNoneTest', - [] - ], - [ - 'CoverageClassExtendedTest', - \array_merge(\range(27, 44), \range(10, 25)) - ], - [ - 'CoverageClassTest', - \range(27, 44) - ], - [ - 'CoverageMethodTest', - \range(29, 33) - ], - [ - 'CoverageMethodOneLineAnnotationTest', - \range(29, 33) - ], - [ - 'CoverageNotPrivateTest', - \array_merge(\range(29, 33), \range(35, 39)) - ], - [ - 'CoverageNotProtectedTest', - \array_merge(\range(29, 33), \range(41, 43)) - ], - [ - 'CoverageNotPublicTest', - \array_merge(\range(35, 39), \range(41, 43)) - ], - [ - 'CoveragePrivateTest', - \range(41, 43) - ], - [ - 'CoverageProtectedTest', - \range(35, 39) - ], - [ - 'CoveragePublicTest', - \range(29, 33) - ], - [ - 'CoverageFunctionTest', - \range(10, 12) - ], - [ - 'NamespaceCoverageClassExtendedTest', - \array_merge(\range(29, 46), \range(12, 27)) - ], - [ - 'NamespaceCoverageClassTest', - \range(29, 46) - ], - [ - 'NamespaceCoverageMethodTest', - \range(31, 35) - ], - [ - 'NamespaceCoverageNotPrivateTest', - \array_merge(\range(31, 35), \range(37, 41)) - ], - [ - 'NamespaceCoverageNotProtectedTest', - \array_merge(\range(31, 35), \range(43, 45)) - ], - [ - 'NamespaceCoverageNotPublicTest', - \array_merge(\range(37, 41), \range(43, 45)) - ], - [ - 'NamespaceCoveragePrivateTest', - \range(43, 45) - ], - [ - 'NamespaceCoverageProtectedTest', - \range(37, 41) - ], - [ - 'NamespaceCoveragePublicTest', - \range(31, 35) - ], - [ - 'NamespaceCoverageCoversClassTest', - \array_merge(\range(43, 45), \range(37, 41), \range(31, 35), \range(24, 26), \range(19, 22), \range(14, 17)) - ], - [ - 'NamespaceCoverageCoversClassPublicTest', - \range(31, 35) - ], - [ - 'CoverageNothingTest', - false - ], - [ - 'CoverageCoversOverridesCoversNothingTest', - \range(29, 33) - ], - ]; - } - - public function testParseTestMethodAnnotationsIncorporatesTraits(): void - { - $result = Test::parseTestMethodAnnotations(\ParseTestMethodAnnotationsMock::class); - - $this->assertArrayHasKey('class', $result); - $this->assertArrayHasKey('method', $result); - $this->assertArrayHasKey('theClassAnnotation', $result['class']); - $this->assertArrayHasKey('theTraitAnnotation', $result['class']); - } -} diff --git a/vendor/phpunit/phpunit/tests/Util/XmlTest.php b/vendor/phpunit/phpunit/tests/Util/XmlTest.php deleted file mode 100644 index 33e7cc9e..00000000 --- a/vendor/phpunit/phpunit/tests/Util/XmlTest.php +++ /dev/null @@ -1,119 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -namespace PHPUnit\Util; - -use PHPUnit\Framework\Exception; -use PHPUnit\Framework\TestCase; - -class XmlTest extends TestCase -{ - /** - * @dataProvider charProvider - */ - public function testPrepareString(string $char): void - { - $e = null; - - $escapedString = Xml::prepareString($char); - $xml = "$escapedString"; - $dom = new \DOMDocument('1.0', 'UTF-8'); - - try { - $dom->loadXML($xml); - } catch (Exception $e) { - } - - $this->assertNull( - $e, - \sprintf( - '\PHPUnit\Util\Xml::prepareString("\x%02x") should not crash DomDocument', - \ord($char) - ) - ); - } - - public function charProvider(): array - { - $data = []; - - for ($i = 0; $i < 256; $i++) { - $data[] = [\chr($i)]; - } - - return $data; - } - - public function testLoadEmptyString(): void - { - $this->expectException(Exception::class); - $this->expectExceptionMessage('Could not load XML from empty string'); - - Xml::load(''); - } - - public function testLoadArray(): void - { - $this->expectException(Exception::class); - $this->expectExceptionMessage('Could not load XML from array'); - - Xml::load([1, 2, 3]); - } - - public function testLoadBoolean(): void - { - $this->expectException(Exception::class); - $this->expectExceptionMessage('Could not load XML from boolean'); - - Xml::load(false); - } - - public function testNestedXmlToVariable(): void - { - $xml = 'foobar'; - $dom = new \DOMDocument; - $dom->loadXML($xml); - - $expected = [ - 'a' => [ - 'b' => 'foo', - ], - 'c' => 'bar', - ]; - - $actual = Xml::xmlToVariable($dom->documentElement); - - $this->assertSame($expected, $actual); - } - - public function testXmlToVariableCanHandleMultipleOfTheSameArgumentType(): void - { - $xml = 'abc'; - $dom = new \DOMDocument(); - $dom->loadXML($xml); - - $expected = ['a' => 'a', 'b' => 'b', 'c' => 'c']; - - $actual = Xml::xmlToVariable($dom->documentElement); - - $this->assertSame($expected, (array) $actual); - } - - public function testXmlToVariableCanConstructObjectsWithConstructorArgumentsRecursively(): void - { - $xml = 'one0two'; - $dom = new \DOMDocument(); - $dom->loadXML($xml); - - $actual = Xml::xmlToVariable($dom->documentElement); - - $this->assertEquals('one', $actual->getMessage()); - $this->assertEquals('two', $actual->getPrevious()->getMessage()); - } -} diff --git a/vendor/phpunit/phpunit/tests/_files/DataProviderTestDoxTest.php b/vendor/phpunit/phpunit/tests/_files/DataProviderTestDoxTest.php index e0320940..9bb9bf69 100644 --- a/vendor/phpunit/phpunit/tests/_files/DataProviderTestDoxTest.php +++ b/vendor/phpunit/phpunit/tests/_files/DataProviderTestDoxTest.php @@ -28,6 +28,15 @@ class DataProviderTestDoxTest extends TestCase $this->assertTrue(true); } + /** + * @dataProvider placeHolderprovider + * @testdox ... $value ... + */ + public function testWithPlaceholders($value): void + { + $this->assertTrue(true); + } + public function provider() { return [ @@ -35,4 +44,24 @@ class DataProviderTestDoxTest extends TestCase 'two' => [2] ]; } + + public function placeHolderprovider(): array + { + return [ + 'boolean' => [true], + 'integer' => [1], + 'float' => [1.0], + 'string' => ['string'], + 'array' => [[1, 2, 3]], + 'object' => [new \stdClass], + 'stringableObject' => [new class { + public function __toString() + { + return 'string'; + } + }], + 'resource' => [\fopen(__FILE__, 'rb')], + 'null' => [null] + ]; + } } diff --git a/vendor/phpunit/phpunit/tests/_files/configuration.one-file-suite.xml b/vendor/phpunit/phpunit/tests/_files/configuration.one-file-suite.xml index bc8dfa12..4eddce62 100644 --- a/vendor/phpunit/phpunit/tests/_files/configuration.one-file-suite.xml +++ b/vendor/phpunit/phpunit/tests/_files/configuration.one-file-suite.xml @@ -1,7 +1,7 @@ - ../../tests/TextUI/debug.phpt + ../../tests/end-to-end/debug.phpt diff --git a/vendor/phpunit/phpunit/tests/_files/configuration.xml b/vendor/phpunit/phpunit/tests/_files/configuration.xml index 84f32929..36c91cac 100644 --- a/vendor/phpunit/phpunit/tests/_files/configuration.xml +++ b/vendor/phpunit/phpunit/tests/_files/configuration.xml @@ -31,8 +31,7 @@ timeoutForMediumTests="10" timeoutForLargeTests="60" verbose="false" - executionOrder="default" - resolveDependencies="false"> + executionOrder="default"> /path/to/files @@ -143,6 +142,8 @@ . /path/to/lib + + diff --git a/vendor/phpunit/phpunit/tests/_files/configuration_xinclude.xml b/vendor/phpunit/phpunit/tests/_files/configuration_xinclude.xml index ab522088..536d4613 100644 --- a/vendor/phpunit/phpunit/tests/_files/configuration_xinclude.xml +++ b/vendor/phpunit/phpunit/tests/_files/configuration_xinclude.xml @@ -64,6 +64,8 @@ . /path/to/lib + + diff --git a/vendor/psy/psysh/bin/build-stub b/vendor/psy/psysh/bin/build-stub old mode 100644 new mode 100755 diff --git a/vendor/psy/psysh/bin/psysh b/vendor/psy/psysh/bin/psysh old mode 100644 new mode 100755 diff --git a/vendor/psy/psysh/composer.json b/vendor/psy/psysh/composer.json index 3e169be9..7df60cf4 100644 --- a/vendor/psy/psysh/composer.json +++ b/vendor/psy/psysh/composer.json @@ -14,6 +14,8 @@ ], "require": { "php": ">=5.4.0", + "ext-json": "*", + "ext-tokenizer": "*", "symfony/console": "~2.3.10|^2.4.2|~3.0|~4.0", "symfony/var-dumper": "~2.7|~3.0|~4.0", "nikic/php-parser": "~1.3|~2.0|~3.0|~4.0", diff --git a/vendor/psy/psysh/src/CodeCleaner.php b/vendor/psy/psysh/src/CodeCleaner.php index 0f0d378f..e44c2c18 100644 --- a/vendor/psy/psysh/src/CodeCleaner.php +++ b/vendor/psy/psysh/src/CodeCleaner.php @@ -138,7 +138,7 @@ class CodeCleaner } try { - $code = @file_get_contents($file); + $code = @\file_get_contents($file); if (!$code) { return; } @@ -169,15 +169,15 @@ class CodeCleaner */ private static function getDebugFile() { - $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS); + $trace = \debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS); - foreach (array_reverse($trace) as $stackFrame) { + foreach (\array_reverse($trace) as $stackFrame) { if (!self::isDebugCall($stackFrame)) { continue; } - if (preg_match('/eval\(/', $stackFrame['file'])) { - preg_match_all('/([^\(]+)\((\d+)/', $stackFrame['file'], $matches); + if (\preg_match('/eval\(/', $stackFrame['file'])) { + \preg_match_all('/([^\(]+)\((\d+)/', $stackFrame['file'], $matches); return $matches[1][0]; } @@ -214,7 +214,7 @@ class CodeCleaner */ public function clean(array $codeLines, $requireSemicolons = false) { - $stmts = $this->parse('parse('traverser->traverse($stmts); // Work around https://github.com/nikic/PHP-Parser/issues/399 - $oldLocale = setlocale(LC_NUMERIC, 0); - setlocale(LC_NUMERIC, 'C'); + $oldLocale = \setlocale(LC_NUMERIC, 0); + \setlocale(LC_NUMERIC, 'C'); $code = $this->printer->prettyPrint($stmts); // Now put the locale back - setlocale(LC_NUMERIC, $oldLocale); + \setlocale(LC_NUMERIC, $oldLocale); return $code; } @@ -307,7 +307,7 @@ class CodeCleaner { $msg = $e->getRawMessage(); - return ($msg === 'Unexpected token EOF') || (strpos($msg, 'Syntax error, unexpected EOF') !== false); + return ($msg === 'Unexpected token EOF') || (\strpos($msg, 'Syntax error, unexpected EOF') !== false); } /** @@ -344,6 +344,6 @@ class CodeCleaner private function parseErrorIsTrailingComma(\PhpParser\Error $e, $code) { - return ($e->getRawMessage() === 'A trailing comma is not allowed here') && (substr(rtrim($code), -1) === ','); + return ($e->getRawMessage() === 'A trailing comma is not allowed here') && (\substr(\rtrim($code), -1) === ','); } } diff --git a/vendor/psy/psysh/src/CodeCleaner/AbstractClassPass.php b/vendor/psy/psysh/src/CodeCleaner/AbstractClassPass.php index 66eaf42c..81d12b6a 100644 --- a/vendor/psy/psysh/src/CodeCleaner/AbstractClassPass.php +++ b/vendor/psy/psysh/src/CodeCleaner/AbstractClassPass.php @@ -36,11 +36,11 @@ class AbstractClassPass extends CodeCleanerPass $this->abstractMethods = []; } elseif ($node instanceof ClassMethod) { if ($node->isAbstract()) { - $name = sprintf('%s::%s', $this->class->name, $node->name); + $name = \sprintf('%s::%s', $this->class->name, $node->name); $this->abstractMethods[] = $name; if ($node->stmts !== null) { - $msg = sprintf('Abstract function %s cannot contain body', $name); + $msg = \sprintf('Abstract function %s cannot contain body', $name); throw new FatalErrorException($msg, 0, E_ERROR, null, $node->getLine()); } } @@ -55,14 +55,14 @@ class AbstractClassPass extends CodeCleanerPass public function leaveNode(Node $node) { if ($node instanceof Class_) { - $count = count($this->abstractMethods); + $count = \count($this->abstractMethods); if ($count > 0 && !$node->isAbstract()) { - $msg = sprintf( + $msg = \sprintf( 'Class %s contains %d abstract method%s must therefore be declared abstract or implement the remaining methods (%s)', $node->name, $count, ($count === 1) ? '' : 's', - implode(', ', $this->abstractMethods) + \implode(', ', $this->abstractMethods) ); throw new FatalErrorException($msg, 0, E_ERROR, null, $node->getLine()); } diff --git a/vendor/psy/psysh/src/CodeCleaner/CalledClassPass.php b/vendor/psy/psysh/src/CodeCleaner/CalledClassPass.php index 280be3b7..e78f08d0 100644 --- a/vendor/psy/psysh/src/CodeCleaner/CalledClassPass.php +++ b/vendor/psy/psysh/src/CodeCleaner/CalledClassPass.php @@ -58,9 +58,9 @@ class CalledClassPass extends CodeCleanerPass return; } - $name = strtolower($node->name); - if (in_array($name, ['get_class', 'get_called_class'])) { - $msg = sprintf('%s() called without object from outside a class', $name); + $name = \strtolower($node->name); + if (\in_array($name, ['get_class', 'get_called_class'])) { + $msg = \sprintf('%s() called without object from outside a class', $name); throw new ErrorException($msg, 0, E_USER_WARNING, null, $node->getLine()); } } @@ -78,6 +78,6 @@ class CalledClassPass extends CodeCleanerPass private function isNull(Node $node) { - return $node->value instanceof ConstFetch && strtolower($node->value->name) === 'null'; + return $node->value instanceof ConstFetch && \strtolower($node->value->name) === 'null'; } } diff --git a/vendor/psy/psysh/src/CodeCleaner/FinalClassPass.php b/vendor/psy/psysh/src/CodeCleaner/FinalClassPass.php index bf1063fd..23f143be 100644 --- a/vendor/psy/psysh/src/CodeCleaner/FinalClassPass.php +++ b/vendor/psy/psysh/src/CodeCleaner/FinalClassPass.php @@ -41,13 +41,13 @@ class FinalClassPass extends CodeCleanerPass if ($node->extends) { $extends = (string) $node->extends; if ($this->isFinalClass($extends)) { - $msg = sprintf('Class %s may not inherit from final class (%s)', $node->name, $extends); + $msg = \sprintf('Class %s may not inherit from final class (%s)', $node->name, $extends); throw new FatalErrorException($msg, 0, E_ERROR, null, $node->getLine()); } } if ($node->isFinal()) { - $this->finalClasses[strtolower($node->name)] = true; + $this->finalClasses[\strtolower($node->name)] = true; } } } @@ -59,8 +59,8 @@ class FinalClassPass extends CodeCleanerPass */ private function isFinalClass($name) { - if (!class_exists($name)) { - return isset($this->finalClasses[strtolower($name)]); + if (!\class_exists($name)) { + return isset($this->finalClasses[\strtolower($name)]); } $refl = new \ReflectionClass($name); diff --git a/vendor/psy/psysh/src/CodeCleaner/FunctionReturnInWriteContextPass.php b/vendor/psy/psysh/src/CodeCleaner/FunctionReturnInWriteContextPass.php index c3aad342..87e5e7ab 100644 --- a/vendor/psy/psysh/src/CodeCleaner/FunctionReturnInWriteContextPass.php +++ b/vendor/psy/psysh/src/CodeCleaner/FunctionReturnInWriteContextPass.php @@ -36,7 +36,7 @@ class FunctionReturnInWriteContextPass extends CodeCleanerPass public function __construct() { - $this->atLeastPhp55 = version_compare(PHP_VERSION, '5.5', '>='); + $this->atLeastPhp55 = \version_compare(PHP_VERSION, '5.5', '>='); } /** diff --git a/vendor/psy/psysh/src/CodeCleaner/ImplicitReturnPass.php b/vendor/psy/psysh/src/CodeCleaner/ImplicitReturnPass.php index 971a9804..06b06978 100644 --- a/vendor/psy/psysh/src/CodeCleaner/ImplicitReturnPass.php +++ b/vendor/psy/psysh/src/CodeCleaner/ImplicitReturnPass.php @@ -49,7 +49,7 @@ class ImplicitReturnPass extends CodeCleanerPass return [new Return_(NoReturnValue::create())]; } - $last = end($nodes); + $last = \end($nodes); // Special case a few types of statements to add an implicit return // value (even though they technically don't have any return value) @@ -68,22 +68,22 @@ class ImplicitReturnPass extends CodeCleanerPass } elseif ($last instanceof Switch_) { foreach ($last->cases as $case) { // only add an implicit return to cases which end in break - $caseLast = end($case->stmts); + $caseLast = \end($case->stmts); if ($caseLast instanceof Break_) { - $case->stmts = $this->addImplicitReturn(array_slice($case->stmts, 0, -1)); + $case->stmts = $this->addImplicitReturn(\array_slice($case->stmts, 0, -1)); $case->stmts[] = $caseLast; } } } elseif ($last instanceof Expr && !($last instanceof Exit_)) { // @codeCoverageIgnoreStart - $nodes[count($nodes) - 1] = new Return_($last, [ + $nodes[\count($nodes) - 1] = new Return_($last, [ 'startLine' => $last->getLine(), 'endLine' => $last->getLine(), ]); // @codeCoverageIgnoreEnd } elseif ($last instanceof Expression && !($last->expr instanceof Exit_)) { // For PHP Parser 4.x - $nodes[count($nodes) - 1] = new Return_($last->expr, [ + $nodes[\count($nodes) - 1] = new Return_($last->expr, [ 'startLine' => $last->getLine(), 'endLine' => $last->getLine(), ]); diff --git a/vendor/psy/psysh/src/CodeCleaner/LegacyEmptyPass.php b/vendor/psy/psysh/src/CodeCleaner/LegacyEmptyPass.php index a298c849..9793d8c4 100644 --- a/vendor/psy/psysh/src/CodeCleaner/LegacyEmptyPass.php +++ b/vendor/psy/psysh/src/CodeCleaner/LegacyEmptyPass.php @@ -28,7 +28,7 @@ class LegacyEmptyPass extends CodeCleanerPass public function __construct() { - $this->atLeastPhp55 = version_compare(PHP_VERSION, '5.5', '>='); + $this->atLeastPhp55 = \version_compare(PHP_VERSION, '5.5', '>='); } /** @@ -49,7 +49,7 @@ class LegacyEmptyPass extends CodeCleanerPass } if (!$node->expr instanceof Variable) { - $msg = sprintf('syntax error, unexpected %s', $this->getUnexpectedThing($node->expr)); + $msg = \sprintf('syntax error, unexpected %s', $this->getUnexpectedThing($node->expr)); throw new ParseErrorException($msg, $node->expr->getLine()); } @@ -61,7 +61,7 @@ class LegacyEmptyPass extends CodeCleanerPass case 'Scalar_String': case 'Scalar_LNumber': case 'Scalar_DNumber': - return json_encode($node->value); + return \json_encode($node->value); case 'Expr_ConstFetch': return (string) $node->name; diff --git a/vendor/psy/psysh/src/CodeCleaner/ListPass.php b/vendor/psy/psysh/src/CodeCleaner/ListPass.php index 04d32e9f..aabf0c36 100644 --- a/vendor/psy/psysh/src/CodeCleaner/ListPass.php +++ b/vendor/psy/psysh/src/CodeCleaner/ListPass.php @@ -12,10 +12,13 @@ namespace Psy\CodeCleaner; use PhpParser\Node; +use PhpParser\Node\Expr; use PhpParser\Node\Expr\Array_; +use PhpParser\Node\Expr\ArrayDimFetch; use PhpParser\Node\Expr\ArrayItem; use PhpParser\Node\Expr\Assign; use PhpParser\Node\Expr\List_; +use PhpParser\Node\Expr\PropertyFetch; use PhpParser\Node\Expr\Variable; use Psy\Exception\ParseErrorException; @@ -28,7 +31,7 @@ class ListPass extends CodeCleanerPass public function __construct() { - $this->atLeastPhp71 = version_compare(PHP_VERSION, '7.1', '>='); + $this->atLeastPhp71 = \version_compare(PHP_VERSION, '7.1', '>='); } /** @@ -74,9 +77,7 @@ class ListPass extends CodeCleanerPass throw new ParseErrorException($msg, $item->key->getLine()); } - $value = ($item instanceof ArrayItem) ? $item->value : $item; - - if (!$value instanceof Variable) { + if (!self::isValidArrayItem($item)) { $msg = 'Assignments can only happen to writable values'; throw new ParseErrorException($msg, $item->getLine()); } @@ -86,4 +87,26 @@ class ListPass extends CodeCleanerPass throw new ParseErrorException('Cannot use empty list'); } } + + /** + * Validate whether a given item in an array is valid for short assignment. + * + * @param Expr $item + * + * @return bool + */ + private static function isValidArrayItem(Expr $item) + { + $value = ($item instanceof ArrayItem) ? $item->value : $item; + + if ($value instanceof Variable) { + return true; + } + + if ($value instanceof ArrayDimFetch || $value instanceof PropertyFetch) { + return isset($value->var) && $value->var instanceof Variable; + } + + return false; + } } diff --git a/vendor/psy/psysh/src/CodeCleaner/LoopContextPass.php b/vendor/psy/psysh/src/CodeCleaner/LoopContextPass.php index 9744fcb6..933278e7 100644 --- a/vendor/psy/psysh/src/CodeCleaner/LoopContextPass.php +++ b/vendor/psy/psysh/src/CodeCleaner/LoopContextPass.php @@ -62,23 +62,23 @@ class LoopContextPass extends CodeCleanerPass $operator = $node instanceof Break_ ? 'break' : 'continue'; if ($this->loopDepth === 0) { - $msg = sprintf("'%s' not in the 'loop' or 'switch' context", $operator); + $msg = \sprintf("'%s' not in the 'loop' or 'switch' context", $operator); throw new FatalErrorException($msg, 0, E_ERROR, null, $node->getLine()); } if ($node->num instanceof LNumber || $node->num instanceof DNumber) { $num = $node->num->value; if ($node->num instanceof DNumber || $num < 1) { - $msg = sprintf("'%s' operator accepts only positive numbers", $operator); + $msg = \sprintf("'%s' operator accepts only positive numbers", $operator); throw new FatalErrorException($msg, 0, E_ERROR, null, $node->getLine()); } if ($num > $this->loopDepth) { - $msg = sprintf("Cannot '%s' %d levels", $operator, $num); + $msg = \sprintf("Cannot '%s' %d levels", $operator, $num); throw new FatalErrorException($msg, 0, E_ERROR, null, $node->getLine()); } } elseif ($node->num) { - $msg = sprintf("'%s' operator with non-constant operand is no longer supported", $operator); + $msg = \sprintf("'%s' operator with non-constant operand is no longer supported", $operator); throw new FatalErrorException($msg, 0, E_ERROR, null, $node->getLine()); } break; diff --git a/vendor/psy/psysh/src/CodeCleaner/NamespaceAwarePass.php b/vendor/psy/psysh/src/CodeCleaner/NamespaceAwarePass.php index 9b404450..6679206d 100644 --- a/vendor/psy/psysh/src/CodeCleaner/NamespaceAwarePass.php +++ b/vendor/psy/psysh/src/CodeCleaner/NamespaceAwarePass.php @@ -59,13 +59,13 @@ abstract class NamespaceAwarePass extends CodeCleanerPass protected function getFullyQualifiedName($name) { if ($name instanceof FullyQualifiedName) { - return implode('\\', $name->parts); + return \implode('\\', $name->parts); } elseif ($name instanceof Name) { $name = $name->parts; - } elseif (!is_array($name)) { + } elseif (!\is_array($name)) { $name = [$name]; } - return implode('\\', array_merge($this->namespace, $name)); + return \implode('\\', \array_merge($this->namespace, $name)); } } diff --git a/vendor/psy/psysh/src/CodeCleaner/NamespacePass.php b/vendor/psy/psysh/src/CodeCleaner/NamespacePass.php index af825376..d26f07cc 100644 --- a/vendor/psy/psysh/src/CodeCleaner/NamespacePass.php +++ b/vendor/psy/psysh/src/CodeCleaner/NamespacePass.php @@ -53,7 +53,7 @@ class NamespacePass extends CodeCleanerPass return $nodes; } - $last = end($nodes); + $last = \end($nodes); if ($last instanceof Namespace_) { $kind = $last->getAttribute('kind'); diff --git a/vendor/psy/psysh/src/CodeCleaner/PassableByReferencePass.php b/vendor/psy/psysh/src/CodeCleaner/PassableByReferencePass.php index 4380eef2..5b5dc086 100644 --- a/vendor/psy/psysh/src/CodeCleaner/PassableByReferencePass.php +++ b/vendor/psy/psysh/src/CodeCleaner/PassableByReferencePass.php @@ -56,7 +56,7 @@ class PassableByReferencePass extends CodeCleanerPass } foreach ($refl->getParameters() as $key => $param) { - if (array_key_exists($key, $node->args)) { + if (\array_key_exists($key, $node->args)) { $arg = $node->args[$key]; if ($param->isPassedByReference() && !$this->isPassableByReference($arg)) { throw new FatalErrorException(self::EXCEPTION_MESSAGE, 0, E_ERROR, null, $node->getLine()); diff --git a/vendor/psy/psysh/src/CodeCleaner/RequirePass.php b/vendor/psy/psysh/src/CodeCleaner/RequirePass.php index 0e805611..31c156a3 100644 --- a/vendor/psy/psysh/src/CodeCleaner/RequirePass.php +++ b/vendor/psy/psysh/src/CodeCleaner/RequirePass.php @@ -79,16 +79,15 @@ class RequirePass extends CodeCleanerPass // @todo Shell::handleError would be better here, because we could // fake the file and line number, but we can't call it statically. // So we're duplicating some of the logics here. - if (E_WARNING & error_reporting()) { + if (E_WARNING & \error_reporting()) { ErrorException::throwException(E_WARNING, 'Filename cannot be empty', null, $lineNumber); - } else { - // @todo trigger an error as fallback? this is pretty ugly… - // trigger_error('Filename cannot be empty', E_USER_WARNING); } + // @todo trigger an error as fallback? this is pretty ugly… + // trigger_error('Filename cannot be empty', E_USER_WARNING); } - if ($file === '' || !stream_resolve_include_path($file)) { - $msg = sprintf("Failed opening required '%s'", $file); + if ($file === '' || !\stream_resolve_include_path($file)) { + $msg = \sprintf("Failed opening required '%s'", $file); throw new FatalErrorException($msg, 0, E_ERROR, null, $lineNumber); } @@ -97,6 +96,6 @@ class RequirePass extends CodeCleanerPass private function isRequireNode(Node $node) { - return $node instanceof Include_ && in_array($node->type, self::$requireTypes); + return $node instanceof Include_ && \in_array($node->type, self::$requireTypes); } } diff --git a/vendor/psy/psysh/src/CodeCleaner/StrictTypesPass.php b/vendor/psy/psysh/src/CodeCleaner/StrictTypesPass.php index a63fe75e..058a5a82 100644 --- a/vendor/psy/psysh/src/CodeCleaner/StrictTypesPass.php +++ b/vendor/psy/psysh/src/CodeCleaner/StrictTypesPass.php @@ -36,7 +36,7 @@ class StrictTypesPass extends CodeCleanerPass public function __construct() { - $this->atLeastPhp7 = version_compare(PHP_VERSION, '7.0', '>='); + $this->atLeastPhp7 = \version_compare(PHP_VERSION, '7.0', '>='); } /** @@ -75,10 +75,10 @@ class StrictTypesPass extends CodeCleanerPass } if ($prependStrictTypes) { - $first = reset($nodes); + $first = \reset($nodes); if (!$first instanceof Declare_) { $declare = new Declare_([new DeclareDeclare('strict_types', new LNumber(1))]); - array_unshift($nodes, $declare); + \array_unshift($nodes, $declare); } } diff --git a/vendor/psy/psysh/src/CodeCleaner/UseStatementPass.php b/vendor/psy/psysh/src/CodeCleaner/UseStatementPass.php index d6ca878c..64ac5be6 100644 --- a/vendor/psy/psysh/src/CodeCleaner/UseStatementPass.php +++ b/vendor/psy/psysh/src/CodeCleaner/UseStatementPass.php @@ -49,7 +49,7 @@ class UseStatementPass extends CodeCleanerPass if ($node instanceof Namespace_) { // If this is the same namespace as last namespace, let's do ourselves // a favor and reload all the aliases... - if (strtolower($node->name) === strtolower($this->lastNamespace)) { + if (\strtolower($node->name) === \strtolower($this->lastNamespace)) { $this->aliases = $this->lastAliases; } } @@ -69,8 +69,8 @@ class UseStatementPass extends CodeCleanerPass // Store a reference to every "use" statement, because we'll need // them in a bit. foreach ($node->uses as $use) { - $alias = $use->alias ?: end($use->name->parts); - $this->aliases[strtolower($alias)] = $use->name; + $alias = $use->alias ?: \end($use->name->parts); + $this->aliases[\strtolower($alias)] = $use->name; } return NodeTraverser::REMOVE_NODE; @@ -78,8 +78,8 @@ class UseStatementPass extends CodeCleanerPass // Expand every "use" statement in the group into a full, standalone // "use" and store 'em with the others. foreach ($node->uses as $use) { - $alias = $use->alias ?: end($use->name->parts); - $this->aliases[strtolower($alias)] = Name::concat($node->prefix, $use->name, [ + $alias = $use->alias ?: \end($use->name->parts); + $this->aliases[\strtolower($alias)] = Name::concat($node->prefix, $use->name, [ 'startLine' => $node->prefix->getAttribute('startLine'), 'endLine' => $use->name->getAttribute('endLine'), ]); @@ -114,12 +114,12 @@ class UseStatementPass extends CodeCleanerPass */ private function findAlias(Name $name) { - $that = strtolower($name); + $that = \strtolower($name); foreach ($this->aliases as $alias => $prefix) { if ($that === $alias) { return new FullyQualifiedName($prefix->toString()); - } elseif (substr($that, 0, strlen($alias) + 1) === $alias . '\\') { - return new FullyQualifiedName($prefix->toString() . substr($name, strlen($alias))); + } elseif (\substr($that, 0, \strlen($alias) + 1) === $alias . '\\') { + return new FullyQualifiedName($prefix->toString() . \substr($name, \strlen($alias))); } } } diff --git a/vendor/psy/psysh/src/CodeCleaner/ValidClassNamePass.php b/vendor/psy/psysh/src/CodeCleaner/ValidClassNamePass.php index 682399bf..9578c9a8 100644 --- a/vendor/psy/psysh/src/CodeCleaner/ValidClassNamePass.php +++ b/vendor/psy/psysh/src/CodeCleaner/ValidClassNamePass.php @@ -43,7 +43,7 @@ class ValidClassNamePass extends NamespaceAwarePass public function __construct() { - $this->atLeastPhp55 = version_compare(PHP_VERSION, '5.5', '>='); + $this->atLeastPhp55 = \version_compare(PHP_VERSION, '5.5', '>='); } /** @@ -164,7 +164,7 @@ class ValidClassNamePass extends NamespaceAwarePass protected function validateClassConstFetchExpression(ClassConstFetch $stmt) { // there is no need to check exists for ::class const for php 5.5 or newer - if (strtolower($stmt->name) === 'class' && $this->atLeastPhp55) { + if (\strtolower($stmt->name) === 'class' && $this->atLeastPhp55) { return; } @@ -210,12 +210,12 @@ class ValidClassNamePass extends NamespaceAwarePass } if ($errorType !== null) { - throw $this->createError(sprintf('%s named %s already exists', ucfirst($errorType), $name), $stmt); + throw $this->createError(\sprintf('%s named %s already exists', \ucfirst($errorType), $name), $stmt); } // Store creation for the rest of this code snippet so we can find local // issue too - $this->currentScope[strtolower($name)] = $scopeType; + $this->currentScope[\strtolower($name)] = $scopeType; } /** @@ -229,7 +229,7 @@ class ValidClassNamePass extends NamespaceAwarePass protected function ensureClassExists($name, $stmt) { if (!$this->classExists($name)) { - throw $this->createError(sprintf('Class \'%s\' not found', $name), $stmt); + throw $this->createError(\sprintf('Class \'%s\' not found', $name), $stmt); } } @@ -244,7 +244,22 @@ class ValidClassNamePass extends NamespaceAwarePass protected function ensureClassOrInterfaceExists($name, $stmt) { if (!$this->classExists($name) && !$this->interfaceExists($name)) { - throw $this->createError(sprintf('Class \'%s\' not found', $name), $stmt); + throw $this->createError(\sprintf('Class \'%s\' not found', $name), $stmt); + } + } + + /** + * Ensure that a referenced class _or trait_ exists. + * + * @throws FatalErrorException + * + * @param string $name + * @param Stmt $stmt + */ + protected function ensureClassOrTraitExists($name, $stmt) + { + if (!$this->classExists($name) && !$this->traitExists($name)) { + throw $this->createError(\sprintf('Class \'%s\' not found', $name), $stmt); } } @@ -259,10 +274,10 @@ class ValidClassNamePass extends NamespaceAwarePass */ protected function ensureMethodExists($class, $name, $stmt) { - $this->ensureClassExists($class, $stmt); + $this->ensureClassOrTraitExists($class, $stmt); // let's pretend all calls to self, parent and static are valid - if (in_array(strtolower($class), ['self', 'parent', 'static'])) { + if (\in_array(\strtolower($class), ['self', 'parent', 'static'])) { return; } @@ -276,8 +291,8 @@ class ValidClassNamePass extends NamespaceAwarePass return; } - if (!method_exists($class, $name) && !method_exists($class, '__callStatic')) { - throw $this->createError(sprintf('Call to undefined method %s::%s()', $class, $name), $stmt); + if (!\method_exists($class, $name) && !\method_exists($class, '__callStatic')) { + throw $this->createError(\sprintf('Call to undefined method %s::%s()', $class, $name), $stmt); } } @@ -295,7 +310,7 @@ class ValidClassNamePass extends NamespaceAwarePass /** @var string $name */ $name = $this->getFullyQualifiedName($interface); if (!$this->interfaceExists($name)) { - throw $this->createError(sprintf('Interface \'%s\' not found', $name), $stmt); + throw $this->createError(\sprintf('Interface \'%s\' not found', $name), $stmt); } } } @@ -335,11 +350,11 @@ class ValidClassNamePass extends NamespaceAwarePass // Give `self`, `static` and `parent` a pass. This will actually let // some errors through, since we're not checking whether the keyword is // being used in a class scope. - if (in_array(strtolower($name), ['self', 'static', 'parent'])) { + if (\in_array(\strtolower($name), ['self', 'static', 'parent'])) { return true; } - return class_exists($name) || $this->findInScope($name) === self::CLASS_TYPE; + return \class_exists($name) || $this->findInScope($name) === self::CLASS_TYPE; } /** @@ -351,7 +366,7 @@ class ValidClassNamePass extends NamespaceAwarePass */ protected function interfaceExists($name) { - return interface_exists($name) || $this->findInScope($name) === self::INTERFACE_TYPE; + return \interface_exists($name) || $this->findInScope($name) === self::INTERFACE_TYPE; } /** @@ -363,7 +378,7 @@ class ValidClassNamePass extends NamespaceAwarePass */ protected function traitExists($name) { - return trait_exists($name) || $this->findInScope($name) === self::TRAIT_TYPE; + return \trait_exists($name) || $this->findInScope($name) === self::TRAIT_TYPE; } /** @@ -375,7 +390,7 @@ class ValidClassNamePass extends NamespaceAwarePass */ protected function findInScope($name) { - $name = strtolower($name); + $name = \strtolower($name); if (isset($this->currentScope[$name])) { return $this->currentScope[$name]; } diff --git a/vendor/psy/psysh/src/CodeCleaner/ValidConstantPass.php b/vendor/psy/psysh/src/CodeCleaner/ValidConstantPass.php index 7134bb28..2d5e3e6d 100644 --- a/vendor/psy/psysh/src/CodeCleaner/ValidConstantPass.php +++ b/vendor/psy/psysh/src/CodeCleaner/ValidConstantPass.php @@ -43,10 +43,10 @@ class ValidConstantPass extends NamespaceAwarePass */ public function leaveNode(Node $node) { - if ($node instanceof ConstFetch && count($node->name->parts) > 1) { + if ($node instanceof ConstFetch && \count($node->name->parts) > 1) { $name = $this->getFullyQualifiedName($node->name); - if (!defined($name)) { - $msg = sprintf('Undefined constant %s', $name); + if (!\defined($name)) { + $msg = \sprintf('Undefined constant %s', $name); throw new FatalErrorException($msg, 0, E_ERROR, null, $node->getLine()); } } elseif ($node instanceof ClassConstFetch) { @@ -77,11 +77,11 @@ class ValidConstantPass extends NamespaceAwarePass // if the class doesn't exist, don't throw an exception… it might be // defined in the same line it's used or something stupid like that. - if (class_exists($className) || interface_exists($className)) { + if (\class_exists($className) || \interface_exists($className)) { $refl = new \ReflectionClass($className); if (!$refl->hasConstant($constName)) { - $constType = class_exists($className) ? 'Class' : 'Interface'; - $msg = sprintf('%s constant \'%s::%s\' not found', $constType, $className, $constName); + $constType = \class_exists($className) ? 'Class' : 'Interface'; + $msg = \sprintf('%s constant \'%s::%s\' not found', $constType, $className, $constName); throw new FatalErrorException($msg, 0, E_ERROR, null, $stmt->getLine()); } } diff --git a/vendor/psy/psysh/src/CodeCleaner/ValidConstructorPass.php b/vendor/psy/psysh/src/CodeCleaner/ValidConstructorPass.php index b049dbc0..a079e26c 100644 --- a/vendor/psy/psysh/src/CodeCleaner/ValidConstructorPass.php +++ b/vendor/psy/psysh/src/CodeCleaner/ValidConstructorPass.php @@ -57,14 +57,14 @@ class ValidConstructorPass extends CodeCleanerPass foreach ($node->stmts as $stmt) { if ($stmt instanceof ClassMethod) { // If we find a new-style constructor, no need to look for the old-style - if ('__construct' === strtolower($stmt->name)) { + if ('__construct' === \strtolower($stmt->name)) { $this->validateConstructor($stmt, $node); return; } // We found a possible old-style constructor (unless there is also a __construct method) - if (empty($this->namespace) && strtolower($node->name) === strtolower($stmt->name)) { + if (empty($this->namespace) && \strtolower($node->name) === \strtolower($stmt->name)) { $constructor = $stmt; } } @@ -89,21 +89,21 @@ class ValidConstructorPass extends CodeCleanerPass // For PHP Parser 4.x $className = $classNode->name instanceof Identifier ? $classNode->name->toString() : $classNode->name; - $msg = sprintf( + $msg = \sprintf( 'Constructor %s::%s() cannot be static', - implode('\\', array_merge($this->namespace, (array) $className)), + \implode('\\', \array_merge($this->namespace, (array) $className)), $constructor->name ); throw new FatalErrorException($msg, 0, E_ERROR, null, $classNode->getLine()); } - if (method_exists($constructor, 'getReturnType') && $constructor->getReturnType()) { + if (\method_exists($constructor, 'getReturnType') && $constructor->getReturnType()) { // For PHP Parser 4.x $className = $classNode->name instanceof Identifier ? $classNode->name->toString() : $classNode->name; - $msg = sprintf( + $msg = \sprintf( 'Constructor %s::%s() cannot declare a return type', - implode('\\', array_merge($this->namespace, (array) $className)), + \implode('\\', \array_merge($this->namespace, (array) $className)), $constructor->name ); throw new FatalErrorException($msg, 0, E_ERROR, null, $classNode->getLine()); diff --git a/vendor/psy/psysh/src/CodeCleaner/ValidFunctionNamePass.php b/vendor/psy/psysh/src/CodeCleaner/ValidFunctionNamePass.php index a6bf01e7..dd1e0576 100644 --- a/vendor/psy/psysh/src/CodeCleaner/ValidFunctionNamePass.php +++ b/vendor/psy/psysh/src/CodeCleaner/ValidFunctionNamePass.php @@ -49,14 +49,14 @@ class ValidFunctionNamePass extends NamespaceAwarePass // @todo add an "else" here which adds a runtime check for instances where we can't tell // whether a function is being redefined by static analysis alone. if ($this->conditionalScopes === 0) { - if (function_exists($name) || - isset($this->currentScope[strtolower($name)])) { - $msg = sprintf('Cannot redeclare %s()', $name); + if (\function_exists($name) || + isset($this->currentScope[\strtolower($name)])) { + $msg = \sprintf('Cannot redeclare %s()', $name); throw new FatalErrorException($msg, 0, E_ERROR, null, $node->getLine()); } } - $this->currentScope[strtolower($name)] = true; + $this->currentScope[\strtolower($name)] = true; } } @@ -76,11 +76,11 @@ class ValidFunctionNamePass extends NamespaceAwarePass // if function name is an expression or a variable, give it a pass for now. $name = $node->name; if (!$name instanceof Expr && !$name instanceof Variable) { - $shortName = implode('\\', $name->parts); + $shortName = \implode('\\', $name->parts); $fullName = $this->getFullyQualifiedName($name); - $inScope = isset($this->currentScope[strtolower($fullName)]); - if (!$inScope && !function_exists($shortName) && !function_exists($fullName)) { - $message = sprintf('Call to undefined function %s()', $name); + $inScope = isset($this->currentScope[\strtolower($fullName)]); + if (!$inScope && !\function_exists($shortName) && !\function_exists($fullName)) { + $message = \sprintf('Call to undefined function %s()', $name); throw new FatalErrorException($message, 0, E_ERROR, null, $node->getLine()); } } diff --git a/vendor/psy/psysh/src/Command/BufferCommand.php b/vendor/psy/psysh/src/Command/BufferCommand.php index 6319ccf8..83ba34a8 100644 --- a/vendor/psy/psysh/src/Command/BufferCommand.php +++ b/vendor/psy/psysh/src/Command/BufferCommand.php @@ -68,10 +68,10 @@ HELP */ protected function formatLines(array $lines, $type = 'return') { - $template = sprintf('<%s>%%s', $type, $type); + $template = \sprintf('<%s>%%s', $type, $type); - return array_map(function ($line) use ($template) { - return sprintf($template, $line); + return \array_map(function ($line) use ($template) { + return \sprintf($template, $line); }, $lines); } } diff --git a/vendor/psy/psysh/src/Command/ClearCommand.php b/vendor/psy/psysh/src/Command/ClearCommand.php index 1a5b845d..6b12048a 100644 --- a/vendor/psy/psysh/src/Command/ClearCommand.php +++ b/vendor/psy/psysh/src/Command/ClearCommand.php @@ -44,6 +44,6 @@ HELP */ protected function execute(InputInterface $input, OutputInterface $output) { - $output->write(sprintf('%c[2J%c[0;0f', 27, 27)); + $output->write(\sprintf('%c[2J%c[0;0f', 27, 27)); } } diff --git a/vendor/psy/psysh/src/Command/Command.php b/vendor/psy/psysh/src/Command/Command.php index 83e1dcea..be013a1b 100644 --- a/vendor/psy/psysh/src/Command/Command.php +++ b/vendor/psy/psysh/src/Command/Command.php @@ -65,10 +65,10 @@ abstract class Command extends BaseCommand if ($help = $this->getProcessedHelp()) { $messages[] = 'Help:'; - $messages[] = ' ' . str_replace("\n", "\n ", $help) . "\n"; + $messages[] = ' ' . \str_replace("\n", "\n ", $help) . "\n"; } - return implode("\n", $messages); + return \implode("\n", $messages); } /** @@ -78,8 +78,8 @@ abstract class Command extends BaseCommand { $hidden = $this->getHiddenArguments(); - return array_filter($this->getNativeDefinition()->getArguments(), function ($argument) use ($hidden) { - return !in_array($argument->getName(), $hidden); + return \array_filter($this->getNativeDefinition()->getArguments(), function ($argument) use ($hidden) { + return !\in_array($argument->getName(), $hidden); }); } @@ -100,8 +100,8 @@ abstract class Command extends BaseCommand { $hidden = $this->getHiddenOptions(); - return array_filter($this->getNativeDefinition()->getOptions(), function ($option) use ($hidden) { - return !in_array($option->getName(), $hidden); + return \array_filter($this->getNativeDefinition()->getOptions(), function ($option) use ($hidden) { + return !\in_array($option->getName(), $hidden); }); } @@ -122,7 +122,7 @@ abstract class Command extends BaseCommand */ private function aliasesAsText() { - return 'Aliases: ' . implode(', ', $this->getAliases()) . '' . PHP_EOL; + return 'Aliases: ' . \implode(', ', $this->getAliases()) . '' . PHP_EOL; } /** @@ -139,21 +139,21 @@ abstract class Command extends BaseCommand if (!empty($arguments)) { $messages[] = 'Arguments:'; foreach ($arguments as $argument) { - if (null !== $argument->getDefault() && (!is_array($argument->getDefault()) || count($argument->getDefault()))) { - $default = sprintf(' (default: %s)', $this->formatDefaultValue($argument->getDefault())); + if (null !== $argument->getDefault() && (!\is_array($argument->getDefault()) || \count($argument->getDefault()))) { + $default = \sprintf(' (default: %s)', $this->formatDefaultValue($argument->getDefault())); } else { $default = ''; } - $description = str_replace("\n", "\n" . str_pad('', $max + 2, ' '), $argument->getDescription()); + $description = \str_replace("\n", "\n" . \str_pad('', $max + 2, ' '), $argument->getDescription()); - $messages[] = sprintf(" %-${max}s %s%s", $argument->getName(), $description, $default); + $messages[] = \sprintf(" %-${max}s %s%s", $argument->getName(), $description, $default); } $messages[] = ''; } - return implode(PHP_EOL, $messages); + return \implode(PHP_EOL, $messages); } /** @@ -171,20 +171,20 @@ abstract class Command extends BaseCommand $messages[] = 'Options:'; foreach ($options as $option) { - if ($option->acceptValue() && null !== $option->getDefault() && (!is_array($option->getDefault()) || count($option->getDefault()))) { - $default = sprintf(' (default: %s)', $this->formatDefaultValue($option->getDefault())); + if ($option->acceptValue() && null !== $option->getDefault() && (!\is_array($option->getDefault()) || \count($option->getDefault()))) { + $default = \sprintf(' (default: %s)', $this->formatDefaultValue($option->getDefault())); } else { $default = ''; } $multiple = $option->isArray() ? ' (multiple values allowed)' : ''; - $description = str_replace("\n", "\n" . str_pad('', $max + 2, ' '), $option->getDescription()); + $description = \str_replace("\n", "\n" . \str_pad('', $max + 2, ' '), $option->getDescription()); - $optionMax = $max - strlen($option->getName()) - 2; - $messages[] = sprintf( + $optionMax = $max - \strlen($option->getName()) - 2; + $messages[] = \sprintf( " %s %-${optionMax}s%s%s%s", '--' . $option->getName(), - $option->getShortcut() ? sprintf('(-%s) ', $option->getShortcut()) : '', + $option->getShortcut() ? \sprintf('(-%s) ', $option->getShortcut()) : '', $description, $default, $multiple @@ -194,7 +194,7 @@ abstract class Command extends BaseCommand $messages[] = ''; } - return implode(PHP_EOL, $messages); + return \implode(PHP_EOL, $messages); } /** @@ -207,16 +207,16 @@ abstract class Command extends BaseCommand $max = 0; foreach ($this->getOptions() as $option) { - $nameLength = strlen($option->getName()) + 2; + $nameLength = \strlen($option->getName()) + 2; if ($option->getShortcut()) { - $nameLength += strlen($option->getShortcut()) + 3; + $nameLength += \strlen($option->getShortcut()) + 3; } - $max = max($max, $nameLength); + $max = \max($max, $nameLength); } foreach ($this->getArguments() as $argument) { - $max = max($max, strlen($argument->getName())); + $max = \max($max, \strlen($argument->getName())); } return ++$max; @@ -231,11 +231,11 @@ abstract class Command extends BaseCommand */ private function formatDefaultValue($default) { - if (is_array($default) && $default === array_values($default)) { - return sprintf("array('%s')", implode("', '", $default)); + if (\is_array($default) && $default === \array_values($default)) { + return \sprintf("array('%s')", \implode("', '", $default)); } - return str_replace("\n", '', var_export($default, true)); + return \str_replace("\n", '', \var_export($default, true)); } /** @@ -247,7 +247,7 @@ abstract class Command extends BaseCommand */ protected function getTable(OutputInterface $output) { - if (!class_exists('Symfony\Component\Console\Helper\Table')) { + if (!\class_exists('Symfony\Component\Console\Helper\Table')) { return $this->getTableHelper(); } diff --git a/vendor/psy/psysh/src/Command/DocCommand.php b/vendor/psy/psysh/src/Command/DocCommand.php index fe202869..913634a0 100644 --- a/vendor/psy/psysh/src/Command/DocCommand.php +++ b/vendor/psy/psysh/src/Command/DocCommand.php @@ -14,7 +14,6 @@ namespace Psy\Command; use Psy\Formatter\DocblockFormatter; use Psy\Formatter\SignatureFormatter; use Psy\Input\CodeArgument; -use Psy\Reflection\ReflectionClassConstant; use Psy\Reflection\ReflectionLanguageConstruct; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; @@ -87,7 +86,7 @@ HELP private function getManualDoc($reflector) { - switch (get_class($reflector)) { + switch (\get_class($reflector)) { case 'ReflectionClass': case 'ReflectionObject': case 'ReflectionFunction': @@ -125,7 +124,7 @@ HELP { if ($db = $this->getApplication()->getManualDb()) { return $db - ->query(sprintf('SELECT doc FROM php_manual WHERE id = %s', $db->quote($id))) + ->query(\sprintf('SELECT doc FROM php_manual WHERE id = %s', $db->quote($id))) ->fetchColumn(0); } } diff --git a/vendor/psy/psysh/src/Command/DumpCommand.php b/vendor/psy/psysh/src/Command/DumpCommand.php index 77bd0e2d..9a8aad82 100644 --- a/vendor/psy/psysh/src/Command/DumpCommand.php +++ b/vendor/psy/psysh/src/Command/DumpCommand.php @@ -73,7 +73,7 @@ HELP $target = $this->resolveCode($input->getArgument('target')); $output->page($this->presenter->present($target, $depth, $input->getOption('all') ? Presenter::VERBOSE : 0)); - if (is_object($target)) { + if (\is_object($target)) { $this->setCommandScopeVariables(new \ReflectionObject($target)); } } @@ -87,7 +87,7 @@ HELP */ protected function resolveTarget($name) { - @trigger_error('`resolveTarget` is deprecated; use `resolveCode` instead.', E_USER_DEPRECATED); + @\trigger_error('`resolveTarget` is deprecated; use `resolveCode` instead.', E_USER_DEPRECATED); return $this->resolveCode($name); } diff --git a/vendor/psy/psysh/src/Command/EditCommand.php b/vendor/psy/psysh/src/Command/EditCommand.php index 7d955692..05714149 100644 --- a/vendor/psy/psysh/src/Command/EditCommand.php +++ b/vendor/psy/psysh/src/Command/EditCommand.php @@ -95,7 +95,7 @@ class EditCommand extends Command implements ContextAware $shouldRemoveFile = false; if ($filePath === null) { - $filePath = tempnam($this->runtimeDir, 'psysh-edit-command'); + $filePath = \tempnam($this->runtimeDir, 'psysh-edit-command'); $shouldRemoveFile = true; } @@ -138,9 +138,9 @@ class EditCommand extends Command implements ContextAware { // If the file argument was a variable, get it from the context if ($fileArgument !== null && - strlen($fileArgument) > 0 && + \strlen($fileArgument) > 0 && $fileArgument[0] === '$') { - $fileArgument = $this->context->get(preg_replace('/^\$/', '', $fileArgument)); + $fileArgument = $this->context->get(\preg_replace('/^\$/', '', $fileArgument)); } return $fileArgument; @@ -156,16 +156,16 @@ class EditCommand extends Command implements ContextAware */ private function editFile($filePath, $shouldRemoveFile) { - $escapedFilePath = escapeshellarg($filePath); + $escapedFilePath = \escapeshellarg($filePath); $pipes = []; - $proc = proc_open((getenv('EDITOR') ?: 'nano') . " {$escapedFilePath}", [STDIN, STDOUT, STDERR], $pipes); - proc_close($proc); + $proc = \proc_open((\getenv('EDITOR') ?: 'nano') . " {$escapedFilePath}", [STDIN, STDOUT, STDERR], $pipes); + \proc_close($proc); - $editedContent = @file_get_contents($filePath); + $editedContent = @\file_get_contents($filePath); if ($shouldRemoveFile) { - @unlink($filePath); + @\unlink($filePath); } if ($editedContent === false) { diff --git a/vendor/psy/psysh/src/Command/HelpCommand.php b/vendor/psy/psysh/src/Command/HelpCommand.php index a50f2562..82ec3a83 100644 --- a/vendor/psy/psysh/src/Command/HelpCommand.php +++ b/vendor/psy/psysh/src/Command/HelpCommand.php @@ -74,13 +74,13 @@ class HelpCommand extends Command } if ($command->getAliases()) { - $aliases = sprintf('Aliases: %s', implode(', ', $command->getAliases())); + $aliases = \sprintf('Aliases: %s', \implode(', ', $command->getAliases())); } else { $aliases = ''; } $table->addRow([ - sprintf('%s', $name), + \sprintf('%s', $name), $command->getDescription(), $aliases, ]); diff --git a/vendor/psy/psysh/src/Command/HistoryCommand.php b/vendor/psy/psysh/src/Command/HistoryCommand.php index eef8ef9d..23f6899e 100644 --- a/vendor/psy/psysh/src/Command/HistoryCommand.php +++ b/vendor/psy/psysh/src/Command/HistoryCommand.php @@ -110,11 +110,11 @@ HELP foreach ($history as $i => $line) { if ($this->filter->match($line, $matches)) { if (isset($matches[0])) { - $chunks = explode($matches[0], $history[$i]); - $chunks = array_map([__CLASS__, 'escape'], $chunks); - $glue = sprintf('%s', self::escape($matches[0])); + $chunks = \explode($matches[0], $history[$i]); + $chunks = \array_map([__CLASS__, 'escape'], $chunks); + $glue = \sprintf('%s', self::escape($matches[0])); - $highlighted[$i] = implode($glue, $chunks); + $highlighted[$i] = \implode($glue, $chunks); } } else { unset($history[$i]); @@ -123,16 +123,16 @@ HELP } if ($save = $input->getOption('save')) { - $output->writeln(sprintf('Saving history in %s...', $save)); - file_put_contents($save, implode(PHP_EOL, $history) . PHP_EOL); + $output->writeln(\sprintf('Saving history in %s...', $save)); + \file_put_contents($save, \implode(PHP_EOL, $history) . PHP_EOL); $output->writeln('History saved.'); } elseif ($input->getOption('replay')) { if (!($input->getOption('show') || $input->getOption('head') || $input->getOption('tail'))) { throw new \InvalidArgumentException('You must limit history via --head, --tail or --show before replaying'); } - $count = count($history); - $output->writeln(sprintf('Replaying %d line%s of history', $count, ($count !== 1) ? 's' : '')); + $count = \count($history); + $output->writeln(\sprintf('Replaying %d line%s of history', $count, ($count !== 1) ? 's' : '')); $this->getApplication()->addInput($history); } elseif ($input->getOption('clear')) { $this->clearHistory(); @@ -156,14 +156,14 @@ HELP */ private function extractRange($range) { - if (preg_match('/^\d+$/', $range)) { + if (\preg_match('/^\d+$/', $range)) { return [$range, $range + 1]; } $matches = []; - if ($range !== '..' && preg_match('/^(\d*)\.\.(\d*)$/', $range, $matches)) { - $start = $matches[1] ? intval($matches[1]) : 0; - $end = $matches[2] ? intval($matches[2]) + 1 : PHP_INT_MAX; + if ($range !== '..' && \preg_match('/^(\d*)\.\.(\d*)$/', $range, $matches)) { + $start = $matches[1] ? \intval($matches[1]) : 0; + $end = $matches[2] ? \intval($matches[2]) + 1 : PHP_INT_MAX; return [$start, $end]; } @@ -185,30 +185,30 @@ HELP $history = $this->readline->listHistory(); // don't show the current `history` invocation - array_pop($history); + \array_pop($history); if ($show) { list($start, $end) = $this->extractRange($show); $length = $end - $start; } elseif ($head) { - if (!preg_match('/^\d+$/', $head)) { + if (!\preg_match('/^\d+$/', $head)) { throw new \InvalidArgumentException('Please specify an integer argument for --head'); } $start = 0; - $length = intval($head); + $length = \intval($head); } elseif ($tail) { - if (!preg_match('/^\d+$/', $tail)) { + if (!\preg_match('/^\d+$/', $tail)) { throw new \InvalidArgumentException('Please specify an integer argument for --tail'); } - $start = count($history) - $tail; - $length = intval($tail) + 1; + $start = \count($history) - $tail; + $length = \intval($tail) + 1; } else { return $history; } - return array_slice($history, $start, $length, true); + return \array_slice($history, $start, $length, true); } /** @@ -227,7 +227,7 @@ HELP } if ($count > 1) { - throw new \InvalidArgumentException('Please specify only one of --' . implode(', --', $options)); + throw new \InvalidArgumentException('Please specify only one of --' . \implode(', --', $options)); } } diff --git a/vendor/psy/psysh/src/Command/ListCommand.php b/vendor/psy/psysh/src/Command/ListCommand.php index 2e65895e..67f4e041 100644 --- a/vendor/psy/psysh/src/Command/ListCommand.php +++ b/vendor/psy/psysh/src/Command/ListCommand.php @@ -178,8 +178,8 @@ HELP } foreach ($result as $label => $items) { - $names = array_map([$this, 'formatItemName'], $items); - $output->writeln(sprintf('%s: %s', $label, implode(', ', $names))); + $names = \array_map([$this, 'formatItemName'], $items); + $output->writeln(\sprintf('%s: %s', $label, \implode(', ', $names))); } } @@ -201,7 +201,7 @@ HELP foreach ($result as $label => $items) { $output->writeln(''); - $output->writeln(sprintf('%s:', $label)); + $output->writeln(\sprintf('%s:', $label)); $table->setRows([]); foreach ($items as $item) { @@ -225,7 +225,7 @@ HELP */ private function formatItemName($item) { - return sprintf('<%s>%s', $item['style'], OutputFormatter::escape($item['name']), $item['style']); + return \sprintf('<%s>%s', $item['style'], OutputFormatter::escape($item['name']), $item['style']); } /** diff --git a/vendor/psy/psysh/src/Command/ListCommand/ClassConstantEnumerator.php b/vendor/psy/psysh/src/Command/ListCommand/ClassConstantEnumerator.php index 0b099270..a1d82ead 100644 --- a/vendor/psy/psysh/src/Command/ListCommand/ClassConstantEnumerator.php +++ b/vendor/psy/psysh/src/Command/ListCommand/ClassConstantEnumerator.php @@ -68,7 +68,7 @@ class ClassConstantEnumerator extends Enumerator $constants = []; foreach ($reflector->getConstants() as $name => $constant) { - $constReflector = ReflectionClassConstant::create($reflector, $name); + $constReflector = ReflectionClassConstant::create($reflector->name, $name); if ($noInherit && $constReflector->getDeclaringClass()->getName() !== $className) { continue; @@ -77,7 +77,7 @@ class ClassConstantEnumerator extends Enumerator $constants[$name] = $constReflector; } - ksort($constants, SORT_NATURAL | SORT_FLAG_CASE); + \ksort($constants, SORT_NATURAL | SORT_FLAG_CASE); return $constants; } @@ -118,7 +118,7 @@ class ClassConstantEnumerator extends Enumerator { if ($reflector->isInterface()) { return 'Interface Constants'; - } elseif (method_exists($reflector, 'isTrait') && $reflector->isTrait()) { + } elseif (\method_exists($reflector, 'isTrait') && $reflector->isTrait()) { return 'Trait Constants'; } else { return 'Class Constants'; diff --git a/vendor/psy/psysh/src/Command/ListCommand/ClassEnumerator.php b/vendor/psy/psysh/src/Command/ListCommand/ClassEnumerator.php index 858f5a2e..8ab6d7a9 100644 --- a/vendor/psy/psysh/src/Command/ListCommand/ClassEnumerator.php +++ b/vendor/psy/psysh/src/Command/ListCommand/ClassEnumerator.php @@ -43,18 +43,18 @@ class ClassEnumerator extends Enumerator // only list classes, interfaces and traits if we are specifically asked if ($input->getOption('classes')) { - $ret = array_merge($ret, $this->filterClasses('Classes', get_declared_classes(), $internal, $user)); + $ret = \array_merge($ret, $this->filterClasses('Classes', \get_declared_classes(), $internal, $user)); } if ($input->getOption('interfaces')) { - $ret = array_merge($ret, $this->filterClasses('Interfaces', get_declared_interfaces(), $internal, $user)); + $ret = \array_merge($ret, $this->filterClasses('Interfaces', \get_declared_interfaces(), $internal, $user)); } if ($input->getOption('traits')) { - $ret = array_merge($ret, $this->filterClasses('Traits', get_declared_traits(), $internal, $user)); + $ret = \array_merge($ret, $this->filterClasses('Traits', \get_declared_traits(), $internal, $user)); } - return array_map([$this, 'prepareClasses'], array_filter($ret)); + return \array_map([$this, 'prepareClasses'], \array_filter($ret)); } /** @@ -75,7 +75,7 @@ class ClassEnumerator extends Enumerator $ret = []; if ($internal) { - $ret['Internal ' . $key] = array_filter($classes, function ($class) { + $ret['Internal ' . $key] = \array_filter($classes, function ($class) { $refl = new \ReflectionClass($class); return $refl->isInternal(); @@ -83,7 +83,7 @@ class ClassEnumerator extends Enumerator } if ($user) { - $ret['User ' . $key] = array_filter($classes, function ($class) { + $ret['User ' . $key] = \array_filter($classes, function ($class) { $refl = new \ReflectionClass($class); return !$refl->isInternal(); @@ -106,7 +106,7 @@ class ClassEnumerator extends Enumerator */ protected function prepareClasses(array $classes) { - natcasesort($classes); + \natcasesort($classes); // My kingdom for a generator. $ret = []; diff --git a/vendor/psy/psysh/src/Command/ListCommand/ConstantEnumerator.php b/vendor/psy/psysh/src/Command/ListCommand/ConstantEnumerator.php index e17d42a0..ad4ce0d1 100644 --- a/vendor/psy/psysh/src/Command/ListCommand/ConstantEnumerator.php +++ b/vendor/psy/psysh/src/Command/ListCommand/ConstantEnumerator.php @@ -54,7 +54,7 @@ class ConstantEnumerator extends Enumerator } if ($category) { - $label = ucfirst($category) . ' Constants'; + $label = \ucfirst($category) . ' Constants'; $ret[$label] = $this->getConstants($category); } @@ -62,7 +62,7 @@ class ConstantEnumerator extends Enumerator $ret['Constants'] = $this->getConstants(); } - return array_map([$this, 'prepareConstants'], array_filter($ret)); + return \array_map([$this, 'prepareConstants'], \array_filter($ret)); } /** @@ -78,15 +78,15 @@ class ConstantEnumerator extends Enumerator protected function getConstants($category = null) { if (!$category) { - return get_defined_constants(); + return \get_defined_constants(); } - $consts = get_defined_constants(true); + $consts = \get_defined_constants(true); if ($category === 'internal') { unset($consts['user']); - return call_user_func_array('array_merge', $consts); + return \call_user_func_array('array_merge', $consts); } return isset($consts[$category]) ? $consts[$category] : []; @@ -104,8 +104,8 @@ class ConstantEnumerator extends Enumerator // My kingdom for a generator. $ret = []; - $names = array_keys($constants); - natcasesort($names); + $names = \array_keys($constants); + \natcasesort($names); foreach ($names as $name) { if ($this->showItem($name)) { diff --git a/vendor/psy/psysh/src/Command/ListCommand/FunctionEnumerator.php b/vendor/psy/psysh/src/Command/ListCommand/FunctionEnumerator.php index 733055a6..6c3fa5ea 100644 --- a/vendor/psy/psysh/src/Command/ListCommand/FunctionEnumerator.php +++ b/vendor/psy/psysh/src/Command/ListCommand/FunctionEnumerator.php @@ -74,12 +74,12 @@ class FunctionEnumerator extends Enumerator */ protected function getFunctions($type = null) { - $funcs = get_defined_functions(); + $funcs = \get_defined_functions(); if ($type) { return $funcs[$type]; } else { - return array_merge($funcs['internal'], $funcs['user']); + return \array_merge($funcs['internal'], $funcs['user']); } } @@ -92,7 +92,7 @@ class FunctionEnumerator extends Enumerator */ protected function prepareFunctions(array $functions) { - natcasesort($functions); + \natcasesort($functions); // My kingdom for a generator. $ret = []; diff --git a/vendor/psy/psysh/src/Command/ListCommand/GlobalVariableEnumerator.php b/vendor/psy/psysh/src/Command/ListCommand/GlobalVariableEnumerator.php index 8e58af8b..f51791cb 100644 --- a/vendor/psy/psysh/src/Command/ListCommand/GlobalVariableEnumerator.php +++ b/vendor/psy/psysh/src/Command/ListCommand/GlobalVariableEnumerator.php @@ -53,8 +53,8 @@ class GlobalVariableEnumerator extends Enumerator { global $GLOBALS; - $names = array_keys($GLOBALS); - natcasesort($names); + $names = \array_keys($GLOBALS); + \natcasesort($names); $ret = []; foreach ($names as $name) { diff --git a/vendor/psy/psysh/src/Command/ListCommand/InterfaceEnumerator.php b/vendor/psy/psysh/src/Command/ListCommand/InterfaceEnumerator.php index dae0dace..4531fce8 100644 --- a/vendor/psy/psysh/src/Command/ListCommand/InterfaceEnumerator.php +++ b/vendor/psy/psysh/src/Command/ListCommand/InterfaceEnumerator.php @@ -23,7 +23,7 @@ class InterfaceEnumerator extends Enumerator { public function __construct(Presenter $presenter) { - @trigger_error('InterfaceEnumerator is no longer used', E_USER_DEPRECATED); + @\trigger_error('InterfaceEnumerator is no longer used', E_USER_DEPRECATED); parent::__construct($presenter); } @@ -49,7 +49,7 @@ class InterfaceEnumerator extends Enumerator return; } - $interfaces = $this->prepareInterfaces(get_declared_interfaces()); + $interfaces = $this->prepareInterfaces(\get_declared_interfaces()); if (empty($interfaces)) { return; @@ -69,7 +69,7 @@ class InterfaceEnumerator extends Enumerator */ protected function prepareInterfaces(array $interfaces) { - natcasesort($interfaces); + \natcasesort($interfaces); // My kingdom for a generator. $ret = []; diff --git a/vendor/psy/psysh/src/Command/ListCommand/MethodEnumerator.php b/vendor/psy/psysh/src/Command/ListCommand/MethodEnumerator.php index ebe43afa..49d7e104 100644 --- a/vendor/psy/psysh/src/Command/ListCommand/MethodEnumerator.php +++ b/vendor/psy/psysh/src/Command/ListCommand/MethodEnumerator.php @@ -77,7 +77,7 @@ class MethodEnumerator extends Enumerator } } - ksort($methods, SORT_NATURAL | SORT_FLAG_CASE); + \ksort($methods, SORT_NATURAL | SORT_FLAG_CASE); return $methods; } @@ -118,7 +118,7 @@ class MethodEnumerator extends Enumerator { if ($reflector->isInterface()) { return 'Interface Methods'; - } elseif (method_exists($reflector, 'isTrait') && $reflector->isTrait()) { + } elseif (\method_exists($reflector, 'isTrait') && $reflector->isTrait()) { return 'Trait Methods'; } else { return 'Class Methods'; diff --git a/vendor/psy/psysh/src/Command/ListCommand/PropertyEnumerator.php b/vendor/psy/psysh/src/Command/ListCommand/PropertyEnumerator.php index 15ce45db..d56caded 100644 --- a/vendor/psy/psysh/src/Command/ListCommand/PropertyEnumerator.php +++ b/vendor/psy/psysh/src/Command/ListCommand/PropertyEnumerator.php @@ -77,7 +77,7 @@ class PropertyEnumerator extends Enumerator } } - ksort($properties, SORT_NATURAL | SORT_FLAG_CASE); + \ksort($properties, SORT_NATURAL | SORT_FLAG_CASE); return $properties; } @@ -119,7 +119,7 @@ class PropertyEnumerator extends Enumerator { if ($reflector->isInterface()) { return 'Interface Properties'; - } elseif (method_exists($reflector, 'isTrait') && $reflector->isTrait()) { + } elseif (\method_exists($reflector, 'isTrait') && $reflector->isTrait()) { return 'Trait Properties'; } else { return 'Class Properties'; @@ -156,11 +156,11 @@ class PropertyEnumerator extends Enumerator { // If $target is a class, trait or interface (try to) get the default // value for the property. - if (!is_object($target)) { + if (!\is_object($target)) { try { $refl = new \ReflectionClass($target); $props = $refl->getDefaultProperties(); - if (array_key_exists($property->name, $props)) { + if (\array_key_exists($property->name, $props)) { $suffix = $property->isStatic() ? '' : ' '; return $this->presentRef($props[$property->name]) . $suffix; diff --git a/vendor/psy/psysh/src/Command/ListCommand/TraitEnumerator.php b/vendor/psy/psysh/src/Command/ListCommand/TraitEnumerator.php index c4c74da7..3ee60155 100644 --- a/vendor/psy/psysh/src/Command/ListCommand/TraitEnumerator.php +++ b/vendor/psy/psysh/src/Command/ListCommand/TraitEnumerator.php @@ -23,7 +23,7 @@ class TraitEnumerator extends Enumerator { public function __construct(Presenter $presenter) { - @trigger_error('TraitEnumerator is no longer used', E_USER_DEPRECATED); + @\trigger_error('TraitEnumerator is no longer used', E_USER_DEPRECATED); parent::__construct($presenter); } @@ -49,7 +49,7 @@ class TraitEnumerator extends Enumerator return; } - $traits = $this->prepareTraits(get_declared_traits()); + $traits = $this->prepareTraits(\get_declared_traits()); if (empty($traits)) { return; @@ -69,7 +69,7 @@ class TraitEnumerator extends Enumerator */ protected function prepareTraits(array $traits) { - natcasesort($traits); + \natcasesort($traits); // My kingdom for a generator. $ret = []; diff --git a/vendor/psy/psysh/src/Command/ListCommand/VariableEnumerator.php b/vendor/psy/psysh/src/Command/ListCommand/VariableEnumerator.php index 257ceac5..0586c203 100644 --- a/vendor/psy/psysh/src/Command/ListCommand/VariableEnumerator.php +++ b/vendor/psy/psysh/src/Command/ListCommand/VariableEnumerator.php @@ -79,9 +79,9 @@ class VariableEnumerator extends Enumerator protected function getVariables($showAll) { $scopeVars = $this->context->getAll(); - uksort($scopeVars, function ($a, $b) { - $aIndex = array_search($a, self::$specialNames); - $bIndex = array_search($b, self::$specialNames); + \uksort($scopeVars, function ($a, $b) { + $aIndex = \array_search($a, self::$specialNames); + $bIndex = \array_search($b, self::$specialNames); if ($aIndex !== false) { if ($bIndex !== false) { @@ -95,12 +95,12 @@ class VariableEnumerator extends Enumerator return -1; } - return strnatcasecmp($a, $b); + return \strnatcasecmp($a, $b); }); $ret = []; foreach ($scopeVars as $name => $val) { - if (!$showAll && in_array($name, self::$specialNames)) { + if (!$showAll && \in_array($name, self::$specialNames)) { continue; } @@ -126,7 +126,7 @@ class VariableEnumerator extends Enumerator $fname = '$' . $name; $ret[$fname] = [ 'name' => $fname, - 'style' => in_array($name, self::$specialNames) ? self::IS_PRIVATE : self::IS_PUBLIC, + 'style' => \in_array($name, self::$specialNames) ? self::IS_PRIVATE : self::IS_PUBLIC, 'value' => $this->presentRef($val), ]; } diff --git a/vendor/psy/psysh/src/Command/ParseCommand.php b/vendor/psy/psysh/src/Command/ParseCommand.php index 5fe36d12..3f3286e8 100644 --- a/vendor/psy/psysh/src/Command/ParseCommand.php +++ b/vendor/psy/psysh/src/Command/ParseCommand.php @@ -97,7 +97,7 @@ class ParseCommand extends Command implements ContextAware, PresenterAware if ($this->parserFactory->hasKindsSupport()) { $msg = 'One of PhpParser\\ParserFactory constants: ' - . implode(', ', ParserFactory::getPossibleKinds()) + . \implode(', ', ParserFactory::getPossibleKinds()) . " (default is based on current interpreter's version)."; $defaultKind = $this->parserFactory->getDefaultKind(); @@ -128,7 +128,7 @@ HELP protected function execute(InputInterface $input, OutputInterface $output) { $code = $input->getArgument('code'); - if (strpos('parse($code); } catch (\PhpParser\Error $e) { - if (strpos($e->getMessage(), 'unexpected EOF') === false) { + if (\strpos($e->getMessage(), 'unexpected EOF') === false) { throw $e; } @@ -171,7 +171,7 @@ HELP */ private function getParser($kind = null) { - if (!array_key_exists($kind, $this->parsers)) { + if (!\array_key_exists($kind, $this->parsers)) { $this->parsers[$kind] = $this->parserFactory->createParser($kind); } diff --git a/vendor/psy/psysh/src/Command/ReflectingCommand.php b/vendor/psy/psysh/src/Command/ReflectingCommand.php index 8bc56f6f..32863280 100644 --- a/vendor/psy/psysh/src/Command/ReflectingCommand.php +++ b/vendor/psy/psysh/src/Command/ReflectingCommand.php @@ -56,19 +56,19 @@ abstract class ReflectingCommand extends Command implements ContextAware */ protected function getTarget($valueName) { - $valueName = trim($valueName); + $valueName = \trim($valueName); $matches = []; switch (true) { - case preg_match(self::CLASS_OR_FUNC, $valueName, $matches): + case \preg_match(self::CLASS_OR_FUNC, $valueName, $matches): return [$this->resolveName($matches[0], true), null, 0]; - case preg_match(self::CLASS_MEMBER, $valueName, $matches): + case \preg_match(self::CLASS_MEMBER, $valueName, $matches): return [$this->resolveName($matches[1]), $matches[2], Mirror::CONSTANT | Mirror::METHOD]; - case preg_match(self::CLASS_STATIC, $valueName, $matches): + case \preg_match(self::CLASS_STATIC, $valueName, $matches): return [$this->resolveName($matches[1]), $matches[2], Mirror::STATIC_PROPERTY | Mirror::PROPERTY]; - case preg_match(self::INSTANCE_MEMBER, $valueName, $matches): + case \preg_match(self::INSTANCE_MEMBER, $valueName, $matches): if ($matches[2] === '->') { $kind = Mirror::METHOD | Mirror::PROPERTY; } else { @@ -97,27 +97,27 @@ abstract class ReflectingCommand extends Command implements ContextAware $shell = $this->getApplication(); // While not *technically* 100% accurate, let's treat `self` and `static` as equivalent. - if (in_array(strtolower($name), ['self', 'static'])) { + if (\in_array(\strtolower($name), ['self', 'static'])) { if ($boundClass = $shell->getBoundClass()) { return $boundClass; } if ($boundObject = $shell->getBoundObject()) { - return get_class($boundObject); + return \get_class($boundObject); } - $msg = sprintf('Cannot use "%s" when no class scope is active', strtolower($name)); + $msg = \sprintf('Cannot use "%s" when no class scope is active', \strtolower($name)); throw new ErrorException($msg, 0, E_USER_ERROR, "eval()'d code", 1); } - if (substr($name, 0, 1) === '\\') { + if (\substr($name, 0, 1) === '\\') { return $name; } if ($namespace = $shell->getNamespace()) { $fullName = $namespace . '\\' . $name; - if (class_exists($fullName) || interface_exists($fullName) || ($includeFunctions && function_exists($fullName))) { + if (\class_exists($fullName) || \interface_exists($fullName) || ($includeFunctions && \function_exists($fullName))) { return $fullName; } } @@ -176,7 +176,7 @@ abstract class ReflectingCommand extends Command implements ContextAware { $value = $this->resolveCode($code); - if (!is_object($value)) { + if (!\is_object($value)) { throw new RuntimeException('Unable to inspect a non-object'); } @@ -192,7 +192,7 @@ abstract class ReflectingCommand extends Command implements ContextAware */ protected function resolveInstance($name) { - @trigger_error('`resolveInstance` is deprecated; use `resolveCode` instead.', E_USER_DEPRECATED); + @\trigger_error('`resolveInstance` is deprecated; use `resolveCode` instead.', E_USER_DEPRECATED); return $this->resolveCode($name); } @@ -230,7 +230,7 @@ abstract class ReflectingCommand extends Command implements ContextAware { $vars = []; - switch (get_class($reflector)) { + switch (\get_class($reflector)) { case 'ReflectionClass': case 'ReflectionObject': $vars['__class'] = $reflector->name; @@ -240,7 +240,7 @@ abstract class ReflectingCommand extends Command implements ContextAware break; case 'ReflectionMethod': - $vars['__method'] = sprintf('%s::%s', $reflector->class, $reflector->name); + $vars['__method'] = \sprintf('%s::%s', $reflector->class, $reflector->name); $vars['__class'] = $reflector->class; $classReflector = $reflector->getDeclaringClass(); if ($classReflector->inNamespace()) { @@ -264,7 +264,7 @@ abstract class ReflectingCommand extends Command implements ContextAware if ($fileName = $reflector->getExecutingFile()) { $vars['__file'] = $fileName; $vars['__line'] = $reflector->getExecutingLine(); - $vars['__dir'] = dirname($fileName); + $vars['__dir'] = \dirname($fileName); } break; @@ -279,7 +279,7 @@ abstract class ReflectingCommand extends Command implements ContextAware // no line for these, but this'll do if ($fileName = $reflector->getDeclaringClass()->getFileName()) { $vars['__file'] = $fileName; - $vars['__dir'] = dirname($fileName); + $vars['__dir'] = \dirname($fileName); } break; @@ -294,7 +294,7 @@ abstract class ReflectingCommand extends Command implements ContextAware if ($fileName = $reflector->getFileName()) { $vars['__file'] = $fileName; $vars['__line'] = $reflector->getStartLine(); - $vars['__dir'] = dirname($fileName); + $vars['__dir'] = \dirname($fileName); } } diff --git a/vendor/psy/psysh/src/Command/ShowCommand.php b/vendor/psy/psysh/src/Command/ShowCommand.php index cae86e59..47d18654 100644 --- a/vendor/psy/psysh/src/Command/ShowCommand.php +++ b/vendor/psy/psysh/src/Command/ShowCommand.php @@ -140,16 +140,16 @@ HELP $index = 0; } } else { - $index = max(0, intval($input->getOption('ex')) - 1); + $index = \max(0, \intval($input->getOption('ex')) - 1); } $trace = $exception->getTrace(); - array_unshift($trace, [ + \array_unshift($trace, [ 'file' => $exception->getFile(), 'line' => $exception->getLine(), ]); - if ($index >= count($trace)) { + if ($index >= \count($trace)) { $index = 0; } @@ -169,25 +169,25 @@ HELP $file = isset($trace[$index]['file']) ? $this->replaceCwd($trace[$index]['file']) : 'n/a'; $line = isset($trace[$index]['line']) ? $trace[$index]['line'] : 'n/a'; - $output->writeln(sprintf( + $output->writeln(\sprintf( 'From %s:%d at level %d of backtrace (of %d).', OutputFormatter::escape($file), OutputFormatter::escape($line), $index + 1, - count($trace) + \count($trace) )); } private function replaceCwd($file) { - if ($cwd = getcwd()) { - $cwd = rtrim($cwd, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR; + if ($cwd = \getcwd()) { + $cwd = \rtrim($cwd, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR; } if ($cwd === false) { return $file; } else { - return preg_replace('/^' . preg_quote($cwd, '/') . '/', '', $file); + return \preg_replace('/^' . \preg_quote($cwd, '/') . '/', '', $file); } } @@ -208,8 +208,8 @@ HELP $line = $trace[$index]['line']; } - if (is_file($file)) { - $code = @file_get_contents($file); + if (\is_file($file)) { + $code = @\file_get_contents($file); } if (empty($code)) { @@ -268,12 +268,12 @@ HELP $line = $context['line']; } - if (is_file($file)) { + if (\is_file($file)) { $vars['__file'] = $file; if (isset($line)) { $vars['__line'] = $line; } - $vars['__dir'] = dirname($file); + $vars['__dir'] = \dirname($file); } } @@ -282,7 +282,7 @@ HELP private function extractEvalFileAndLine($file) { - if (preg_match('/(.*)\\((\\d+)\\) : eval\\(\\)\'d code$/', $file, $matches)) { + if (\preg_match('/(.*)\\((\\d+)\\) : eval\\(\\)\'d code$/', $file, $matches)) { return [$matches[1], $matches[2]]; } } diff --git a/vendor/psy/psysh/src/Command/SudoCommand.php b/vendor/psy/psysh/src/Command/SudoCommand.php index 44cc2c0e..9d5afbf0 100644 --- a/vendor/psy/psysh/src/Command/SudoCommand.php +++ b/vendor/psy/psysh/src/Command/SudoCommand.php @@ -103,13 +103,13 @@ HELP // special case for !! if ($code === '!!') { $history = $this->readline->listHistory(); - if (count($history) < 2) { + if (\count($history) < 2) { throw new \InvalidArgumentException('No previous command to replay'); } - $code = $history[count($history) - 2]; + $code = $history[\count($history) - 2]; } - if (strpos('parser->parse($code); } catch (\PhpParser\Error $e) { - if (strpos($e->getMessage(), 'unexpected EOF') === false) { + if (\strpos($e->getMessage(), 'unexpected EOF') === false) { throw $e; } diff --git a/vendor/psy/psysh/src/Command/ThrowUpCommand.php b/vendor/psy/psysh/src/Command/ThrowUpCommand.php index 99af9a8a..b37f7573 100644 --- a/vendor/psy/psysh/src/Command/ThrowUpCommand.php +++ b/vendor/psy/psysh/src/Command/ThrowUpCommand.php @@ -125,12 +125,12 @@ HELP return [new Arg(new Variable('_e'))]; } - if (strpos('parse($code); - if (count($nodes) !== 1) { + if (\count($nodes) !== 1) { throw new \InvalidArgumentException('No idea how to throw this'); } @@ -161,7 +161,7 @@ HELP try { return $this->parser->parse($code); } catch (\PhpParser\Error $e) { - if (strpos($e->getMessage(), 'unexpected EOF') === false) { + if (\strpos($e->getMessage(), 'unexpected EOF') === false) { throw $e; } diff --git a/vendor/psy/psysh/src/Command/TimeitCommand.php b/vendor/psy/psysh/src/Command/TimeitCommand.php index 70d70c0e..c5966313 100644 --- a/vendor/psy/psysh/src/Command/TimeitCommand.php +++ b/vendor/psy/psysh/src/Command/TimeitCommand.php @@ -16,7 +16,6 @@ use PhpParser\PrettyPrinter\Standard as Printer; use Psy\Command\TimeitCommand\TimeitVisitor; use Psy\Input\CodeArgument; use Psy\ParserFactory; -use Psy\Shell; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; @@ -99,13 +98,13 @@ HELP self::$times = []; if ($num === 1) { - $output->writeln(sprintf(self::RESULT_MSG, $times[0])); + $output->writeln(\sprintf(self::RESULT_MSG, $times[0])); } else { - $total = array_sum($times); - rsort($times); - $median = $times[round($num / 2)]; + $total = \array_sum($times); + \rsort($times); + $median = $times[\round($num / 2)]; - $output->writeln(sprintf(self::AVG_RESULT_MSG, $total / $num, $median, $total)); + $output->writeln(\sprintf(self::AVG_RESULT_MSG, $total / $num, $median, $total)); } } @@ -118,7 +117,7 @@ HELP */ public static function markStart() { - self::$start = microtime(true); + self::$start = \microtime(true); } /** @@ -137,7 +136,7 @@ HELP */ public static function markEnd($ret = null) { - self::$times[] = microtime(true) - self::$start; + self::$times[] = \microtime(true) - self::$start; self::$start = null; return $ret; @@ -185,7 +184,7 @@ HELP try { return $this->parser->parse($code); } catch (\PhpParser\Error $e) { - if (strpos($e->getMessage(), 'unexpected EOF') === false) { + if (\strpos($e->getMessage(), 'unexpected EOF') === false) { throw $e; } diff --git a/vendor/psy/psysh/src/Command/TimeitCommand/TimeitVisitor.php b/vendor/psy/psysh/src/Command/TimeitCommand/TimeitVisitor.php index 6ee66994..841ba135 100644 --- a/vendor/psy/psysh/src/Command/TimeitCommand/TimeitVisitor.php +++ b/vendor/psy/psysh/src/Command/TimeitCommand/TimeitVisitor.php @@ -75,15 +75,15 @@ class TimeitVisitor extends NodeVisitorAbstract public function afterTraverse(array $nodes) { // prepend a `markStart` call - array_unshift($nodes, $this->maybeExpression($this->getStartCall())); + \array_unshift($nodes, $this->maybeExpression($this->getStartCall())); // append a `markEnd` call (wrapping the final node, if it's an expression) - $last = $nodes[count($nodes) - 1]; + $last = $nodes[\count($nodes) - 1]; if ($last instanceof Expr) { - array_pop($nodes); + \array_pop($nodes); $nodes[] = $this->getEndCall($last); } elseif ($last instanceof Expression) { - array_pop($nodes); + \array_pop($nodes); $nodes[] = new Expression($this->getEndCall($last->expr), $last->getAttributes()); } elseif ($last instanceof Return_) { // nothing to do here, we're already ending with a return call @@ -134,6 +134,6 @@ class TimeitVisitor extends NodeVisitorAbstract */ private function maybeExpression($expr, $attrs = []) { - return class_exists('PhpParser\Node\Stmt\Expression') ? new Expression($expr, $attrs) : $expr; + return \class_exists('PhpParser\Node\Stmt\Expression') ? new Expression($expr, $attrs) : $expr; } } diff --git a/vendor/psy/psysh/src/Command/TraceCommand.php b/vendor/psy/psysh/src/Command/TraceCommand.php index becc5831..c28b0e72 100644 --- a/vendor/psy/psysh/src/Command/TraceCommand.php +++ b/vendor/psy/psysh/src/Command/TraceCommand.php @@ -90,8 +90,8 @@ HELP */ protected function getBacktrace(\Exception $e, $count = null, $includePsy = true) { - if ($cwd = getcwd()) { - $cwd = rtrim($cwd, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR; + if ($cwd = \getcwd()) { + $cwd = \rtrim($cwd, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR; } if ($count === null) { @@ -101,7 +101,7 @@ HELP $lines = []; $trace = $e->getTrace(); - array_unshift($trace, [ + \array_unshift($trace, [ 'function' => '', 'file' => $e->getFile() !== null ? $e->getFile() : 'n/a', 'line' => $e->getLine() !== null ? $e->getLine() : 'n/a', @@ -109,16 +109,16 @@ HELP ]); if (!$includePsy) { - for ($i = count($trace) - 1; $i >= 0; $i--) { + for ($i = \count($trace) - 1; $i >= 0; $i--) { $thing = isset($trace[$i]['class']) ? $trace[$i]['class'] : $trace[$i]['function']; - if (preg_match('/\\\\?Psy\\\\/', $thing)) { - $trace = array_slice($trace, $i + 1); + if (\preg_match('/\\\\?Psy\\\\/', $thing)) { + $trace = \array_slice($trace, $i + 1); break; } } } - for ($i = 0, $count = min($count, count($trace)); $i < $count; $i++) { + for ($i = 0, $count = \min($count, \count($trace)); $i < $count; $i++) { $class = isset($trace[$i]['class']) ? $trace[$i]['class'] : ''; $type = isset($trace[$i]['type']) ? $trace[$i]['type'] : ''; $function = $trace[$i]['function']; @@ -126,16 +126,16 @@ HELP $line = isset($trace[$i]['line']) ? $trace[$i]['line'] : 'n/a'; // Leave execution loop out of the `eval()'d code` lines - if (preg_match("#/src/Execution(?:Loop)?Closure.php\(\d+\) : eval\(\)'d code$#", str_replace('\\', '/', $file))) { + if (\preg_match("#/src/Execution(?:Loop)?Closure.php\(\d+\) : eval\(\)'d code$#", \str_replace('\\', '/', $file))) { $file = "eval()'d code"; } // Skip any lines that don't match our filter options - if (!$this->filter->match(sprintf('%s%s%s() at %s:%s', $class, $type, $function, $file, $line))) { + if (!$this->filter->match(\sprintf('%s%s%s() at %s:%s', $class, $type, $function, $file, $line))) { continue; } - $lines[] = sprintf( + $lines[] = \sprintf( ' %s%s%s() at %s:%s', OutputFormatter::escape($class), OutputFormatter::escape($type), @@ -161,7 +161,7 @@ HELP if ($cwd === false) { return $file; } else { - return preg_replace('/^' . preg_quote($cwd, '/') . '/', '', $file); + return \preg_replace('/^' . \preg_quote($cwd, '/') . '/', '', $file); } } } diff --git a/vendor/psy/psysh/src/Command/WhereamiCommand.php b/vendor/psy/psysh/src/Command/WhereamiCommand.php index c2b27843..98593d13 100644 --- a/vendor/psy/psysh/src/Command/WhereamiCommand.php +++ b/vendor/psy/psysh/src/Command/WhereamiCommand.php @@ -33,7 +33,7 @@ class WhereamiCommand extends Command public function __construct($colorMode = null) { $this->colorMode = $colorMode ?: Configuration::COLOR_MODE_AUTO; - $this->backtrace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS); + $this->backtrace = \debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS); parent::__construct(); } @@ -69,13 +69,13 @@ HELP */ protected function trace() { - foreach (array_reverse($this->backtrace) as $stackFrame) { + foreach (\array_reverse($this->backtrace) as $stackFrame) { if ($this->isDebugCall($stackFrame)) { return $stackFrame; } } - return end($this->backtrace); + return \end($this->backtrace); } private static function isDebugCall(array $stackFrame) @@ -84,7 +84,7 @@ HELP $function = isset($stackFrame['function']) ? $stackFrame['function'] : null; return ($class === null && $function === 'Psy\debug') || - ($class === 'Psy\Shell' && in_array($function, ['__construct', 'debug'])); + ($class === 'Psy\Shell' && \in_array($function, ['__construct', 'debug'])); } /** @@ -95,8 +95,8 @@ HELP protected function fileInfo() { $stackFrame = $this->trace(); - if (preg_match('/eval\(/', $stackFrame['file'])) { - preg_match_all('/([^\(]+)\((\d+)/', $stackFrame['file'], $matches); + if (\preg_match('/eval\(/', $stackFrame['file'])) { + \preg_match_all('/([^\(]+)\((\d+)/', $stackFrame['file'], $matches); $file = $matches[1][0]; $line = (int) $matches[2][0]; } else { @@ -104,7 +104,7 @@ HELP $line = $stackFrame['line']; } - return compact('file', 'line'); + return \compact('file', 'line'); } /** @@ -117,11 +117,11 @@ HELP $factory = new ConsoleColorFactory($this->colorMode); $colors = $factory->getConsoleColor(); $highlighter = new Highlighter($colors); - $contents = file_get_contents($info['file']); + $contents = \file_get_contents($info['file']); $output->startPaging(); $output->writeln(''); - $output->writeln(sprintf('From %s:%s:', $this->replaceCwd($info['file']), $info['line'])); + $output->writeln(\sprintf('From %s:%s:', $this->replaceCwd($info['file']), $info['line'])); $output->writeln(''); $output->write($highlighter->getCodeSnippet($contents, $info['line'], $num, $num), ShellOutput::OUTPUT_RAW); $output->stopPaging(); @@ -136,13 +136,13 @@ HELP */ private function replaceCwd($file) { - $cwd = getcwd(); + $cwd = \getcwd(); if ($cwd === false) { return $file; } - $cwd = rtrim($cwd, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR; + $cwd = \rtrim($cwd, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR; - return preg_replace('/^' . preg_quote($cwd, '/') . '/', '', $file); + return \preg_replace('/^' . \preg_quote($cwd, '/') . '/', '', $file); } } diff --git a/vendor/psy/psysh/src/Command/WtfCommand.php b/vendor/psy/psysh/src/Command/WtfCommand.php index 68ba0f3f..c6d53000 100644 --- a/vendor/psy/psysh/src/Command/WtfCommand.php +++ b/vendor/psy/psysh/src/Command/WtfCommand.php @@ -86,26 +86,26 @@ HELP { $this->filter->bind($input); - $incredulity = implode('', $input->getArgument('incredulity')); - if (strlen(preg_replace('/[\\?!]/', '', $incredulity))) { + $incredulity = \implode('', $input->getArgument('incredulity')); + if (\strlen(\preg_replace('/[\\?!]/', '', $incredulity))) { throw new \InvalidArgumentException('Incredulity must include only "?" and "!"'); } $exception = $this->context->getLastException(); - $count = $input->getOption('all') ? PHP_INT_MAX : max(3, pow(2, strlen($incredulity) + 1)); + $count = $input->getOption('all') ? PHP_INT_MAX : \max(3, \pow(2, \strlen($incredulity) + 1)); $shell = $this->getApplication(); $output->startPaging(); do { - $traceCount = count($exception->getTrace()); + $traceCount = \count($exception->getTrace()); $showLines = $count; // Show the whole trace if we'd only be hiding a few lines - if ($traceCount < max($count * 1.2, $count + 2)) { + if ($traceCount < \max($count * 1.2, $count + 2)) { $showLines = PHP_INT_MAX; } $trace = $this->getBacktrace($exception, $showLines); - $moreLines = $traceCount - count($trace); + $moreLines = $traceCount - \count($trace); $output->writeln($shell->formatException($exception)); $output->writeln('--'); @@ -113,7 +113,7 @@ HELP $output->writeln(''); if ($moreLines > 0) { - $output->writeln(sprintf( + $output->writeln(\sprintf( '', $moreLines )); diff --git a/vendor/psy/psysh/src/ConfigPaths.php b/vendor/psy/psysh/src/ConfigPaths.php index 0c9c78a4..c4de2d57 100644 --- a/vendor/psy/psysh/src/ConfigPaths.php +++ b/vendor/psy/psysh/src/ConfigPaths.php @@ -68,7 +68,7 @@ class ConfigPaths { $configDirs = self::getHomeConfigDirs(); foreach ($configDirs as $configDir) { - if (@is_dir($configDir)) { + if (@\is_dir($configDir)) { return $configDir; } } @@ -136,7 +136,7 @@ class ConfigPaths { $xdg = new Xdg(); - set_error_handler(['Psy\Exception\ErrorException', 'throwException']); + \set_error_handler(['Psy\Exception\ErrorException', 'throwException']); try { // XDG doesn't really work on Windows, sometimes complains about @@ -146,34 +146,34 @@ class ConfigPaths } catch (\Exception $e) { // Well. That didn't work. Fall back to a boring old folder in the // system temp dir. - $runtimeDir = sys_get_temp_dir(); + $runtimeDir = \sys_get_temp_dir(); } - restore_error_handler(); + \restore_error_handler(); - return strtr($runtimeDir, '\\', '/') . '/psysh'; + return \strtr($runtimeDir, '\\', '/') . '/psysh'; } private static function getDirNames(array $baseDirs) { - $dirs = array_map(function ($dir) { - return strtr($dir, '\\', '/') . '/psysh'; + $dirs = \array_map(function ($dir) { + return \strtr($dir, '\\', '/') . '/psysh'; }, $baseDirs); // Add ~/.psysh - if ($home = getenv('HOME')) { - $dirs[] = strtr($home, '\\', '/') . '/.psysh'; + if ($home = \getenv('HOME')) { + $dirs[] = \strtr($home, '\\', '/') . '/.psysh'; } // Add some Windows specific ones :) - if (defined('PHP_WINDOWS_VERSION_MAJOR')) { - if ($appData = getenv('APPDATA')) { + if (\defined('PHP_WINDOWS_VERSION_MAJOR')) { + if ($appData = \getenv('APPDATA')) { // AppData gets preference - array_unshift($dirs, strtr($appData, '\\', '/') . '/PsySH'); + \array_unshift($dirs, \strtr($appData, '\\', '/') . '/PsySH'); } - $dir = strtr(getenv('HOMEDRIVE') . '/' . getenv('HOMEPATH'), '\\', '/') . '/.psysh'; - if (!in_array($dir, $dirs)) { + $dir = \strtr(\getenv('HOMEDRIVE') . '/' . \getenv('HOMEPATH'), '\\', '/') . '/.psysh'; + if (!\in_array($dir, $dirs)) { $dirs[] = $dir; } } @@ -187,7 +187,7 @@ class ConfigPaths foreach ($dirNames as $dir) { foreach ($fileNames as $name) { $file = $dir . '/' . $name; - if (@is_file($file)) { + if (@\is_file($file)) { $files[] = $file; } } @@ -207,30 +207,30 @@ class ConfigPaths */ public static function touchFileWithMkdir($file) { - if (file_exists($file)) { - if (is_writable($file)) { + if (\file_exists($file)) { + if (\is_writable($file)) { return $file; } - trigger_error(sprintf('Writing to %s is not allowed.', $file), E_USER_NOTICE); + \trigger_error(\sprintf('Writing to %s is not allowed.', $file), E_USER_NOTICE); return false; } - $dir = dirname($file); + $dir = \dirname($file); - if (!is_dir($dir)) { + if (!\is_dir($dir)) { // Just try making it and see if it works - @mkdir($dir, 0700, true); + @\mkdir($dir, 0700, true); } - if (!is_dir($dir) || !is_writable($dir)) { - trigger_error(sprintf('Writing to %s is not allowed.', $dir), E_USER_NOTICE); + if (!\is_dir($dir) || !\is_writable($dir)) { + \trigger_error(\sprintf('Writing to %s is not allowed.', $dir), E_USER_NOTICE); return false; } - touch($file); + \touch($file); return $file; } diff --git a/vendor/psy/psysh/src/Configuration.php b/vendor/psy/psysh/src/Configuration.php index b37f2e57..67c76e7b 100644 --- a/vendor/psy/psysh/src/Configuration.php +++ b/vendor/psy/psysh/src/Configuration.php @@ -114,7 +114,7 @@ class Configuration // explicit configFile option if (isset($config['configFile'])) { $this->configFile = $config['configFile']; - } elseif ($configFile = getenv('PSYSH_CONFIG')) { + } elseif ($configFile = \getenv('PSYSH_CONFIG')) { $this->configFile = $configFile; } @@ -145,8 +145,8 @@ class Configuration public function init() { // feature detection - $this->hasReadline = function_exists('readline'); - $this->hasPcntl = function_exists('pcntl_signal') && function_exists('posix_getpid'); + $this->hasReadline = \function_exists('readline'); + $this->hasPcntl = \function_exists('pcntl_signal') && \function_exists('posix_getpid'); if ($configFile = $this->getConfigFile()) { $this->loadConfigFile($configFile); @@ -180,9 +180,9 @@ class Configuration $files = ConfigPaths::getConfigFiles(['config.php', 'rc.php'], $this->configDir); if (!empty($files)) { - if ($this->warnOnMultipleConfigs && count($files) > 1) { - $msg = sprintf('Multiple configuration files found: %s. Using %s', implode($files, ', '), $files[0]); - trigger_error($msg, E_USER_NOTICE); + if ($this->warnOnMultipleConfigs && \count($files) > 1) { + $msg = \sprintf('Multiple configuration files found: %s. Using %s', \implode($files, ', '), $files[0]); + \trigger_error($msg, E_USER_NOTICE); } return $files[0]; @@ -199,9 +199,9 @@ class Configuration */ public function getLocalConfigFile() { - $localConfig = getcwd() . '/.psysh.php'; + $localConfig = \getcwd() . '/.psysh.php'; - if (@is_file($localConfig)) { + if (@\is_file($localConfig)) { return $localConfig; } } @@ -215,7 +215,7 @@ class Configuration { foreach (self::$AVAILABLE_OPTIONS as $option) { if (isset($options[$option])) { - $method = 'set' . ucfirst($option); + $method = 'set' . \ucfirst($option); $this->$method($options[$option]); } } @@ -223,14 +223,14 @@ class Configuration // legacy `tabCompletion` option if (isset($options['tabCompletion'])) { $msg = '`tabCompletion` is deprecated; use `useTabCompletion` instead.'; - @trigger_error($msg, E_USER_DEPRECATED); + @\trigger_error($msg, E_USER_DEPRECATED); $this->setUseTabCompletion($options['tabCompletion']); } foreach (['commands', 'matchers', 'casters'] as $option) { if (isset($options[$option])) { - $method = 'add' . ucfirst($option); + $method = 'add' . \ucfirst($option); $this->$method($options[$option]); } } @@ -238,7 +238,7 @@ class Configuration // legacy `tabCompletionMatchers` option if (isset($options['tabCompletionMatchers'])) { $msg = '`tabCompletionMatchers` is deprecated; use `matchers` instead.'; - @trigger_error($msg, E_USER_DEPRECATED); + @\trigger_error($msg, E_USER_DEPRECATED); $this->addMatchers($options['tabCompletionMatchers']); } @@ -267,7 +267,7 @@ class Configuration $result = $load($this); if (!empty($result)) { - if (is_array($result)) { + if (\is_array($result)) { $this->loadConfig($result); } else { throw new \InvalidArgumentException('Psy Shell configuration must return an array of options'); @@ -359,8 +359,8 @@ class Configuration $this->runtimeDir = ConfigPaths::getRuntimeDir(); } - if (!is_dir($this->runtimeDir)) { - mkdir($this->runtimeDir, 0700, true); + if (!\is_dir($this->runtimeDir)) { + \mkdir($this->runtimeDir, 0700, true); } return $this->runtimeDir; @@ -393,9 +393,9 @@ class Configuration $files = ConfigPaths::getConfigFiles(['psysh_history', 'history'], $this->configDir); if (!empty($files)) { - if ($this->warnOnMultipleConfigs && count($files) > 1) { - $msg = sprintf('Multiple history files found: %s. Using %s', implode($files, ', '), $files[0]); - trigger_error($msg, E_USER_NOTICE); + if ($this->warnOnMultipleConfigs && \count($files) > 1) { + $msg = \sprintf('Multiple history files found: %s. Using %s', \implode($files, ', '), $files[0]); + \trigger_error($msg, E_USER_NOTICE); } $this->setHistoryFile($files[0]); @@ -462,7 +462,7 @@ class Configuration */ public function getTempFile($type, $pid) { - return tempnam($this->getRuntimeDir(), $type . '_' . $pid . '_'); + return \tempnam($this->getRuntimeDir(), $type . '_' . $pid . '_'); } /** @@ -477,7 +477,7 @@ class Configuration */ public function getPipe($type, $pid) { - return sprintf('%s/%s_%s', $this->getRuntimeDir(), $type, $pid); + return \sprintf('%s/%s_%s', $this->getRuntimeDir(), $type, $pid); } /** @@ -861,7 +861,7 @@ class Configuration */ public function setPager($pager) { - if ($pager && !is_string($pager) && !$pager instanceof OutputPager) { + if ($pager && !\is_string($pager) && !$pager instanceof OutputPager) { throw new \InvalidArgumentException('Unexpected pager instance'); } @@ -879,10 +879,10 @@ class Configuration public function getPager() { if (!isset($this->pager) && $this->usePcntl()) { - if ($pager = ini_get('cli.pager')) { + if ($pager = \ini_get('cli.pager')) { // use the default pager $this->pager = $pager; - } elseif ($less = exec('which less 2>/dev/null')) { + } elseif ($less = \exec('which less 2>/dev/null')) { // check for the presence of less... $this->pager = $less . ' -R -S -F -X'; } @@ -937,7 +937,7 @@ class Configuration */ public function addMatchers(array $matchers) { - $this->newMatchers = array_merge($this->newMatchers, $matchers); + $this->newMatchers = \array_merge($this->newMatchers, $matchers); if (isset($this->shell)) { $this->doAddMatchers(); } @@ -977,7 +977,7 @@ class Configuration */ public function addCommands(array $commands) { - $this->newCommands = array_merge($this->newCommands, $commands); + $this->newCommands = \array_merge($this->newCommands, $commands); if (isset($this->shell)) { $this->doAddCommands(); } @@ -1033,9 +1033,9 @@ class Configuration $files = ConfigPaths::getDataFiles(['php_manual.sqlite'], $this->dataDir); if (!empty($files)) { - if ($this->warnOnMultipleConfigs && count($files) > 1) { - $msg = sprintf('Multiple manual database files found: %s. Using %s', implode($files, ', '), $files[0]); - trigger_error($msg, E_USER_NOTICE); + if ($this->warnOnMultipleConfigs && \count($files) > 1) { + $msg = \sprintf('Multiple manual database files found: %s. Using %s', \implode($files, ', '), $files[0]); + \trigger_error($msg, E_USER_NOTICE); } return $this->manualDbFile = $files[0]; @@ -1051,7 +1051,7 @@ class Configuration { if (!isset($this->manualDb)) { $dbFile = $this->getManualDbFile(); - if (is_file($dbFile)) { + if (\is_file($dbFile)) { try { $this->manualDb = new \PDO('sqlite:' . $dbFile); } catch (\PDOException $e) { @@ -1133,7 +1133,7 @@ class Configuration self::COLOR_MODE_DISABLED, ]; - if (in_array($colorMode, $validColorModes)) { + if (\in_array($colorMode, $validColorModes)) { $this->colorMode = $colorMode; } else { throw new \InvalidArgumentException('invalid color mode: ' . $colorMode); @@ -1226,7 +1226,7 @@ class Configuration Checker::NEVER, ]; - if (!in_array($interval, $validIntervals)) { + if (!\in_array($interval, $validIntervals)) { throw new \InvalidArgumentException('invalid update check interval: ' . $interval); } diff --git a/vendor/psy/psysh/src/Context.php b/vendor/psy/psysh/src/Context.php index c0e58e89..104dc8ff 100644 --- a/vendor/psy/psysh/src/Context.php +++ b/vendor/psy/psysh/src/Context.php @@ -75,13 +75,13 @@ class Context case '__file': case '__line': case '__dir': - if (array_key_exists($name, $this->commandScopeVariables)) { + if (\array_key_exists($name, $this->commandScopeVariables)) { return $this->commandScopeVariables[$name]; } break; default: - if (array_key_exists($name, $this->scopeVariables)) { + if (\array_key_exists($name, $this->scopeVariables)) { return $this->scopeVariables[$name]; } break; @@ -97,7 +97,7 @@ class Context */ public function getAll() { - return array_merge($this->scopeVariables, $this->getSpecialVariables()); + return \array_merge($this->scopeVariables, $this->getSpecialVariables()); } /** @@ -123,7 +123,7 @@ class Context $vars['this'] = $this->boundObject; } - return array_merge($vars, $this->commandScopeVariables); + return \array_merge($vars, $this->commandScopeVariables); } /** @@ -228,7 +228,7 @@ class Context */ public function setBoundObject($boundObject) { - $this->boundObject = is_object($boundObject) ? $boundObject : null; + $this->boundObject = \is_object($boundObject) ? $boundObject : null; $this->boundClass = null; } @@ -251,7 +251,7 @@ class Context */ public function setBoundClass($boundClass) { - $this->boundClass = (is_string($boundClass) && $boundClass !== '') ? $boundClass : null; + $this->boundClass = (\is_string($boundClass) && $boundClass !== '') ? $boundClass : null; $this->boundObject = null; } @@ -275,7 +275,7 @@ class Context $vars = []; foreach ($commandScopeVariables as $key => $value) { // kind of type check - if (is_scalar($value) && in_array($key, self::$commandScopeNames)) { + if (\is_scalar($value) && \in_array($key, self::$commandScopeNames)) { $vars[$key] = $value; } } @@ -303,7 +303,7 @@ class Context */ public function getUnusedCommandScopeVariableNames() { - return array_diff(self::$commandScopeNames, array_keys($this->commandScopeVariables)); + return \array_diff(self::$commandScopeNames, \array_keys($this->commandScopeVariables)); } /** @@ -315,6 +315,6 @@ class Context */ public static function isSpecialVariableName($name) { - return in_array($name, self::$specialNames) || in_array($name, self::$commandScopeNames); + return \in_array($name, self::$specialNames) || \in_array($name, self::$commandScopeNames); } } diff --git a/vendor/psy/psysh/src/Exception/BreakException.php b/vendor/psy/psysh/src/Exception/BreakException.php index 1436d56a..2200e78d 100644 --- a/vendor/psy/psysh/src/Exception/BreakException.php +++ b/vendor/psy/psysh/src/Exception/BreakException.php @@ -24,7 +24,7 @@ class BreakException extends \Exception implements Exception public function __construct($message = '', $code = 0, \Exception $previous = null) { $this->rawMessage = $message; - parent::__construct(sprintf('Exit: %s', $message), $code, $previous); + parent::__construct(\sprintf('Exit: %s', $message), $code, $previous); } /** diff --git a/vendor/psy/psysh/src/Exception/ErrorException.php b/vendor/psy/psysh/src/Exception/ErrorException.php index 2cd7e95f..822fa927 100644 --- a/vendor/psy/psysh/src/Exception/ErrorException.php +++ b/vendor/psy/psysh/src/Exception/ErrorException.php @@ -32,7 +32,7 @@ class ErrorException extends \ErrorException implements Exception { $this->rawMessage = $message; - if (!empty($filename) && preg_match('{Psy[/\\\\]ExecutionLoop}', $filename)) { + if (!empty($filename) && \preg_match('{Psy[/\\\\]ExecutionLoop}', $filename)) { $filename = ''; } @@ -67,7 +67,7 @@ class ErrorException extends \ErrorException implements Exception break; } - $message = sprintf('PHP %s: %s%s on line %d', $type, $message, $filename ? ' in ' . $filename : '', $lineno); + $message = \sprintf('PHP %s: %s%s on line %d', $type, $message, $filename ? ' in ' . $filename : '', $lineno); parent::__construct($message, $code, $severity, $filename, $lineno, $previous); } diff --git a/vendor/psy/psysh/src/Exception/FatalErrorException.php b/vendor/psy/psysh/src/Exception/FatalErrorException.php index 08b56c0b..48a4e2b8 100644 --- a/vendor/psy/psysh/src/Exception/FatalErrorException.php +++ b/vendor/psy/psysh/src/Exception/FatalErrorException.php @@ -36,7 +36,7 @@ class FatalErrorException extends \ErrorException implements Exception } $this->rawMessage = $message; - $message = sprintf('PHP Fatal error: %s in %s on line %d', $message, $filename ?: "eval()'d code", $lineno); + $message = \sprintf('PHP Fatal error: %s in %s on line %d', $message, $filename ?: "eval()'d code", $lineno); parent::__construct($message, $code, $severity, $filename, $lineno, $previous); } diff --git a/vendor/psy/psysh/src/Exception/ParseErrorException.php b/vendor/psy/psysh/src/Exception/ParseErrorException.php index 93d0d3c9..cb6380e6 100644 --- a/vendor/psy/psysh/src/Exception/ParseErrorException.php +++ b/vendor/psy/psysh/src/Exception/ParseErrorException.php @@ -24,7 +24,7 @@ class ParseErrorException extends \PhpParser\Error implements Exception */ public function __construct($message = '', $line = -1) { - $message = sprintf('PHP Parse error: %s', $message); + $message = \sprintf('PHP Parse error: %s', $message); parent::__construct($message, $line); } diff --git a/vendor/psy/psysh/src/Exception/ThrowUpException.php b/vendor/psy/psysh/src/Exception/ThrowUpException.php index 8c3eb06c..b0ca490a 100644 --- a/vendor/psy/psysh/src/Exception/ThrowUpException.php +++ b/vendor/psy/psysh/src/Exception/ThrowUpException.php @@ -21,7 +21,7 @@ class ThrowUpException extends \Exception implements Exception */ public function __construct(\Exception $exception) { - $message = sprintf("Throwing %s with message '%s'", get_class($exception), $exception->getMessage()); + $message = \sprintf("Throwing %s with message '%s'", \get_class($exception), $exception->getMessage()); parent::__construct($message, $exception->getCode(), $exception); } diff --git a/vendor/psy/psysh/src/Exception/TypeErrorException.php b/vendor/psy/psysh/src/Exception/TypeErrorException.php index 9dbdb936..b6894983 100644 --- a/vendor/psy/psysh/src/Exception/TypeErrorException.php +++ b/vendor/psy/psysh/src/Exception/TypeErrorException.php @@ -27,8 +27,8 @@ class TypeErrorException extends \Exception implements Exception public function __construct($message = '', $code = 0) { $this->rawMessage = $message; - $message = preg_replace('/, called in .*?: eval\\(\\)\'d code/', '', $message); - parent::__construct(sprintf('TypeError: %s', $message), $code); + $message = \preg_replace('/, called in .*?: eval\\(\\)\'d code/', '', $message); + parent::__construct(\sprintf('TypeError: %s', $message), $code); } /** diff --git a/vendor/psy/psysh/src/ExecutionClosure.php b/vendor/psy/psysh/src/ExecutionClosure.php index 29a3bcc6..5c7cd25a 100644 --- a/vendor/psy/psysh/src/ExecutionClosure.php +++ b/vendor/psy/psysh/src/ExecutionClosure.php @@ -28,42 +28,42 @@ class ExecutionClosure $this->setClosure($__psysh__, function () use ($__psysh__) { try { // Restore execution scope variables - extract($__psysh__->getScopeVariables(false)); + \extract($__psysh__->getScopeVariables(false)); // Buffer stdout; we'll need it later - ob_start([$__psysh__, 'writeStdout'], 1); + \ob_start([$__psysh__, 'writeStdout'], 1); // Convert all errors to exceptions - set_error_handler([$__psysh__, 'handleError']); + \set_error_handler([$__psysh__, 'handleError']); // Evaluate the current code buffer $_ = eval($__psysh__->onExecute($__psysh__->flushCode() ?: ExecutionClosure::NOOP_INPUT)); } catch (\Throwable $_e) { // Clean up on our way out. - restore_error_handler(); - if (ob_get_level() > 0) { - ob_end_clean(); + \restore_error_handler(); + if (\ob_get_level() > 0) { + \ob_end_clean(); } throw $_e; } catch (\Exception $_e) { // Clean up on our way out. - restore_error_handler(); - if (ob_get_level() > 0) { - ob_end_clean(); + \restore_error_handler(); + if (\ob_get_level() > 0) { + \ob_end_clean(); } throw $_e; } // Won't be needing this anymore - restore_error_handler(); + \restore_error_handler(); // Flush stdout (write to shell output, plus save to magic variable) - ob_end_flush(); + \ob_end_flush(); // Save execution scope variables for next time - $__psysh__->setScopeVariables(get_defined_vars()); + $__psysh__->setScopeVariables(\get_defined_vars()); return $_; }); @@ -79,8 +79,8 @@ class ExecutionClosure { if (self::shouldBindClosure()) { $that = $shell->getBoundObject(); - if (is_object($that)) { - $closure = $closure->bindTo($that, get_class($that)); + if (\is_object($that)) { + $closure = $closure->bindTo($that, \get_class($that)); } else { $closure = $closure->bindTo(null, $shell->getBoundClass()); } @@ -110,8 +110,8 @@ class ExecutionClosure { // skip binding on HHVM < 3.5.0 // see https://github.com/facebook/hhvm/issues/1203 - if (defined('HHVM_VERSION')) { - return version_compare(HHVM_VERSION, '3.5.0', '>='); + if (\defined('HHVM_VERSION')) { + return \version_compare(HHVM_VERSION, '3.5.0', '>='); } return true; diff --git a/vendor/psy/psysh/src/ExecutionLoop.php b/vendor/psy/psysh/src/ExecutionLoop.php index eacd1d3c..2e4307cb 100644 --- a/vendor/psy/psysh/src/ExecutionLoop.php +++ b/vendor/psy/psysh/src/ExecutionLoop.php @@ -42,7 +42,7 @@ class ExecutionLoop { // Load user-defined includes $load = function (Shell $__psysh__) { - set_error_handler([$__psysh__, 'handleError']); + \set_error_handler([$__psysh__, 'handleError']); foreach ($__psysh__->getIncludes() as $__psysh_include__) { try { include $__psysh_include__; @@ -52,14 +52,14 @@ class ExecutionLoop $__psysh__->writeException($_e); } } - restore_error_handler(); + \restore_error_handler(); unset($__psysh_include__); // Override any new local variables with pre-defined scope variables - extract($__psysh__->getScopeVariables(false)); + \extract($__psysh__->getScopeVariables(false)); // ... then add the whole mess of variables back. - $__psysh__->setScopeVariables(get_defined_vars()); + $__psysh__->setScopeVariables(\get_defined_vars()); }; $load($shell); diff --git a/vendor/psy/psysh/src/ExecutionLoop/ProcessForker.php b/vendor/psy/psysh/src/ExecutionLoop/ProcessForker.php index 2e645032..47047959 100644 --- a/vendor/psy/psysh/src/ExecutionLoop/ProcessForker.php +++ b/vendor/psy/psysh/src/ExecutionLoop/ProcessForker.php @@ -33,7 +33,7 @@ class ProcessForker extends AbstractListener */ public static function isSupported() { - return function_exists('pcntl_signal') && function_exists('posix_getpid'); + return \function_exists('pcntl_signal') && \function_exists('posix_getpid'); } /** @@ -46,20 +46,20 @@ class ProcessForker extends AbstractListener */ public function beforeRun(Shell $shell) { - list($up, $down) = stream_socket_pair(STREAM_PF_UNIX, STREAM_SOCK_STREAM, STREAM_IPPROTO_IP); + list($up, $down) = \stream_socket_pair(STREAM_PF_UNIX, STREAM_SOCK_STREAM, STREAM_IPPROTO_IP); if (!$up) { throw new \RuntimeException('Unable to create socket pair'); } - $pid = pcntl_fork(); + $pid = \pcntl_fork(); if ($pid < 0) { throw new \RuntimeException('Unable to start execution loop'); } elseif ($pid > 0) { // This is the main thread. We'll just wait for a while. // We won't be needing this one. - fclose($up); + \fclose($up); // Wait for a return value from the loop process. $read = [$down]; @@ -67,40 +67,40 @@ class ProcessForker extends AbstractListener $except = null; do { - $n = @stream_select($read, $write, $except, null); + $n = @\stream_select($read, $write, $except, null); if ($n === 0) { throw new \RuntimeException('Process timed out waiting for execution loop'); } if ($n === false) { - $err = error_get_last(); - if (!isset($err['message']) || stripos($err['message'], 'interrupted system call') === false) { + $err = \error_get_last(); + if (!isset($err['message']) || \stripos($err['message'], 'interrupted system call') === false) { $msg = $err['message'] ? - sprintf('Error waiting for execution loop: %s', $err['message']) : + \sprintf('Error waiting for execution loop: %s', $err['message']) : 'Error waiting for execution loop'; throw new \RuntimeException($msg); } } } while ($n < 1); - $content = stream_get_contents($down); - fclose($down); + $content = \stream_get_contents($down); + \fclose($down); if ($content) { - $shell->setScopeVariables(@unserialize($content)); + $shell->setScopeVariables(@\unserialize($content)); } throw new BreakException('Exiting main thread'); } // This is the child process. It's going to do all the work. - if (function_exists('setproctitle')) { + if (\function_exists('setproctitle')) { setproctitle('psysh (loop)'); } // We won't be needing this one. - fclose($down); + \fclose($down); // Save this; we'll need to close it in `afterRun` $this->up = $up; @@ -125,8 +125,8 @@ class ProcessForker extends AbstractListener { // if there's an old savegame hanging around, let's kill it. if (isset($this->savegame)) { - posix_kill($this->savegame, SIGKILL); - pcntl_signal_dispatch(); + \posix_kill($this->savegame, SIGKILL); + \pcntl_signal_dispatch(); } } @@ -140,10 +140,10 @@ class ProcessForker extends AbstractListener { // We're a child thread. Send the scope variables back up to the main thread. if (isset($this->up)) { - fwrite($this->up, $this->serializeReturn($shell->getScopeVariables(false))); - fclose($this->up); + \fwrite($this->up, $this->serializeReturn($shell->getScopeVariables(false))); + \fclose($this->up); - posix_kill(posix_getpid(), SIGKILL); + \posix_kill(\posix_getpid(), SIGKILL); } } @@ -157,18 +157,18 @@ class ProcessForker extends AbstractListener private function createSavegame() { // the current process will become the savegame - $this->savegame = posix_getpid(); + $this->savegame = \posix_getpid(); - $pid = pcntl_fork(); + $pid = \pcntl_fork(); if ($pid < 0) { throw new \RuntimeException('Unable to create savegame fork'); } elseif ($pid > 0) { // we're the savegame now... let's wait and see what happens - pcntl_waitpid($pid, $status); + \pcntl_waitpid($pid, $status); // worker exited cleanly, let's bail - if (!pcntl_wexitstatus($status)) { - posix_kill(posix_getpid(), SIGKILL); + if (!\pcntl_wexitstatus($status)) { + \posix_kill(\posix_getpid(), SIGKILL); } // worker didn't exit cleanly, we'll need to have another go @@ -199,12 +199,12 @@ class ProcessForker extends AbstractListener } // Resources and Closures don't error, but they don't serialize well either. - if (is_resource($value) || $value instanceof \Closure) { + if (\is_resource($value) || $value instanceof \Closure) { continue; } try { - @serialize($value); + @\serialize($value); $serializable[$key] = $value; } catch (\Throwable $e) { // we'll just ignore this one... @@ -214,6 +214,6 @@ class ProcessForker extends AbstractListener } } - return @serialize($serializable); + return @\serialize($serializable); } } diff --git a/vendor/psy/psysh/src/ExecutionLoop/RunkitReloader.php b/vendor/psy/psysh/src/ExecutionLoop/RunkitReloader.php index 5706b79a..d80480b0 100644 --- a/vendor/psy/psysh/src/ExecutionLoop/RunkitReloader.php +++ b/vendor/psy/psysh/src/ExecutionLoop/RunkitReloader.php @@ -30,7 +30,7 @@ class RunkitReloader extends AbstractListener */ public static function isSupported() { - return extension_loaded('runkit'); + return \extension_loaded('runkit'); } /** @@ -62,11 +62,11 @@ class RunkitReloader extends AbstractListener */ private function reload(Shell $shell) { - clearstatcache(); + \clearstatcache(); $modified = []; - foreach (get_included_files() as $file) { - $timestamp = filemtime($file); + foreach (\get_included_files() as $file) { + $timestamp = \filemtime($file); if (!isset($this->timestamps[$file])) { $this->timestamps[$file] = $timestamp; @@ -78,7 +78,7 @@ class RunkitReloader extends AbstractListener } if (!$this->lintFile($file)) { - $msg = sprintf('Modified file "%s" could not be reloaded', $file); + $msg = \sprintf('Modified file "%s" could not be reloaded', $file); $shell->writeException(new ParseErrorException($msg)); continue; } @@ -125,7 +125,7 @@ class RunkitReloader extends AbstractListener { // first try to parse it try { - $this->parser->parse(file_get_contents($file)); + $this->parser->parse(\file_get_contents($file)); } catch (\Exception $e) { return false; } diff --git a/vendor/psy/psysh/src/ExecutionLoopClosure.php b/vendor/psy/psysh/src/ExecutionLoopClosure.php index e34848ed..94d3ce2e 100644 --- a/vendor/psy/psysh/src/ExecutionLoopClosure.php +++ b/vendor/psy/psysh/src/ExecutionLoopClosure.php @@ -31,7 +31,7 @@ class ExecutionLoopClosure extends ExecutionClosure { $this->setClosure($__psysh__, function () use ($__psysh__) { // Restore execution scope variables - extract($__psysh__->getScopeVariables(false)); + \extract($__psysh__->getScopeVariables(false)); do { $__psysh__->beforeLoop(); @@ -40,40 +40,43 @@ class ExecutionLoopClosure extends ExecutionClosure $__psysh__->getInput(); try { + // Pull in any new execution scope variables + \extract($__psysh__->getScopeVariablesDiff(\get_defined_vars())); + // Buffer stdout; we'll need it later - ob_start([$__psysh__, 'writeStdout'], 1); + \ob_start([$__psysh__, 'writeStdout'], 1); // Convert all errors to exceptions - set_error_handler([$__psysh__, 'handleError']); + \set_error_handler([$__psysh__, 'handleError']); // Evaluate the current code buffer $_ = eval($__psysh__->onExecute($__psysh__->flushCode() ?: ExecutionClosure::NOOP_INPUT)); } catch (\Throwable $_e) { // Clean up on our way out. - restore_error_handler(); - if (ob_get_level() > 0) { - ob_end_clean(); + \restore_error_handler(); + if (\ob_get_level() > 0) { + \ob_end_clean(); } throw $_e; } catch (\Exception $_e) { // Clean up on our way out. - restore_error_handler(); - if (ob_get_level() > 0) { - ob_end_clean(); + \restore_error_handler(); + if (\ob_get_level() > 0) { + \ob_end_clean(); } throw $_e; } // Won't be needing this anymore - restore_error_handler(); + \restore_error_handler(); // Flush stdout (write to shell output, plus save to magic variable) - ob_end_flush(); + \ob_end_flush(); // Save execution scope variables for next time - $__psysh__->setScopeVariables(get_defined_vars()); + $__psysh__->setScopeVariables(\get_defined_vars()); $__psysh__->writeReturnValue($_); } catch (BreakException $_e) { diff --git a/vendor/psy/psysh/src/Formatter/CodeFormatter.php b/vendor/psy/psysh/src/Formatter/CodeFormatter.php index 5ef195df..2ac37cc9 100644 --- a/vendor/psy/psysh/src/Formatter/CodeFormatter.php +++ b/vendor/psy/psysh/src/Formatter/CodeFormatter.php @@ -38,11 +38,11 @@ class CodeFormatter implements Formatter $colorMode = $colorMode ?: Configuration::COLOR_MODE_AUTO; if ($fileName = $reflector->getFileName()) { - if (!is_file($fileName)) { + if (!\is_file($fileName)) { throw new RuntimeException('Source code unavailable'); } - $file = file_get_contents($fileName); + $file = \file_get_contents($fileName); $start = $reflector->getStartLine(); $end = $reflector->getEndLine() - $start; diff --git a/vendor/psy/psysh/src/Formatter/DocblockFormatter.php b/vendor/psy/psysh/src/Formatter/DocblockFormatter.php index 33f450e1..39ea60e5 100644 --- a/vendor/psy/psysh/src/Formatter/DocblockFormatter.php +++ b/vendor/psy/psysh/src/Formatter/DocblockFormatter.php @@ -45,20 +45,20 @@ class DocblockFormatter implements Formatter if (!empty($docblock->tags)) { foreach ($docblock::$vectors as $name => $vector) { if (isset($docblock->tags[$name])) { - $chunks[] = sprintf('%s:', self::inflect($name)); + $chunks[] = \sprintf('%s:', self::inflect($name)); $chunks[] = self::formatVector($vector, $docblock->tags[$name]); $chunks[] = ''; } } - $tags = self::formatTags(array_keys($docblock::$vectors), $docblock->tags); + $tags = self::formatTags(\array_keys($docblock::$vectors), $docblock->tags); if (!empty($tags)) { $chunks[] = $tags; $chunks[] = ''; } } - return rtrim(implode("\n", $chunks)); + return \rtrim(\implode("\n", $chunks)); } /** @@ -78,7 +78,7 @@ class DocblockFormatter implements Formatter $max = 0; foreach ($lines as $line) { $chunk = $line[$type]; - $cur = empty($chunk) ? 0 : strlen($chunk) + 1; + $cur = empty($chunk) ? 0 : \strlen($chunk) + 1; if ($cur > $max) { $max = $cur; } @@ -86,12 +86,12 @@ class DocblockFormatter implements Formatter $template[] = self::getVectorParamTemplate($type, $max); } - $template = implode(' ', $template); + $template = \implode(' ', $template); - return implode("\n", array_map(function ($line) use ($template) { - $escaped = array_map(['Symfony\Component\Console\Formatter\OutputFormatter', 'escape'], $line); + return \implode("\n", \array_map(function ($line) use ($template) { + $escaped = \array_map(['Symfony\Component\Console\Formatter\OutputFormatter', 'escape'], $line); - return rtrim(vsprintf($template, $escaped)); + return \rtrim(\vsprintf($template, $escaped)); }, $lines)); } @@ -108,18 +108,18 @@ class DocblockFormatter implements Formatter $chunks = []; foreach ($tags as $name => $values) { - if (in_array($name, $skip)) { + if (\in_array($name, $skip)) { continue; } foreach ($values as $value) { - $chunks[] = sprintf('%s%s %s', self::inflect($name), empty($value) ? '' : ':', OutputFormatter::escape($value)); + $chunks[] = \sprintf('%s%s %s', self::inflect($name), empty($value) ? '' : ':', OutputFormatter::escape($value)); } $chunks[] = ''; } - return implode("\n", $chunks); + return \implode("\n", $chunks); } /** @@ -133,10 +133,10 @@ class DocblockFormatter implements Formatter private static function getVectorParamTemplate($type, $max) { if (!isset(self::$vectorParamTemplates[$type])) { - return sprintf('%%-%ds', $max); + return \sprintf('%%-%ds', $max); } - return sprintf('<%s>%%-%ds', self::$vectorParamTemplates[$type], $max, self::$vectorParamTemplates[$type]); + return \sprintf('<%s>%%-%ds', self::$vectorParamTemplates[$type], $max, self::$vectorParamTemplates[$type]); } /** @@ -149,7 +149,7 @@ class DocblockFormatter implements Formatter */ private static function indent($text, $indent = ' ') { - return $indent . str_replace("\n", "\n" . $indent, $text); + return $indent . \str_replace("\n", "\n" . $indent, $text); } /** @@ -161,8 +161,8 @@ class DocblockFormatter implements Formatter */ private static function inflect($text) { - $words = trim(preg_replace('/[\s_-]+/', ' ', preg_replace('/([a-z])([A-Z])/', '$1 $2', $text))); + $words = \trim(\preg_replace('/[\s_-]+/', ' ', \preg_replace('/([a-z])([A-Z])/', '$1 $2', $text))); - return implode(' ', array_map('ucfirst', explode(' ', $words))); + return \implode(' ', \array_map('ucfirst', \explode(' ', $words))); } } diff --git a/vendor/psy/psysh/src/Formatter/SignatureFormatter.php b/vendor/psy/psysh/src/Formatter/SignatureFormatter.php index 2a83ad1c..ec8725d9 100644 --- a/vendor/psy/psysh/src/Formatter/SignatureFormatter.php +++ b/vendor/psy/psysh/src/Formatter/SignatureFormatter.php @@ -56,7 +56,7 @@ class SignatureFormatter implements Formatter return self::formatConstant($reflector); default: - throw new \InvalidArgumentException('Unexpected Reflector class: ' . get_class($reflector)); + throw new \InvalidArgumentException('Unexpected Reflector class: ' . \get_class($reflector)); } } @@ -84,13 +84,13 @@ class SignatureFormatter implements Formatter if ($reflector instanceof \ReflectionClass && $reflector->isTrait()) { // For some reason, PHP 5.x returns `abstract public` modifiers for // traits. Let's just ignore that business entirely. - if (version_compare(PHP_VERSION, '7.0.0', '<')) { + if (\version_compare(PHP_VERSION, '7.0.0', '<')) { return []; } } - return implode(' ', array_map(function ($modifier) { - return sprintf('%s', $modifier); + return \implode(' ', \array_map(function ($modifier) { + return \sprintf('%s', $modifier); }, \Reflection::getModifierNames($reflector->getModifiers()))); } @@ -115,24 +115,24 @@ class SignatureFormatter implements Formatter $chunks[] = $reflector->isInterface() ? 'interface' : 'class'; } - $chunks[] = sprintf('%s', self::formatName($reflector)); + $chunks[] = \sprintf('%s', self::formatName($reflector)); if ($parent = $reflector->getParentClass()) { $chunks[] = 'extends'; - $chunks[] = sprintf('%s', $parent->getName()); + $chunks[] = \sprintf('%s', $parent->getName()); } $interfaces = $reflector->getInterfaceNames(); if (!empty($interfaces)) { - sort($interfaces); + \sort($interfaces); $chunks[] = 'implements'; - $chunks[] = implode(', ', array_map(function ($name) { - return sprintf('%s', $name); + $chunks[] = \implode(', ', \array_map(function ($name) { + return \sprintf('%s', $name); }, $interfaces)); } - return implode(' ', $chunks); + return \implode(' ', $chunks); } /** @@ -147,7 +147,7 @@ class SignatureFormatter implements Formatter $value = $reflector->getValue(); $style = self::getTypeStyle($value); - return sprintf( + return \sprintf( 'const %s = <%s>%s', self::formatName($reflector), $style, @@ -168,7 +168,7 @@ class SignatureFormatter implements Formatter $value = $reflector->getValue(); $style = self::getTypeStyle($value); - return sprintf( + return \sprintf( 'define(%s, <%s>%s)', OutputFormatter::escape(Json::encode($reflector->getName())), $style, @@ -186,11 +186,11 @@ class SignatureFormatter implements Formatter */ private static function getTypeStyle($value) { - if (is_int($value) || is_float($value)) { + if (\is_int($value) || \is_float($value)) { return 'number'; - } elseif (is_string($value)) { + } elseif (\is_string($value)) { return 'string'; - } elseif (is_bool($value) || is_null($value)) { + } elseif (\is_bool($value) || \is_null($value)) { return 'bool'; } else { return 'strong'; // @codeCoverageIgnore @@ -206,7 +206,7 @@ class SignatureFormatter implements Formatter */ private static function formatProperty(\ReflectionProperty $reflector) { - return sprintf( + return \sprintf( '%s $%s', self::formatModifiers($reflector), $reflector->getName() @@ -222,11 +222,11 @@ class SignatureFormatter implements Formatter */ private static function formatFunction(\ReflectionFunctionAbstract $reflector) { - return sprintf( + return \sprintf( 'function %s%s(%s)', $reflector->returnsReference() ? '&' : '', self::formatName($reflector), - implode(', ', self::formatFunctionParams($reflector)) + \implode(', ', self::formatFunctionParams($reflector)) ); } @@ -239,7 +239,7 @@ class SignatureFormatter implements Formatter */ private static function formatMethod(\ReflectionMethod $reflector) { - return sprintf( + return \sprintf( '%s %s', self::formatModifiers($reflector), self::formatFunction($reflector) @@ -262,7 +262,7 @@ class SignatureFormatter implements Formatter if ($param->isArray()) { $hint = 'array '; } elseif ($class = $param->getClass()) { - $hint = sprintf('%s ', $class->getName()); + $hint = \sprintf('%s ', $class->getName()); } } catch (\Exception $e) { // sometimes we just don't know... @@ -272,11 +272,11 @@ class SignatureFormatter implements Formatter // Hax: we'll try to extract it :P // @codeCoverageIgnoreStart - $chunks = explode('$' . $param->getName(), (string) $param); - $chunks = explode(' ', trim($chunks[0])); - $guess = end($chunks); + $chunks = \explode('$' . $param->getName(), (string) $param); + $chunks = \explode(' ', \trim($chunks[0])); + $guess = \end($chunks); - $hint = sprintf('%s ', $guess); + $hint = \sprintf('%s ', $guess); // @codeCoverageIgnoreEnd } @@ -287,14 +287,14 @@ class SignatureFormatter implements Formatter } else { $value = $param->getDefaultValue(); $typeStyle = self::getTypeStyle($value); - $value = is_array($value) ? 'array()' : is_null($value) ? 'null' : var_export($value, true); + $value = \is_array($value) ? 'array()' : \is_null($value) ? 'null' : \var_export($value, true); } - $default = sprintf(' = <%s>%s', $typeStyle, OutputFormatter::escape($value), $typeStyle); + $default = \sprintf(' = <%s>%s', $typeStyle, OutputFormatter::escape($value), $typeStyle); } else { $default = ''; } - $params[] = sprintf( + $params[] = \sprintf( '%s%s$%s%s', $param->isPassedByReference() ? '&' : '', $hint, diff --git a/vendor/psy/psysh/src/Input/FilterOptions.php b/vendor/psy/psysh/src/Input/FilterOptions.php index a2ed49d0..d77a04fb 100644 --- a/vendor/psy/psysh/src/Input/FilterOptions.php +++ b/vendor/psy/psysh/src/Input/FilterOptions.php @@ -56,7 +56,7 @@ class FilterOptions } if (!$this->stringIsRegex($pattern)) { - $pattern = '/' . preg_quote($pattern, '/') . '/'; + $pattern = '/' . \preg_quote($pattern, '/') . '/'; } if ($insensitive = $input->getOption('insensitive')) { @@ -91,7 +91,7 @@ class FilterOptions */ public function match($string, array &$matches = null) { - return $this->filter === false || (preg_match($this->pattern, $string, $matches) xor $this->invert); + return $this->filter === false || (\preg_match($this->pattern, $string, $matches) xor $this->invert); } /** @@ -121,7 +121,7 @@ class FilterOptions */ private function stringIsRegex($string) { - return substr($string, 0, 1) === '/' && substr($string, -1) === '/' && strlen($string) >= 3; + return \substr($string, 0, 1) === '/' && \substr($string, -1) === '/' && \strlen($string) >= 3; } /** @@ -133,13 +133,13 @@ class FilterOptions */ private function validateRegex($pattern) { - set_error_handler(['Psy\Exception\ErrorException', 'throwException']); + \set_error_handler(['Psy\Exception\ErrorException', 'throwException']); try { - preg_match($pattern, ''); + \preg_match($pattern, ''); } catch (ErrorException $e) { - restore_error_handler(); - throw new RuntimeException(str_replace('preg_match(): ', 'Invalid regular expression: ', $e->getRawMessage())); + \restore_error_handler(); + throw new RuntimeException(\str_replace('preg_match(): ', 'Invalid regular expression: ', $e->getRawMessage())); } - restore_error_handler(); + \restore_error_handler(); } } diff --git a/vendor/psy/psysh/src/Input/ShellInput.php b/vendor/psy/psysh/src/Input/ShellInput.php index 7141d2d4..8675f4d1 100644 --- a/vendor/psy/psysh/src/Input/ShellInput.php +++ b/vendor/psy/psysh/src/Input/ShellInput.php @@ -51,10 +51,10 @@ class ShellInput extends StringInput if ($definition->getArgumentCount() > 0) { $args = $definition->getArguments(); - $lastArg = array_pop($args); + $lastArg = \array_pop($args); foreach ($args as $arg) { if ($arg instanceof CodeArgument) { - $msg = sprintf('Unexpected CodeArgument before the final position: %s', $arg->getName()); + $msg = \sprintf('Unexpected CodeArgument before the final position: %s', $arg->getName()); throw new \InvalidArgumentException($msg); } } @@ -84,33 +84,33 @@ class ShellInput extends StringInput private function tokenize($input) { $tokens = []; - $length = strlen($input); + $length = \strlen($input); $cursor = 0; while ($cursor < $length) { - if (preg_match('/\s+/A', $input, $match, null, $cursor)) { - } elseif (preg_match('/([^="\'\s]+?)(=?)(' . StringInput::REGEX_QUOTED_STRING . '+)/A', $input, $match, null, $cursor)) { + if (\preg_match('/\s+/A', $input, $match, null, $cursor)) { + } elseif (\preg_match('/([^="\'\s]+?)(=?)(' . StringInput::REGEX_QUOTED_STRING . '+)/A', $input, $match, null, $cursor)) { $tokens[] = [ - $match[1] . $match[2] . stripcslashes(str_replace(['"\'', '\'"', '\'\'', '""'], '', substr($match[3], 1, strlen($match[3]) - 2))), - stripcslashes(substr($input, $cursor)), + $match[1] . $match[2] . \stripcslashes(\str_replace(['"\'', '\'"', '\'\'', '""'], '', \substr($match[3], 1, \strlen($match[3]) - 2))), + \stripcslashes(\substr($input, $cursor)), ]; - } elseif (preg_match('/' . StringInput::REGEX_QUOTED_STRING . '/A', $input, $match, null, $cursor)) { + } elseif (\preg_match('/' . StringInput::REGEX_QUOTED_STRING . '/A', $input, $match, null, $cursor)) { $tokens[] = [ - stripcslashes(substr($match[0], 1, strlen($match[0]) - 2)), - stripcslashes(substr($input, $cursor)), + \stripcslashes(\substr($match[0], 1, \strlen($match[0]) - 2)), + \stripcslashes(\substr($input, $cursor)), ]; - } elseif (preg_match('/' . StringInput::REGEX_STRING . '/A', $input, $match, null, $cursor)) { + } elseif (\preg_match('/' . StringInput::REGEX_STRING . '/A', $input, $match, null, $cursor)) { $tokens[] = [ - stripcslashes($match[1]), - stripcslashes(substr($input, $cursor)), + \stripcslashes($match[1]), + \stripcslashes(\substr($input, $cursor)), ]; } else { // should never happen // @codeCoverageIgnoreStart - throw new \InvalidArgumentException(sprintf('Unable to parse input near "... %s ..."', substr($input, $cursor, 10))); + throw new \InvalidArgumentException(\sprintf('Unable to parse input near "... %s ..."', \substr($input, $cursor, 10))); // @codeCoverageIgnoreEnd } - $cursor += strlen($match[0]); + $cursor += \strlen($match[0]); } return $tokens; @@ -123,7 +123,7 @@ class ShellInput extends StringInput { $parseOptions = true; $this->parsed = $this->tokenPairs; - while (null !== $tokenPair = array_shift($this->parsed)) { + while (null !== $tokenPair = \array_shift($this->parsed)) { // token is what you'd expect. rest is the remainder of the input // string, including token, and will be used if this is a code arg. list($token, $rest) = $tokenPair; @@ -132,7 +132,7 @@ class ShellInput extends StringInput $this->parseShellArgument($token, $rest); } elseif ($parseOptions && '--' === $token) { $parseOptions = false; - } elseif ($parseOptions && 0 === strpos($token, '--')) { + } elseif ($parseOptions && 0 === \strpos($token, '--')) { $this->parseLongOption($token); } elseif ($parseOptions && '-' === $token[0] && '-' !== $token) { $this->parseShortOption($token); @@ -152,7 +152,7 @@ class ShellInput extends StringInput */ private function parseShellArgument($token, $rest) { - $c = count($this->arguments); + $c = \count($this->arguments); // if input is expecting another argument, add it if ($this->definition->hasArgument($c)) { @@ -184,11 +184,11 @@ class ShellInput extends StringInput // unexpected argument $all = $this->definition->getArguments(); - if (count($all)) { - throw new \RuntimeException(sprintf('Too many arguments, expected arguments "%s".', implode('" "', array_keys($all)))); + if (\count($all)) { + throw new \RuntimeException(\sprintf('Too many arguments, expected arguments "%s".', \implode('" "', \array_keys($all)))); } - throw new \RuntimeException(sprintf('No arguments expected, got "%s".', $token)); + throw new \RuntimeException(\sprintf('No arguments expected, got "%s".', $token)); // @codeCoverageIgnoreEnd } @@ -202,12 +202,12 @@ class ShellInput extends StringInput */ private function parseShortOption($token) { - $name = substr($token, 1); + $name = \substr($token, 1); - if (strlen($name) > 1) { + if (\strlen($name) > 1) { if ($this->definition->hasShortcut($name[0]) && $this->definition->getOptionForShortcut($name[0])->acceptValue()) { // an option with a value (with no space) - $this->addShortOption($name[0], substr($name, 1)); + $this->addShortOption($name[0], \substr($name, 1)); } else { $this->parseShortOptionSet($name); } @@ -225,15 +225,15 @@ class ShellInput extends StringInput */ private function parseShortOptionSet($name) { - $len = strlen($name); + $len = \strlen($name); for ($i = 0; $i < $len; $i++) { if (!$this->definition->hasShortcut($name[$i])) { - throw new \RuntimeException(sprintf('The "-%s" option does not exist.', $name[$i])); + throw new \RuntimeException(\sprintf('The "-%s" option does not exist.', $name[$i])); } $option = $this->definition->getOptionForShortcut($name[$i]); if ($option->acceptValue()) { - $this->addLongOption($option->getName(), $i === $len - 1 ? null : substr($name, $i + 1)); + $this->addLongOption($option->getName(), $i === $len - 1 ? null : \substr($name, $i + 1)); break; } else { @@ -249,18 +249,18 @@ class ShellInput extends StringInput */ private function parseLongOption($token) { - $name = substr($token, 2); + $name = \substr($token, 2); - if (false !== $pos = strpos($name, '=')) { - if (0 === strlen($value = substr($name, $pos + 1))) { + if (false !== $pos = \strpos($name, '=')) { + if (0 === \strlen($value = \substr($name, $pos + 1))) { // if no value after "=" then substr() returns "" since php7 only, false before // see http://php.net/manual/fr/migration70.incompatible.php#119151 if (PHP_VERSION_ID < 70000 && false === $value) { $value = ''; } - array_unshift($this->parsed, [$value, null]); + \array_unshift($this->parsed, [$value, null]); } - $this->addLongOption(substr($name, 0, $pos), $value); + $this->addLongOption(\substr($name, 0, $pos), $value); } else { $this->addLongOption($name, null); } @@ -277,7 +277,7 @@ class ShellInput extends StringInput private function addShortOption($shortcut, $value) { if (!$this->definition->hasShortcut($shortcut)) { - throw new \RuntimeException(sprintf('The "-%s" option does not exist.', $shortcut)); + throw new \RuntimeException(\sprintf('The "-%s" option does not exist.', $shortcut)); } $this->addLongOption($this->definition->getOptionForShortcut($shortcut)->getName(), $value); @@ -294,30 +294,30 @@ class ShellInput extends StringInput private function addLongOption($name, $value) { if (!$this->definition->hasOption($name)) { - throw new \RuntimeException(sprintf('The "--%s" option does not exist.', $name)); + throw new \RuntimeException(\sprintf('The "--%s" option does not exist.', $name)); } $option = $this->definition->getOption($name); if (null !== $value && !$option->acceptValue()) { - throw new \RuntimeException(sprintf('The "--%s" option does not accept a value.', $name)); + throw new \RuntimeException(\sprintf('The "--%s" option does not accept a value.', $name)); } - if (in_array($value, ['', 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); + $next = \array_shift($this->parsed); $nextToken = $next[0]; - if ((isset($nextToken[0]) && '-' !== $nextToken[0]) || in_array($nextToken, ['', null], true)) { + if ((isset($nextToken[0]) && '-' !== $nextToken[0]) || \in_array($nextToken, ['', null], true)) { $value = $nextToken; } else { - array_unshift($this->parsed, $next); + \array_unshift($this->parsed, $next); } } if (null === $value) { if ($option->isValueRequired()) { - throw new \RuntimeException(sprintf('The "--%s" option requires a value.', $name)); + throw new \RuntimeException(\sprintf('The "--%s" option requires a value.', $name)); } if (!$option->isArray() && !$option->isValueOptional()) { diff --git a/vendor/psy/psysh/src/Output/ProcOutputPager.php b/vendor/psy/psysh/src/Output/ProcOutputPager.php index d8c03028..a047b1c3 100644 --- a/vendor/psy/psysh/src/Output/ProcOutputPager.php +++ b/vendor/psy/psysh/src/Output/ProcOutputPager.php @@ -51,14 +51,14 @@ class ProcOutputPager extends StreamOutput implements OutputPager public function doWrite($message, $newline) { $pipe = $this->getPipe(); - if (false === @fwrite($pipe, $message . ($newline ? PHP_EOL : ''))) { + if (false === @\fwrite($pipe, $message . ($newline ? PHP_EOL : ''))) { // @codeCoverageIgnoreStart // should never happen throw new \RuntimeException('Unable to write output'); // @codeCoverageIgnoreEnd } - fflush($pipe); + \fflush($pipe); } /** @@ -67,11 +67,11 @@ class ProcOutputPager extends StreamOutput implements OutputPager public function close() { if (isset($this->pipe)) { - fclose($this->pipe); + \fclose($this->pipe); } if (isset($this->proc)) { - $exit = proc_close($this->proc); + $exit = \proc_close($this->proc); if ($exit !== 0) { throw new \RuntimeException('Error closing output stream'); } @@ -88,10 +88,10 @@ class ProcOutputPager extends StreamOutput implements OutputPager private function getPipe() { if (!isset($this->pipe) || !isset($this->proc)) { - $desc = [['pipe', 'r'], $this->stream, fopen('php://stderr', 'w')]; - $this->proc = proc_open($this->cmd, $desc, $pipes); + $desc = [['pipe', 'r'], $this->stream, \fopen('php://stderr', 'w')]; + $this->proc = \proc_open($this->cmd, $desc, $pipes); - if (!is_resource($this->proc)) { + if (!\is_resource($this->proc)) { throw new \RuntimeException('Error opening output stream'); } diff --git a/vendor/psy/psysh/src/Output/ShellOutput.php b/vendor/psy/psysh/src/Output/ShellOutput.php index e980d387..5881a5c2 100644 --- a/vendor/psy/psysh/src/Output/ShellOutput.php +++ b/vendor/psy/psysh/src/Output/ShellOutput.php @@ -41,7 +41,7 @@ class ShellOutput extends ConsoleOutput if ($pager === null) { $this->pager = new PassthruPager($this); - } elseif (is_string($pager)) { + } elseif (\is_string($pager)) { $this->pager = new ProcOutputPager($this, $pager); } elseif ($pager instanceof OutputPager) { $this->pager = $pager; @@ -65,17 +65,17 @@ class ShellOutput extends ConsoleOutput */ public function page($messages, $type = 0) { - if (is_string($messages)) { + if (\is_string($messages)) { $messages = (array) $messages; } - if (!is_array($messages) && !is_callable($messages)) { + if (!\is_array($messages) && !\is_callable($messages)) { throw new \InvalidArgumentException('Paged output requires a string, array or callback'); } $this->startPaging(); - if (is_callable($messages)) { + if (\is_callable($messages)) { $messages($this); } else { $this->write($messages, true, $type); @@ -122,15 +122,15 @@ class ShellOutput extends ConsoleOutput $messages = (array) $messages; if ($type & self::NUMBER_LINES) { - $pad = strlen((string) count($messages)); + $pad = \strlen((string) \count($messages)); $template = $this->isDecorated() ? ": %s" : "%{$pad}s: %s"; if ($type & self::OUTPUT_RAW) { - $messages = array_map(['Symfony\Component\Console\Formatter\OutputFormatter', 'escape'], $messages); + $messages = \array_map(['Symfony\Component\Console\Formatter\OutputFormatter', 'escape'], $messages); } foreach ($messages as $i => $line) { - $messages[$i] = sprintf($template, $i, $line); + $messages[$i] = \sprintf($template, $i, $line); } // clean this up for super. diff --git a/vendor/psy/psysh/src/ParserFactory.php b/vendor/psy/psysh/src/ParserFactory.php index 21427483..263da202 100644 --- a/vendor/psy/psysh/src/ParserFactory.php +++ b/vendor/psy/psysh/src/ParserFactory.php @@ -44,7 +44,7 @@ class ParserFactory */ public function hasKindsSupport() { - return class_exists('PhpParser\ParserFactory'); + return \class_exists('PhpParser\ParserFactory'); } /** @@ -55,7 +55,7 @@ class ParserFactory public function getDefaultKind() { if ($this->hasKindsSupport()) { - return version_compare(PHP_VERSION, '7.0', '>=') ? static::ONLY_PHP7 : static::ONLY_PHP5; + return \version_compare(PHP_VERSION, '7.0', '>=') ? static::ONLY_PHP7 : static::ONLY_PHP5; } } @@ -73,11 +73,11 @@ class ParserFactory $kind = $kind ?: $this->getDefaultKind(); - if (!in_array($kind, static::getPossibleKinds())) { + if (!\in_array($kind, static::getPossibleKinds())) { throw new \InvalidArgumentException('Unknown parser kind'); } - $parser = $originalFactory->create(constant('PhpParser\ParserFactory::' . $kind)); + $parser = $originalFactory->create(\constant('PhpParser\ParserFactory::' . $kind)); } else { if ($kind !== null) { throw new \InvalidArgumentException('Install PHP Parser v2.x to specify parser kind'); diff --git a/vendor/psy/psysh/src/Readline/GNUReadline.php b/vendor/psy/psysh/src/Readline/GNUReadline.php index e1041220..1cec3c63 100644 --- a/vendor/psy/psysh/src/Readline/GNUReadline.php +++ b/vendor/psy/psysh/src/Readline/GNUReadline.php @@ -36,7 +36,7 @@ class GNUReadline implements Readline */ public static function isSupported() { - return function_exists('readline_list_history'); + return \function_exists('readline_list_history'); } /** @@ -58,7 +58,7 @@ class GNUReadline implements Readline */ public function addHistory($line) { - if ($res = readline_add_history($line)) { + if ($res = \readline_add_history($line)) { $this->writeHistory(); } @@ -70,7 +70,7 @@ class GNUReadline implements Readline */ public function clearHistory() { - if ($res = readline_clear_history()) { + if ($res = \readline_clear_history()) { $this->writeHistory(); } @@ -96,12 +96,12 @@ class GNUReadline implements Readline // // https://github.com/php/php-src/blob/423a057023ef3c00d2ffc16a6b43ba01d0f71796/NEWS#L19-L21 // - if (version_compare(PHP_VERSION, '5.6.7', '>=') || !ini_get('open_basedir')) { - readline_read_history(); + if (\version_compare(PHP_VERSION, '5.6.7', '>=') || !\ini_get('open_basedir')) { + \readline_read_history(); } - readline_clear_history(); + \readline_clear_history(); - return readline_read_history($this->historyFile); + return \readline_read_history($this->historyFile); } /** @@ -109,7 +109,7 @@ class GNUReadline implements Readline */ public function readline($prompt = null) { - return readline($prompt); + return \readline($prompt); } /** @@ -117,7 +117,7 @@ class GNUReadline implements Readline */ public function redisplay() { - readline_redisplay(); + \readline_redisplay(); } /** @@ -128,7 +128,7 @@ class GNUReadline implements Readline // We have to write history first, since it is used // by Libedit to list history if ($this->historyFile !== false) { - $res = readline_write_history($this->historyFile); + $res = \readline_write_history($this->historyFile); } else { $res = true; } @@ -144,25 +144,25 @@ class GNUReadline implements Readline if ($this->eraseDups) { // flip-flip technique: removes duplicates, latest entries win. - $hist = array_flip(array_flip($hist)); + $hist = \array_flip(\array_flip($hist)); // sort on keys to get the order back - ksort($hist); + \ksort($hist); } if ($this->historySize > 0) { - $histsize = count($hist); + $histsize = \count($hist); if ($histsize > $this->historySize) { - $hist = array_slice($hist, $histsize - $this->historySize); + $hist = \array_slice($hist, $histsize - $this->historySize); } } - readline_clear_history(); + \readline_clear_history(); foreach ($hist as $line) { - readline_add_history($line); + \readline_add_history($line); } if ($this->historyFile !== false) { - return readline_write_history($this->historyFile); + return \readline_write_history($this->historyFile); } return true; diff --git a/vendor/psy/psysh/src/Readline/HoaConsole.php b/vendor/psy/psysh/src/Readline/HoaConsole.php index 9330d259..a49b5928 100644 --- a/vendor/psy/psysh/src/Readline/HoaConsole.php +++ b/vendor/psy/psysh/src/Readline/HoaConsole.php @@ -27,7 +27,7 @@ class HoaConsole implements Readline */ public static function isSupported() { - return class_exists('\Hoa\Console\Console', true); + return \class_exists('\Hoa\Console\Console', true); } public function __construct() diff --git a/vendor/psy/psysh/src/Readline/Libedit.php b/vendor/psy/psysh/src/Readline/Libedit.php index 008affea..d1dc002f 100644 --- a/vendor/psy/psysh/src/Readline/Libedit.php +++ b/vendor/psy/psysh/src/Readline/Libedit.php @@ -29,7 +29,7 @@ class Libedit extends GNUReadline */ public static function isSupported() { - return function_exists('readline') && !function_exists('readline_list_history'); + return \function_exists('readline') && !\function_exists('readline_list_history'); } /** @@ -37,23 +37,23 @@ class Libedit extends GNUReadline */ public function listHistory() { - $history = file_get_contents($this->historyFile); + $history = \file_get_contents($this->historyFile); if (!$history) { return []; } // libedit doesn't seem to support non-unix line separators. - $history = explode("\n", $history); + $history = \explode("\n", $history); // shift the history signature, ensure it's valid - if (array_shift($history) !== '_HiStOrY_V2_') { + if (\array_shift($history) !== '_HiStOrY_V2_') { return []; } // decode the line - $history = array_map([$this, 'parseHistoryLine'], $history); + $history = \array_map([$this, 'parseHistoryLine'], $history); // filter empty lines & comments - return array_values(array_filter($history)); + return \array_values(\array_filter($history)); } /** @@ -74,8 +74,8 @@ class Libedit extends GNUReadline } // if "\0" is found in an entry, then // everything from it until the end of line is a comment. - if (($pos = strpos($line, "\0")) !== false) { - $line = substr($line, 0, $pos); + if (($pos = \strpos($line, "\0")) !== false) { + $line = \substr($line, 0, $pos); } return ($line !== '') ? Str::unvis($line) : null; diff --git a/vendor/psy/psysh/src/Readline/Transient.php b/vendor/psy/psysh/src/Readline/Transient.php index 58518947..e238fdf4 100644 --- a/vendor/psy/psysh/src/Readline/Transient.php +++ b/vendor/psy/psysh/src/Readline/Transient.php @@ -50,7 +50,7 @@ class Transient implements Readline public function addHistory($line) { if ($this->eraseDups) { - if (($key = array_search($line, $this->history)) !== false) { + if (($key = \array_search($line, $this->history)) !== false) { unset($this->history[$key]); } } @@ -58,13 +58,13 @@ class Transient implements Readline $this->history[] = $line; if ($this->historySize > 0) { - $histsize = count($this->history); + $histsize = \count($this->history); if ($histsize > $this->historySize) { - $this->history = array_slice($this->history, $histsize - $this->historySize); + $this->history = \array_slice($this->history, $histsize - $this->historySize); } } - $this->history = array_values($this->history); + $this->history = \array_values($this->history); return true; } @@ -106,7 +106,7 @@ class Transient implements Readline { echo $prompt; - return rtrim(fgets($this->getStdin(), 1024)); + return \rtrim(\fgets($this->getStdin(), 1024)); } /** @@ -135,10 +135,10 @@ class Transient implements Readline private function getStdin() { if (!isset($this->stdin)) { - $this->stdin = fopen('php://stdin', 'r'); + $this->stdin = \fopen('php://stdin', 'r'); } - if (feof($this->stdin)) { + if (\feof($this->stdin)) { throw new BreakException('Ctrl+D'); } diff --git a/vendor/psy/psysh/src/Reflection/ReflectionClassConstant.php b/vendor/psy/psysh/src/Reflection/ReflectionClassConstant.php index ab686bbe..019ad21d 100644 --- a/vendor/psy/psysh/src/Reflection/ReflectionClassConstant.php +++ b/vendor/psy/psysh/src/Reflection/ReflectionClassConstant.php @@ -38,7 +38,7 @@ class ReflectionClassConstant implements \Reflector $this->name = $name; $constants = $class->getConstants(); - if (!array_key_exists($name, $constants)) { + if (!\array_key_exists($name, $constants)) { throw new \InvalidArgumentException('Unknown constant: ' . $name); } @@ -59,7 +59,7 @@ class ReflectionClassConstant implements \Reflector $refl = new self($class, $name); $value = $refl->getValue(); - $str = sprintf('Constant [ public %s %s ] { %s }', gettype($value), $refl->getName(), $value); + $str = \sprintf('Constant [ public %s %s ] { %s }', \gettype($value), $refl->getName(), $value); if ($return) { return $str; @@ -219,7 +219,7 @@ class ReflectionClassConstant implements \Reflector */ public static function create($class, $name) { - if (class_exists('\\ReflectionClassConstant')) { + if (\class_exists('\\ReflectionClassConstant')) { return new \ReflectionClassConstant($class, $name); } diff --git a/vendor/psy/psysh/src/Reflection/ReflectionConstant.php b/vendor/psy/psysh/src/Reflection/ReflectionConstant.php index 7fa9b8a6..a813fc57 100644 --- a/vendor/psy/psysh/src/Reflection/ReflectionConstant.php +++ b/vendor/psy/psysh/src/Reflection/ReflectionConstant.php @@ -23,7 +23,7 @@ class ReflectionConstant extends ReflectionClassConstant */ public function __construct($class, $name) { - @trigger_error('ReflectionConstant is now ReflectionClassConstant', E_USER_DEPRECATED); + @\trigger_error('ReflectionConstant is now ReflectionClassConstant', E_USER_DEPRECATED); parent::__construct($class, $name); } diff --git a/vendor/psy/psysh/src/Reflection/ReflectionConstant_.php b/vendor/psy/psysh/src/Reflection/ReflectionConstant_.php index 91f96b6f..b355e350 100644 --- a/vendor/psy/psysh/src/Reflection/ReflectionConstant_.php +++ b/vendor/psy/psysh/src/Reflection/ReflectionConstant_.php @@ -46,12 +46,12 @@ class ReflectionConstant_ implements \Reflector { $this->name = $name; - if (!defined($name) && !self::isMagicConstant($name)) { + if (!\defined($name) && !self::isMagicConstant($name)) { throw new \InvalidArgumentException('Unknown constant: ' . $name); } if (!self::isMagicConstant($name)) { - $this->value = @constant($name); + $this->value = @\constant($name); } } @@ -68,7 +68,7 @@ class ReflectionConstant_ implements \Reflector $refl = new self($name); $value = $refl->getValue(); - $str = sprintf('Constant [ %s %s ] { %s }', gettype($value), $refl->getName(), $value); + $str = \sprintf('Constant [ %s %s ] { %s }', \gettype($value), $refl->getName(), $value); if ($return) { return $str; @@ -79,7 +79,7 @@ class ReflectionConstant_ implements \Reflector public static function isMagicConstant($name) { - return in_array($name, self::$magicConstants); + return \in_array($name, self::$magicConstants); } /** @@ -115,7 +115,7 @@ class ReflectionConstant_ implements \Reflector return ''; } - return preg_replace('/\\\\[^\\\\]+$/', '', $this->name); + return \preg_replace('/\\\\[^\\\\]+$/', '', $this->name); } /** @@ -135,7 +135,7 @@ class ReflectionConstant_ implements \Reflector */ public function inNamespace() { - return strpos($this->name, '\\') !== false; + return \strpos($this->name, '\\') !== false; } /** diff --git a/vendor/psy/psysh/src/Reflection/ReflectionLanguageConstruct.php b/vendor/psy/psysh/src/Reflection/ReflectionLanguageConstruct.php index bda08194..9b8eefc1 100644 --- a/vendor/psy/psysh/src/Reflection/ReflectionLanguageConstruct.php +++ b/vendor/psy/psysh/src/Reflection/ReflectionLanguageConstruct.php @@ -122,7 +122,7 @@ class ReflectionLanguageConstruct extends \ReflectionFunctionAbstract { $params = []; foreach (self::$languageConstructs[$this->keyword] as $parameter => $opts) { - array_push($params, new ReflectionLanguageConstructParameter($this->keyword, $parameter, $opts)); + \array_push($params, new ReflectionLanguageConstructParameter($this->keyword, $parameter, $opts)); } return $params; @@ -159,6 +159,6 @@ class ReflectionLanguageConstruct extends \ReflectionFunctionAbstract */ public static function isLanguageConstruct($keyword) { - return array_key_exists($keyword, self::$languageConstructs); + return \array_key_exists($keyword, self::$languageConstructs); } } diff --git a/vendor/psy/psysh/src/Reflection/ReflectionLanguageConstructParameter.php b/vendor/psy/psysh/src/Reflection/ReflectionLanguageConstructParameter.php index af1f4cb4..9161aa78 100644 --- a/vendor/psy/psysh/src/Reflection/ReflectionLanguageConstructParameter.php +++ b/vendor/psy/psysh/src/Reflection/ReflectionLanguageConstructParameter.php @@ -44,7 +44,7 @@ class ReflectionLanguageConstructParameter extends \ReflectionParameter */ public function isArray() { - return array_key_exists('isArray', $this->opts) && $this->opts['isArray']; + return \array_key_exists('isArray', $this->opts) && $this->opts['isArray']; } /** @@ -76,7 +76,7 @@ class ReflectionLanguageConstructParameter extends \ReflectionParameter */ public function isOptional() { - return array_key_exists('isOptional', $this->opts) && $this->opts['isOptional']; + return \array_key_exists('isOptional', $this->opts) && $this->opts['isOptional']; } /** @@ -86,7 +86,7 @@ class ReflectionLanguageConstructParameter extends \ReflectionParameter */ public function isDefaultValueAvailable() { - return array_key_exists('defaultValue', $this->opts); + return \array_key_exists('defaultValue', $this->opts); } /** @@ -98,6 +98,6 @@ class ReflectionLanguageConstructParameter extends \ReflectionParameter */ public function isPassedByReference() { - return array_key_exists('isPassedByReference', $this->opts) && $this->opts['isPassedByReference']; + return \array_key_exists('isPassedByReference', $this->opts) && $this->opts['isPassedByReference']; } } diff --git a/vendor/psy/psysh/src/Shell.php b/vendor/psy/psysh/src/Shell.php index 3fe0b761..5d3517f2 100644 --- a/vendor/psy/psysh/src/Shell.php +++ b/vendor/psy/psysh/src/Shell.php @@ -47,7 +47,7 @@ use Symfony\Component\Console\Output\OutputInterface; */ class Shell extends Application { - const VERSION = 'v0.9.6'; + const VERSION = 'v0.9.8'; const PROMPT = '>>> '; const BUFF_PROMPT = '... '; @@ -109,7 +109,7 @@ class Shell extends Application public static function isIncluded(array $trace) { return isset($trace[0]['function']) && - in_array($trace[0]['function'], ['require', 'include', 'require_once', 'include_once']); + \in_array($trace[0]['function'], ['require', 'include', 'require_once', 'include_once']); } /** @@ -234,7 +234,7 @@ class Shell extends Application */ protected function getTabCompletionMatchers() { - @trigger_error('getTabCompletionMatchers is no longer used', E_USER_DEPRECATED); + @\trigger_error('getTabCompletionMatchers is no longer used', E_USER_DEPRECATED); } /** @@ -264,7 +264,7 @@ class Shell extends Application */ public function addMatchers(array $matchers) { - $this->matchers = array_merge($this->matchers, $matchers); + $this->matchers = \array_merge($this->matchers, $matchers); if (isset($this->autoCompleter)) { $this->addMatchersToAutoCompleter($matchers); @@ -392,7 +392,7 @@ class Shell extends Application } // handle empty input - if (trim($input) === '' && !$this->codeBufferOpen) { + if (\trim($input) === '' && !$this->codeBufferOpen) { continue; } @@ -424,12 +424,12 @@ class Shell extends Application } $code = $this->codeBuffer; - array_push($code, $input); - $tokens = @token_get_all('getScopeVariables(false) as $key => $value) { + if (!array_key_exists($key, $currentVars) || $currentVars[$key] !== $value) { + $newVars[$key] = $value; + } + } + + return $newVars; + } + /** * Get the set of unused command-scope variable names. * @@ -575,7 +599,7 @@ class Shell extends Application */ public function getScopeVariableNames() { - return array_keys($this->context->getAll()); + return \array_keys($this->context->getAll()); } /** @@ -647,7 +671,7 @@ class Shell extends Application */ public function getIncludes() { - return array_merge($this->config->getDefaultIncludes(), $this->includes); + return \array_merge($this->config->getDefaultIncludes(), $this->includes); } /** @@ -682,9 +706,9 @@ class Shell extends Application { try { // Code lines ending in \ keep the buffer open - if (substr(rtrim($code), -1) === '\\') { + if (\substr(\rtrim($code), -1) === '\\') { $this->codeBufferOpen = true; - $code = substr(rtrim($code), 0, -1); + $code = \substr(\rtrim($code), 0, -1); } else { $this->codeBufferOpen = false; } @@ -766,7 +790,7 @@ class Shell extends Application throw new \InvalidArgumentException('Command not found: ' . $input); } - $input = new ShellInput(str_replace('\\', '\\\\', rtrim($input, " \t\n\r\0\x0B;"))); + $input = new ShellInput(\str_replace('\\', '\\\\', \rtrim($input, " \t\n\r\0\x0B;"))); if ($input->hasParameterOption(['--help', '-h'])) { $helpCommand = $this->get('help'); @@ -835,7 +859,7 @@ class Shell extends Application return; } - list($codeBuffer, $codeBufferOpen, $code) = array_pop($this->codeStack); + list($codeBuffer, $codeBufferOpen, $code) = \array_pop($this->codeStack); $this->codeBuffer = $codeBuffer; $this->codeBufferOpen = $codeBufferOpen; @@ -861,7 +885,7 @@ class Shell extends Application } // Skip empty lines and lines starting with a space - if (trim($line) !== '' && substr($line, 0, 1) !== ' ') { + if (\trim($line) !== '' && \substr($line, 0, 1) !== ' ') { $this->readline->addHistory($line); } } @@ -871,11 +895,11 @@ class Shell extends Application */ private function addCodeBufferToHistory() { - $codeBuffer = array_filter($this->codeBuffer, function ($line) { + $codeBuffer = \array_filter($this->codeBuffer, function ($line) { return !$line instanceof SilentInput; }); - $this->addHistory(implode("\n", $codeBuffer)); + $this->addHistory(\implode("\n", $codeBuffer)); } /** @@ -888,7 +912,7 @@ class Shell extends Application public function getNamespace() { if ($namespace = $this->cleaner->getNamespace()) { - return implode('\\', $namespace); + return \implode('\\', $namespace); } } @@ -907,7 +931,7 @@ class Shell extends Application // Incremental flush if ($out !== '' && !$isCleaning) { $this->output->write($out, false, ShellOutput::OUTPUT_RAW); - $this->outputWantsNewline = (substr($out, -1) !== "\n"); + $this->outputWantsNewline = (\substr($out, -1) !== "\n"); $this->stdoutBuffer .= $out; } @@ -915,7 +939,7 @@ class Shell extends Application if ($phase & PHP_OUTPUT_HANDLER_END) { // Write an extra newline if stdout didn't end with one if ($this->outputWantsNewline) { - $this->output->writeln(sprintf('', $this->config->useUnicode() ? '⏎' : '\\n')); + $this->output->writeln(\sprintf('', $this->config->useUnicode() ? '⏎' : '\\n')); $this->outputWantsNewline = false; } @@ -945,9 +969,9 @@ class Shell extends Application $this->context->setReturnValue($ret); $ret = $this->presentValue($ret); - $indent = str_repeat(' ', strlen(static::RETVAL)); + $indent = \str_repeat(' ', \strlen(static::RETVAL)); - $this->output->writeln(static::RETVAL . str_replace(PHP_EOL, PHP_EOL . $indent, $ret)); + $this->output->writeln(static::RETVAL . \str_replace(PHP_EOL, PHP_EOL . $indent, $ret)); } /** @@ -981,23 +1005,23 @@ class Shell extends Application $message = $e->getMessage(); if (!$e instanceof PsyException) { if ($message === '') { - $message = get_class($e); + $message = \get_class($e); } else { - $message = sprintf('%s with message \'%s\'', get_class($e), $message); + $message = \sprintf('%s with message \'%s\'', \get_class($e), $message); } } - $message = preg_replace( + $message = \preg_replace( "#(\\w:)?(/\\w+)*/src/Execution(?:Loop)?Closure.php\(\d+\) : eval\(\)'d code#", "eval()'d code", - str_replace('\\', '/', $message) + \str_replace('\\', '/', $message) ); - $message = str_replace(" in eval()'d code", ' in Psy Shell code', $message); + $message = \str_replace(" in eval()'d code", ' in Psy Shell code', $message); $severity = ($e instanceof \ErrorException) ? $this->getSeverity($e) : 'error'; - return sprintf('<%s>%s', $severity, OutputFormatter::escape($message), $severity); + return \sprintf('<%s>%s', $severity, OutputFormatter::escape($message), $severity); } /** @@ -1010,7 +1034,7 @@ class Shell extends Application protected function getSeverity(\ErrorException $e) { $severity = $e->getSeverity(); - if ($severity & error_reporting()) { + if ($severity & \error_reporting()) { switch ($severity) { case E_WARNING: case E_NOTICE: @@ -1086,7 +1110,7 @@ class Shell extends Application */ public function handleError($errno, $errstr, $errfile, $errline) { - if ($errno & error_reporting()) { + if ($errno & \error_reporting()) { ErrorException::throwException($errno, $errstr, $errfile, $errline); } elseif ($errno & $this->config->errorLoggingLevel()) { // log it and continue... @@ -1132,7 +1156,7 @@ class Shell extends Application */ protected function hasCommand($input) { - if (preg_match('/([^\s]+?)(?:\s|$)/A', ltrim($input), $match)) { + if (\preg_match('/([^\s]+?)(?:\s|$)/A', \ltrim($input), $match)) { return $this->has($match[1]); } @@ -1167,22 +1191,22 @@ class Shell extends Application protected function readline() { if (!empty($this->inputBuffer)) { - $line = array_shift($this->inputBuffer); + $line = \array_shift($this->inputBuffer); if (!$line instanceof SilentInput) { - $this->output->writeln(sprintf('', static::REPLAY, OutputFormatter::escape($line))); + $this->output->writeln(\sprintf('', static::REPLAY, OutputFormatter::escape($line))); } return $line; } if ($bracketedPaste = $this->config->useBracketedPaste()) { - printf("\e[?2004h"); // Enable bracketed paste + \printf("\e[?2004h"); // Enable bracketed paste } $line = $this->readline->readline($this->getPrompt()); if ($bracketedPaste) { - printf("\e[?2004l"); // ... and disable it again + \printf("\e[?2004l"); // ... and disable it again } return $line; @@ -1195,7 +1219,7 @@ class Shell extends Application */ protected function getHeader() { - return sprintf('', $this->getVersion()); + return \sprintf('', $this->getVersion()); } /** @@ -1207,7 +1231,7 @@ class Shell extends Application { $separator = $this->config->useUnicode() ? '—' : '-'; - return sprintf('Psy Shell %s (PHP %s %s %s)', self::VERSION, phpversion(), $separator, php_sapi_name()); + return \sprintf('Psy Shell %s (PHP %s %s %s)', self::VERSION, PHP_VERSION, $separator, PHP_SAPI); } /** @@ -1225,7 +1249,7 @@ class Shell extends Application */ protected function autocomplete($text) { - @trigger_error('Tab completion is provided by the AutoCompleter service', E_USER_DEPRECATED); + @\trigger_error('Tab completion is provided by the AutoCompleter service', E_USER_DEPRECATED); } /** @@ -1280,7 +1304,7 @@ class Shell extends Application try { $client = $this->config->getChecker(); if (!$client->isLatest()) { - $this->output->writeln(sprintf('New version is available (current: %s, latest: %s)', self::VERSION, $client->getLatest())); + $this->output->writeln(\sprintf('New version is available (current: %s, latest: %s)', self::VERSION, $client->getLatest())); } } catch (\InvalidArgumentException $e) { $this->output->writeln($e->getMessage()); diff --git a/vendor/psy/psysh/src/Sudo.php b/vendor/psy/psysh/src/Sudo.php index 3c085239..be354bef 100644 --- a/vendor/psy/psysh/src/Sudo.php +++ b/vendor/psy/psysh/src/Sudo.php @@ -64,9 +64,9 @@ class Sudo */ public static function callMethod($object, $method, $args = null) { - $args = func_get_args(); - $object = array_shift($args); - $method = array_shift($args); + $args = \func_get_args(); + $object = \array_shift($args); + $method = \array_shift($args); $refl = new \ReflectionObject($object); $reflMethod = $refl->getMethod($method); @@ -122,9 +122,9 @@ class Sudo */ public static function callStatic($class, $method, $args = null) { - $args = func_get_args(); - $class = array_shift($args); - $method = array_shift($args); + $args = \func_get_args(); + $class = \array_shift($args); + $method = \array_shift($args); $refl = new \ReflectionClass($class); $reflMethod = $refl->getMethod($method); diff --git a/vendor/psy/psysh/src/Sudo/SudoVisitor.php b/vendor/psy/psysh/src/Sudo/SudoVisitor.php index 31fe6bfb..2b78a423 100644 --- a/vendor/psy/psysh/src/Sudo/SudoVisitor.php +++ b/vendor/psy/psysh/src/Sudo/SudoVisitor.php @@ -52,7 +52,7 @@ class SudoVisitor extends NodeVisitorAbstract $name = $node->name instanceof Identifier ? $node->name->toString() : $node->name; $args = [ $node->var, - is_string($name) ? new String_($name) : $name, + \is_string($name) ? new String_($name) : $name, ]; return $this->prepareCall(self::PROPERTY_FETCH, $args); @@ -61,7 +61,7 @@ class SudoVisitor extends NodeVisitorAbstract $name = $target->name instanceof Identifier ? $target->name->toString() : $target->name; $args = [ $target->var, - is_string($name) ? new String_($name) : $name, + \is_string($name) ? new String_($name) : $name, $node->expr, ]; @@ -69,8 +69,8 @@ class SudoVisitor extends NodeVisitorAbstract } elseif ($node instanceof MethodCall) { $name = $node->name instanceof Identifier ? $node->name->toString() : $node->name; $args = $node->args; - array_unshift($args, new Arg(is_string($name) ? new String_($name) : $name)); - array_unshift($args, new Arg($node->var)); + \array_unshift($args, new Arg(\is_string($name) ? new String_($name) : $name)); + \array_unshift($args, new Arg($node->var)); // not using prepareCall because the $node->args we started with are already Arg instances return new StaticCall(new FullyQualifiedName(self::SUDO_CLASS), self::METHOD_CALL, $args); @@ -78,8 +78,8 @@ class SudoVisitor extends NodeVisitorAbstract $class = $node->class instanceof Name ? $node->class->toString() : $node->class; $name = $node->name instanceof Identifier ? $node->name->toString() : $node->name; $args = [ - is_string($class) ? new String_($class) : $class, - is_string($name) ? new String_($name) : $name, + \is_string($class) ? new String_($class) : $class, + \is_string($name) ? new String_($name) : $name, ]; return $this->prepareCall(self::STATIC_PROPERTY_FETCH, $args); @@ -88,8 +88,8 @@ class SudoVisitor extends NodeVisitorAbstract $class = $target->class instanceof Name ? $target->class->toString() : $target->class; $name = $target->name instanceof Identifier ? $target->name->toString() : $target->name; $args = [ - is_string($class) ? new String_($class) : $class, - is_string($name) ? new String_($name) : $name, + \is_string($class) ? new String_($class) : $class, + \is_string($name) ? new String_($name) : $name, $node->expr, ]; @@ -98,8 +98,8 @@ class SudoVisitor extends NodeVisitorAbstract $args = $node->args; $class = $node->class instanceof Name ? $node->class->toString() : $node->class; $name = $node->name instanceof Identifier ? $node->name->toString() : $node->name; - array_unshift($args, new Arg(is_string($name) ? new String_($name) : $name)); - array_unshift($args, new Arg(is_string($class) ? new String_($class) : $class)); + \array_unshift($args, new Arg(\is_string($name) ? new String_($name) : $name)); + \array_unshift($args, new Arg(\is_string($class) ? new String_($class) : $class)); // not using prepareCall because the $node->args we started with are already Arg instances return new StaticCall(new FullyQualifiedName(self::SUDO_CLASS), self::STATIC_CALL, $args); @@ -107,8 +107,8 @@ class SudoVisitor extends NodeVisitorAbstract $class = $node->class instanceof Name ? $node->class->toString() : $node->class; $name = $node->name instanceof Identifier ? $node->name->toString() : $node->name; $args = [ - is_string($class) ? new String_($class) : $class, - is_string($name) ? new String_($name) : $name, + \is_string($class) ? new String_($class) : $class, + \is_string($name) ? new String_($name) : $name, ]; return $this->prepareCall(self::CLASS_CONST_FETCH, $args); @@ -117,7 +117,7 @@ class SudoVisitor extends NodeVisitorAbstract private function prepareCall($method, $args) { - return new StaticCall(new FullyQualifiedName(self::SUDO_CLASS), $method, array_map(function ($arg) { + return new StaticCall(new FullyQualifiedName(self::SUDO_CLASS), $method, \array_map(function ($arg) { return new Arg($arg); }, $args)); } diff --git a/vendor/psy/psysh/src/TabCompletion/AutoCompleter.php b/vendor/psy/psysh/src/TabCompletion/AutoCompleter.php index 8b316445..0751aa78 100644 --- a/vendor/psy/psysh/src/TabCompletion/AutoCompleter.php +++ b/vendor/psy/psysh/src/TabCompletion/AutoCompleter.php @@ -38,7 +38,7 @@ class AutoCompleter */ public function activate() { - readline_completion_function([&$this, 'callback']); + \readline_completion_function([&$this, 'callback']); } /** @@ -56,27 +56,27 @@ class AutoCompleter // try to work around it. $line = $info['line_buffer']; if (isset($info['end'])) { - $line = substr($line, 0, $info['end']); + $line = \substr($line, 0, $info['end']); } if ($line === '' && $input !== '') { $line = $input; } - $tokens = token_get_all('matchers as $matcher) { if ($matcher->hasMatched($tokens)) { - $matches = array_merge($matcher->getMatches($tokens), $matches); + $matches = \array_merge($matcher->getMatches($tokens), $matches); } } - $matches = array_unique($matches); + $matches = \array_unique($matches); return !empty($matches) ? $matches : ['']; } @@ -93,7 +93,7 @@ class AutoCompleter */ public function callback($input, $index) { - return $this->processCallback($input, $index, readline_info()); + return $this->processCallback($input, $index, \readline_info()); } /** @@ -103,8 +103,8 @@ class AutoCompleter { // PHP didn't implement the whole readline API when they first switched // to libedit. And they still haven't. - if (function_exists('readline_callback_handler_remove')) { - readline_callback_handler_remove(); + if (\function_exists('readline_callback_handler_remove')) { + \readline_callback_handler_remove(); } } } diff --git a/vendor/psy/psysh/src/TabCompletion/Matcher/AbstractDefaultParametersMatcher.php b/vendor/psy/psysh/src/TabCompletion/Matcher/AbstractDefaultParametersMatcher.php index 1dc0765a..c44af36a 100644 --- a/vendor/psy/psysh/src/TabCompletion/Matcher/AbstractDefaultParametersMatcher.php +++ b/vendor/psy/psysh/src/TabCompletion/Matcher/AbstractDefaultParametersMatcher.php @@ -36,7 +36,7 @@ abstract class AbstractDefaultParametersMatcher extends AbstractContextAwareMatc return []; } - return [implode(', ', $parametersProcessed) . ')']; + return [\implode(', ', $parametersProcessed) . ')']; } /** @@ -50,8 +50,8 @@ abstract class AbstractDefaultParametersMatcher extends AbstractContextAwareMatc */ private function valueToShortString($value) { - if (!is_array($value)) { - return json_encode($value); + if (!\is_array($value)) { + return \json_encode($value); } $chunks = []; @@ -60,7 +60,7 @@ abstract class AbstractDefaultParametersMatcher extends AbstractContextAwareMatc $allSequential = true; foreach ($value as $key => $item) { - $allSequential = $allSequential && is_numeric($key) && $key === count($chunksSequential); + $allSequential = $allSequential && \is_numeric($key) && $key === \count($chunksSequential); $keyString = $this->valueToShortString($key); $itemString = $this->valueToShortString($item); @@ -71,6 +71,6 @@ abstract class AbstractDefaultParametersMatcher extends AbstractContextAwareMatc $chunksToImplode = $allSequential ? $chunksSequential : $chunks; - return '[' . implode(', ', $chunksToImplode) . ']'; + return '[' . \implode(', ', $chunksToImplode) . ']'; } } diff --git a/vendor/psy/psysh/src/TabCompletion/Matcher/AbstractMatcher.php b/vendor/psy/psysh/src/TabCompletion/Matcher/AbstractMatcher.php index efa9e57e..63b71547 100644 --- a/vendor/psy/psysh/src/TabCompletion/Matcher/AbstractMatcher.php +++ b/vendor/psy/psysh/src/TabCompletion/Matcher/AbstractMatcher.php @@ -64,7 +64,7 @@ abstract class AbstractMatcher protected function getInput(array $tokens) { $var = ''; - $firstToken = array_pop($tokens); + $firstToken = \array_pop($tokens); if (self::tokenIs($firstToken, self::T_STRING)) { $var = $firstToken[1]; } @@ -84,7 +84,7 @@ abstract class AbstractMatcher $class = ''; while (self::hasToken( [self::T_NS_SEPARATOR, self::T_STRING], - $token = array_pop($tokens) + $token = \array_pop($tokens) )) { if (self::needCompleteClass($token)) { continue; @@ -116,7 +116,7 @@ abstract class AbstractMatcher */ public static function startsWith($prefix, $word) { - return preg_match(sprintf('#^%s#', $prefix), $word); + return \preg_match(\sprintf('#^%s#', $prefix), $word); } /** @@ -129,13 +129,13 @@ abstract class AbstractMatcher */ public static function hasSyntax($token, $syntax = self::VAR_SYNTAX) { - if (!is_array($token)) { + if (!\is_array($token)) { return false; } - $regexp = sprintf('#%s#', $syntax); + $regexp = \sprintf('#%s#', $syntax); - return (bool) preg_match($regexp, $token[1]); + return (bool) \preg_match($regexp, $token[1]); } /** @@ -148,11 +148,11 @@ abstract class AbstractMatcher */ public static function tokenIs($token, $which) { - if (!is_array($token)) { + if (!\is_array($token)) { return false; } - return token_name($token[0]) === $which; + return \token_name($token[0]) === $which; } /** @@ -164,16 +164,16 @@ abstract class AbstractMatcher */ public static function isOperator($token) { - if (!is_string($token)) { + if (!\is_string($token)) { return false; } - return strpos(self::MISC_OPERATORS, $token) !== false; + return \strpos(self::MISC_OPERATORS, $token) !== false; } public static function needCompleteClass($token) { - return in_array($token[1], ['doc', 'ls', 'show']); + return \in_array($token[1], ['doc', 'ls', 'show']); } /** @@ -186,10 +186,10 @@ abstract class AbstractMatcher */ public static function hasToken(array $coll, $token) { - if (!is_array($token)) { + if (!\is_array($token)) { return false; } - return in_array(token_name($token[0]), $coll); + return \in_array(\token_name($token[0]), $coll); } } diff --git a/vendor/psy/psysh/src/TabCompletion/Matcher/ClassAttributesMatcher.php b/vendor/psy/psysh/src/TabCompletion/Matcher/ClassAttributesMatcher.php index b26df778..8e976b0a 100644 --- a/vendor/psy/psysh/src/TabCompletion/Matcher/ClassAttributesMatcher.php +++ b/vendor/psy/psysh/src/TabCompletion/Matcher/ClassAttributesMatcher.php @@ -28,10 +28,10 @@ class ClassAttributesMatcher extends AbstractMatcher { $input = $this->getInput($tokens); - $firstToken = array_pop($tokens); + $firstToken = \array_pop($tokens); if (self::tokenIs($firstToken, self::T_STRING)) { // second token is the nekudotayim operator - array_pop($tokens); + \array_pop($tokens); } $class = $this->getNamespaceAndClass($tokens); @@ -42,24 +42,24 @@ class ClassAttributesMatcher extends AbstractMatcher return []; } - $vars = array_merge( - array_map( + $vars = \array_merge( + \array_map( function ($var) { return '$' . $var; }, - array_keys($reflection->getStaticProperties()) + \array_keys($reflection->getStaticProperties()) ), - array_keys($reflection->getConstants()) + \array_keys($reflection->getConstants()) ); - return array_map( + return \array_map( function ($name) use ($class) { - $chunks = explode('\\', $class); - $className = array_pop($chunks); + $chunks = \explode('\\', $class); + $className = \array_pop($chunks); return $className . '::' . $name; }, - array_filter( + \array_filter( $vars, function ($var) use ($input) { return AbstractMatcher::startsWith($input, $var); @@ -73,8 +73,8 @@ class ClassAttributesMatcher extends AbstractMatcher */ public function hasMatched(array $tokens) { - $token = array_pop($tokens); - $prevToken = array_pop($tokens); + $token = \array_pop($tokens); + $prevToken = \array_pop($tokens); switch (true) { case self::tokenIs($prevToken, self::T_DOUBLE_COLON) && self::tokenIs($token, self::T_STRING): diff --git a/vendor/psy/psysh/src/TabCompletion/Matcher/ClassMethodDefaultParametersMatcher.php b/vendor/psy/psysh/src/TabCompletion/Matcher/ClassMethodDefaultParametersMatcher.php index 4e6025bb..3a269a35 100644 --- a/vendor/psy/psysh/src/TabCompletion/Matcher/ClassMethodDefaultParametersMatcher.php +++ b/vendor/psy/psysh/src/TabCompletion/Matcher/ClassMethodDefaultParametersMatcher.php @@ -15,9 +15,9 @@ class ClassMethodDefaultParametersMatcher extends AbstractDefaultParametersMatch { public function getMatches(array $tokens, array $info = []) { - $openBracket = array_pop($tokens); - $functionName = array_pop($tokens); - $methodOperator = array_pop($tokens); + $openBracket = \array_pop($tokens); + $functionName = \array_pop($tokens); + $methodOperator = \array_pop($tokens); $class = $this->getNamespaceAndClass($tokens); @@ -41,19 +41,19 @@ class ClassMethodDefaultParametersMatcher extends AbstractDefaultParametersMatch public function hasMatched(array $tokens) { - $openBracket = array_pop($tokens); + $openBracket = \array_pop($tokens); if ($openBracket !== '(') { return false; } - $functionName = array_pop($tokens); + $functionName = \array_pop($tokens); if (!self::tokenIs($functionName, self::T_STRING)) { return false; } - $operator = array_pop($tokens); + $operator = \array_pop($tokens); if (!self::tokenIs($operator, self::T_DOUBLE_COLON)) { return false; diff --git a/vendor/psy/psysh/src/TabCompletion/Matcher/ClassMethodsMatcher.php b/vendor/psy/psysh/src/TabCompletion/Matcher/ClassMethodsMatcher.php index 2aba6dc1..d278c18b 100644 --- a/vendor/psy/psysh/src/TabCompletion/Matcher/ClassMethodsMatcher.php +++ b/vendor/psy/psysh/src/TabCompletion/Matcher/ClassMethodsMatcher.php @@ -28,10 +28,10 @@ class ClassMethodsMatcher extends AbstractMatcher { $input = $this->getInput($tokens); - $firstToken = array_pop($tokens); + $firstToken = \array_pop($tokens); if (self::tokenIs($firstToken, self::T_STRING)) { // second token is the nekudotayim operator - array_pop($tokens); + \array_pop($tokens); } $class = $this->getNamespaceAndClass($tokens); @@ -48,18 +48,18 @@ class ClassMethodsMatcher extends AbstractMatcher $methods = $reflection->getMethods(\ReflectionMethod::IS_STATIC); } - $methods = array_map(function (\ReflectionMethod $method) { + $methods = \array_map(function (\ReflectionMethod $method) { return $method->getName(); }, $methods); - return array_map( + return \array_map( function ($name) use ($class) { - $chunks = explode('\\', $class); - $className = array_pop($chunks); + $chunks = \explode('\\', $class); + $className = \array_pop($chunks); return $className . '::' . $name; }, - array_filter($methods, function ($method) use ($input) { + \array_filter($methods, function ($method) use ($input) { return AbstractMatcher::startsWith($input, $method); }) ); @@ -70,8 +70,8 @@ class ClassMethodsMatcher extends AbstractMatcher */ public function hasMatched(array $tokens) { - $token = array_pop($tokens); - $prevToken = array_pop($tokens); + $token = \array_pop($tokens); + $prevToken = \array_pop($tokens); switch (true) { case self::tokenIs($prevToken, self::T_DOUBLE_COLON) && self::tokenIs($token, self::T_STRING): diff --git a/vendor/psy/psysh/src/TabCompletion/Matcher/ClassNamesMatcher.php b/vendor/psy/psysh/src/TabCompletion/Matcher/ClassNamesMatcher.php index 8c35094f..844b3d2a 100644 --- a/vendor/psy/psysh/src/TabCompletion/Matcher/ClassNamesMatcher.php +++ b/vendor/psy/psysh/src/TabCompletion/Matcher/ClassNamesMatcher.php @@ -26,21 +26,21 @@ class ClassNamesMatcher extends AbstractMatcher public function getMatches(array $tokens, array $info = []) { $class = $this->getNamespaceAndClass($tokens); - if (strlen($class) > 0 && $class[0] === '\\') { - $class = substr($class, 1, strlen($class)); + if (\strlen($class) > 0 && $class[0] === '\\') { + $class = \substr($class, 1, \strlen($class)); } - $quotedClass = preg_quote($class); + $quotedClass = \preg_quote($class); - return array_map( + return \array_map( function ($className) use ($class) { // get the number of namespace separators - $nsPos = substr_count($class, '\\'); - $pieces = explode('\\', $className); + $nsPos = \substr_count($class, '\\'); + $pieces = \explode('\\', $className); //$methods = Mirror::get($class); - return implode('\\', array_slice($pieces, $nsPos, count($pieces))); + return \implode('\\', \array_slice($pieces, $nsPos, \count($pieces))); }, - array_filter( - get_declared_classes(), + \array_filter( + \get_declared_classes(), function ($className) use ($quotedClass) { return AbstractMatcher::startsWith($quotedClass, $className); } @@ -53,8 +53,8 @@ class ClassNamesMatcher extends AbstractMatcher */ public function hasMatched(array $tokens) { - $token = array_pop($tokens); - $prevToken = array_pop($tokens); + $token = \array_pop($tokens); + $prevToken = \array_pop($tokens); $blacklistedTokens = [ self::T_INCLUDE, self::T_INCLUDE_ONCE, self::T_REQUIRE, self::T_REQUIRE_ONCE, @@ -63,7 +63,7 @@ class ClassNamesMatcher extends AbstractMatcher switch (true) { case self::hasToken([$blacklistedTokens], $token): case self::hasToken([$blacklistedTokens], $prevToken): - case is_string($token) && $token === '$': + case \is_string($token) && $token === '$': return false; case self::hasToken([self::T_NEW, self::T_OPEN_TAG, self::T_NS_SEPARATOR, self::T_STRING], $prevToken): case self::hasToken([self::T_NEW, self::T_OPEN_TAG, self::T_NS_SEPARATOR], $token): diff --git a/vendor/psy/psysh/src/TabCompletion/Matcher/CommandsMatcher.php b/vendor/psy/psysh/src/TabCompletion/Matcher/CommandsMatcher.php index eddcef98..e3d8423a 100644 --- a/vendor/psy/psysh/src/TabCompletion/Matcher/CommandsMatcher.php +++ b/vendor/psy/psysh/src/TabCompletion/Matcher/CommandsMatcher.php @@ -45,8 +45,8 @@ class CommandsMatcher extends AbstractMatcher { $names = []; foreach ($commands as $command) { - $names = array_merge([$command->getName()], $names); - $names = array_merge($command->getAliases(), $names); + $names = \array_merge([$command->getName()], $names); + $names = \array_merge($command->getAliases(), $names); } $this->commands = $names; } @@ -60,7 +60,7 @@ class CommandsMatcher extends AbstractMatcher */ protected function isCommand($name) { - return in_array($name, $this->commands); + return \in_array($name, $this->commands); } /** @@ -88,7 +88,7 @@ class CommandsMatcher extends AbstractMatcher { $input = $this->getInput($tokens); - return array_filter($this->commands, function ($command) use ($input) { + return \array_filter($this->commands, function ($command) use ($input) { return AbstractMatcher::startsWith($input, $command); }); } @@ -98,8 +98,8 @@ class CommandsMatcher extends AbstractMatcher */ public function hasMatched(array $tokens) { - /* $openTag */ array_shift($tokens); - $command = array_shift($tokens); + /* $openTag */ \array_shift($tokens); + $command = \array_shift($tokens); switch (true) { case self::tokenIs($command, self::T_STRING) && diff --git a/vendor/psy/psysh/src/TabCompletion/Matcher/ConstantsMatcher.php b/vendor/psy/psysh/src/TabCompletion/Matcher/ConstantsMatcher.php index ddd8bcb0..71be18f5 100644 --- a/vendor/psy/psysh/src/TabCompletion/Matcher/ConstantsMatcher.php +++ b/vendor/psy/psysh/src/TabCompletion/Matcher/ConstantsMatcher.php @@ -27,7 +27,7 @@ class ConstantsMatcher extends AbstractMatcher { $const = $this->getInput($tokens); - return array_filter(array_keys(get_defined_constants()), function ($constant) use ($const) { + return \array_filter(\array_keys(\get_defined_constants()), function ($constant) use ($const) { return AbstractMatcher::startsWith($const, $constant); }); } @@ -37,8 +37,8 @@ class ConstantsMatcher extends AbstractMatcher */ public function hasMatched(array $tokens) { - $token = array_pop($tokens); - $prevToken = array_pop($tokens); + $token = \array_pop($tokens); + $prevToken = \array_pop($tokens); switch (true) { case self::tokenIs($prevToken, self::T_NEW): diff --git a/vendor/psy/psysh/src/TabCompletion/Matcher/FunctionDefaultParametersMatcher.php b/vendor/psy/psysh/src/TabCompletion/Matcher/FunctionDefaultParametersMatcher.php index 14c568e1..66d9ea1d 100644 --- a/vendor/psy/psysh/src/TabCompletion/Matcher/FunctionDefaultParametersMatcher.php +++ b/vendor/psy/psysh/src/TabCompletion/Matcher/FunctionDefaultParametersMatcher.php @@ -15,9 +15,9 @@ class FunctionDefaultParametersMatcher extends AbstractDefaultParametersMatcher { public function getMatches(array $tokens, array $info = []) { - array_pop($tokens); // open bracket + \array_pop($tokens); // open bracket - $functionName = array_pop($tokens); + $functionName = \array_pop($tokens); try { $reflection = new \ReflectionFunction($functionName[1]); @@ -32,19 +32,19 @@ class FunctionDefaultParametersMatcher extends AbstractDefaultParametersMatcher public function hasMatched(array $tokens) { - $openBracket = array_pop($tokens); + $openBracket = \array_pop($tokens); if ($openBracket !== '(') { return false; } - $functionName = array_pop($tokens); + $functionName = \array_pop($tokens); if (!self::tokenIs($functionName, self::T_STRING)) { return false; } - if (!function_exists($functionName[1])) { + if (!\function_exists($functionName[1])) { return false; } diff --git a/vendor/psy/psysh/src/TabCompletion/Matcher/FunctionsMatcher.php b/vendor/psy/psysh/src/TabCompletion/Matcher/FunctionsMatcher.php index 8bf16856..3aa12a1f 100644 --- a/vendor/psy/psysh/src/TabCompletion/Matcher/FunctionsMatcher.php +++ b/vendor/psy/psysh/src/TabCompletion/Matcher/FunctionsMatcher.php @@ -27,10 +27,10 @@ class FunctionsMatcher extends AbstractMatcher { $func = $this->getInput($tokens); - $functions = get_defined_functions(); - $allFunctions = array_merge($functions['user'], $functions['internal']); + $functions = \get_defined_functions(); + $allFunctions = \array_merge($functions['user'], $functions['internal']); - return array_filter($allFunctions, function ($function) use ($func) { + return \array_filter($allFunctions, function ($function) use ($func) { return AbstractMatcher::startsWith($func, $function); }); } @@ -40,8 +40,8 @@ class FunctionsMatcher extends AbstractMatcher */ public function hasMatched(array $tokens) { - $token = array_pop($tokens); - $prevToken = array_pop($tokens); + $token = \array_pop($tokens); + $prevToken = \array_pop($tokens); switch (true) { case self::tokenIs($prevToken, self::T_NEW): diff --git a/vendor/psy/psysh/src/TabCompletion/Matcher/KeywordsMatcher.php b/vendor/psy/psysh/src/TabCompletion/Matcher/KeywordsMatcher.php index b576f82b..9d0deeee 100644 --- a/vendor/psy/psysh/src/TabCompletion/Matcher/KeywordsMatcher.php +++ b/vendor/psy/psysh/src/TabCompletion/Matcher/KeywordsMatcher.php @@ -48,7 +48,7 @@ class KeywordsMatcher extends AbstractMatcher */ public function isKeyword($keyword) { - return in_array($keyword, $this->keywords); + return \in_array($keyword, $this->keywords); } /** @@ -58,7 +58,7 @@ class KeywordsMatcher extends AbstractMatcher { $input = $this->getInput($tokens); - return array_filter($this->keywords, function ($keyword) use ($input) { + return \array_filter($this->keywords, function ($keyword) use ($input) { return AbstractMatcher::startsWith($input, $keyword); }); } @@ -68,8 +68,8 @@ class KeywordsMatcher extends AbstractMatcher */ public function hasMatched(array $tokens) { - $token = array_pop($tokens); - $prevToken = array_pop($tokens); + $token = \array_pop($tokens); + $prevToken = \array_pop($tokens); switch (true) { case self::hasToken([self::T_OPEN_TAG, self::T_VARIABLE], $token): diff --git a/vendor/psy/psysh/src/TabCompletion/Matcher/MongoClientMatcher.php b/vendor/psy/psysh/src/TabCompletion/Matcher/MongoClientMatcher.php index eb15f15c..fb51bf7d 100644 --- a/vendor/psy/psysh/src/TabCompletion/Matcher/MongoClientMatcher.php +++ b/vendor/psy/psysh/src/TabCompletion/Matcher/MongoClientMatcher.php @@ -27,13 +27,13 @@ class MongoClientMatcher extends AbstractContextAwareMatcher { $input = $this->getInput($tokens); - $firstToken = array_pop($tokens); + $firstToken = \array_pop($tokens); if (self::tokenIs($firstToken, self::T_STRING)) { // second token is the object operator - array_pop($tokens); + \array_pop($tokens); } - $objectToken = array_pop($tokens); - $objectName = str_replace('$', '', $objectToken[1]); + $objectToken = \array_pop($tokens); + $objectName = \str_replace('$', '', $objectToken[1]); $object = $this->getVariable($objectName); if (!$object instanceof \MongoClient) { @@ -42,8 +42,8 @@ class MongoClientMatcher extends AbstractContextAwareMatcher $list = $object->listDBs(); - return array_filter( - array_map(function ($info) { + return \array_filter( + \array_map(function ($info) { return $info['name']; }, $list['databases']), function ($var) use ($input) { @@ -57,8 +57,8 @@ class MongoClientMatcher extends AbstractContextAwareMatcher */ public function hasMatched(array $tokens) { - $token = array_pop($tokens); - $prevToken = array_pop($tokens); + $token = \array_pop($tokens); + $prevToken = \array_pop($tokens); switch (true) { case self::tokenIs($token, self::T_OBJECT_OPERATOR): diff --git a/vendor/psy/psysh/src/TabCompletion/Matcher/MongoDatabaseMatcher.php b/vendor/psy/psysh/src/TabCompletion/Matcher/MongoDatabaseMatcher.php index 26e2337a..fb1b9bbf 100644 --- a/vendor/psy/psysh/src/TabCompletion/Matcher/MongoDatabaseMatcher.php +++ b/vendor/psy/psysh/src/TabCompletion/Matcher/MongoDatabaseMatcher.php @@ -27,20 +27,20 @@ class MongoDatabaseMatcher extends AbstractContextAwareMatcher { $input = $this->getInput($tokens); - $firstToken = array_pop($tokens); + $firstToken = \array_pop($tokens); if (self::tokenIs($firstToken, self::T_STRING)) { // second token is the object operator - array_pop($tokens); + \array_pop($tokens); } - $objectToken = array_pop($tokens); - $objectName = str_replace('$', '', $objectToken[1]); + $objectToken = \array_pop($tokens); + $objectName = \str_replace('$', '', $objectToken[1]); $object = $this->getVariable($objectName); if (!$object instanceof \MongoDB) { return []; } - return array_filter( + return \array_filter( $object->getCollectionNames(), function ($var) use ($input) { return AbstractMatcher::startsWith($input, $var); @@ -53,8 +53,8 @@ class MongoDatabaseMatcher extends AbstractContextAwareMatcher */ public function hasMatched(array $tokens) { - $token = array_pop($tokens); - $prevToken = array_pop($tokens); + $token = \array_pop($tokens); + $prevToken = \array_pop($tokens); switch (true) { case self::tokenIs($token, self::T_OBJECT_OPERATOR): diff --git a/vendor/psy/psysh/src/TabCompletion/Matcher/ObjectAttributesMatcher.php b/vendor/psy/psysh/src/TabCompletion/Matcher/ObjectAttributesMatcher.php index bed365a8..ff44f5ac 100644 --- a/vendor/psy/psysh/src/TabCompletion/Matcher/ObjectAttributesMatcher.php +++ b/vendor/psy/psysh/src/TabCompletion/Matcher/ObjectAttributesMatcher.php @@ -30,16 +30,16 @@ class ObjectAttributesMatcher extends AbstractContextAwareMatcher { $input = $this->getInput($tokens); - $firstToken = array_pop($tokens); + $firstToken = \array_pop($tokens); if (self::tokenIs($firstToken, self::T_STRING)) { // second token is the object operator - array_pop($tokens); + \array_pop($tokens); } - $objectToken = array_pop($tokens); - if (!is_array($objectToken)) { + $objectToken = \array_pop($tokens); + if (!\is_array($objectToken)) { return []; } - $objectName = str_replace('$', '', $objectToken[1]); + $objectName = \str_replace('$', '', $objectToken[1]); try { $object = $this->getVariable($objectName); @@ -47,12 +47,12 @@ class ObjectAttributesMatcher extends AbstractContextAwareMatcher return []; } - if (!is_object($object)) { + if (!\is_object($object)) { return []; } - return array_filter( - array_keys(get_class_vars(get_class($object))), + return \array_filter( + \array_keys(\get_class_vars(\get_class($object))), function ($var) use ($input) { return AbstractMatcher::startsWith($input, $var); } @@ -64,8 +64,8 @@ class ObjectAttributesMatcher extends AbstractContextAwareMatcher */ public function hasMatched(array $tokens) { - $token = array_pop($tokens); - $prevToken = array_pop($tokens); + $token = \array_pop($tokens); + $prevToken = \array_pop($tokens); switch (true) { case self::tokenIs($token, self::T_OBJECT_OPERATOR): diff --git a/vendor/psy/psysh/src/TabCompletion/Matcher/ObjectMethodDefaultParametersMatcher.php b/vendor/psy/psysh/src/TabCompletion/Matcher/ObjectMethodDefaultParametersMatcher.php index cb95ae7e..16fa0189 100644 --- a/vendor/psy/psysh/src/TabCompletion/Matcher/ObjectMethodDefaultParametersMatcher.php +++ b/vendor/psy/psysh/src/TabCompletion/Matcher/ObjectMethodDefaultParametersMatcher.php @@ -15,16 +15,16 @@ class ObjectMethodDefaultParametersMatcher extends AbstractDefaultParametersMatc { public function getMatches(array $tokens, array $info = []) { - $openBracket = array_pop($tokens); - $functionName = array_pop($tokens); - $methodOperator = array_pop($tokens); + $openBracket = \array_pop($tokens); + $functionName = \array_pop($tokens); + $methodOperator = \array_pop($tokens); - $objectToken = array_pop($tokens); - if (!is_array($objectToken)) { + $objectToken = \array_pop($tokens); + if (!\is_array($objectToken)) { return []; } - $objectName = str_replace('$', '', $objectToken[1]); + $objectName = \str_replace('$', '', $objectToken[1]); try { $object = $this->getVariable($objectName); @@ -48,19 +48,19 @@ class ObjectMethodDefaultParametersMatcher extends AbstractDefaultParametersMatc public function hasMatched(array $tokens) { - $openBracket = array_pop($tokens); + $openBracket = \array_pop($tokens); if ($openBracket !== '(') { return false; } - $functionName = array_pop($tokens); + $functionName = \array_pop($tokens); if (!self::tokenIs($functionName, self::T_STRING)) { return false; } - $operator = array_pop($tokens); + $operator = \array_pop($tokens); if (!self::tokenIs($operator, self::T_OBJECT_OPERATOR)) { return false; diff --git a/vendor/psy/psysh/src/TabCompletion/Matcher/ObjectMethodsMatcher.php b/vendor/psy/psysh/src/TabCompletion/Matcher/ObjectMethodsMatcher.php index cc45b1d9..23c751c7 100644 --- a/vendor/psy/psysh/src/TabCompletion/Matcher/ObjectMethodsMatcher.php +++ b/vendor/psy/psysh/src/TabCompletion/Matcher/ObjectMethodsMatcher.php @@ -30,16 +30,16 @@ class ObjectMethodsMatcher extends AbstractContextAwareMatcher { $input = $this->getInput($tokens); - $firstToken = array_pop($tokens); + $firstToken = \array_pop($tokens); if (self::tokenIs($firstToken, self::T_STRING)) { // second token is the object operator - array_pop($tokens); + \array_pop($tokens); } - $objectToken = array_pop($tokens); - if (!is_array($objectToken)) { + $objectToken = \array_pop($tokens); + if (!\is_array($objectToken)) { return []; } - $objectName = str_replace('$', '', $objectToken[1]); + $objectName = \str_replace('$', '', $objectToken[1]); try { $object = $this->getVariable($objectName); @@ -47,12 +47,12 @@ class ObjectMethodsMatcher extends AbstractContextAwareMatcher return []; } - if (!is_object($object)) { + if (!\is_object($object)) { return []; } - return array_filter( - get_class_methods($object), + return \array_filter( + \get_class_methods($object), function ($var) use ($input) { return AbstractMatcher::startsWith($input, $var) && // also check that we do not suggest invoking a super method(__construct, __wakeup, …) @@ -66,8 +66,8 @@ class ObjectMethodsMatcher extends AbstractContextAwareMatcher */ public function hasMatched(array $tokens) { - $token = array_pop($tokens); - $prevToken = array_pop($tokens); + $token = \array_pop($tokens); + $prevToken = \array_pop($tokens); switch (true) { case self::tokenIs($token, self::T_OBJECT_OPERATOR): diff --git a/vendor/psy/psysh/src/TabCompletion/Matcher/VariablesMatcher.php b/vendor/psy/psysh/src/TabCompletion/Matcher/VariablesMatcher.php index 28685259..a142b7b2 100644 --- a/vendor/psy/psysh/src/TabCompletion/Matcher/VariablesMatcher.php +++ b/vendor/psy/psysh/src/TabCompletion/Matcher/VariablesMatcher.php @@ -25,9 +25,9 @@ class VariablesMatcher extends AbstractContextAwareMatcher */ public function getMatches(array $tokens, array $info = []) { - $var = str_replace('$', '', $this->getInput($tokens)); + $var = \str_replace('$', '', $this->getInput($tokens)); - return array_filter(array_keys($this->getVariables()), function ($variable) use ($var) { + return \array_filter(\array_keys($this->getVariables()), function ($variable) use ($var) { return AbstractMatcher::startsWith($var, $variable); }); } @@ -37,11 +37,11 @@ class VariablesMatcher extends AbstractContextAwareMatcher */ public function hasMatched(array $tokens) { - $token = array_pop($tokens); + $token = \array_pop($tokens); switch (true) { case self::hasToken([self::T_OPEN_TAG, self::T_VARIABLE], $token): - case is_string($token) && $token === '$': + case \is_string($token) && $token === '$': case self::isOperator($token): return true; } diff --git a/vendor/psy/psysh/src/Util/Docblock.php b/vendor/psy/psysh/src/Util/Docblock.php index c7989471..750210ba 100644 --- a/vendor/psy/psysh/src/Util/Docblock.php +++ b/vendor/psy/psysh/src/Util/Docblock.php @@ -101,18 +101,18 @@ class Docblock protected static function prefixLength(array $lines) { // find only lines with interesting things - $lines = array_filter($lines, function ($line) { - return substr($line, strspn($line, "* \t\n\r\0\x0B")); + $lines = \array_filter($lines, function ($line) { + return \substr($line, \strspn($line, "* \t\n\r\0\x0B")); }); // if we sort the lines, we only have to compare two items - sort($lines); + \sort($lines); - $first = reset($lines); - $last = end($lines); + $first = \reset($lines); + $last = \end($lines); // find the longest common substring - $count = min(strlen($first), strlen($last)); + $count = \min(\strlen($first), \strlen($last)); for ($i = 0; $i < $count; $i++) { if ($first[$i] !== $last[$i]) { return $i; @@ -130,15 +130,15 @@ class Docblock protected function parseComment($comment) { // Strip the opening and closing tags of the docblock - $comment = substr($comment, 3, -2); + $comment = \substr($comment, 3, -2); // Split into arrays of lines - $comment = array_filter(preg_split('/\r?\n\r?/', $comment)); + $comment = \array_filter(\preg_split('/\r?\n\r?/', $comment)); // Trim asterisks and whitespace from the beginning and whitespace from the end of lines $prefixLength = self::prefixLength($comment); - $comment = array_map(function ($line) use ($prefixLength) { - return rtrim(substr($line, $prefixLength)); + $comment = \array_map(function ($line) use ($prefixLength) { + return \rtrim(\substr($line, $prefixLength)); }, $comment); // Group the lines together by @tags @@ -157,30 +157,30 @@ class Docblock // Parse the blocks foreach ($blocks as $block => $body) { - $body = trim(implode("\n", $body)); + $body = \trim(\implode("\n", $body)); if ($block === 0 && !self::isTagged($body)) { // This is the description block $this->desc = $body; } else { // This block is tagged - $tag = substr(self::strTag($body), 1); - $body = ltrim(substr($body, strlen($tag) + 2)); + $tag = \substr(self::strTag($body), 1); + $body = \ltrim(\substr($body, \strlen($tag) + 2)); if (isset(self::$vectors[$tag])) { // The tagged block is a vector - $count = count(self::$vectors[$tag]); + $count = \count(self::$vectors[$tag]); if ($body) { - $parts = preg_split('/\s+/', $body, $count); + $parts = \preg_split('/\s+/', $body, $count); } else { $parts = []; } // Default the trailing values - $parts = array_pad($parts, $count, null); + $parts = \array_pad($parts, $count, null); // Store as a mapped array - $this->tags[$tag][] = array_combine(self::$vectors[$tag], $parts); + $this->tags[$tag][] = \array_combine(self::$vectors[$tag], $parts); } else { // The tagged block is only text $this->tags[$tag][] = $body; @@ -198,7 +198,7 @@ class Docblock */ public function hasTag($tag) { - return is_array($this->tags) && array_key_exists($tag, $this->tags); + return \is_array($this->tags) && \array_key_exists($tag, $this->tags); } /** @@ -222,7 +222,7 @@ class Docblock */ public static function isTagged($str) { - return isset($str[1]) && $str[0] === '@' && ctype_alpha($str[1]); + return isset($str[1]) && $str[0] === '@' && !\preg_match('/[^A-Za-z]/', $str[1]); } /** @@ -234,7 +234,7 @@ class Docblock */ public static function strTag($str) { - if (preg_match('/^@[a-z0-9_]+/', $str, $matches)) { + if (\preg_match('/^@[a-z0-9_]+/', $str, $matches)) { return $matches[0]; } } diff --git a/vendor/psy/psysh/src/Util/Json.php b/vendor/psy/psysh/src/Util/Json.php index 54ccf313..471f10e7 100644 --- a/vendor/psy/psysh/src/Util/Json.php +++ b/vendor/psy/psysh/src/Util/Json.php @@ -28,6 +28,6 @@ class Json { $opt |= JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE; - return json_encode($val, $opt); + return \json_encode($val, $opt); } } diff --git a/vendor/psy/psysh/src/Util/Mirror.php b/vendor/psy/psysh/src/Util/Mirror.php index 862d0bed..09c0b5b9 100644 --- a/vendor/psy/psysh/src/Util/Mirror.php +++ b/vendor/psy/psysh/src/Util/Mirror.php @@ -44,10 +44,10 @@ class Mirror */ public static function get($value, $member = null, $filter = 15) { - if ($member === null && is_string($value)) { - if (function_exists($value)) { + if ($member === null && \is_string($value)) { + if (\function_exists($value)) { return new \ReflectionFunction($value); - } elseif (defined($value) || ReflectionConstant_::isMagicConstant($value)) { + } elseif (\defined($value) || ReflectionConstant_::isMagicConstant($value)) { return new ReflectionConstant_($value); } } @@ -65,10 +65,10 @@ class Mirror } elseif ($filter & self::STATIC_PROPERTY && $class->hasProperty($member) && $class->getProperty($member)->isStatic()) { return $class->getProperty($member); } else { - throw new RuntimeException(sprintf( + throw new RuntimeException(\sprintf( 'Unknown member %s on class %s', $member, - is_object($value) ? get_class($value) : $value + \is_object($value) ? \get_class($value) : $value )); } } @@ -84,13 +84,13 @@ class Mirror */ private static function getClass($value) { - if (is_object($value)) { + if (\is_object($value)) { return new \ReflectionObject($value); } - if (!is_string($value)) { + if (!\is_string($value)) { throw new \InvalidArgumentException('Mirror expects an object or class'); - } elseif (!class_exists($value) && !interface_exists($value) && !trait_exists($value)) { + } elseif (!\class_exists($value) && !\interface_exists($value) && !\trait_exists($value)) { throw new \InvalidArgumentException('Unknown class or function: ' . $value); } diff --git a/vendor/psy/psysh/src/Util/Str.php b/vendor/psy/psysh/src/Util/Str.php index 88c052af..47d52399 100644 --- a/vendor/psy/psysh/src/Util/Str.php +++ b/vendor/psy/psysh/src/Util/Str.php @@ -61,9 +61,9 @@ EOS; */ public static function unvis($input) { - $output = preg_replace_callback(self::UNVIS_RX, 'self::unvisReplace', $input); + $output = \preg_replace_callback(self::UNVIS_RX, 'self::unvisReplace', $input); // other escapes & octal are handled by stripcslashes - return stripcslashes($output); + return \stripcslashes($output); } /** @@ -88,27 +88,27 @@ EOS; $chr = $match[3]; // unvis S_META1 $cp = 0200; - $cp |= ord($chr); + $cp |= \ord($chr); - return chr($cp); + return \chr($cp); } // \M^(.) if (isset($match[4]) && $match[4] !== '') { $chr = $match[4]; // unvis S_META | S_CTRL $cp = 0200; - $cp |= ($chr === '?') ? 0177 : ord($chr) & 037; + $cp |= ($chr === '?') ? 0177 : \ord($chr) & 037; - return chr($cp); + return \chr($cp); } // \^(.) if (isset($match[5]) && $match[5] !== '') { $chr = $match[5]; // unvis S_CTRL $cp = 0; - $cp |= ($chr === '?') ? 0177 : ord($chr) & 037; + $cp |= ($chr === '?') ? 0177 : \ord($chr) & 037; - return chr($cp); + return \chr($cp); } } } diff --git a/vendor/psy/psysh/src/VarDumper/Dumper.php b/vendor/psy/psysh/src/VarDumper/Dumper.php index a6e9e875..cc13b265 100644 --- a/vendor/psy/psysh/src/VarDumper/Dumper.php +++ b/vendor/psy/psysh/src/VarDumper/Dumper.php @@ -67,20 +67,20 @@ class Dumper extends CliDumper protected function style($style, $value, $attr = []) { if ('ref' === $style) { - $value = strtr($value, '@', '#'); + $value = \strtr($value, '@', '#'); } $styled = ''; $map = self::$controlCharsMap; $cchr = $this->styles['cchr']; - $chunks = preg_split(self::$controlCharsRx, $value, null, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE); + $chunks = \preg_split(self::$controlCharsRx, $value, null, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE); foreach ($chunks as $chunk) { - if (preg_match(self::$onlyControlCharsRx, $chunk)) { + if (\preg_match(self::$onlyControlCharsRx, $chunk)) { $chars = ''; $i = 0; do { - $chars .= isset($map[$chunk[$i]]) ? $map[$chunk[$i]] : sprintf('\x%02X', ord($chunk[$i])); + $chars .= isset($map[$chunk[$i]]) ? $map[$chunk[$i]] : \sprintf('\x%02X', \ord($chunk[$i])); } while (isset($chunk[++$i])); $chars = $this->formatter->escape($chars); diff --git a/vendor/psy/psysh/src/VarDumper/Presenter.php b/vendor/psy/psysh/src/VarDumper/Presenter.php index 400778ab..4f821e0c 100644 --- a/vendor/psy/psysh/src/VarDumper/Presenter.php +++ b/vendor/psy/psysh/src/VarDumper/Presenter.php @@ -49,14 +49,14 @@ class Presenter public function __construct(OutputFormatter $formatter, $forceArrayIndexes = false) { // Work around https://github.com/symfony/symfony/issues/23572 - $oldLocale = setlocale(LC_NUMERIC, 0); - setlocale(LC_NUMERIC, 'C'); + $oldLocale = \setlocale(LC_NUMERIC, 0); + \setlocale(LC_NUMERIC, 'C'); $this->dumper = new Dumper($formatter, $forceArrayIndexes); $this->dumper->setStyles($this->styles); // Now put the locale back - setlocale(LC_NUMERIC, $oldLocale); + \setlocale(LC_NUMERIC, $oldLocale); $this->cloner = new Cloner(); $this->cloner->addCasters(['*' => function ($obj, array $a, Stub $stub, $isNested, $filter = 0) { @@ -116,8 +116,8 @@ class Presenter } // Work around https://github.com/symfony/symfony/issues/23572 - $oldLocale = setlocale(LC_NUMERIC, 0); - setlocale(LC_NUMERIC, 'C'); + $oldLocale = \setlocale(LC_NUMERIC, 0); + \setlocale(LC_NUMERIC, 'C'); $output = ''; $this->dumper->dump($data, function ($line, $depth) use (&$output) { @@ -125,12 +125,12 @@ class Presenter if ('' !== $output) { $output .= PHP_EOL; } - $output .= str_repeat(' ', $depth) . $line; + $output .= \str_repeat(' ', $depth) . $line; } }); // Now put the locale back - setlocale(LC_NUMERIC, $oldLocale); + \setlocale(LC_NUMERIC, $oldLocale); return OutputFormatter::escape($output); } diff --git a/vendor/psy/psysh/src/VersionUpdater/GitHubChecker.php b/vendor/psy/psysh/src/VersionUpdater/GitHubChecker.php index e62a4d27..40cfc2e2 100644 --- a/vendor/psy/psysh/src/VersionUpdater/GitHubChecker.php +++ b/vendor/psy/psysh/src/VersionUpdater/GitHubChecker.php @@ -24,7 +24,7 @@ class GitHubChecker implements Checker */ public function isLatest() { - return version_compare(Shell::VERSION, $this->getLatest(), '>='); + return \version_compare(Shell::VERSION, $this->getLatest(), '>='); } /** @@ -68,22 +68,22 @@ class GitHubChecker implements Checker */ public function fetchLatestRelease() { - $context = stream_context_create([ + $context = \stream_context_create([ 'http' => [ 'user_agent' => 'PsySH/' . Shell::VERSION, 'timeout' => 3, ], ]); - set_error_handler(function () { + \set_error_handler(function () { // Just ignore all errors with this. The checker will throw an exception // if it doesn't work :) }); - $result = @file_get_contents(self::URL, false, $context); + $result = @\file_get_contents(self::URL, false, $context); - restore_error_handler(); + \restore_error_handler(); - return json_decode($result); + return \json_decode($result); } } diff --git a/vendor/psy/psysh/src/VersionUpdater/IntervalChecker.php b/vendor/psy/psysh/src/VersionUpdater/IntervalChecker.php index 712f2758..7e0da432 100644 --- a/vendor/psy/psysh/src/VersionUpdater/IntervalChecker.php +++ b/vendor/psy/psysh/src/VersionUpdater/IntervalChecker.php @@ -11,8 +11,6 @@ namespace Psy\VersionUpdater; -use Psy\Shell; - class IntervalChecker extends GitHubChecker { private $cacheFile; @@ -27,7 +25,7 @@ class IntervalChecker extends GitHubChecker public function fetchLatestRelease() { // Read the cached file - $cached = json_decode(@file_get_contents($this->cacheFile, false)); + $cached = \json_decode(@\file_get_contents($this->cacheFile, false)); if ($cached && isset($cached->last_check) && isset($cached->release)) { $now = new \DateTime(); $lastCheck = new \DateTime($cached->last_check); @@ -60,10 +58,10 @@ class IntervalChecker extends GitHubChecker private function updateCache($release) { $data = [ - 'last_check' => date(DATE_ATOM), + 'last_check' => \date(DATE_ATOM), 'release' => $release, ]; - file_put_contents($this->cacheFile, json_encode($data)); + \file_put_contents($this->cacheFile, \json_encode($data)); } } diff --git a/vendor/psy/psysh/src/functions.php b/vendor/psy/psysh/src/functions.php index b07c4920..4e875bba 100644 --- a/vendor/psy/psysh/src/functions.php +++ b/vendor/psy/psysh/src/functions.php @@ -18,7 +18,7 @@ use Symfony\Component\Console\Input\InputDefinition; use Symfony\Component\Console\Input\InputOption; use XdgBaseDir\Xdg; -if (!function_exists('Psy\sh')) { +if (!\function_exists('Psy\sh')) { /** * Command to return the eval-able code to startup PsySH. * @@ -32,7 +32,7 @@ if (!function_exists('Psy\sh')) { } } -if (!function_exists('Psy\debug')) { +if (!\function_exists('Psy\debug')) { /** * Invoke a Psy Shell from the current context. * @@ -89,7 +89,7 @@ if (!function_exists('Psy\debug')) { $sh->addInput('whereami -n2', true); } - if (is_string($bindTo)) { + if (\is_string($bindTo)) { $sh->setBoundClass($bindTo); } elseif ($bindTo !== null) { $sh->setBoundObject($bindTo); @@ -101,7 +101,7 @@ if (!function_exists('Psy\debug')) { } } -if (!function_exists('Psy\info')) { +if (!\function_exists('Psy\info')) { /** * Get a bunch of debugging info about the current PsySH environment and * configuration. @@ -123,12 +123,12 @@ if (!function_exists('Psy\info')) { } $xdg = new Xdg(); - $home = rtrim(str_replace('\\', '/', $xdg->getHomeDir()), '/'); - $homePattern = '#^' . preg_quote($home, '#') . '/#'; + $home = \rtrim(\str_replace('\\', '/', $xdg->getHomeDir()), '/'); + $homePattern = '#^' . \preg_quote($home, '#') . '/#'; $prettyPath = function ($path) use ($homePattern) { - if (is_string($path)) { - return preg_replace($homePattern, '~/', $path); + if (\is_string($path)) { + return \preg_replace($homePattern, '~/', $path); } else { return $path; } @@ -146,7 +146,7 @@ if (!function_exists('Psy\info')) { 'config file' => [ 'default config file' => $prettyPath($config->getConfigFile()), 'local config file' => $prettyPath($config->getLocalConfigFile()), - 'PSYSH_CONFIG env' => $prettyPath(getenv('PSYSH_CONFIG')), + 'PSYSH_CONFIG env' => $prettyPath(\getenv('PSYSH_CONFIG')), ], // 'config dir' => $config->getConfigDir(), // 'data dir' => $config->getDataDir(), @@ -171,12 +171,12 @@ if (!function_exists('Psy\info')) { ]; if ($config->hasReadline()) { - $info = readline_info(); + $info = \readline_info(); $readline = [ 'readline available' => true, 'readline enabled' => $config->useReadline(), - 'readline service' => get_class($config->getReadline()), + 'readline service' => \get_class($config->getReadline()), ]; if (isset($info['library_version'])) { @@ -193,12 +193,12 @@ if (!function_exists('Psy\info')) { } $pcntl = [ - 'pcntl available' => function_exists('pcntl_signal'), - 'posix available' => function_exists('posix_getpid'), + 'pcntl available' => \function_exists('pcntl_signal'), + 'posix available' => \function_exists('posix_getpid'), ]; - $disabledFuncs = array_map('trim', explode(',', ini_get('disable_functions'))); - if (in_array('pcntl_signal', $disabledFuncs) || in_array('pcntl_fork', $disabledFuncs)) { + $disabledFuncs = \array_map('trim', \explode(',', \ini_get('disable_functions'))); + if (\in_array('pcntl_signal', $disabledFuncs) || \in_array('pcntl_fork', $disabledFuncs)) { $pcntl['pcntl disabled'] = true; } @@ -226,7 +226,7 @@ if (!function_exists('Psy\info')) { $val = $d->format(\DateTime::RFC2822); break; } - $key = 'db ' . str_replace('_', ' ', $key); + $key = 'db ' . \str_replace('_', ' ', $key); $docs[$key] = $val; } } else { @@ -243,25 +243,25 @@ if (!function_exists('Psy\info')) { $autocomplete = [ 'tab completion enabled' => $config->useTabCompletion(), - 'custom matchers' => array_map('get_class', $config->getTabCompletionMatchers()), + 'custom matchers' => \array_map('get_class', $config->getTabCompletionMatchers()), 'bracketed paste' => $config->useBracketedPaste(), ]; // Shenanigans, but totally justified. if ($shell = Sudo::fetchProperty($config, 'shell')) { - $core['loop listeners'] = array_map('get_class', Sudo::fetchProperty($shell, 'loopListeners')); - $core['commands'] = array_map('get_class', $shell->all()); + $core['loop listeners'] = \array_map('get_class', Sudo::fetchProperty($shell, 'loopListeners')); + $core['commands'] = \array_map('get_class', $shell->all()); - $autocomplete['custom matchers'] = array_map('get_class', Sudo::fetchProperty($shell, 'matchers')); + $autocomplete['custom matchers'] = \array_map('get_class', Sudo::fetchProperty($shell, 'matchers')); } // @todo Show Presenter / custom casters. - return array_merge($core, compact('updates', 'pcntl', 'readline', 'history', 'docs', 'autocomplete')); + return \array_merge($core, \compact('updates', 'pcntl', 'readline', 'history', 'docs', 'autocomplete')); } } -if (!function_exists('Psy\bin')) { +if (!\function_exists('Psy\bin')) { /** * `psysh` command line executable. * @@ -313,7 +313,7 @@ if (!function_exists('Psy\bin')) { } $version = $shell->getVersion(); - $name = basename(reset($_SERVER['argv'])); + $name = \basename(\reset($_SERVER['argv'])); echo <<traverser->traverse($this->parse('isset(strtolower("A"))')); $this->fail(); } catch (FatalErrorException $e) { - if (version_compare(PHP_VERSION, '5.5', '>=')) { + if (\version_compare(PHP_VERSION, '5.5', '>=')) { $this->assertContains( 'Cannot use isset() on the result of a function call (you can use "null !== func()" instead)', $e->getMessage() @@ -66,7 +66,7 @@ class FunctionReturnInWriteContextPassTest extends CodeCleanerTestCase */ public function testEmpty() { - if (version_compare(PHP_VERSION, '5.5', '>=')) { + if (\version_compare(PHP_VERSION, '5.5', '>=')) { $this->markTestSkipped(); } diff --git a/vendor/psy/psysh/test/CodeCleaner/LegacyEmptyPassTest.php b/vendor/psy/psysh/test/CodeCleaner/LegacyEmptyPassTest.php index 5afb5759..5c4c7b05 100644 --- a/vendor/psy/psysh/test/CodeCleaner/LegacyEmptyPassTest.php +++ b/vendor/psy/psysh/test/CodeCleaner/LegacyEmptyPassTest.php @@ -31,7 +31,7 @@ class LegacyEmptyPassTest extends CodeCleanerTestCase public function invalidStatements() { - if (version_compare(PHP_VERSION, '5.5', '>=')) { + if (\version_compare(PHP_VERSION, '5.5', '>=')) { return [ ['empty()'], ]; @@ -58,7 +58,7 @@ class LegacyEmptyPassTest extends CodeCleanerTestCase public function validStatements() { - if (version_compare(PHP_VERSION, '5.5', '<')) { + if (\version_compare(PHP_VERSION, '5.5', '<')) { return [ ['empty($foo)'], ]; diff --git a/vendor/psy/psysh/test/CodeCleaner/ListPassTest.php b/vendor/psy/psysh/test/CodeCleaner/ListPassTest.php index 95cf3a74..7481f7c3 100644 --- a/vendor/psy/psysh/test/CodeCleaner/ListPassTest.php +++ b/vendor/psy/psysh/test/CodeCleaner/ListPassTest.php @@ -26,7 +26,7 @@ class ListPassTest extends CodeCleanerTestCase */ public function testProcessInvalidStatement($code, $expectedMessage) { - if (method_exists($this, 'setExpectedException')) { + if (\method_exists($this, 'setExpectedException')) { $this->setExpectedException('Psy\Exception\ParseErrorException', $expectedMessage); } else { $this->expectExceptionMessage($expectedMessage); @@ -50,20 +50,23 @@ class ListPassTest extends CodeCleanerTestCase ['list("a") = array(1)', $errorPhpParserSyntax], ]; - if (version_compare(PHP_VERSION, '7.1', '<')) { - return array_merge($invalidExpr, [ + if (\version_compare(PHP_VERSION, '7.1', '<')) { + return \array_merge($invalidExpr, [ ['list("a" => _) = array("a" => 1)', $errorPhpParserSyntax], ['[] = []', $errorShortListAssign], ['[$a] = [1]', $errorShortListAssign], ['list("a" => $a) = array("a" => 1)', $errorAssocListAssign], + ['[$a[0], $a[1]] = [1, 2]', $errorShortListAssign], + ['[$a->b, $a->c] = [1, 2]', $errorShortListAssign], ]); } - return array_merge($invalidExpr, [ + return \array_merge($invalidExpr, [ ['list("a" => _) = array("a" => 1)', $errorPhpParserSyntax], ['["a"] = [1]', $errorNonVariableAssign], ['[] = []', $errorEmptyList], ['[,] = [1,2]', $errorEmptyList], + ['[,,] = [1,2,3]', $errorEmptyList], ]); } @@ -84,8 +87,8 @@ class ListPassTest extends CodeCleanerTestCase ['list($x, $y) = array(1, 2)'], ]; - if (version_compare(PHP_VERSION, '7.1', '>=')) { - return array_merge($validExpr, [ + if (\version_compare(PHP_VERSION, '7.1', '>=')) { + return \array_merge($validExpr, [ ['[$a] = array(1)'], ['list($b) = [2]'], ['[$x, $y] = array(1, 2)'], @@ -96,6 +99,8 @@ class ListPassTest extends CodeCleanerTestCase ['[,$b] = [1,2,3]'], ['[$a,,$c] = [1,2,3]'], ['[$a,,,] = [1,2,3]'], + ['[$a[0], $a[1]] = [1, 2]'], + ['[$a->b, $a->c] = [1, 2]'], ]); } diff --git a/vendor/psy/psysh/test/CodeCleaner/NamespacePassTest.php b/vendor/psy/psysh/test/CodeCleaner/NamespacePassTest.php index 0c28dc6e..e8f01396 100644 --- a/vendor/psy/psysh/test/CodeCleaner/NamespacePassTest.php +++ b/vendor/psy/psysh/test/CodeCleaner/NamespacePassTest.php @@ -43,7 +43,7 @@ class NamespacePassTest extends CodeCleanerTestCase // A new block namespace clears out the current namespace... $this->parseAndTraverse('namespace Gamma { array_merge(); }'); - if (defined('PhpParser\\Node\\Stmt\\Namespace_::KIND_SEMICOLON')) { + if (\defined('PhpParser\\Node\\Stmt\\Namespace_::KIND_SEMICOLON')) { $this->assertNull($this->cleaner->getNamespace()); } else { // But not for PHP-Parser < v3.1.2 :( diff --git a/vendor/psy/psysh/test/CodeCleaner/NoReturnValueTest.php b/vendor/psy/psysh/test/CodeCleaner/NoReturnValueTest.php index 6a7d009a..11e9d013 100644 --- a/vendor/psy/psysh/test/CodeCleaner/NoReturnValueTest.php +++ b/vendor/psy/psysh/test/CodeCleaner/NoReturnValueTest.php @@ -20,7 +20,7 @@ class NoReturnValueTest extends ParserTestCase public function testCreate() { $stmt = NoReturnValue::create(); - if (class_exists('PhpParser\Node\Stmt\Expression')) { + if (\class_exists('PhpParser\Node\Stmt\Expression')) { $stmt = new Expression($stmt); } diff --git a/vendor/psy/psysh/test/CodeCleaner/RequirePassTest.php b/vendor/psy/psysh/test/CodeCleaner/RequirePassTest.php index 0b7b3bc3..6640e639 100644 --- a/vendor/psy/psysh/test/CodeCleaner/RequirePassTest.php +++ b/vendor/psy/psysh/test/CodeCleaner/RequirePassTest.php @@ -70,7 +70,7 @@ class RequirePassTest extends CodeCleanerTestCase */ public function testResolveEmptyWarnings($file) { - if (!E_WARNING & error_reporting()) { + if (!E_WARNING & \error_reporting()) { $this->markTestSkipped(); } diff --git a/vendor/psy/psysh/test/CodeCleaner/StrictTypesPassTest.php b/vendor/psy/psysh/test/CodeCleaner/StrictTypesPassTest.php index ee147824..54186190 100644 --- a/vendor/psy/psysh/test/CodeCleaner/StrictTypesPassTest.php +++ b/vendor/psy/psysh/test/CodeCleaner/StrictTypesPassTest.php @@ -17,7 +17,7 @@ class StrictTypesPassTest extends CodeCleanerTestCase { public function setUp() { - if (version_compare(PHP_VERSION, '7.0', '<')) { + if (\version_compare(PHP_VERSION, '7.0', '<')) { $this->markTestSkipped(); } diff --git a/vendor/psy/psysh/test/CodeCleaner/UseStatementPassTest.php b/vendor/psy/psysh/test/CodeCleaner/UseStatementPassTest.php index aedfd499..4d5ac342 100644 --- a/vendor/psy/psysh/test/CodeCleaner/UseStatementPassTest.php +++ b/vendor/psy/psysh/test/CodeCleaner/UseStatementPassTest.php @@ -80,7 +80,7 @@ class UseStatementPassTest extends CodeCleanerTestCase public function groupUseStatements() { - if (version_compare(PHP_VERSION, '7.0', '<')) { + if (\version_compare(PHP_VERSION, '7.0', '<')) { $this->markTestSkipped(); } diff --git a/vendor/psy/psysh/test/CodeCleaner/ValidClassNamePassTest.php b/vendor/psy/psysh/test/CodeCleaner/ValidClassNamePassTest.php index 67b15750..2d9ed60b 100644 --- a/vendor/psy/psysh/test/CodeCleaner/ValidClassNamePassTest.php +++ b/vendor/psy/psysh/test/CodeCleaner/ValidClassNamePassTest.php @@ -172,6 +172,7 @@ class ValidClassNamePassTest extends CodeCleanerTestCase ['DateTime::$someMethod()'], ['Psy\Test\CodeCleaner\Fixtures\ClassWithStatic::doStuff()'], ['Psy\Test\CodeCleaner\Fixtures\ClassWithCallStatic::doStuff()'], + ['Psy\Test\CodeCleaner\Fixtures\TraitWithStatic::doStuff()'], // Allow `self` and `static` as class names. [' @@ -305,12 +306,12 @@ class ValidClassNamePassTest extends CodeCleanerTestCase ]; // Ugh. There's gotta be a better way to test for this. - if (class_exists('PhpParser\ParserFactory')) { + if (\class_exists('PhpParser\ParserFactory')) { // PHP 7.0 anonymous classes, only supported by PHP Parser v2.x $valid[] = ['$obj = new class() {}']; } - if (version_compare(PHP_VERSION, '5.5', '>=')) { + if (\version_compare(PHP_VERSION, '5.5', '>=')) { $valid[] = ['interface A {} A::class']; $valid[] = ['interface A {} A::CLASS']; $valid[] = ['class A {} A::class']; diff --git a/vendor/psy/psysh/test/CodeCleaner/ValidConstructorPassTest.php b/vendor/psy/psysh/test/CodeCleaner/ValidConstructorPassTest.php index c0379b26..4f7e40c4 100644 --- a/vendor/psy/psysh/test/CodeCleaner/ValidConstructorPassTest.php +++ b/vendor/psy/psysh/test/CodeCleaner/ValidConstructorPassTest.php @@ -47,7 +47,7 @@ class ValidConstructorPassTest extends CodeCleanerTestCase ['class A { private static function a() {}}'], ]; - if (version_compare(PHP_VERSION, '7.0', '>=')) { + if (\version_compare(PHP_VERSION, '7.0', '>=')) { $data[] = ['class A { public function A(): ?array {}}']; $data[] = ['class A { public function a(): ?array {}}']; } @@ -82,7 +82,7 @@ class ValidConstructorPassTest extends CodeCleanerTestCase ['namespace B; class A { private static function A() {}}'], ]; - if (version_compare(PHP_VERSION, '7.0', '>=')) { + if (\version_compare(PHP_VERSION, '7.0', '>=')) { $data[] = ['class A { public static function A() {} public function __construct() {}}']; $data[] = ['class A { private function __construct() {} public static function A(): ?array {}}']; $data[] = ['namespace B; class A { private static function A(): ?array {}}']; diff --git a/vendor/psy/psysh/test/CodeCleanerTest.php b/vendor/psy/psysh/test/CodeCleanerTest.php index 40ec6b42..2195a4ff 100644 --- a/vendor/psy/psysh/test/CodeCleanerTest.php +++ b/vendor/psy/psysh/test/CodeCleanerTest.php @@ -79,7 +79,7 @@ class CodeCleanerTest extends \PHPUnit\Framework\TestCase */ public function testMoreUnclosedStatements(array $lines) { - if (defined('HHVM_VERSION')) { + if (\defined('HHVM_VERSION')) { $this->markTestSkipped('HHVM not supported.'); } diff --git a/vendor/psy/psysh/test/ConfigurationTest.php b/vendor/psy/psysh/test/ConfigurationTest.php index a250d834..b7b6c0c0 100644 --- a/vendor/psy/psysh/test/ConfigurationTest.php +++ b/vendor/psy/psysh/test/ConfigurationTest.php @@ -30,10 +30,10 @@ class ConfigurationTest extends \PHPUnit\Framework\TestCase { $config = $this->getConfig(); - $this->assertSame(function_exists('readline'), $config->hasReadline()); - $this->assertSame(function_exists('readline'), $config->useReadline()); - $this->assertSame(function_exists('pcntl_signal'), $config->hasPcntl()); - $this->assertSame(function_exists('pcntl_signal'), $config->usePcntl()); + $this->assertSame(\function_exists('readline'), $config->hasReadline()); + $this->assertSame(\function_exists('readline'), $config->useReadline()); + $this->assertSame(\function_exists('pcntl_signal'), $config->hasPcntl()); + $this->assertSame(\function_exists('pcntl_signal'), $config->usePcntl()); $this->assertFalse($config->requireSemicolons()); $this->assertSame(Configuration::COLOR_MODE_AUTO, $config->colorMode()); $this->assertNull($config->getStartupMessage()); @@ -57,20 +57,20 @@ class ConfigurationTest extends \PHPUnit\Framework\TestCase */ public function testFilesAndDirectories($home, $configFile, $historyFile, $manualDbFile) { - $oldHome = getenv('HOME'); - putenv("HOME=$home"); + $oldHome = \getenv('HOME'); + \putenv("HOME=$home"); $config = new Configuration(); - $this->assertSame(realpath($configFile), realpath($config->getConfigFile())); - $this->assertSame(realpath($historyFile), realpath($config->getHistoryFile())); - $this->assertSame(realpath($manualDbFile), realpath($config->getManualDbFile())); + $this->assertSame(\realpath($configFile), \realpath($config->getConfigFile())); + $this->assertSame(\realpath($historyFile), \realpath($config->getHistoryFile())); + $this->assertSame(\realpath($manualDbFile), \realpath($config->getManualDbFile())); - putenv("HOME=$oldHome"); + \putenv("HOME=$oldHome"); } public function directories() { - $base = realpath(__DIR__ . '/fixtures'); + $base = \realpath(__DIR__ . '/fixtures'); return [ [ @@ -125,21 +125,21 @@ class ConfigurationTest extends \PHPUnit\Framework\TestCase { $config = $this->getConfig(__DIR__ . '/fixtures/config.php'); - $runtimeDir = $this->joinPath(realpath(sys_get_temp_dir()), 'psysh_test', 'withconfig', 'temp'); + $runtimeDir = $this->joinPath(\realpath(\sys_get_temp_dir()), 'psysh_test', 'withconfig', 'temp'); - $this->assertStringStartsWith($runtimeDir, realpath($config->getTempFile('foo', 123))); - $this->assertStringStartsWith($runtimeDir, realpath(dirname($config->getPipe('pipe', 123)))); - $this->assertStringStartsWith($runtimeDir, realpath($config->getRuntimeDir())); + $this->assertStringStartsWith($runtimeDir, \realpath($config->getTempFile('foo', 123))); + $this->assertStringStartsWith($runtimeDir, \realpath(\dirname($config->getPipe('pipe', 123)))); + $this->assertStringStartsWith($runtimeDir, \realpath($config->getRuntimeDir())); - $this->assertSame(function_exists('readline'), $config->useReadline()); + $this->assertSame(\function_exists('readline'), $config->useReadline()); $this->assertFalse($config->usePcntl()); $this->assertSame(E_ALL & ~E_NOTICE, $config->errorLoggingLevel()); } public function testLoadLocalConfigFile() { - $oldPwd = getcwd(); - chdir(realpath(__DIR__ . '/fixtures/project/')); + $oldPwd = \getcwd(); + \chdir(\realpath(__DIR__ . '/fixtures/project/')); $config = new Configuration(); @@ -153,7 +153,7 @@ class ConfigurationTest extends \PHPUnit\Framework\TestCase $this->assertFalse($config->requireSemicolons()); $this->assertTrue($config->useUnicode()); - chdir($oldPwd); + \chdir($oldPwd); } /** @@ -166,7 +166,7 @@ class ConfigurationTest extends \PHPUnit\Framework\TestCase private function joinPath() { - return implode(DIRECTORY_SEPARATOR, func_get_args()); + return \implode(DIRECTORY_SEPARATOR, \func_get_args()); } public function testConfigIncludes() diff --git a/vendor/psy/psysh/test/ContextTest.php b/vendor/psy/psysh/test/ContextTest.php index 0b8b6dc8..d1937036 100644 --- a/vendor/psy/psysh/test/ContextTest.php +++ b/vendor/psy/psysh/test/ContextTest.php @@ -244,7 +244,7 @@ class ContextTest extends \PHPUnit\Framework\TestCase $__line = 'dixie'; $__dir = 'wrinkly'; - $vars = compact('__function', '__method', '__class', '__namespace', '__file', '__line', '__dir'); + $vars = \compact('__function', '__method', '__class', '__namespace', '__file', '__line', '__dir'); $context = new Context(); $context->setCommandScopeVariables($vars); @@ -259,7 +259,7 @@ class ContextTest extends \PHPUnit\Framework\TestCase $this->assertEquals($__line, $context->get('__line')); $this->assertEquals($__dir, $context->get('__dir')); - $someVars = compact('__function', '__namespace', '__file', '__line', '__dir'); + $someVars = \compact('__function', '__namespace', '__file', '__line', '__dir'); $context->setCommandScopeVariables($someVars); } @@ -282,7 +282,7 @@ class ContextTest extends \PHPUnit\Framework\TestCase $this->assertEquals( ['__method', '__class'], - array_values($context->getUnusedCommandScopeVariableNames()) + \array_values($context->getUnusedCommandScopeVariableNames()) ); } diff --git a/vendor/psy/psysh/test/Exception/ErrorExceptionTest.php b/vendor/psy/psysh/test/Exception/ErrorExceptionTest.php index e66319b9..ef9fb9ab 100644 --- a/vendor/psy/psysh/test/Exception/ErrorExceptionTest.php +++ b/vendor/psy/psysh/test/Exception/ErrorExceptionTest.php @@ -76,14 +76,14 @@ class ErrorExceptionTest extends \PHPUnit\Framework\TestCase */ public function testThrowExceptionAsErrorHandler($level, $type) { - set_error_handler(['Psy\Exception\ErrorException', 'throwException']); + \set_error_handler(['Psy\Exception\ErrorException', 'throwException']); try { - trigger_error('{whot}', $level); + \trigger_error('{whot}', $level); } catch (ErrorException $e) { $this->assertContains('PHP ' . $type, $e->getMessage()); $this->assertContains('{whot}', $e->getMessage()); } - restore_error_handler(); + \restore_error_handler(); } public function getUserLevels() @@ -110,7 +110,7 @@ class ErrorExceptionTest extends \PHPUnit\Framework\TestCase public function testFromError() { - if (version_compare(PHP_VERSION, '7.0.0', '<')) { + if (\version_compare(PHP_VERSION, '7.0.0', '<')) { $this->markTestSkipped(); } diff --git a/vendor/psy/psysh/test/Exception/ThrowUpExceptionTest.php b/vendor/psy/psysh/test/Exception/ThrowUpExceptionTest.php index f44ab873..09c33732 100644 --- a/vendor/psy/psysh/test/Exception/ThrowUpExceptionTest.php +++ b/vendor/psy/psysh/test/Exception/ThrowUpExceptionTest.php @@ -40,7 +40,7 @@ class ThrowUpExceptionTest extends \PHPUnit\Framework\TestCase public function testFromThrowableWithError() { - if (version_compare(PHP_VERSION, '7.0.0', '<')) { + if (\version_compare(PHP_VERSION, '7.0.0', '<')) { $this->markTestSkipped(); } diff --git a/vendor/psy/psysh/test/Exception/TypeErrorExceptionTest.php b/vendor/psy/psysh/test/Exception/TypeErrorExceptionTest.php index 7bf27af9..01f251bb 100644 --- a/vendor/psy/psysh/test/Exception/TypeErrorExceptionTest.php +++ b/vendor/psy/psysh/test/Exception/TypeErrorExceptionTest.php @@ -37,7 +37,7 @@ class TypeErrorExceptionTest extends \PHPUnit\Framework\TestCase public function testFromTypeError() { - if (version_compare(PHP_VERSION, '7.0.0', '<')) { + if (\version_compare(PHP_VERSION, '7.0.0', '<')) { $this->markTestSkipped(); } diff --git a/vendor/psy/psysh/test/Formatter/CodeFormatterTest.php b/vendor/psy/psysh/test/Formatter/CodeFormatterTest.php index ee213f1c..87f56dfd 100644 --- a/vendor/psy/psysh/test/Formatter/CodeFormatterTest.php +++ b/vendor/psy/psysh/test/Formatter/CodeFormatterTest.php @@ -22,7 +22,7 @@ class CodeFormatterTest extends \PHPUnit\Framework\TestCase public function testFormat($reflector, $expected) { $formatted = CodeFormatter::format($reflector); - $formattedWithoutColors = preg_replace('#' . chr(27) . '\[\d\d?m#', '', $formatted); + $formattedWithoutColors = \preg_replace('#' . \chr(27) . '\[\d\d?m#', '', $formatted); $this->assertEquals($expected, self::trimLines($formattedWithoutColors)); $this->assertNotEquals($expected, self::trimLines($formatted)); @@ -88,7 +88,7 @@ EOS; [new \ReflectionProperty('Psy\Test\Formatter\Fixtures\SomeClass', 'someProp')], ]; - if (version_compare(PHP_VERSION, '7.1.0', '>=')) { + if (\version_compare(PHP_VERSION, '7.1.0', '>=')) { $reflectors[] = [new \ReflectionClassConstant('Psy\Test\Formatter\Fixtures\SomeClass', 'SOME_CONST')]; } @@ -115,7 +115,7 @@ EOS; public function filenames() { - if (defined('HHVM_VERSION')) { + if (\defined('HHVM_VERSION')) { $this->markTestSkipped('We have issues with PHPUnit mocks on HHVM.'); } @@ -124,6 +124,6 @@ EOS; private static function trimLines($code) { - return rtrim(implode("\n", array_map('rtrim', explode("\n", $code)))); + return \rtrim(\implode("\n", \array_map('rtrim', \explode("\n", $code)))); } } diff --git a/vendor/psy/psysh/test/Formatter/SignatureFormatterTest.php b/vendor/psy/psysh/test/Formatter/SignatureFormatterTest.php index 7d4938d0..096e6ae7 100644 --- a/vendor/psy/psysh/test/Formatter/SignatureFormatterTest.php +++ b/vendor/psy/psysh/test/Formatter/SignatureFormatterTest.php @@ -29,7 +29,7 @@ class SignatureFormatterTest extends \PHPUnit\Framework\TestCase */ public function testFormat($reflector, $expected) { - $this->assertSame($expected, strip_tags(SignatureFormatter::format($reflector))); + $this->assertSame($expected, \strip_tags(SignatureFormatter::format($reflector))); } public function signatureReflectors() @@ -37,7 +37,7 @@ class SignatureFormatterTest extends \PHPUnit\Framework\TestCase return [ [ new \ReflectionFunction('implode'), - defined('HHVM_VERSION') ? 'function implode($arg1, $arg2 = null)' : 'function implode($glue, $pieces)', + \defined('HHVM_VERSION') ? 'function implode($arg1, $arg2 = null)' : 'function implode($glue, $pieces)', ], [ ReflectionClassConstant::create($this, 'FOO'), diff --git a/vendor/psy/psysh/test/ParserTestCase.php b/vendor/psy/psysh/test/ParserTestCase.php index 78055206..a0740b66 100644 --- a/vendor/psy/psysh/test/ParserTestCase.php +++ b/vendor/psy/psysh/test/ParserTestCase.php @@ -92,6 +92,6 @@ class ParserTestCase extends \PHPUnit\Framework\TestCase { $msg = $e->getRawMessage(); - return ($msg === 'Unexpected token EOF') || (strpos($msg, 'Syntax error, unexpected EOF') !== false); + return ($msg === 'Unexpected token EOF') || (\strpos($msg, 'Syntax error, unexpected EOF') !== false); } } diff --git a/vendor/psy/psysh/test/Readline/GNUReadlineTest.php b/vendor/psy/psysh/test/Readline/GNUReadlineTest.php index 7f39197e..406377fc 100644 --- a/vendor/psy/psysh/test/Readline/GNUReadlineTest.php +++ b/vendor/psy/psysh/test/Readline/GNUReadlineTest.php @@ -23,8 +23,8 @@ class GNUReadlineTest extends \PHPUnit\Framework\TestCase $this->markTestSkipped('GNUReadline not enabled'); } - $this->historyFile = tempnam(sys_get_temp_dir(), 'psysh_test_history'); - file_put_contents($this->historyFile, "_HiStOrY_V2_\n"); + $this->historyFile = \tempnam(\sys_get_temp_dir(), 'psysh_test_history'); + \file_put_contents($this->historyFile, "_HiStOrY_V2_\n"); } public function testHistory() diff --git a/vendor/psy/psysh/test/Readline/LibeditTest.php b/vendor/psy/psysh/test/Readline/LibeditTest.php index 44a06c61..2d7be288 100644 --- a/vendor/psy/psysh/test/Readline/LibeditTest.php +++ b/vendor/psy/psysh/test/Readline/LibeditTest.php @@ -23,20 +23,20 @@ class LibeditTest extends \PHPUnit\Framework\TestCase $this->markTestSkipped('Libedit not enabled'); } - $this->historyFile = tempnam(sys_get_temp_dir(), 'psysh_test_history'); - if (false === file_put_contents($this->historyFile, "_HiStOrY_V2_\n")) { + $this->historyFile = \tempnam(\sys_get_temp_dir(), 'psysh_test_history'); + if (false === \file_put_contents($this->historyFile, "_HiStOrY_V2_\n")) { $this->fail('Unable to write history file: ' . $this->historyFile); } // Calling readline_read_history before readline_clear_history // avoids segfault with PHP 5.5.7 & libedit v3.1 - readline_read_history($this->historyFile); - readline_clear_history(); + \readline_read_history($this->historyFile); + \readline_clear_history(); } public function tearDown() { - if (is_file($this->historyFile)) { - unlink($this->historyFile); + if (\is_file($this->historyFile)) { + \unlink($this->historyFile); } } @@ -94,7 +94,7 @@ class LibeditTest extends \PHPUnit\Framework\TestCase public function testListHistory() { $readline = new Libedit($this->historyFile); - file_put_contents( + \file_put_contents( $this->historyFile, "This is an entry\n\0This is a comment\nThis is an entry\0With a comment\n", FILE_APPEND @@ -113,7 +113,7 @@ class LibeditTest extends \PHPUnit\Framework\TestCase public function testLinebreaksSupport() { $readline = new Libedit($this->historyFile); - file_put_contents( + \file_put_contents( $this->historyFile, "foo\rbar\nbaz\r\nw00t", FILE_APPEND diff --git a/vendor/psy/psysh/test/Reflection/ReflectionConstantTest.php b/vendor/psy/psysh/test/Reflection/ReflectionConstantTest.php index 95328ff8..02c1a844 100644 --- a/vendor/psy/psysh/test/Reflection/ReflectionConstantTest.php +++ b/vendor/psy/psysh/test/Reflection/ReflectionConstantTest.php @@ -13,7 +13,7 @@ namespace Psy\Test\Reflection; use Psy\Reflection\ReflectionConstant_; -define('Psy\\Test\\Reflection\\SOME_CONSTANT', 'yep'); +\define('Psy\\Test\\Reflection\\SOME_CONSTANT', 'yep'); class ReflectionConstantTest extends \PHPUnit\Framework\TestCase { diff --git a/vendor/psy/psysh/test/ShellTest.php b/vendor/psy/psysh/test/ShellTest.php index 5b587d63..809af021 100644 --- a/vendor/psy/psysh/test/ShellTest.php +++ b/vendor/psy/psysh/test/ShellTest.php @@ -25,7 +25,7 @@ class ShellTest extends \PHPUnit\Framework\TestCase public function tearDown() { foreach ($this->streams as $stream) { - fclose($stream); + \fclose($stream); } } @@ -39,7 +39,7 @@ class ShellTest extends \PHPUnit\Framework\TestCase $_e = 'ignore this'; $shell = new Shell($this->getConfig()); - $shell->setScopeVariables(compact('one', 'two', 'three', '__psysh__', '_', '_e', 'this')); + $shell->setScopeVariables(\compact('one', 'two', 'three', '__psysh__', '_', '_e', 'this')); $this->assertNotContains('__psysh__', $shell->getScopeVariableNames()); $this->assertSame(['one', 'two', 'three', '_'], $shell->getScopeVariableNames()); @@ -48,6 +48,9 @@ class ShellTest extends \PHPUnit\Framework\TestCase $this->assertSame($three, $shell->getScopeVariable('three')); $this->assertNull($shell->getScopeVariable('_')); + $diff = $shell->getScopeVariablesDiff(['one' => $one, 'two' => 'not two']); + $this->assertSame(['two' => $two, 'three' => $three, '_' => null], $diff); + $shell->setScopeVariables([]); $this->assertSame(['_'], $shell->getScopeVariableNames()); @@ -80,7 +83,7 @@ class ShellTest extends \PHPUnit\Framework\TestCase $config = $this->getConfig(['usePcntl' => false]); $shell = new Shell($config); - $shell->setScopeVariables(compact('one', 'two', 'three', '__psysh__', '_', '_e', 'this')); + $shell->setScopeVariables(\compact('one', 'two', 'three', '__psysh__', '_', '_e', 'this')); $shell->addInput('exit', true); // This is super slow and we shouldn't do this :( @@ -160,8 +163,8 @@ class ShellTest extends \PHPUnit\Framework\TestCase $this->assertFalse($shell->hasCode()); $this->assertEmpty($shell->getCodeBuffer()); - rewind($stream); - $streamContents = stream_get_contents($stream); + \rewind($stream); + $streamContents = \stream_get_contents($stream); $this->assertContains('PHP Parse error', $streamContents); $this->assertContains('message', $streamContents); @@ -175,19 +178,19 @@ class ShellTest extends \PHPUnit\Framework\TestCase $stream = $output->getStream(); $shell->setOutput($output); - $oldLevel = error_reporting(); - error_reporting($oldLevel & ~E_USER_NOTICE); + $oldLevel = \error_reporting(); + \error_reporting($oldLevel & ~E_USER_NOTICE); try { $shell->handleError(E_USER_NOTICE, 'wheee', null, 13); } catch (ErrorException $e) { - error_reporting($oldLevel); + \error_reporting($oldLevel); $this->fail('Unexpected error exception'); } - error_reporting($oldLevel); + \error_reporting($oldLevel); - rewind($stream); - $streamContents = stream_get_contents($stream); + \rewind($stream); + $streamContents = \stream_get_contents($stream); $this->assertContains('PHP Notice:', $streamContents); $this->assertContains('wheee', $streamContents); @@ -200,13 +203,13 @@ class ShellTest extends \PHPUnit\Framework\TestCase public function testNotHandlingErrors() { $shell = new Shell($this->getConfig()); - $oldLevel = error_reporting(); - error_reporting($oldLevel | E_USER_NOTICE); + $oldLevel = \error_reporting(); + \error_reporting($oldLevel | E_USER_NOTICE); try { $shell->handleError(E_USER_NOTICE, 'wheee', null, 13); } catch (ErrorException $e) { - error_reporting($oldLevel); + \error_reporting($oldLevel); throw $e; } } @@ -217,8 +220,8 @@ class ShellTest extends \PHPUnit\Framework\TestCase $this->assertInstanceOf('Symfony\Component\Console\Application', $shell); $this->assertContains(Shell::VERSION, $shell->getVersion()); - $this->assertContains(phpversion(), $shell->getVersion()); - $this->assertContains(php_sapi_name(), $shell->getVersion()); + $this->assertContains(PHP_VERSION, $shell->getVersion()); + $this->assertContains(PHP_SAPI, $shell->getVersion()); } public function testCodeBuffer() @@ -236,7 +239,7 @@ class ShellTest extends \PHPUnit\Framework\TestCase $shell->addCode('{}'); $code = $shell->flushCode(); $this->assertFalse($shell->hasCode()); - $code = preg_replace('/\s+/', ' ', $code); + $code = \preg_replace('/\s+/', ' ', $code); $this->assertNotNull($code); $this->assertSame('class a { } return new \\Psy\\CodeCleaner\\NoReturnValue();', $code); } @@ -256,7 +259,7 @@ class ShellTest extends \PHPUnit\Framework\TestCase $shell->addCode('+ 1'); $code = $shell->flushCode(); $this->assertFalse($shell->hasCode()); - $code = preg_replace('/\s+/', ' ', $code); + $code = \preg_replace('/\s+/', ' ', $code); $this->assertNotNull($code); $this->assertSame('return 1 + 1 + 1;', $code); } @@ -291,8 +294,8 @@ class ShellTest extends \PHPUnit\Framework\TestCase $shell->writeStdout("{{stdout}}\n"); - rewind($stream); - $streamContents = stream_get_contents($stream); + \rewind($stream); + $streamContents = \stream_get_contents($stream); $this->assertSame('{{stdout}}' . PHP_EOL, $streamContents); } @@ -306,8 +309,8 @@ class ShellTest extends \PHPUnit\Framework\TestCase $shell->writeStdout('{{stdout}}'); - rewind($stream); - $streamContents = stream_get_contents($stream); + \rewind($stream); + $streamContents = \stream_get_contents($stream); $this->assertSame('{{stdout}}' . PHP_EOL, $streamContents); } @@ -323,8 +326,8 @@ class ShellTest extends \PHPUnit\Framework\TestCase $shell->setOutput($output); $shell->writeReturnValue($input); - rewind($stream); - $this->assertEquals($expected, stream_get_contents($stream)); + \rewind($stream); + $this->assertEquals($expected, \stream_get_contents($stream)); } public function getReturnValues() @@ -346,8 +349,8 @@ class ShellTest extends \PHPUnit\Framework\TestCase $shell->setOutput($output); $shell->writeException($exception); - rewind($stream); - $this->assertSame($expected, stream_get_contents($stream)); + \rewind($stream); + $this->assertSame($expected, \stream_get_contents($stream)); } public function getRenderedExceptions() @@ -367,8 +370,8 @@ class ShellTest extends \PHPUnit\Framework\TestCase $shell = new Shell($this->getConfig()); $shell->setOutput($output); $this->assertEquals($expected, $shell->execute($input)); - rewind($stream); - $this->assertSame('', stream_get_contents($stream)); + \rewind($stream); + $this->assertSame('', \stream_get_contents($stream)); } public function getExecuteValues() @@ -414,7 +417,7 @@ class ShellTest extends \PHPUnit\Framework\TestCase private function getOutput() { - $stream = fopen('php://memory', 'w+'); + $stream = \fopen('php://memory', 'w+'); $this->streams[] = $stream; $output = new StreamOutput($stream, StreamOutput::VERBOSITY_NORMAL, false); @@ -425,8 +428,8 @@ class ShellTest extends \PHPUnit\Framework\TestCase private function getConfig(array $config = []) { // Mebbe there's a better way than this? - $dir = tempnam(sys_get_temp_dir(), 'psysh_shell_test_'); - unlink($dir); + $dir = \tempnam(\sys_get_temp_dir(), 'psysh_shell_test_'); + \unlink($dir); $defaults = [ 'configDir' => $dir, @@ -434,6 +437,6 @@ class ShellTest extends \PHPUnit\Framework\TestCase 'runtimeDir' => $dir, ]; - return new Configuration(array_merge($defaults, $config)); + return new Configuration(\array_merge($defaults, $config)); } } diff --git a/vendor/psy/psysh/test/SudoTest.php b/vendor/psy/psysh/test/SudoTest.php index 8ac07774..6123db04 100644 --- a/vendor/psy/psysh/test/SudoTest.php +++ b/vendor/psy/psysh/test/SudoTest.php @@ -17,7 +17,7 @@ class SudoTest extends \PHPUnit\Framework\TestCase { public function setUp() { - if (version_compare(PHP_VERSION, '7.1.0', '<')) { + if (\version_compare(PHP_VERSION, '7.1.0', '<')) { $this->markTestSkipped('YOLO'); } } diff --git a/vendor/psy/psysh/test/TabCompletion/AutoCompleterTest.php b/vendor/psy/psysh/test/TabCompletion/AutoCompleterTest.php index 25878046..d98d452c 100644 --- a/vendor/psy/psysh/test/TabCompletion/AutoCompleterTest.php +++ b/vendor/psy/psysh/test/TabCompletion/AutoCompleterTest.php @@ -62,7 +62,7 @@ class AutoCompleterTest extends \PHPUnit\Framework\TestCase $code = $tabCompletion->processCallback('', 0, [ 'line_buffer' => $line, 'point' => 0, - 'end' => strlen($line), + 'end' => \strlen($line), ]); foreach ($mustContain as $mc) { diff --git a/vendor/psy/psysh/test/Util/DocblockTest.php b/vendor/psy/psysh/test/Util/DocblockTest.php index 6fa775d9..82e12fed 100644 --- a/vendor/psy/psysh/test/Util/DocblockTest.php +++ b/vendor/psy/psysh/test/Util/DocblockTest.php @@ -41,7 +41,7 @@ class DocblockTest extends \PHPUnit\Framework\TestCase public function comments() { - if (defined('HHVM_VERSION')) { + if (\defined('HHVM_VERSION')) { $this->markTestSkipped('We have issues with PHPUnit mocks on HHVM.'); } diff --git a/vendor/psy/psysh/test/Util/MirrorTest.php b/vendor/psy/psysh/test/Util/MirrorTest.php index 09976bdf..585fffbb 100644 --- a/vendor/psy/psysh/test/Util/MirrorTest.php +++ b/vendor/psy/psysh/test/Util/MirrorTest.php @@ -36,7 +36,7 @@ class MirrorTest extends \PHPUnit\Framework\TestCase $this->assertInstanceOf('ReflectionObject', $refl); $refl = Mirror::get($this, 'FOO'); - if (version_compare(PHP_VERSION, '7.1.0', '>=')) { + if (\version_compare(PHP_VERSION, '7.1.0', '>=')) { $this->assertInstanceOf('ReflectionClassConstant', $refl); } else { $this->assertInstanceOf('Psy\Reflection\ReflectionClassConstant', $refl); diff --git a/vendor/psy/psysh/test/Util/StrTest.php b/vendor/psy/psysh/test/Util/StrTest.php index 2a58d9f9..4f99a79b 100644 --- a/vendor/psy/psysh/test/Util/StrTest.php +++ b/vendor/psy/psysh/test/Util/StrTest.php @@ -26,6 +26,6 @@ class StrTest extends \PHPUnit\Framework\TestCase public function unvisProvider() { //return require_once(__DIR__.'/../fixtures/unvis_fixtures.php'); - return json_decode(file_get_contents(__DIR__ . '/../fixtures/unvis_fixtures.json')); + return \json_decode(\file_get_contents(__DIR__ . '/../fixtures/unvis_fixtures.json')); } } diff --git a/vendor/psy/psysh/test/VersionUpdater/GitHubCheckerTest.php b/vendor/psy/psysh/test/VersionUpdater/GitHubCheckerTest.php index bbbd69cf..7d12d47d 100644 --- a/vendor/psy/psysh/test/VersionUpdater/GitHubCheckerTest.php +++ b/vendor/psy/psysh/test/VersionUpdater/GitHubCheckerTest.php @@ -52,13 +52,13 @@ class GitHubCheckerTest extends \PHPUnit\Framework\TestCase public function jsonResults() { return [ - [false, json_decode('{"tag_name":"v9.0.0"}')], - [true, json_decode('{"tag_name":"v' . Shell::VERSION . '"}')], - [true, json_decode('{"tag_name":"v0.0.1"}')], - [true, json_decode('{"tag_name":"v0.4.1-alpha"}')], - [true, json_decode('{"tag_name":"v0.4.2-beta3"}')], - [true, json_decode('{"tag_name":"v0.0.1"}')], - [true, json_decode('{"tag_name":""}')], + [false, \json_decode('{"tag_name":"v9.0.0"}')], + [true, \json_decode('{"tag_name":"v' . Shell::VERSION . '"}')], + [true, \json_decode('{"tag_name":"v0.0.1"}')], + [true, \json_decode('{"tag_name":"v0.4.1-alpha"}')], + [true, \json_decode('{"tag_name":"v0.4.2-beta3"}')], + [true, \json_decode('{"tag_name":"v0.0.1"}')], + [true, \json_decode('{"tag_name":""}')], ]; } @@ -71,12 +71,12 @@ class GitHubCheckerTest extends \PHPUnit\Framework\TestCase [null], [false], [true], - [json_decode('{"foo":"bar"}')], - [json_decode('{}')], - [json_decode('[]')], + [\json_decode('{"foo":"bar"}')], + [\json_decode('{}')], + [\json_decode('[]')], [[]], - [json_decode('{"tag_name":false"}')], - [json_decode('{"tag_name":true"}')], + [\json_decode('{"tag_name":false"}')], + [\json_decode('{"tag_name":true"}')], ]; } } diff --git a/vendor/psy/psysh/test/fixtures/config.php b/vendor/psy/psysh/test/fixtures/config.php index 4aa1f5fb..4c74b79d 100644 --- a/vendor/psy/psysh/test/fixtures/config.php +++ b/vendor/psy/psysh/test/fixtures/config.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -$config->setRuntimeDir(sys_get_temp_dir() . '/psysh_test/withconfig/temp'); +$config->setRuntimeDir(\sys_get_temp_dir() . '/psysh_test/withconfig/temp'); return [ 'useReadline' => true, diff --git a/vendor/psy/psysh/test/tools/gen_unvis_fixtures.py b/vendor/psy/psysh/test/tools/gen_unvis_fixtures.py old mode 100644 new mode 100755 diff --git a/vendor/psy/psysh/test/tools/vis.py b/vendor/psy/psysh/test/tools/vis.py old mode 100644 new mode 100755 diff --git a/vendor/ramsey/uuid/CHANGELOG.md b/vendor/ramsey/uuid/CHANGELOG.md index 86633261..3965fff2 100644 --- a/vendor/ramsey/uuid/CHANGELOG.md +++ b/vendor/ramsey/uuid/CHANGELOG.md @@ -1,5 +1,15 @@ # ramsey/uuid Changelog +## 3.8.0 + +_Released: 2018-07-19_ + + * Add support for determining MAC address on FreeBSD systems ([#212](https://github.com/ramsey/uuid/pull/212)) + * Add a polyfill for PHP ctype functions to support systems where the ctype functions are not part of the PHP build ([#223](https://github.com/ramsey/uuid/pull/223)) + * Improve validation to disallow UUIDs with a trailing newline character ([#225](https://github.com/ramsey/uuid/pull/225)) + * Add annotations for thrown exceptions for improved IDE hinting ([#232](https://github.com/ramsey/uuid/pull/232)) + * Improve documentation, testing, and project metadata (i.e. `.gitattributes`, etc.) + ## 3.7.3 _Released: 2018-01-19_ diff --git a/vendor/ramsey/uuid/composer.json b/vendor/ramsey/uuid/composer.json index ac842c8d..952120cd 100644 --- a/vendor/ramsey/uuid/composer.json +++ b/vendor/ramsey/uuid/composer.json @@ -26,21 +26,23 @@ }, "require": { "php": "^5.4 || ^7.0", - "paragonie/random_compat": "^1.0|^2.0" + "paragonie/random_compat": "^1.0|^2.0|9.99.99", + "symfony/polyfill-ctype": "^1.8" }, "require-dev": { - "moontoast/math": "^1.1", + "codeception/aspect-mock": "^1.0 | ~2.0.0", + "doctrine/annotations": "~1.2.0", + "goaop/framework": "1.0.0-alpha.2 | ^1.0 | ~2.1.0", "ircmaxell/random-lib": "^1.1", - "phpunit/phpunit": "^4.7|^5.0", - "squizlabs/php_codesniffer": "^2.3", "jakub-onderka/php-parallel-lint": "^0.9.0", "mockery/mockery": "^0.9.9", - "goaop/framework": "1.0.0-alpha.2 | ^1.0 | ^2.1", - "doctrine/annotations": "~1.2.0", - "codeception/aspect-mock": "^1.0 | ~2.0.0", - "php-mock/php-mock-phpunit": "^0.3|^1.1" + "moontoast/math": "^1.1", + "php-mock/php-mock-phpunit": "^0.3|^1.1", + "phpunit/phpunit": "^4.7|^5.0|^6.5", + "squizlabs/php_codesniffer": "^2.3" }, "suggest": { + "ext-ctype": "Provides support for PHP Ctype functions", "ircmaxell/random-lib": "Provides RandomLib for use with the RandomLibAdapter", "ext-libsodium": "Provides the PECL libsodium extension for use with the SodiumRandomGenerator", "ext-uuid": "Provides the PECL UUID extension for use with the PeclUuidTimeGenerator and PeclUuidRandomGenerator", @@ -71,5 +73,8 @@ "@phpunit", "@phpcs" ] + }, + "config": { + "sort-packages": true } } diff --git a/vendor/ramsey/uuid/docs/.gitignore b/vendor/ramsey/uuid/docs/.gitignore deleted file mode 100644 index 69fa449d..00000000 --- a/vendor/ramsey/uuid/docs/.gitignore +++ /dev/null @@ -1 +0,0 @@ -_build/ diff --git a/vendor/ramsey/uuid/docs/Makefile b/vendor/ramsey/uuid/docs/Makefile deleted file mode 100644 index f4bd287a..00000000 --- a/vendor/ramsey/uuid/docs/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -# Minimal makefile for Sphinx documentation -# - -# You can set these variables from the command line. -SPHINXOPTS = -SPHINXBUILD = sphinx-build -SPHINXPROJ = ramseyuuid -SOURCEDIR = . -BUILDDIR = _build - -# Put it first so that "make" without argument is like "make help". -help: - @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) - -.PHONY: help Makefile - -# Catch-all target: route all unknown targets to Sphinx using the new -# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). -%: Makefile - @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) \ No newline at end of file diff --git a/vendor/ramsey/uuid/docs/_static/.gitkeep b/vendor/ramsey/uuid/docs/_static/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/ramsey/uuid/docs/conf.py b/vendor/ramsey/uuid/docs/conf.py deleted file mode 100644 index 48984599..00000000 --- a/vendor/ramsey/uuid/docs/conf.py +++ /dev/null @@ -1,169 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# -# ramsey/uuid documentation build configuration file, created by -# sphinx-quickstart on Tue Jan 16 20:01:49 2018. -# -# This file is execfile()d with the current directory set to its -# containing dir. -# -# Note that not all possible configuration values are present in this -# autogenerated file. -# -# All configuration values have a default; values that are commented out -# serve to show the default. - -# If extensions (or modules to document with autodoc) are in another directory, -# add these directories to sys.path here. If the directory is relative to the -# documentation root, use os.path.abspath to make it absolute, like shown here. -# -# import os -# import sys -# sys.path.insert(0, os.path.abspath('.')) - - -# -- General configuration ------------------------------------------------ - -# If your documentation needs a minimal Sphinx version, state it here. -# -# needs_sphinx = '1.0' - -# Add any Sphinx extension module names here, as strings. They can be -# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom -# ones. -extensions = [] - -# Add any paths that contain templates here, relative to this directory. -templates_path = ['_templates'] - -# The suffix(es) of source filenames. -# You can specify multiple suffix as a list of string: -# -# source_suffix = ['.rst', '.md'] -source_suffix = '.rst' - -# The master toctree document. -master_doc = 'index' - -# General information about the project. -project = 'ramsey/uuid' -copyright = '2018, Ben Ramsey' -author = 'Ben Ramsey' - -# The version info for the project you're documenting, acts as replacement for -# |version| and |release|, also used in various other places throughout the -# built documents. -# -# The short X.Y version. -version = '3.7' -# The full version, including alpha/beta/rc tags. -release = '3.7' - -# The language for content autogenerated by Sphinx. Refer to documentation -# for a list of supported languages. -# -# This is also used if you do content translation via gettext catalogs. -# Usually you set "language" from the command line for these cases. -language = None - -# List of patterns, relative to source directory, that match files and -# directories to ignore when looking for source files. -# This patterns also effect to html_static_path and html_extra_path -exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] - -# The name of the Pygments (syntax highlighting) style to use. -pygments_style = 'sphinx' - -# If true, `todo` and `todoList` produce output, else they produce nothing. -todo_include_todos = False - - -# -- Options for HTML output ---------------------------------------------- - -# The theme to use for HTML and HTML Help pages. See the documentation for -# a list of builtin themes. -# -html_theme = 'alabaster' - -# Theme options are theme-specific and customize the look and feel of a theme -# further. For a list of options available for each theme, see the -# documentation. -# -# html_theme_options = {} - -# Add any paths that contain custom static files (such as style sheets) here, -# relative to this directory. They are copied after the builtin static files, -# so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['_static'] - -# Custom sidebar templates, must be a dictionary that maps document names -# to template names. -# -# This is required for the alabaster theme -# refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars -html_sidebars = { - '**': [ - 'relations.html', # needs 'show_related': True theme option to display - 'searchbox.html', - ] -} - - -# -- Options for HTMLHelp output ------------------------------------------ - -# Output file base name for HTML help builder. -htmlhelp_basename = 'ramseyuuiddoc' - - -# -- Options for LaTeX output --------------------------------------------- - -latex_elements = { - # The paper size ('letterpaper' or 'a4paper'). - # - # 'papersize': 'letterpaper', - - # The font size ('10pt', '11pt' or '12pt'). - # - # 'pointsize': '10pt', - - # Additional stuff for the LaTeX preamble. - # - # 'preamble': '', - - # Latex figure (float) alignment - # - # 'figure_align': 'htbp', -} - -# Grouping the document tree into LaTeX files. List of tuples -# (source start file, target name, title, -# author, documentclass [howto, manual, or own class]). -latex_documents = [ - (master_doc, 'ramseyuuid.tex', 'ramsey/uuid Documentation', - 'Ben Ramsey', 'manual'), -] - - -# -- Options for manual page output --------------------------------------- - -# One entry per manual page. List of tuples -# (source start file, name, description, authors, manual section). -man_pages = [ - (master_doc, 'ramseyuuid', 'ramsey/uuid Documentation', - [author], 1) -] - - -# -- Options for Texinfo output ------------------------------------------- - -# Grouping the document tree into Texinfo files. List of tuples -# (source start file, target name, title, author, -# dir menu entry, description, category) -texinfo_documents = [ - (master_doc, 'ramseyuuid', 'ramsey/uuid Documentation', - author, 'ramseyuuid', 'One line description of project.', - 'Miscellaneous'), -] - - - diff --git a/vendor/ramsey/uuid/docs/index.rst b/vendor/ramsey/uuid/docs/index.rst deleted file mode 100644 index 0a3d176c..00000000 --- a/vendor/ramsey/uuid/docs/index.rst +++ /dev/null @@ -1,19 +0,0 @@ -.. ramsey/uuid documentation master file, created by - sphinx-quickstart on Tue Jan 16 20:01:49 2018. - You can adapt this file completely to your liking, but it should at least - contain the root `toctree` directive. - -ramsey/uuid -=========== - -.. toctree:: - :maxdepth: 2 - :caption: Contents: - - - -Indices and tables -================== - -* :ref:`genindex` -* :ref:`search` diff --git a/vendor/ramsey/uuid/src/Codec/CodecInterface.php b/vendor/ramsey/uuid/src/Codec/CodecInterface.php index f0dde950..6ea20544 100644 --- a/vendor/ramsey/uuid/src/Codec/CodecInterface.php +++ b/vendor/ramsey/uuid/src/Codec/CodecInterface.php @@ -42,6 +42,7 @@ interface CodecInterface * * @param string $encodedUuid * @return UuidInterface + * @throws \Ramsey\Uuid\Exception\InvalidUuidStringException */ public function decode($encodedUuid); @@ -50,6 +51,8 @@ interface CodecInterface * * @param string $bytes * @return UuidInterface + * @throws \Ramsey\Uuid\Exception\InvalidUuidStringException + * @throws \InvalidArgumentException if string has not 16 characters */ public function decodeBytes($bytes); } diff --git a/vendor/ramsey/uuid/src/Codec/GuidStringCodec.php b/vendor/ramsey/uuid/src/Codec/GuidStringCodec.php index 380d94ef..864980b3 100644 --- a/vendor/ramsey/uuid/src/Codec/GuidStringCodec.php +++ b/vendor/ramsey/uuid/src/Codec/GuidStringCodec.php @@ -60,6 +60,7 @@ class GuidStringCodec extends StringCodec * * @param string $encodedUuid * @return UuidInterface + * @throws \Ramsey\Uuid\Exception\InvalidUuidStringException */ public function decode($encodedUuid) { @@ -75,6 +76,7 @@ class GuidStringCodec extends StringCodec * * @param string $bytes * @return UuidInterface + * @throws \Ramsey\Uuid\Exception\InvalidUuidStringException */ public function decodeBytes($bytes) { diff --git a/vendor/ramsey/uuid/src/Codec/OrderedTimeCodec.php b/vendor/ramsey/uuid/src/Codec/OrderedTimeCodec.php index cbbb75ea..3257759c 100644 --- a/vendor/ramsey/uuid/src/Codec/OrderedTimeCodec.php +++ b/vendor/ramsey/uuid/src/Codec/OrderedTimeCodec.php @@ -50,6 +50,7 @@ class OrderedTimeCodec extends StringCodec * * @param string $bytes * @return UuidInterface + * @throws \InvalidArgumentException if string has not 16 characters */ public function decodeBytes($bytes) { diff --git a/vendor/ramsey/uuid/src/Codec/StringCodec.php b/vendor/ramsey/uuid/src/Codec/StringCodec.php index 46181964..7f352065 100644 --- a/vendor/ramsey/uuid/src/Codec/StringCodec.php +++ b/vendor/ramsey/uuid/src/Codec/StringCodec.php @@ -74,6 +74,7 @@ class StringCodec implements CodecInterface * * @param string $encodedUuid * @return UuidInterface + * @throws \Ramsey\Uuid\Exception\InvalidUuidStringException */ public function decode($encodedUuid) { @@ -88,6 +89,7 @@ class StringCodec implements CodecInterface * * @param string $bytes * @return UuidInterface + * @throws \InvalidArgumentException if string has not 16 characters */ public function decodeBytes($bytes) { @@ -115,6 +117,7 @@ class StringCodec implements CodecInterface * * @param string $encodedUuid * @return array + * @throws \Ramsey\Uuid\Exception\InvalidUuidStringException */ protected function extractComponents($encodedUuid) { diff --git a/vendor/ramsey/uuid/src/Codec/TimestampFirstCombCodec.php b/vendor/ramsey/uuid/src/Codec/TimestampFirstCombCodec.php index c4434384..2c4ded89 100644 --- a/vendor/ramsey/uuid/src/Codec/TimestampFirstCombCodec.php +++ b/vendor/ramsey/uuid/src/Codec/TimestampFirstCombCodec.php @@ -60,6 +60,7 @@ class TimestampFirstCombCodec extends StringCodec * @param string $encodedUuid * * @return UuidInterface + * @throws \Ramsey\Uuid\Exception\InvalidUuidStringException */ public function decode($encodedUuid) { @@ -76,6 +77,7 @@ class TimestampFirstCombCodec extends StringCodec * @param string $bytes * * @return UuidInterface + * @throws \Ramsey\Uuid\Exception\InvalidUuidStringException */ public function decodeBytes($bytes) { diff --git a/vendor/ramsey/uuid/src/Converter/NumberConverterInterface.php b/vendor/ramsey/uuid/src/Converter/NumberConverterInterface.php index 673c1df3..9505e8c6 100644 --- a/vendor/ramsey/uuid/src/Converter/NumberConverterInterface.php +++ b/vendor/ramsey/uuid/src/Converter/NumberConverterInterface.php @@ -28,6 +28,7 @@ interface NumberConverterInterface * * @param string $hex The hexadecimal string representation to convert * @return mixed + * @throws \Ramsey\Uuid\Exception\UnsatisfiedDependencyException if `Moontoast\Math\BigNumber` is not present */ public function fromHex($hex); @@ -39,6 +40,7 @@ interface NumberConverterInterface * a true integer, a string integer, or a object representation that * this converter can understand * @return string Hexadecimal string + * @throws \Ramsey\Uuid\Exception\UnsatisfiedDependencyException if `Moontoast\Math\BigNumber` is not present */ public function toHex($integer); } diff --git a/vendor/ramsey/uuid/src/Converter/Time/DegradedTimeConverter.php b/vendor/ramsey/uuid/src/Converter/Time/DegradedTimeConverter.php index 46edbe78..b94589cd 100644 --- a/vendor/ramsey/uuid/src/Converter/Time/DegradedTimeConverter.php +++ b/vendor/ramsey/uuid/src/Converter/Time/DegradedTimeConverter.php @@ -30,7 +30,7 @@ class DegradedTimeConverter implements TimeConverterInterface * @param string $seconds * @param string $microSeconds * @return void - * @throws UnsatisfiedDependencyException + * @throws UnsatisfiedDependencyException if called on a 32-bit system and `Moontoast\Math\BigNumber` is not present */ public function calculateTime($seconds, $microSeconds) { diff --git a/vendor/ramsey/uuid/src/Converter/TimeConverterInterface.php b/vendor/ramsey/uuid/src/Converter/TimeConverterInterface.php index f0688367..382008ac 100644 --- a/vendor/ramsey/uuid/src/Converter/TimeConverterInterface.php +++ b/vendor/ramsey/uuid/src/Converter/TimeConverterInterface.php @@ -27,6 +27,8 @@ interface TimeConverterInterface * @param string $seconds * @param string $microSeconds * @return string[] An array guaranteed to contain `low`, `mid`, and `high` keys + * @throws \Ramsey\Uuid\Exception\UnsatisfiedDependencyException if called on a 32-bit system and + * `Moontoast\Math\BigNumber` is not present * @link http://tools.ietf.org/html/rfc4122#section-4.2.2 */ public function calculateTime($seconds, $microSeconds); diff --git a/vendor/ramsey/uuid/src/DegradedUuid.php b/vendor/ramsey/uuid/src/DegradedUuid.php index b596c388..bcf0be80 100644 --- a/vendor/ramsey/uuid/src/DegradedUuid.php +++ b/vendor/ramsey/uuid/src/DegradedUuid.php @@ -24,6 +24,9 @@ use Ramsey\Uuid\Exception\UnsupportedOperationException; */ class DegradedUuid extends Uuid { + /** + * @inheritdoc + */ public function getDateTime() { if ($this->getVersion() != 1) { diff --git a/vendor/ramsey/uuid/src/Generator/CombGenerator.php b/vendor/ramsey/uuid/src/Generator/CombGenerator.php index 1a427767..7a948231 100644 --- a/vendor/ramsey/uuid/src/Generator/CombGenerator.php +++ b/vendor/ramsey/uuid/src/Generator/CombGenerator.php @@ -53,6 +53,9 @@ class CombGenerator implements RandomGeneratorInterface * * @param integer $length The number of bytes of random binary data to generate * @return string A binary string + * @throws \Ramsey\Uuid\Exception\UnsatisfiedDependencyException if `Moontoast\Math\BigNumber` is not present + * @throws \InvalidArgumentException if length is not a positive integer + * @throws \Exception */ public function generate($length) { diff --git a/vendor/ramsey/uuid/src/Generator/DefaultTimeGenerator.php b/vendor/ramsey/uuid/src/Generator/DefaultTimeGenerator.php index f05d8183..c9969b3a 100644 --- a/vendor/ramsey/uuid/src/Generator/DefaultTimeGenerator.php +++ b/vendor/ramsey/uuid/src/Generator/DefaultTimeGenerator.php @@ -72,6 +72,10 @@ class DefaultTimeGenerator implements TimeGeneratorInterface * could arise when the clock is set backwards in time or if the node ID * changes. * @return string A binary string + * @throws \Ramsey\Uuid\Exception\UnsatisfiedDependencyException if called on a 32-bit system and + * `Moontoast\Math\BigNumber` is not present + * @throws \InvalidArgumentException + * @throws \Exception if it was not possible to gather sufficient entropy */ public function generate($node = null, $clockSeq = null) { @@ -111,6 +115,8 @@ class DefaultTimeGenerator implements TimeGeneratorInterface * * @param string|int $node A node value that may be used to override the node provider * @return string Hexadecimal representation of the node ID + * @throws \InvalidArgumentException + * @throws \Exception */ protected function getValidNode($node) { diff --git a/vendor/ramsey/uuid/src/Generator/RandomBytesGenerator.php b/vendor/ramsey/uuid/src/Generator/RandomBytesGenerator.php index 1e8392ab..aaa285df 100644 --- a/vendor/ramsey/uuid/src/Generator/RandomBytesGenerator.php +++ b/vendor/ramsey/uuid/src/Generator/RandomBytesGenerator.php @@ -28,6 +28,7 @@ class RandomBytesGenerator implements RandomGeneratorInterface * * @param integer $length The number of bytes of random binary data to generate * @return string A binary string + * @throws \Exception if it was not possible to gather sufficient entropy */ public function generate($length) { diff --git a/vendor/ramsey/uuid/src/Generator/RandomGeneratorInterface.php b/vendor/ramsey/uuid/src/Generator/RandomGeneratorInterface.php index 87ccbc95..3a1bcae7 100644 --- a/vendor/ramsey/uuid/src/Generator/RandomGeneratorInterface.php +++ b/vendor/ramsey/uuid/src/Generator/RandomGeneratorInterface.php @@ -25,6 +25,9 @@ interface RandomGeneratorInterface * * @param integer $length The number of bytes of random binary data to generate * @return string A binary string + * @throws \Ramsey\Uuid\Exception\UnsatisfiedDependencyException if `Moontoast\Math\BigNumber` is not present + * @throws \InvalidArgumentException + * @throws \Exception if it was not possible to gather sufficient entropy */ public function generate($length); } diff --git a/vendor/ramsey/uuid/src/Generator/TimeGeneratorInterface.php b/vendor/ramsey/uuid/src/Generator/TimeGeneratorInterface.php index 1a56d513..cb182ea0 100644 --- a/vendor/ramsey/uuid/src/Generator/TimeGeneratorInterface.php +++ b/vendor/ramsey/uuid/src/Generator/TimeGeneratorInterface.php @@ -30,6 +30,10 @@ interface TimeGeneratorInterface * could arise when the clock is set backwards in time or if the node ID * changes. * @return string A binary string + * @throws \Ramsey\Uuid\Exception\UnsatisfiedDependencyException if called on a 32-bit system and + * `Moontoast\Math\BigNumber` is not present + * @throws \InvalidArgumentException + * @throws \Exception if it was not possible to gather sufficient entropy */ public function generate($node = null, $clockSeq = null); } diff --git a/vendor/ramsey/uuid/src/Provider/Node/FallbackNodeProvider.php b/vendor/ramsey/uuid/src/Provider/Node/FallbackNodeProvider.php index e230e17a..289fddea 100644 --- a/vendor/ramsey/uuid/src/Provider/Node/FallbackNodeProvider.php +++ b/vendor/ramsey/uuid/src/Provider/Node/FallbackNodeProvider.php @@ -43,6 +43,7 @@ class FallbackNodeProvider implements NodeProviderInterface * and returning the first non-empty value found * * @return string System node ID as a hexadecimal string + * @throws \Exception */ public function getNode() { diff --git a/vendor/ramsey/uuid/src/Provider/Node/RandomNodeProvider.php b/vendor/ramsey/uuid/src/Provider/Node/RandomNodeProvider.php index 1018554e..76c570d7 100644 --- a/vendor/ramsey/uuid/src/Provider/Node/RandomNodeProvider.php +++ b/vendor/ramsey/uuid/src/Provider/Node/RandomNodeProvider.php @@ -28,6 +28,7 @@ class RandomNodeProvider implements NodeProviderInterface * Returns the system node ID * * @return string System node ID as a hexadecimal string + * @throws \Exception if it was not possible to gather sufficient entropy */ public function getNode() { diff --git a/vendor/ramsey/uuid/src/Provider/Node/SystemNodeProvider.php b/vendor/ramsey/uuid/src/Provider/Node/SystemNodeProvider.php index e1b28fcb..ae6a09ea 100644 --- a/vendor/ramsey/uuid/src/Provider/Node/SystemNodeProvider.php +++ b/vendor/ramsey/uuid/src/Provider/Node/SystemNodeProvider.php @@ -62,6 +62,10 @@ class SystemNodeProvider implements NodeProviderInterface */ protected function getIfconfig() { + if (strpos(strtolower(ini_get('disable_functions')), 'passthru') !== false) { + return ''; + } + ob_start(); switch (strtoupper(substr(php_uname('a'), 0, 3))) { case 'WIN': @@ -70,6 +74,9 @@ class SystemNodeProvider implements NodeProviderInterface case 'DAR': passthru('ifconfig 2>&1'); break; + case 'FRE': + passthru('netstat -i -f link 2>&1'); + break; case 'LIN': default: passthru('netstat -ie 2>&1'); @@ -88,17 +95,16 @@ class SystemNodeProvider implements NodeProviderInterface { $mac = false; - if (strtoupper(php_uname('s')) === "LINUX") { + if (strtoupper(php_uname('s')) === 'LINUX') { $addressPaths = glob('/sys/class/net/*/address', GLOB_NOSORT); if (empty($addressPaths)) { return false; } - $macs = array_map( - 'file_get_contents', - $addressPaths - ); + array_walk($addressPaths, function ($addressPath) use (&$macs) { + $macs[] = file_get_contents($addressPath); + }); $macs = array_map('trim', $macs); diff --git a/vendor/ramsey/uuid/src/Provider/NodeProviderInterface.php b/vendor/ramsey/uuid/src/Provider/NodeProviderInterface.php index 864e8404..14f747be 100644 --- a/vendor/ramsey/uuid/src/Provider/NodeProviderInterface.php +++ b/vendor/ramsey/uuid/src/Provider/NodeProviderInterface.php @@ -24,6 +24,7 @@ interface NodeProviderInterface * Returns the system node ID * * @return string System node ID as a hexadecimal string + * @throws \Exception if it was not possible to gather sufficient entropy */ public function getNode(); } diff --git a/vendor/ramsey/uuid/src/Uuid.php b/vendor/ramsey/uuid/src/Uuid.php index fa07aa54..45f9fa44 100644 --- a/vendor/ramsey/uuid/src/Uuid.php +++ b/vendor/ramsey/uuid/src/Uuid.php @@ -229,6 +229,7 @@ class Uuid implements UuidInterface * * @param string $serialized * @link http://php.net/manual/en/class.serializable.php + * @throws \Ramsey\Uuid\Exception\InvalidUuidStringException */ public function unserialize($serialized) { @@ -332,6 +333,9 @@ class Uuid implements UuidInterface return $this->converter; } + /** + * @inheritdoc + */ public function getDateTime() { if ($this->getVersion() != 1) { @@ -384,6 +388,9 @@ class Uuid implements UuidInterface return str_replace('-', '', $this->toString()); } + /** + * @inheritdoc + */ public function getInteger() { return $this->converter->fromHex($this->getHex()); @@ -393,6 +400,7 @@ class Uuid implements UuidInterface * Returns the least significant 64 bits of this UUID's 128 bit value. * * @return mixed Converted representation of the unsigned 64-bit integer value + * @throws \Ramsey\Uuid\Exception\UnsatisfiedDependencyException if `Moontoast\Math\BigNumber` is not present */ public function getLeastSignificantBits() { @@ -413,6 +421,7 @@ class Uuid implements UuidInterface * Returns the most significant 64 bits of this UUID's 128 bit value. * * @return mixed Converted representation of the unsigned 64-bit integer value + * @throws \Ramsey\Uuid\Exception\UnsatisfiedDependencyException if `Moontoast\Math\BigNumber` is not present */ public function getMostSignificantBits() { @@ -534,6 +543,9 @@ class Uuid implements UuidInterface return hexdec($this->getTimestampHex()); } + /** + * @inheritdoc + */ public function getTimestampHex() { if ($this->getVersion() != 1) { @@ -612,6 +624,8 @@ class Uuid implements UuidInterface * * @param string $bytes * @return UuidInterface + * @throws \Ramsey\Uuid\Exception\InvalidUuidStringException + * @throws \InvalidArgumentException */ public static function fromBytes($bytes) { @@ -623,6 +637,7 @@ class Uuid implements UuidInterface * * @param string $name A string that specifies a UUID * @return UuidInterface + * @throws \Ramsey\Uuid\Exception\InvalidUuidStringException */ public static function fromString($name) { @@ -634,6 +649,8 @@ class Uuid implements UuidInterface * * @param string $integer String representation of 128-bit integer * @return UuidInterface + * @throws \Ramsey\Uuid\Exception\UnsatisfiedDependencyException if `Moontoast\Math\BigNumber` is not present + * @throws \Ramsey\Uuid\Exception\InvalidUuidStringException */ public static function fromInteger($integer) { @@ -654,7 +671,7 @@ class Uuid implements UuidInterface return true; } - if (!preg_match('/' . self::VALID_PATTERN . '/', $uuid)) { + if (!preg_match('/' . self::VALID_PATTERN . '/D', $uuid)) { return false; } @@ -670,6 +687,10 @@ class Uuid implements UuidInterface * could arise when the clock is set backwards in time or if the node ID * changes. * @return UuidInterface + * @throws \Ramsey\Uuid\Exception\UnsatisfiedDependencyException if called on a 32-bit system and + * `Moontoast\Math\BigNumber` is not present + * @throws \InvalidArgumentException + * @throws \Exception if it was not possible to gather sufficient entropy */ public static function uuid1($node = null, $clockSeq = null) { @@ -683,6 +704,7 @@ class Uuid implements UuidInterface * @param string $ns The UUID namespace in which to create the named UUID * @param string $name The name to create a UUID for * @return UuidInterface + * @throws \Ramsey\Uuid\Exception\InvalidUuidStringException */ public static function uuid3($ns, $name) { @@ -693,6 +715,9 @@ class Uuid implements UuidInterface * Generate a version 4 (random) UUID. * * @return UuidInterface + * @throws \Ramsey\Uuid\Exception\UnsatisfiedDependencyException if `Moontoast\Math\BigNumber` is not present + * @throws \InvalidArgumentException + * @throws \Exception */ public static function uuid4() { @@ -706,6 +731,7 @@ class Uuid implements UuidInterface * @param string $ns The UUID namespace in which to create the named UUID * @param string $name The name to create a UUID for * @return UuidInterface + * @throws \Ramsey\Uuid\Exception\InvalidUuidStringException */ public static function uuid5($ns, $name) { diff --git a/vendor/ramsey/uuid/src/UuidFactory.php b/vendor/ramsey/uuid/src/UuidFactory.php index 77d2383c..99644d4b 100644 --- a/vendor/ramsey/uuid/src/UuidFactory.php +++ b/vendor/ramsey/uuid/src/UuidFactory.php @@ -180,17 +180,26 @@ class UuidFactory implements UuidFactoryInterface $this->uuidBuilder = $builder; } + /** + * @inheritdoc + */ public function fromBytes($bytes) { return $this->codec->decodeBytes($bytes); } + /** + * @inheritdoc + */ public function fromString($uuid) { $uuid = strtolower($uuid); return $this->codec->decode($uuid); } + /** + * @inheritdoc + */ public function fromInteger($integer) { $hex = $this->numberConverter->toHex($integer); @@ -199,6 +208,9 @@ class UuidFactory implements UuidFactoryInterface return $this->fromString($hex); } + /** + * @inheritdoc + */ public function uuid1($node = null, $clockSeq = null) { $bytes = $this->timeGenerator->generate($node, $clockSeq); @@ -207,11 +219,17 @@ class UuidFactory implements UuidFactoryInterface return $this->uuidFromHashedName($hex, 1); } + /** + * @inheritdoc + */ public function uuid3($ns, $name) { return $this->uuidFromNsAndName($ns, $name, 3, 'md5'); } + /** + * @inheritdoc + */ public function uuid4() { $bytes = $this->randomGenerator->generate(16); @@ -224,6 +242,9 @@ class UuidFactory implements UuidFactoryInterface return $this->uuidFromHashedName($hex, 4); } + /** + * @inheritdoc + */ public function uuid5($ns, $name) { return $this->uuidFromNsAndName($ns, $name, 5, 'sha1'); @@ -253,6 +274,7 @@ class UuidFactory implements UuidFactoryInterface * @param string $hashFunction The hash function to use when hashing together * the namespace and name * @return UuidInterface + * @throws \Ramsey\Uuid\Exception\InvalidUuidStringException */ protected function uuidFromNsAndName($ns, $name, $version, $hashFunction) { diff --git a/vendor/ramsey/uuid/src/UuidFactoryInterface.php b/vendor/ramsey/uuid/src/UuidFactoryInterface.php index 6895ff2c..a228f5bc 100644 --- a/vendor/ramsey/uuid/src/UuidFactoryInterface.php +++ b/vendor/ramsey/uuid/src/UuidFactoryInterface.php @@ -23,12 +23,16 @@ interface UuidFactoryInterface /** * Generate a version 1 UUID from a host ID, sequence number, and the current time. * - * @param int|string $node A 48-bit number representing the hardware address + * @param int|string|null $node A 48-bit number representing the hardware address * This number may be represented as an integer or a hexadecimal string. - * @param int $clockSeq A 14-bit number used to help avoid duplicates that + * @param int|null $clockSeq A 14-bit number used to help avoid duplicates that * could arise when the clock is set backwards in time or if the node ID * changes. * @return UuidInterface + * @throws \Ramsey\Uuid\Exception\UnsatisfiedDependencyException if called on a 32-bit system and + * `Moontoast\Math\BigNumber` is not present + * @throws \InvalidArgumentException + * @throws \Exception if it was not possible to gather sufficient entropy */ public function uuid1($node = null, $clockSeq = null); @@ -39,6 +43,7 @@ interface UuidFactoryInterface * @param string $ns The UUID namespace in which to create the named UUID * @param string $name The name to create a UUID for * @return UuidInterface + * @throws \Ramsey\Uuid\Exception\InvalidUuidStringException */ public function uuid3($ns, $name); @@ -46,6 +51,9 @@ interface UuidFactoryInterface * Generate a version 4 (random) UUID. * * @return UuidInterface + * @throws \Ramsey\Uuid\Exception\UnsatisfiedDependencyException if `Moontoast\Math\BigNumber` is not present + * @throws \InvalidArgumentException + * @throws \Exception */ public function uuid4(); @@ -56,6 +64,7 @@ interface UuidFactoryInterface * @param string $ns The UUID namespace in which to create the named UUID * @param string $name The name to create a UUID for * @return UuidInterface + * @throws \Ramsey\Uuid\Exception\InvalidUuidStringException */ public function uuid5($ns, $name); @@ -64,6 +73,8 @@ interface UuidFactoryInterface * * @param string $bytes A 16-byte string representation of a UUID * @return UuidInterface + * @throws \Ramsey\Uuid\Exception\InvalidUuidStringException + * @throws \InvalidArgumentException if string has not 16 characters */ public function fromBytes($bytes); @@ -72,6 +83,7 @@ interface UuidFactoryInterface * * @param string $uuid A string representation of a UUID * @return UuidInterface + * @throws \Ramsey\Uuid\Exception\InvalidUuidStringException */ public function fromString($uuid); @@ -84,6 +96,8 @@ interface UuidFactoryInterface * @param mixed $integer The integer to use when creating a `Uuid` from an * integer; may be of any type understood by the configured number converter * @return UuidInterface + * @throws \Ramsey\Uuid\Exception\UnsatisfiedDependencyException if `Moontoast\Math\BigNumber` is not present + * @throws \Ramsey\Uuid\Exception\InvalidUuidStringException */ public function fromInteger($integer); } diff --git a/vendor/ramsey/uuid/src/UuidInterface.php b/vendor/ramsey/uuid/src/UuidInterface.php index 792c32aa..ea3a46fb 100644 --- a/vendor/ramsey/uuid/src/UuidInterface.php +++ b/vendor/ramsey/uuid/src/UuidInterface.php @@ -123,6 +123,8 @@ interface UuidInterface extends \JsonSerializable, \Serializable * * @return \DateTime A PHP DateTime representation of the date * @throws UnsupportedOperationException If this UUID is not a version 1 UUID + * @throws \Ramsey\Uuid\Exception\UnsatisfiedDependencyException if called in a 32-bit system and + * `Moontoast\Math\BigNumber` is not present */ public function getDateTime(); @@ -131,6 +133,7 @@ interface UuidInterface extends \JsonSerializable, \Serializable * representation. * * @return mixed Converted representation of the unsigned 128-bit integer value + * @throws \Ramsey\Uuid\Exception\UnsatisfiedDependencyException if `Moontoast\Math\BigNumber` is not present */ public function getInteger(); diff --git a/vendor/sebastian/comparator/ChangeLog.md b/vendor/sebastian/comparator/ChangeLog.md index 37d1dd67..0328bf70 100644 --- a/vendor/sebastian/comparator/ChangeLog.md +++ b/vendor/sebastian/comparator/ChangeLog.md @@ -2,6 +2,12 @@ All notable changes are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles. +## [3.0.2] - 2018-07-12 + +### Changed + +* By default, `MockObjectComparator` is now tried before all other (default) comparators + ## [3.0.1] - 2018-06-14 ### Fixed @@ -44,6 +50,7 @@ All notable changes are documented in this file using the [Keep a CHANGELOG](htt * Added `SebastianBergmann\Comparator\Factory::reset()` to unregister all non-default comparators * Added support for `phpunit/phpunit-mock-objects` version `^5.0` +[3.0.2]: https://github.com/sebastianbergmann/comparator/compare/3.0.1...3.0.2 [3.0.1]: https://github.com/sebastianbergmann/comparator/compare/3.0.0...3.0.1 [3.0.0]: https://github.com/sebastianbergmann/comparator/compare/2.1.3...3.0.0 [2.1.3]: https://github.com/sebastianbergmann/comparator/compare/2.1.2...2.1.3 diff --git a/vendor/sebastian/comparator/src/Factory.php b/vendor/sebastian/comparator/src/Factory.php index eeb55a91..53d1c797 100644 --- a/vendor/sebastian/comparator/src/Factory.php +++ b/vendor/sebastian/comparator/src/Factory.php @@ -115,23 +115,23 @@ class Factory private function registerDefaultComparators() { - $this->registerDefaultComparator(new TypeComparator); - $this->registerDefaultComparator(new ScalarComparator); - $this->registerDefaultComparator(new NumericComparator); - $this->registerDefaultComparator(new DoubleComparator); - $this->registerDefaultComparator(new ArrayComparator); - $this->registerDefaultComparator(new ResourceComparator); - $this->registerDefaultComparator(new ObjectComparator); - $this->registerDefaultComparator(new ExceptionComparator); - $this->registerDefaultComparator(new SplObjectStorageComparator); - $this->registerDefaultComparator(new DOMNodeComparator); $this->registerDefaultComparator(new MockObjectComparator); $this->registerDefaultComparator(new DateTimeComparator); + $this->registerDefaultComparator(new DOMNodeComparator); + $this->registerDefaultComparator(new SplObjectStorageComparator); + $this->registerDefaultComparator(new ExceptionComparator); + $this->registerDefaultComparator(new ObjectComparator); + $this->registerDefaultComparator(new ResourceComparator); + $this->registerDefaultComparator(new ArrayComparator); + $this->registerDefaultComparator(new DoubleComparator); + $this->registerDefaultComparator(new NumericComparator); + $this->registerDefaultComparator(new ScalarComparator); + $this->registerDefaultComparator(new TypeComparator); } private function registerDefaultComparator(Comparator $comparator) { - \array_unshift($this->defaultComparators, $comparator); + $this->defaultComparators[] = $comparator; $comparator->setFactory($this); } diff --git a/vendor/sebastian/comparator/src/NumericComparator.php b/vendor/sebastian/comparator/src/NumericComparator.php index 386218e7..8a03ffcf 100644 --- a/vendor/sebastian/comparator/src/NumericComparator.php +++ b/vendor/sebastian/comparator/src/NumericComparator.php @@ -45,7 +45,7 @@ class NumericComparator extends ScalarComparator public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = false, $ignoreCase = false) { if (\is_infinite($actual) && \is_infinite($expected)) { - return; + return; // @codeCoverageIgnore } if ((\is_infinite($actual) xor \is_infinite($expected)) || diff --git a/vendor/sebastian/comparator/tests/ArrayComparatorTest.php b/vendor/sebastian/comparator/tests/ArrayComparatorTest.php index 973aa16b..25906bb5 100644 --- a/vendor/sebastian/comparator/tests/ArrayComparatorTest.php +++ b/vendor/sebastian/comparator/tests/ArrayComparatorTest.php @@ -12,20 +12,20 @@ namespace SebastianBergmann\Comparator; use PHPUnit\Framework\TestCase; /** - * @coversDefaultClass SebastianBergmann\Comparator\ArrayComparator + * @covers \SebastianBergmann\Comparator\ArrayComparator * - * @uses SebastianBergmann\Comparator\Comparator - * @uses SebastianBergmann\Comparator\Factory - * @uses SebastianBergmann\Comparator\ComparisonFailure + * @uses \SebastianBergmann\Comparator\Comparator + * @uses \SebastianBergmann\Comparator\Factory + * @uses \SebastianBergmann\Comparator\ComparisonFailure */ -class ArrayComparatorTest extends TestCase +final class ArrayComparatorTest extends TestCase { /** * @var ArrayComparator */ private $comparator; - protected function setUp() + protected function setUp(): void { $this->comparator = new ArrayComparator; $this->comparator->setFactory(new Factory); @@ -116,10 +116,7 @@ class ArrayComparatorTest extends TestCase ]; } - /** - * @covers ::accepts - */ - public function testAcceptsSucceeds() + public function testAcceptsSucceeds(): void { $this->assertTrue( $this->comparator->accepts([], []) @@ -127,10 +124,9 @@ class ArrayComparatorTest extends TestCase } /** - * @covers ::accepts * @dataProvider acceptsFailsProvider */ - public function testAcceptsFails($expected, $actual) + public function testAcceptsFails($expected, $actual): void { $this->assertFalse( $this->comparator->accepts($expected, $actual) @@ -138,10 +134,9 @@ class ArrayComparatorTest extends TestCase } /** - * @covers ::assertEquals * @dataProvider assertEqualsSucceedsProvider */ - public function testAssertEqualsSucceeds($expected, $actual, $delta = 0.0, $canonicalize = false) + public function testAssertEqualsSucceeds($expected, $actual, $delta = 0.0, $canonicalize = false): void { $exception = null; @@ -154,10 +149,9 @@ class ArrayComparatorTest extends TestCase } /** - * @covers ::assertEquals * @dataProvider assertEqualsFailsProvider */ - public function testAssertEqualsFails($expected, $actual, $delta = 0.0, $canonicalize = false) + public function testAssertEqualsFails($expected, $actual, $delta = 0.0, $canonicalize = false): void { $this->expectException(ComparisonFailure::class); $this->expectExceptionMessage('Failed asserting that two arrays are equal'); diff --git a/vendor/sebastian/comparator/tests/ComparisonFailureTest.php b/vendor/sebastian/comparator/tests/ComparisonFailureTest.php index df2be11c..3b438b76 100644 --- a/vendor/sebastian/comparator/tests/ComparisonFailureTest.php +++ b/vendor/sebastian/comparator/tests/ComparisonFailureTest.php @@ -12,11 +12,13 @@ namespace SebastianBergmann\Comparator; use PHPUnit\Framework\TestCase; /** - * @covers SebastianBergmann\Comparator\ComparisonFailure + * @covers \SebastianBergmann\Comparator\ComparisonFailure + * + * @uses \SebastianBergmann\Comparator\Factory */ final class ComparisonFailureTest extends TestCase { - public function testComparisonFailure() + public function testComparisonFailure(): void { $actual = "\nB\n"; $expected = "\nA\n"; @@ -48,7 +50,7 @@ final class ComparisonFailureTest extends TestCase $this->assertSame($message . $diff, $failure->toString()); } - public function testDiffNotPossible() + public function testDiffNotPossible(): void { $failure = new ComparisonFailure('a', 'b', false, false, true, 'test'); $this->assertSame('', $failure->getDiff()); diff --git a/vendor/sebastian/comparator/tests/DOMNodeComparatorTest.php b/vendor/sebastian/comparator/tests/DOMNodeComparatorTest.php index b4c0060d..18451e0a 100644 --- a/vendor/sebastian/comparator/tests/DOMNodeComparatorTest.php +++ b/vendor/sebastian/comparator/tests/DOMNodeComparatorTest.php @@ -14,17 +14,20 @@ use DOMNode; use PHPUnit\Framework\TestCase; /** - * @coversDefaultClass SebastianBergmann\Comparator\DOMNodeComparator + * @covers \SebastianBergmann\Comparator\DOMNodeComparator * - * @uses SebastianBergmann\Comparator\Comparator - * @uses SebastianBergmann\Comparator\Factory - * @uses SebastianBergmann\Comparator\ComparisonFailure + * @uses \SebastianBergmann\Comparator\Comparator + * @uses \SebastianBergmann\Comparator\Factory + * @uses \SebastianBergmann\Comparator\ComparisonFailure */ -class DOMNodeComparatorTest extends TestCase +final class DOMNodeComparatorTest extends TestCase { + /** + * @var DOMNodeComparator + */ private $comparator; - protected function setUp() + protected function setUp(): void { $this->comparator = new DOMNodeComparator; } @@ -119,10 +122,9 @@ class DOMNodeComparatorTest extends TestCase } /** - * @covers ::accepts * @dataProvider acceptsSucceedsProvider */ - public function testAcceptsSucceeds($expected, $actual) + public function testAcceptsSucceeds($expected, $actual): void { $this->assertTrue( $this->comparator->accepts($expected, $actual) @@ -130,10 +132,9 @@ class DOMNodeComparatorTest extends TestCase } /** - * @covers ::accepts * @dataProvider acceptsFailsProvider */ - public function testAcceptsFails($expected, $actual) + public function testAcceptsFails($expected, $actual): void { $this->assertFalse( $this->comparator->accepts($expected, $actual) @@ -141,12 +142,9 @@ class DOMNodeComparatorTest extends TestCase } /** - * @covers ::assertEquals * @dataProvider assertEqualsSucceedsProvider - * - * @param bool $ignoreCase */ - public function testAssertEqualsSucceeds($expected, $actual, $ignoreCase = false) + public function testAssertEqualsSucceeds($expected, $actual, $ignoreCase = false): void { $exception = null; @@ -161,10 +159,9 @@ class DOMNodeComparatorTest extends TestCase } /** - * @covers ::assertEquals * @dataProvider assertEqualsFailsProvider */ - public function testAssertEqualsFails($expected, $actual) + public function testAssertEqualsFails($expected, $actual): void { $this->expectException(ComparisonFailure::class); $this->expectExceptionMessage('Failed asserting that two DOM'); diff --git a/vendor/sebastian/comparator/tests/DateTimeComparatorTest.php b/vendor/sebastian/comparator/tests/DateTimeComparatorTest.php index d3501a1d..41e10861 100644 --- a/vendor/sebastian/comparator/tests/DateTimeComparatorTest.php +++ b/vendor/sebastian/comparator/tests/DateTimeComparatorTest.php @@ -15,20 +15,20 @@ use DateTimeZone; use PHPUnit\Framework\TestCase; /** - * @coversDefaultClass SebastianBergmann\Comparator\DateTimeComparator + * @covers \SebastianBergmann\Comparator\DateTimeComparator * - * @uses SebastianBergmann\Comparator\Comparator - * @uses SebastianBergmann\Comparator\Factory - * @uses SebastianBergmann\Comparator\ComparisonFailure + * @uses \SebastianBergmann\Comparator\Comparator + * @uses \SebastianBergmann\Comparator\Factory + * @uses \SebastianBergmann\Comparator\ComparisonFailure */ -class DateTimeComparatorTest extends TestCase +final class DateTimeComparatorTest extends TestCase { /** * @var DateTimeComparator */ private $comparator; - protected function setUp() + protected function setUp(): void { $this->comparator = new DateTimeComparator; } @@ -150,10 +150,7 @@ class DateTimeComparatorTest extends TestCase ]; } - /** - * @covers ::accepts - */ - public function testAcceptsSucceeds() + public function testAcceptsSucceeds(): void { $this->assertTrue( $this->comparator->accepts( @@ -164,10 +161,9 @@ class DateTimeComparatorTest extends TestCase } /** - * @covers ::accepts * @dataProvider acceptsFailsProvider */ - public function testAcceptsFails($expected, $actual) + public function testAcceptsFails($expected, $actual): void { $this->assertFalse( $this->comparator->accepts($expected, $actual) @@ -175,10 +171,9 @@ class DateTimeComparatorTest extends TestCase } /** - * @covers ::assertEquals * @dataProvider assertEqualsSucceedsProvider */ - public function testAssertEqualsSucceeds($expected, $actual, $delta = 0.0) + public function testAssertEqualsSucceeds($expected, $actual, $delta = 0.0): void { $exception = null; @@ -191,10 +186,9 @@ class DateTimeComparatorTest extends TestCase } /** - * @covers ::assertEquals * @dataProvider assertEqualsFailsProvider */ - public function testAssertEqualsFails($expected, $actual, $delta = 0.0) + public function testAssertEqualsFails($expected, $actual, $delta = 0.0): void { $this->expectException(ComparisonFailure::class); $this->expectExceptionMessage('Failed asserting that two DateTime objects are equal.'); @@ -202,20 +196,12 @@ class DateTimeComparatorTest extends TestCase $this->comparator->assertEquals($expected, $actual, $delta); } - /** - * @requires PHP 5.5 - * @covers ::accepts - */ - public function testAcceptsDateTimeInterface() + public function testAcceptsDateTimeInterface(): void { $this->assertTrue($this->comparator->accepts(new DateTime, new DateTimeImmutable)); } - /** - * @requires PHP 5.5 - * @covers ::assertEquals - */ - public function testSupportsDateTimeInterface() + public function testSupportsDateTimeInterface(): void { $this->assertNull( $this->comparator->assertEquals( diff --git a/vendor/sebastian/comparator/tests/DoubleComparatorTest.php b/vendor/sebastian/comparator/tests/DoubleComparatorTest.php index 5968120f..1a577a21 100644 --- a/vendor/sebastian/comparator/tests/DoubleComparatorTest.php +++ b/vendor/sebastian/comparator/tests/DoubleComparatorTest.php @@ -12,17 +12,20 @@ namespace SebastianBergmann\Comparator; use PHPUnit\Framework\TestCase; /** - * @coversDefaultClass SebastianBergmann\Comparator\DoubleComparator + * @covers \SebastianBergmann\Comparator\DoubleComparator * - * @uses SebastianBergmann\Comparator\Comparator - * @uses SebastianBergmann\Comparator\Factory - * @uses SebastianBergmann\Comparator\ComparisonFailure + * @uses \SebastianBergmann\Comparator\Comparator + * @uses \SebastianBergmann\Comparator\Factory + * @uses \SebastianBergmann\Comparator\ComparisonFailure */ -class DoubleComparatorTest extends TestCase +final class DoubleComparatorTest extends TestCase { + /** + * @var DoubleComparator + */ private $comparator; - protected function setUp() + protected function setUp(): void { $this->comparator = new DoubleComparator; } @@ -85,10 +88,9 @@ class DoubleComparatorTest extends TestCase } /** - * @covers ::accepts * @dataProvider acceptsSucceedsProvider */ - public function testAcceptsSucceeds($expected, $actual) + public function testAcceptsSucceeds($expected, $actual): void { $this->assertTrue( $this->comparator->accepts($expected, $actual) @@ -96,10 +98,9 @@ class DoubleComparatorTest extends TestCase } /** - * @covers ::accepts * @dataProvider acceptsFailsProvider */ - public function testAcceptsFails($expected, $actual) + public function testAcceptsFails($expected, $actual): void { $this->assertFalse( $this->comparator->accepts($expected, $actual) @@ -107,10 +108,9 @@ class DoubleComparatorTest extends TestCase } /** - * @covers ::assertEquals * @dataProvider assertEqualsSucceedsProvider */ - public function testAssertEqualsSucceeds($expected, $actual, $delta = 0.0) + public function testAssertEqualsSucceeds($expected, $actual, $delta = 0.0): void { $exception = null; @@ -123,10 +123,9 @@ class DoubleComparatorTest extends TestCase } /** - * @covers ::assertEquals * @dataProvider assertEqualsFailsProvider */ - public function testAssertEqualsFails($expected, $actual, $delta = 0.0) + public function testAssertEqualsFails($expected, $actual, $delta = 0.0): void { $this->expectException(ComparisonFailure::class); $this->expectExceptionMessage('matches expected'); diff --git a/vendor/sebastian/comparator/tests/ExceptionComparatorTest.php b/vendor/sebastian/comparator/tests/ExceptionComparatorTest.php index deefd3b2..12330eaa 100644 --- a/vendor/sebastian/comparator/tests/ExceptionComparatorTest.php +++ b/vendor/sebastian/comparator/tests/ExceptionComparatorTest.php @@ -14,17 +14,20 @@ use PHPUnit\Framework\TestCase; use RuntimeException; /** - * @coversDefaultClass SebastianBergmann\Comparator\ExceptionComparator + * @covers \SebastianBergmann\Comparator\ExceptionComparator * - * @uses SebastianBergmann\Comparator\Comparator - * @uses SebastianBergmann\Comparator\Factory - * @uses SebastianBergmann\Comparator\ComparisonFailure + * @uses \SebastianBergmann\Comparator\Comparator + * @uses \SebastianBergmann\Comparator\Factory + * @uses \SebastianBergmann\Comparator\ComparisonFailure */ -class ExceptionComparatorTest extends TestCase +final class ExceptionComparatorTest extends TestCase { + /** + * @var ExceptionComparator + */ private $comparator; - protected function setUp() + protected function setUp(): void { $this->comparator = new ExceptionComparator; $this->comparator->setFactory(new Factory); @@ -86,10 +89,9 @@ class ExceptionComparatorTest extends TestCase } /** - * @covers ::accepts * @dataProvider acceptsSucceedsProvider */ - public function testAcceptsSucceeds($expected, $actual) + public function testAcceptsSucceeds($expected, $actual): void { $this->assertTrue( $this->comparator->accepts($expected, $actual) @@ -97,10 +99,9 @@ class ExceptionComparatorTest extends TestCase } /** - * @covers ::accepts * @dataProvider acceptsFailsProvider */ - public function testAcceptsFails($expected, $actual) + public function testAcceptsFails($expected, $actual): void { $this->assertFalse( $this->comparator->accepts($expected, $actual) @@ -108,10 +109,9 @@ class ExceptionComparatorTest extends TestCase } /** - * @covers ::assertEquals * @dataProvider assertEqualsSucceedsProvider */ - public function testAssertEqualsSucceeds($expected, $actual) + public function testAssertEqualsSucceeds($expected, $actual): void { $exception = null; @@ -124,10 +124,9 @@ class ExceptionComparatorTest extends TestCase } /** - * @covers ::assertEquals * @dataProvider assertEqualsFailsProvider */ - public function testAssertEqualsFails($expected, $actual, $message) + public function testAssertEqualsFails($expected, $actual, $message): void { $this->expectException(ComparisonFailure::class); $this->expectExceptionMessage($message); diff --git a/vendor/sebastian/comparator/tests/FactoryTest.php b/vendor/sebastian/comparator/tests/FactoryTest.php index f6a8fa72..82f53433 100644 --- a/vendor/sebastian/comparator/tests/FactoryTest.php +++ b/vendor/sebastian/comparator/tests/FactoryTest.php @@ -12,13 +12,13 @@ namespace SebastianBergmann\Comparator; use PHPUnit\Framework\TestCase; /** - * @coversDefaultClass SebastianBergmann\Comparator\Factory + * @covers \SebastianBergmann\Comparator\Factory * - * @uses SebastianBergmann\Comparator\Comparator - * @uses SebastianBergmann\Comparator\Factory - * @uses SebastianBergmann\Comparator\ComparisonFailure + * @uses \SebastianBergmann\Comparator\Comparator + * @uses \SebastianBergmann\Comparator\Factory + * @uses \SebastianBergmann\Comparator\ComparisonFailure */ -class FactoryTest extends TestCase +final class FactoryTest extends TestCase { public function instanceProvider() { @@ -69,20 +69,15 @@ class FactoryTest extends TestCase /** * @dataProvider instanceProvider - * @covers ::getComparatorFor - * @covers ::__construct */ - public function testGetComparatorFor($a, $b, $expected) + public function testGetComparatorFor($a, $b, $expected): void { $factory = new Factory; $actual = $factory->getComparatorFor($a, $b); $this->assertInstanceOf($expected, $actual); } - /** - * @covers ::register - */ - public function testRegister() + public function testRegister(): void { $comparator = new TestClassComparator; @@ -98,10 +93,7 @@ class FactoryTest extends TestCase $this->assertInstanceOf($expected, $actual); } - /** - * @covers ::unregister - */ - public function testUnregister() + public function testUnregister(): void { $comparator = new TestClassComparator; @@ -117,7 +109,7 @@ class FactoryTest extends TestCase $this->assertInstanceOf($expected, $actual); } - public function testIsSingleton() + public function testIsSingleton(): void { $f = Factory::getInstance(); $this->assertSame($f, Factory::getInstance()); diff --git a/vendor/sebastian/comparator/tests/MockObjectComparatorTest.php b/vendor/sebastian/comparator/tests/MockObjectComparatorTest.php index 6d0be008..922e9d69 100644 --- a/vendor/sebastian/comparator/tests/MockObjectComparatorTest.php +++ b/vendor/sebastian/comparator/tests/MockObjectComparatorTest.php @@ -13,17 +13,20 @@ use PHPUnit\Framework\TestCase; use stdClass; /** - * @coversDefaultClass SebastianBergmann\Comparator\MockObjectComparator + * @covers \SebastianBergmann\Comparator\MockObjectComparator * - * @uses SebastianBergmann\Comparator\Comparator - * @uses SebastianBergmann\Comparator\Factory - * @uses SebastianBergmann\Comparator\ComparisonFailure + * @uses \SebastianBergmann\Comparator\Comparator + * @uses \SebastianBergmann\Comparator\Factory + * @uses \SebastianBergmann\Comparator\ComparisonFailure */ -class MockObjectComparatorTest extends TestCase +final class MockObjectComparatorTest extends TestCase { + /** + * @var MockObjectComparator + */ private $comparator; - protected function setUp() + protected function setUp(): void { $this->comparator = new MockObjectComparator; $this->comparator->setFactory(new Factory); @@ -118,10 +121,9 @@ class MockObjectComparatorTest extends TestCase } /** - * @covers ::accepts * @dataProvider acceptsSucceedsProvider */ - public function testAcceptsSucceeds($expected, $actual) + public function testAcceptsSucceeds($expected, $actual): void { $this->assertTrue( $this->comparator->accepts($expected, $actual) @@ -129,10 +131,9 @@ class MockObjectComparatorTest extends TestCase } /** - * @covers ::accepts * @dataProvider acceptsFailsProvider */ - public function testAcceptsFails($expected, $actual) + public function testAcceptsFails($expected, $actual): void { $this->assertFalse( $this->comparator->accepts($expected, $actual) @@ -140,10 +141,9 @@ class MockObjectComparatorTest extends TestCase } /** - * @covers ::assertEquals * @dataProvider assertEqualsSucceedsProvider */ - public function testAssertEqualsSucceeds($expected, $actual, $delta = 0.0) + public function testAssertEqualsSucceeds($expected, $actual, $delta = 0.0): void { $exception = null; @@ -156,10 +156,9 @@ class MockObjectComparatorTest extends TestCase } /** - * @covers ::assertEquals * @dataProvider assertEqualsFailsProvider */ - public function testAssertEqualsFails($expected, $actual, $message, $delta = 0.0) + public function testAssertEqualsFails($expected, $actual, $message, $delta = 0.0): void { $this->expectException(ComparisonFailure::class); $this->expectExceptionMessage($message); diff --git a/vendor/sebastian/comparator/tests/NumericComparatorTest.php b/vendor/sebastian/comparator/tests/NumericComparatorTest.php index db0e5f6a..504172f4 100644 --- a/vendor/sebastian/comparator/tests/NumericComparatorTest.php +++ b/vendor/sebastian/comparator/tests/NumericComparatorTest.php @@ -12,17 +12,20 @@ namespace SebastianBergmann\Comparator; use PHPUnit\Framework\TestCase; /** - * @coversDefaultClass SebastianBergmann\Comparator\NumericComparator + * @covers \SebastianBergmann\Comparator\NumericComparator * - * @uses SebastianBergmann\Comparator\Comparator - * @uses SebastianBergmann\Comparator\Factory - * @uses SebastianBergmann\Comparator\ComparisonFailure + * @uses \SebastianBergmann\Comparator\Comparator + * @uses \SebastianBergmann\Comparator\Factory + * @uses \SebastianBergmann\Comparator\ComparisonFailure */ -class NumericComparatorTest extends TestCase +final class NumericComparatorTest extends TestCase { + /** + * @var NumericComparator + */ private $comparator; - protected function setUp() + protected function setUp(): void { $this->comparator = new NumericComparator; } @@ -73,10 +76,9 @@ class NumericComparatorTest extends TestCase } /** - * @covers ::accepts * @dataProvider acceptsSucceedsProvider */ - public function testAcceptsSucceeds($expected, $actual) + public function testAcceptsSucceeds($expected, $actual): void { $this->assertTrue( $this->comparator->accepts($expected, $actual) @@ -84,10 +86,9 @@ class NumericComparatorTest extends TestCase } /** - * @covers ::accepts * @dataProvider acceptsFailsProvider */ - public function testAcceptsFails($expected, $actual) + public function testAcceptsFails($expected, $actual): void { $this->assertFalse( $this->comparator->accepts($expected, $actual) @@ -95,10 +96,9 @@ class NumericComparatorTest extends TestCase } /** - * @covers ::assertEquals * @dataProvider assertEqualsSucceedsProvider */ - public function testAssertEqualsSucceeds($expected, $actual, $delta = 0.0) + public function testAssertEqualsSucceeds($expected, $actual, $delta = 0.0): void { $exception = null; @@ -111,10 +111,9 @@ class NumericComparatorTest extends TestCase } /** - * @covers ::assertEquals * @dataProvider assertEqualsFailsProvider */ - public function testAssertEqualsFails($expected, $actual, $delta = 0.0) + public function testAssertEqualsFails($expected, $actual, $delta = 0.0): void { $this->expectException(ComparisonFailure::class); $this->expectExceptionMessage('matches expected'); diff --git a/vendor/sebastian/comparator/tests/ObjectComparatorTest.php b/vendor/sebastian/comparator/tests/ObjectComparatorTest.php index 8212007a..30ef2306 100644 --- a/vendor/sebastian/comparator/tests/ObjectComparatorTest.php +++ b/vendor/sebastian/comparator/tests/ObjectComparatorTest.php @@ -13,17 +13,20 @@ use PHPUnit\Framework\TestCase; use stdClass; /** - * @coversDefaultClass SebastianBergmann\Comparator\ObjectComparator + * @covers \SebastianBergmann\Comparator\ObjectComparator * - * @uses SebastianBergmann\Comparator\Comparator - * @uses SebastianBergmann\Comparator\Factory - * @uses SebastianBergmann\Comparator\ComparisonFailure + * @uses \SebastianBergmann\Comparator\Comparator + * @uses \SebastianBergmann\Comparator\Factory + * @uses \SebastianBergmann\Comparator\ComparisonFailure */ -class ObjectComparatorTest extends TestCase +final class ObjectComparatorTest extends TestCase { + /** + * @var ObjectComparator + */ private $comparator; - protected function setUp() + protected function setUp(): void { $this->comparator = new ObjectComparator; $this->comparator->setFactory(new Factory); @@ -100,10 +103,9 @@ class ObjectComparatorTest extends TestCase } /** - * @covers ::accepts * @dataProvider acceptsSucceedsProvider */ - public function testAcceptsSucceeds($expected, $actual) + public function testAcceptsSucceeds($expected, $actual): void { $this->assertTrue( $this->comparator->accepts($expected, $actual) @@ -111,10 +113,9 @@ class ObjectComparatorTest extends TestCase } /** - * @covers ::accepts * @dataProvider acceptsFailsProvider */ - public function testAcceptsFails($expected, $actual) + public function testAcceptsFails($expected, $actual): void { $this->assertFalse( $this->comparator->accepts($expected, $actual) @@ -122,10 +123,9 @@ class ObjectComparatorTest extends TestCase } /** - * @covers ::assertEquals * @dataProvider assertEqualsSucceedsProvider */ - public function testAssertEqualsSucceeds($expected, $actual, $delta = 0.0) + public function testAssertEqualsSucceeds($expected, $actual, $delta = 0.0): void { $exception = null; @@ -138,10 +138,9 @@ class ObjectComparatorTest extends TestCase } /** - * @covers ::assertEquals * @dataProvider assertEqualsFailsProvider */ - public function testAssertEqualsFails($expected, $actual, $message, $delta = 0.0) + public function testAssertEqualsFails($expected, $actual, $message, $delta = 0.0): void { $this->expectException(ComparisonFailure::class); $this->expectExceptionMessage($message); diff --git a/vendor/sebastian/comparator/tests/ResourceComparatorTest.php b/vendor/sebastian/comparator/tests/ResourceComparatorTest.php index de1da944..158aaa90 100644 --- a/vendor/sebastian/comparator/tests/ResourceComparatorTest.php +++ b/vendor/sebastian/comparator/tests/ResourceComparatorTest.php @@ -12,17 +12,20 @@ namespace SebastianBergmann\Comparator; use PHPUnit\Framework\TestCase; /** - * @coversDefaultClass SebastianBergmann\Comparator\ResourceComparator + * @covers \SebastianBergmann\Comparator\ResourceComparator * - * @uses SebastianBergmann\Comparator\Comparator - * @uses SebastianBergmann\Comparator\Factory - * @uses SebastianBergmann\Comparator\ComparisonFailure + * @uses \SebastianBergmann\Comparator\Comparator + * @uses \SebastianBergmann\Comparator\Factory + * @uses \SebastianBergmann\Comparator\ComparisonFailure */ -class ResourceComparatorTest extends TestCase +final class ResourceComparatorTest extends TestCase { + /** + * @var ResourceComparator + */ private $comparator; - protected function setUp() + protected function setUp(): void { $this->comparator = new ResourceComparator; } @@ -73,10 +76,9 @@ class ResourceComparatorTest extends TestCase } /** - * @covers ::accepts * @dataProvider acceptsSucceedsProvider */ - public function testAcceptsSucceeds($expected, $actual) + public function testAcceptsSucceeds($expected, $actual): void { $this->assertTrue( $this->comparator->accepts($expected, $actual) @@ -84,10 +86,9 @@ class ResourceComparatorTest extends TestCase } /** - * @covers ::accepts * @dataProvider acceptsFailsProvider */ - public function testAcceptsFails($expected, $actual) + public function testAcceptsFails($expected, $actual): void { $this->assertFalse( $this->comparator->accepts($expected, $actual) @@ -95,10 +96,9 @@ class ResourceComparatorTest extends TestCase } /** - * @covers ::assertEquals * @dataProvider assertEqualsSucceedsProvider */ - public function testAssertEqualsSucceeds($expected, $actual) + public function testAssertEqualsSucceeds($expected, $actual): void { $exception = null; @@ -111,10 +111,9 @@ class ResourceComparatorTest extends TestCase } /** - * @covers ::assertEquals * @dataProvider assertEqualsFailsProvider */ - public function testAssertEqualsFails($expected, $actual) + public function testAssertEqualsFails($expected, $actual): void { $this->expectException(ComparisonFailure::class); diff --git a/vendor/sebastian/comparator/tests/ScalarComparatorTest.php b/vendor/sebastian/comparator/tests/ScalarComparatorTest.php index 761a62dc..11feae27 100644 --- a/vendor/sebastian/comparator/tests/ScalarComparatorTest.php +++ b/vendor/sebastian/comparator/tests/ScalarComparatorTest.php @@ -12,17 +12,20 @@ namespace SebastianBergmann\Comparator; use PHPUnit\Framework\TestCase; /** - * @coversDefaultClass SebastianBergmann\Comparator\ScalarComparator + * @covers \SebastianBergmann\Comparator\ScalarComparator * - * @uses SebastianBergmann\Comparator\Comparator - * @uses SebastianBergmann\Comparator\Factory - * @uses SebastianBergmann\Comparator\ComparisonFailure + * @uses \SebastianBergmann\Comparator\Comparator + * @uses \SebastianBergmann\Comparator\Factory + * @uses \SebastianBergmann\Comparator\ComparisonFailure */ -class ScalarComparatorTest extends TestCase +final class ScalarComparatorTest extends TestCase { + /** + * @var ScalarComparator + */ private $comparator; - protected function setUp() + protected function setUp(): void { $this->comparator = new ScalarComparator; } @@ -114,10 +117,9 @@ class ScalarComparatorTest extends TestCase } /** - * @covers ::accepts * @dataProvider acceptsSucceedsProvider */ - public function testAcceptsSucceeds($expected, $actual) + public function testAcceptsSucceeds($expected, $actual): void { $this->assertTrue( $this->comparator->accepts($expected, $actual) @@ -125,10 +127,9 @@ class ScalarComparatorTest extends TestCase } /** - * @covers ::accepts * @dataProvider acceptsFailsProvider */ - public function testAcceptsFails($expected, $actual) + public function testAcceptsFails($expected, $actual): void { $this->assertFalse( $this->comparator->accepts($expected, $actual) @@ -136,10 +137,9 @@ class ScalarComparatorTest extends TestCase } /** - * @covers ::assertEquals * @dataProvider assertEqualsSucceedsProvider */ - public function testAssertEqualsSucceeds($expected, $actual, $ignoreCase = false) + public function testAssertEqualsSucceeds($expected, $actual, $ignoreCase = false): void { $exception = null; @@ -152,10 +152,9 @@ class ScalarComparatorTest extends TestCase } /** - * @covers ::assertEquals * @dataProvider assertEqualsFailsProvider */ - public function testAssertEqualsFails($expected, $actual, $message) + public function testAssertEqualsFails($expected, $actual, $message): void { $this->expectException(ComparisonFailure::class); $this->expectExceptionMessage($message); diff --git a/vendor/sebastian/comparator/tests/SplObjectStorageComparatorTest.php b/vendor/sebastian/comparator/tests/SplObjectStorageComparatorTest.php index 1482140c..19cbe716 100644 --- a/vendor/sebastian/comparator/tests/SplObjectStorageComparatorTest.php +++ b/vendor/sebastian/comparator/tests/SplObjectStorageComparatorTest.php @@ -14,17 +14,20 @@ use SplObjectStorage; use stdClass; /** - * @coversDefaultClass SebastianBergmann\Comparator\SplObjectStorageComparator + * @covers \SebastianBergmann\Comparator\SplObjectStorageComparator * - * @uses SebastianBergmann\Comparator\Comparator - * @uses SebastianBergmann\Comparator\Factory - * @uses SebastianBergmann\Comparator\ComparisonFailure + * @uses \SebastianBergmann\Comparator\Comparator + * @uses \SebastianBergmann\Comparator\Factory + * @uses \SebastianBergmann\Comparator\ComparisonFailure */ -class SplObjectStorageComparatorTest extends TestCase +final class SplObjectStorageComparatorTest extends TestCase { + /** + * @var SplObjectStorageComparator + */ private $comparator; - protected function setUp() + protected function setUp(): void { $this->comparator = new SplObjectStorageComparator; } @@ -83,10 +86,7 @@ class SplObjectStorageComparatorTest extends TestCase ]; } - /** - * @covers ::accepts - */ - public function testAcceptsSucceeds() + public function testAcceptsSucceeds(): void { $this->assertTrue( $this->comparator->accepts( @@ -97,10 +97,9 @@ class SplObjectStorageComparatorTest extends TestCase } /** - * @covers ::accepts * @dataProvider acceptsFailsProvider */ - public function testAcceptsFails($expected, $actual) + public function testAcceptsFails($expected, $actual): void { $this->assertFalse( $this->comparator->accepts($expected, $actual) @@ -108,10 +107,9 @@ class SplObjectStorageComparatorTest extends TestCase } /** - * @covers ::assertEquals * @dataProvider assertEqualsSucceedsProvider */ - public function testAssertEqualsSucceeds($expected, $actual) + public function testAssertEqualsSucceeds($expected, $actual): void { $exception = null; @@ -124,10 +122,9 @@ class SplObjectStorageComparatorTest extends TestCase } /** - * @covers ::assertEquals * @dataProvider assertEqualsFailsProvider */ - public function testAssertEqualsFails($expected, $actual) + public function testAssertEqualsFails($expected, $actual): void { $this->expectException(ComparisonFailure::class); $this->expectExceptionMessage('Failed asserting that two objects are equal.'); @@ -135,7 +132,7 @@ class SplObjectStorageComparatorTest extends TestCase $this->comparator->assertEquals($expected, $actual); } - public function testAssertEqualsFails2() + public function testAssertEqualsFails2(): void { $this->expectException(ComparisonFailure::class); $this->expectExceptionMessage('Failed asserting that two objects are equal.'); diff --git a/vendor/sebastian/comparator/tests/TypeComparatorTest.php b/vendor/sebastian/comparator/tests/TypeComparatorTest.php index 19edcb05..b8586a5a 100644 --- a/vendor/sebastian/comparator/tests/TypeComparatorTest.php +++ b/vendor/sebastian/comparator/tests/TypeComparatorTest.php @@ -13,17 +13,20 @@ use PHPUnit\Framework\TestCase; use stdClass; /** - * @coversDefaultClass SebastianBergmann\Comparator\TypeComparator + * @covers \SebastianBergmann\Comparator\TypeComparator * - * @uses SebastianBergmann\Comparator\Comparator - * @uses SebastianBergmann\Comparator\Factory - * @uses SebastianBergmann\Comparator\ComparisonFailure + * @uses \SebastianBergmann\Comparator\Comparator + * @uses \SebastianBergmann\Comparator\Factory + * @uses \SebastianBergmann\Comparator\ComparisonFailure */ -class TypeComparatorTest extends TestCase +final class TypeComparatorTest extends TestCase { + /** + * @var TypeComparator + */ private $comparator; - protected function setUp() + protected function setUp(): void { $this->comparator = new TypeComparator; } @@ -67,10 +70,9 @@ class TypeComparatorTest extends TestCase } /** - * @covers ::accepts * @dataProvider acceptsSucceedsProvider */ - public function testAcceptsSucceeds($expected, $actual) + public function testAcceptsSucceeds($expected, $actual): void { $this->assertTrue( $this->comparator->accepts($expected, $actual) @@ -78,10 +80,9 @@ class TypeComparatorTest extends TestCase } /** - * @covers ::assertEquals * @dataProvider assertEqualsSucceedsProvider */ - public function testAssertEqualsSucceeds($expected, $actual) + public function testAssertEqualsSucceeds($expected, $actual): void { $exception = null; @@ -94,10 +95,9 @@ class TypeComparatorTest extends TestCase } /** - * @covers ::assertEquals * @dataProvider assertEqualsFailsProvider */ - public function testAssertEqualsFails($expected, $actual) + public function testAssertEqualsFails($expected, $actual): void { $this->expectException(ComparisonFailure::class); $this->expectExceptionMessage('does not match expected type'); diff --git a/vendor/swiftmailer/swiftmailer/CHANGES b/vendor/swiftmailer/swiftmailer/CHANGES index 390e1a14..753ddc1b 100644 --- a/vendor/swiftmailer/swiftmailer/CHANGES +++ b/vendor/swiftmailer/swiftmailer/CHANGES @@ -1,6 +1,11 @@ Changelog ========= +6.1.2 (2018-07-13) +------------------ + + * handled recipient errors when pipelining + 6.1.1 (2018-07-04) ------------------ diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift.php index 4f2a2852..35fb7a59 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.1'; + const VERSION = '6.1.2'; public static $initialized = false; public static $inits = []; diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php index 5c4b9bdd..39b6e213 100644 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php @@ -313,15 +313,18 @@ abstract class Swift_Transport_AbstractSmtpTransport implements Swift_Transport * * If no response codes are given, the response will not be validated. * If codes are given, an exception will be thrown on an invalid response. + * If the command is RCPT TO, and the pipeline is non-empty, no exception + * will be thrown; instead the failing address is added to $failures. * * @param string $command * @param int[] $codes * @param string[] $failures An array of failures by-reference * @param bool $pipeline Do not wait for response + * @param string $address The address, if command is RCPT TO. * * @return string|null The server response, or null if pipelining is enabled */ - public function executeCommand($command, $codes = [], &$failures = null, $pipeline = false) + public function executeCommand($command, $codes = [], &$failures = null, $pipeline = false, $address = null) { $failures = (array) $failures; $seq = $this->buffer->write($command); @@ -329,14 +332,22 @@ abstract class Swift_Transport_AbstractSmtpTransport implements Swift_Transport $this->eventDispatcher->dispatchEvent($evt, 'commandSent'); } - $this->pipeline[] = [$command, $seq, $codes]; + $this->pipeline[] = [$command, $seq, $codes, $address]; if ($pipeline && $this->pipelining) { $response = null; } else { while ($this->pipeline) { - list($command, $seq, $codes) = array_shift($this->pipeline); + list($command, $seq, $codes, $address) = array_shift($this->pipeline); $response = $this->getFullResponse($seq); - $this->assertResponseCode($response, $codes); + try { + $this->assertResponseCode($response, $codes); + } catch (Swift_TransportException $e) { + if ($this->pipeline && $address) { + $failures[] = $address; + } else { + $this->throwException($e); + } + } } } @@ -371,14 +382,14 @@ abstract class Swift_Transport_AbstractSmtpTransport implements Swift_Transport { $address = $this->addressEncoder->encodeString($address); $this->executeCommand( - sprintf("RCPT TO:<%s>\r\n", $address), [250, 251, 252], $failures, true + sprintf("RCPT TO:<%s>\r\n", $address), [250, 251, 252], $failures, true, $address ); } /** Send the DATA command */ - protected function doDataCommand() + protected function doDataCommand(&$failedRecipients) { - $this->executeCommand("DATA\r\n", [354]); + $this->executeCommand("DATA\r\n", [354], $failedRecipients); } /** Stream the contents of the message over the buffer */ @@ -488,7 +499,10 @@ abstract class Swift_Transport_AbstractSmtpTransport implements Swift_Transport } if (0 != $sent) { - $this->doDataCommand(); + $sent += count($failedRecipients); + $this->doDataCommand($failedRecipients); + $sent -= count($failedRecipients); + $this->streamMessage($message); } else { $this->reset(); diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/EsmtpTransport.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/EsmtpTransport.php index be3a4cb2..d1f1c2cf 100644 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/EsmtpTransport.php +++ b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/EsmtpTransport.php @@ -284,10 +284,11 @@ class Swift_Transport_EsmtpTransport extends Swift_Transport_AbstractSmtpTranspo * @param int[] $codes * @param string[] $failures An array of failures by-reference * @param bool $pipeline Do not wait for response + * @param string $address The address, if command is RCPT TO. * - * @return string + * @return string|null The server response, or null if pipelining is enabled */ - public function executeCommand($command, $codes = [], &$failures = null, $pipeline = false) + public function executeCommand($command, $codes = [], &$failures = null, $pipeline = false, $address = null) { $failures = (array) $failures; $stopSignal = false; @@ -301,7 +302,7 @@ class Swift_Transport_EsmtpTransport extends Swift_Transport_AbstractSmtpTranspo } } - return parent::executeCommand($command, $codes, $failures, $pipeline); + return parent::executeCommand($command, $codes, $failures, $pipeline, $address); } /** Mixin handling method for ESMTP handlers */ @@ -397,7 +398,7 @@ class Swift_Transport_EsmtpTransport extends Swift_Transport_AbstractSmtpTranspo } $paramStr = !empty($params) ? ' '.implode(' ', $params) : ''; $this->executeCommand( - sprintf("RCPT TO:<%s>%s\r\n", $address, $paramStr), [250, 251, 252], $failures, true + sprintf("RCPT TO:<%s>%s\r\n", $address, $paramStr), [250, 251, 252], $failures, true, $address ); } diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Transport/EsmtpTransportTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Transport/EsmtpTransportTest.php index 9ac07125..db1edcef 100644 --- a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Transport/EsmtpTransportTest.php +++ b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Transport/EsmtpTransportTest.php @@ -278,7 +278,7 @@ class Swift_Transport_EsmtpTransportTest extends Swift_Transport_AbstractSmtpEve $smtp->start(); } - public function testPipelining2() + public function testPipelining() { $buf = $this->getBuffer(); $smtp = $this->getTransport($buf); @@ -340,11 +340,242 @@ class Swift_Transport_EsmtpTransportTest extends Swift_Transport_AbstractSmtpEve $this->finishBuffer($buf); $smtp->start(); - $smtp->send($message); + $sent = $smtp->send($message, $failedRecipients); + + $this->assertEquals(1, $sent); + $this->assertEmpty($failedRecipients); $this->assertTrue($smtp->getPipelining()); } + public function testPipeliningWithRecipientFailure() + { + $buf = $this->getBuffer(); + $smtp = $this->getTransport($buf); + $this->assertNull($smtp->getPipelining()); + + $message = $this->createMessage(); + $message->shouldReceive('getFrom') + ->zeroOrMoreTimes() + ->andReturn(['me@domain.com' => 'Me']); + $message->shouldReceive('getTo') + ->zeroOrMoreTimes() + ->andReturn([ + 'good@foo' => null, + 'bad@foo' => null, + 'good@bar' => null, + ]); + + $buf->shouldReceive('initialize') + ->once(); + $buf->shouldReceive('readLine') + ->once() + ->with(0) + ->andReturn("220 some.server.tld bleh\r\n"); + $buf->shouldReceive('write') + ->once() + ->with('~^EHLO .+?\r\n$~D') + ->andReturn(1); + $buf->shouldReceive('readLine') + ->once() + ->with(1) + ->andReturn('250-ServerName'."\r\n"); + $buf->shouldReceive('readLine') + ->once() + ->with(1) + ->andReturn('250 PIPELINING'."\r\n"); + + $buf->shouldReceive('write') + ->ordered() + ->once() + ->with("MAIL FROM:\r\n") + ->andReturn(1); + $buf->shouldReceive('write') + ->ordered() + ->once() + ->with("RCPT TO:\r\n") + ->andReturn(2); + $buf->shouldReceive('write') + ->ordered() + ->once() + ->with("RCPT TO:\r\n") + ->andReturn(3); + $buf->shouldReceive('write') + ->ordered() + ->once() + ->with("RCPT TO:\r\n") + ->andReturn(4); + $buf->shouldReceive('write') + ->ordered() + ->once() + ->with("DATA\r\n") + ->andReturn(5); + $buf->shouldReceive('readLine') + ->ordered() + ->once() + ->with(1) + ->andReturn("250 OK\r\n"); + $buf->shouldReceive('readLine') + ->ordered() + ->once() + ->with(2) + ->andReturn("250 OK\r\n"); + $buf->shouldReceive('readLine') + ->ordered() + ->once() + ->with(3) + ->andReturn("450 Unknown address bad@foo\r\n"); + $buf->shouldReceive('readLine') + ->ordered() + ->once() + ->with(4) + ->andReturn("250 OK\r\n"); + $buf->shouldReceive('readLine') + ->ordered() + ->once() + ->with(5) + ->andReturn("354 OK\r\n"); + + $this->finishBuffer($buf); + $smtp->start(); + $sent = $smtp->send($message, $failedRecipients); + + $this->assertEquals(2, $sent); + $this->assertEquals(['bad@foo'], $failedRecipients); + + $this->assertTrue($smtp->getPipelining()); + } + + public function testPipeliningWithSenderFailure() + { + $buf = $this->getBuffer(); + $smtp = $this->getTransport($buf); + $this->assertNull($smtp->getPipelining()); + + $message = $this->createMessage(); + $message->shouldReceive('getFrom') + ->zeroOrMoreTimes() + ->andReturn(['me@domain.com' => 'Me']); + $message->shouldReceive('getTo') + ->zeroOrMoreTimes() + ->andReturn(['foo@bar' => null]); + + $buf->shouldReceive('initialize') + ->once(); + $buf->shouldReceive('readLine') + ->once() + ->with(0) + ->andReturn("220 some.server.tld bleh\r\n"); + $buf->shouldReceive('write') + ->once() + ->with('~^EHLO .+?\r\n$~D') + ->andReturn(1); + $buf->shouldReceive('readLine') + ->once() + ->with(1) + ->andReturn('250-ServerName'."\r\n"); + $buf->shouldReceive('readLine') + ->once() + ->with(1) + ->andReturn('250 PIPELINING'."\r\n"); + + $buf->shouldReceive('write') + ->ordered() + ->once() + ->with("MAIL FROM:\r\n") + ->andReturn(1); + $buf->shouldReceive('write') + ->ordered() + ->once() + ->with("RCPT TO:\r\n") + ->andReturn(2); + $buf->shouldReceive('write') + ->ordered() + ->once() + ->with("DATA\r\n")->andReturn(3); + $buf->shouldReceive('readLine') + ->ordered() + ->once() + ->with(1) + ->andReturn("550 Unknown address me@domain.com\r\n"); + + $smtp->start(); + + $this->expectException('Swift_TransportException'); + $this->expectExceptionMessage('Expected response code 250 but got code "550"'); + $smtp->send($message, $failedRecipients); + } + + public function testPipeliningWithDataFailure() + { + $buf = $this->getBuffer(); + $smtp = $this->getTransport($buf); + $this->assertNull($smtp->getPipelining()); + + $message = $this->createMessage(); + $message->shouldReceive('getFrom') + ->zeroOrMoreTimes() + ->andReturn(['me@domain.com' => 'Me']); + $message->shouldReceive('getTo') + ->zeroOrMoreTimes() + ->andReturn(['foo@bar' => null]); + + $buf->shouldReceive('initialize') + ->once(); + $buf->shouldReceive('readLine') + ->once() + ->with(0) + ->andReturn("220 some.server.tld bleh\r\n"); + $buf->shouldReceive('write') + ->once() + ->with('~^EHLO .+?\r\n$~D') + ->andReturn(1); + $buf->shouldReceive('readLine') + ->once() + ->with(1) + ->andReturn('250-ServerName'."\r\n"); + $buf->shouldReceive('readLine') + ->once() + ->with(1) + ->andReturn('250 PIPELINING'."\r\n"); + + $buf->shouldReceive('write') + ->ordered() + ->once() + ->with("MAIL FROM:\r\n") + ->andReturn(1); + $buf->shouldReceive('write') + ->ordered() + ->once() + ->with("RCPT TO:\r\n") + ->andReturn(2); + $buf->shouldReceive('write') + ->ordered() + ->once() + ->with("DATA\r\n")->andReturn(3); + $buf->shouldReceive('readLine') + ->ordered() + ->once() + ->with(1) + ->andReturn("250 OK\r\n"); + $buf->shouldReceive('readLine') + ->ordered() + ->once() + ->with(2) + ->andReturn("250 OK\r\n"); + $buf->shouldReceive('readLine') + ->ordered() + ->once() + ->with(3) + ->andReturn("452 Insufficient system storage\r\n"); + + $smtp->start(); + + $this->expectException('Swift_TransportException'); + $this->expectExceptionMessage('Expected response code 354 but got code "452"'); + $smtp->send($message, $failedRecipients); + } + public function providerPipeliningOverride() { return [ diff --git a/vendor/symfony/console/Application.php b/vendor/symfony/console/Application.php index 4020bd52..3ef76b3f 100644 --- a/vendor/symfony/console/Application.php +++ b/vendor/symfony/console/Application.php @@ -11,35 +11,35 @@ namespace Symfony\Component\Console; -use Symfony\Component\Console\CommandLoader\CommandLoaderInterface; -use Symfony\Component\Console\Exception\ExceptionInterface; -use Symfony\Component\Console\Exception\NamespaceNotFoundException; -use Symfony\Component\Console\Formatter\OutputFormatter; -use Symfony\Component\Console\Helper\DebugFormatterHelper; -use Symfony\Component\Console\Helper\Helper; -use Symfony\Component\Console\Helper\ProcessHelper; -use Symfony\Component\Console\Helper\QuestionHelper; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\StreamableInputInterface; -use Symfony\Component\Console\Input\ArgvInput; -use Symfony\Component\Console\Input\ArrayInput; -use Symfony\Component\Console\Input\InputDefinition; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputAwareInterface; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Output\ConsoleOutput; -use Symfony\Component\Console\Output\ConsoleOutputInterface; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Command\HelpCommand; use Symfony\Component\Console\Command\ListCommand; -use Symfony\Component\Console\Helper\HelperSet; -use Symfony\Component\Console\Helper\FormatterHelper; +use Symfony\Component\Console\CommandLoader\CommandLoaderInterface; use Symfony\Component\Console\Event\ConsoleCommandEvent; use Symfony\Component\Console\Event\ConsoleErrorEvent; use Symfony\Component\Console\Event\ConsoleTerminateEvent; use Symfony\Component\Console\Exception\CommandNotFoundException; +use Symfony\Component\Console\Exception\ExceptionInterface; use Symfony\Component\Console\Exception\LogicException; +use Symfony\Component\Console\Exception\NamespaceNotFoundException; +use Symfony\Component\Console\Formatter\OutputFormatter; +use Symfony\Component\Console\Helper\DebugFormatterHelper; +use Symfony\Component\Console\Helper\FormatterHelper; +use Symfony\Component\Console\Helper\Helper; +use Symfony\Component\Console\Helper\HelperSet; +use Symfony\Component\Console\Helper\ProcessHelper; +use Symfony\Component\Console\Helper\QuestionHelper; +use Symfony\Component\Console\Input\ArgvInput; +use Symfony\Component\Console\Input\ArrayInput; +use Symfony\Component\Console\Input\InputArgument; +use Symfony\Component\Console\Input\InputAwareInterface; +use Symfony\Component\Console\Input\InputDefinition; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Input\InputOption; +use Symfony\Component\Console\Input\StreamableInputInterface; +use Symfony\Component\Console\Output\ConsoleOutput; +use Symfony\Component\Console\Output\ConsoleOutputInterface; +use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Style\SymfonyStyle; use Symfony\Component\Debug\ErrorHandler; use Symfony\Component\Debug\Exception\FatalThrowableError; @@ -132,7 +132,7 @@ class Application }; if ($phpHandler = set_exception_handler($renderException)) { restore_exception_handler(); - if (!is_array($phpHandler) || !$phpHandler[0] instanceof ErrorHandler) { + if (!\is_array($phpHandler) || !$phpHandler[0] instanceof ErrorHandler) { $debugHandler = true; } elseif ($debugHandler = $phpHandler[0]->setExceptionHandler($renderException)) { $phpHandler[0]->setExceptionHandler($debugHandler); @@ -225,7 +225,7 @@ class Application // the command name MUST be the first element of the input $command = $this->find($name); } catch (\Throwable $e) { - if (!($e instanceof CommandNotFoundException && !$e instanceof NamespaceNotFoundException) || 1 !== count($alternatives = $e->getAlternatives()) || !$input->isInteractive()) { + 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); @@ -465,11 +465,11 @@ class Application } if (null === $command->getDefinition()) { - throw new LogicException(sprintf('Command class "%s" is not correctly initialized. You probably forgot to call the parent constructor.', get_class($command))); + throw new LogicException(sprintf('Command class "%s" is not correctly initialized. You probably forgot to call the parent constructor.', \get_class($command))); } if (!$command->getName()) { - throw new LogicException(sprintf('The command defined in "%s" cannot have an empty name.', get_class($command))); + throw new LogicException(sprintf('The command defined in "%s" cannot have an empty name.', \get_class($command))); } $this->commands[$command->getName()] = $command; @@ -566,7 +566,7 @@ class Application $message = sprintf('There are no commands defined in the "%s" namespace.', $namespace); if ($alternatives = $this->findAlternatives($namespace, $allNamespaces)) { - if (1 == count($alternatives)) { + if (1 == \count($alternatives)) { $message .= "\n\nDid you mean this?\n "; } else { $message .= "\n\nDid you mean one of these?\n "; @@ -578,8 +578,8 @@ class Application throw new NamespaceNotFoundException($message, $alternatives); } - $exact = in_array($namespace, $namespaces, true); - if (count($namespaces) > 1 && !$exact) { + $exact = \in_array($namespace, $namespaces, true); + if (\count($namespaces) > 1 && !$exact) { throw new NamespaceNotFoundException(sprintf("The namespace \"%s\" is ambiguous.\nDid you mean one of these?\n%s", $namespace, $this->getAbbreviationSuggestions(array_values($namespaces))), array_values($namespaces)); } @@ -612,7 +612,7 @@ class Application } // if no commands matched or we just matched namespaces - if (empty($commands) || count(preg_grep('{^'.$expr.'$}i', $commands)) < 1) { + if (empty($commands) || \count(preg_grep('{^'.$expr.'$}i', $commands)) < 1) { if (false !== $pos = strrpos($name, ':')) { // check if a namespace exists and contains commands $this->findNamespace(substr($name, 0, $pos)); @@ -621,7 +621,7 @@ class Application $message = sprintf('Command "%s" is not defined.', $name); if ($alternatives = $this->findAlternatives($name, $allCommands)) { - if (1 == count($alternatives)) { + if (1 == \count($alternatives)) { $message .= "\n\nDid you mean this?\n "; } else { $message .= "\n\nDid you mean one of these?\n "; @@ -633,18 +633,18 @@ class Application } // filter out aliases for commands which are already on the list - if (count($commands) > 1) { + if (\count($commands) > 1) { $commandList = $this->commandLoader ? array_merge(array_flip($this->commandLoader->getNames()), $this->commands) : $this->commands; $commands = array_unique(array_filter($commands, function ($nameOrAlias) use ($commandList, $commands, &$aliases) { $commandName = $commandList[$nameOrAlias] instanceof Command ? $commandList[$nameOrAlias]->getName() : $nameOrAlias; $aliases[$nameOrAlias] = $commandName; - return $commandName === $nameOrAlias || !in_array($commandName, $commands); + return $commandName === $nameOrAlias || !\in_array($commandName, $commands); })); } - $exact = in_array($name, $commands, true) || isset($aliases[$name]); - if (count($commands) > 1 && !$exact) { + $exact = \in_array($name, $commands, true) || isset($aliases[$name]); + if (\count($commands) > 1 && !$exact) { $usableWidth = $this->terminal->getWidth() - 10; $abbrevs = array_values($commands); $maxLen = 0; @@ -724,7 +724,7 @@ class Application { $abbrevs = array(); foreach ($names as $name) { - for ($len = strlen($name); $len > 0; --$len) { + for ($len = \strlen($name); $len > 0; --$len) { $abbrev = substr($name, 0, $len); $abbrevs[$abbrev][] = $name; } @@ -753,7 +753,7 @@ class Application do { $message = trim($e->getMessage()); if ('' === $message || OutputInterface::VERBOSITY_VERBOSE <= $output->getVerbosity()) { - $title = sprintf(' [%s%s] ', get_class($e), 0 !== ($code = $e->getCode()) ? ' ('.$code.')' : ''); + $title = sprintf(' [%s%s] ', \get_class($e), 0 !== ($code = $e->getCode()) ? ' ('.$code.')' : ''); $len = Helper::strlen($title); } else { $len = 0; @@ -793,7 +793,7 @@ class Application // exception related properties $trace = $e->getTrace(); - for ($i = 0, $count = count($trace); $i < $count; ++$i) { + for ($i = 0, $count = \count($trace); $i < $count; ++$i) { $class = isset($trace[$i]['class']) ? $trace[$i]['class'] : ''; $type = isset($trace[$i]['type']) ? $trace[$i]['type'] : ''; $function = $trace[$i]['function']; @@ -821,7 +821,7 @@ class Application if (true === $input->hasParameterOption(array('--no-interaction', '-n'), true)) { $input->setInteractive(false); - } elseif (function_exists('posix_isatty')) { + } elseif (\function_exists('posix_isatty')) { $inputStream = null; if ($input instanceof StreamableInputInterface) { @@ -1007,7 +1007,7 @@ class Application $parts = explode(':', $name); array_pop($parts); - return implode(':', null === $limit ? $parts : array_slice($parts, 0, $limit)); + return implode(':', null === $limit ? $parts : \array_slice($parts, 0, $limit)); } /** @@ -1040,7 +1040,7 @@ class Application } $lev = levenshtein($subname, $parts[$i]); - if ($lev <= strlen($subname) / 3 || '' !== $subname && false !== strpos($parts[$i], $subname)) { + if ($lev <= \strlen($subname) / 3 || '' !== $subname && false !== strpos($parts[$i], $subname)) { $alternatives[$collectionName] = $exists ? $alternatives[$collectionName] + $lev : $lev; } elseif ($exists) { $alternatives[$collectionName] += $threshold; @@ -1050,7 +1050,7 @@ class Application foreach ($collection as $item) { $lev = levenshtein($name, $item); - if ($lev <= strlen($name) / 3 || false !== strpos($item, $name)) { + if ($lev <= \strlen($name) / 3 || false !== strpos($item, $name)) { $alternatives[$item] = isset($alternatives[$item]) ? $alternatives[$item] - $lev : $lev; } } @@ -1106,7 +1106,7 @@ class Application $line = $char; } - $lines[] = count($lines) ? str_pad($line, $width) : $line; + $lines[] = \count($lines) ? str_pad($line, $width) : $line; mb_convert_variables($encoding, 'utf8', $lines); @@ -1127,7 +1127,7 @@ class Application $namespaces = array(); foreach ($parts as $part) { - if (count($namespaces)) { + if (\count($namespaces)) { $namespaces[] = end($namespaces).':'.$part; } else { $namespaces[] = $part; diff --git a/vendor/symfony/console/Command/Command.php b/vendor/symfony/console/Command/Command.php index b64d9af3..38bb8b99 100644 --- a/vendor/symfony/console/Command/Command.php +++ b/vendor/symfony/console/Command/Command.php @@ -11,16 +11,16 @@ namespace Symfony\Component\Console\Command; -use Symfony\Component\Console\Exception\ExceptionInterface; -use Symfony\Component\Console\Input\InputDefinition; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Application; -use Symfony\Component\Console\Helper\HelperSet; +use Symfony\Component\Console\Exception\ExceptionInterface; use Symfony\Component\Console\Exception\InvalidArgumentException; use Symfony\Component\Console\Exception\LogicException; +use Symfony\Component\Console\Helper\HelperSet; +use Symfony\Component\Console\Input\InputArgument; +use Symfony\Component\Console\Input\InputDefinition; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Input\InputOption; +use Symfony\Component\Console\Output\OutputInterface; /** * Base class for all commands. @@ -55,7 +55,7 @@ class Command */ public static function getDefaultName() { - $class = get_called_class(); + $class = \get_called_class(); $r = new \ReflectionProperty($class, 'defaultName'); return $class === $r->class ? static::$defaultName : null; @@ -217,15 +217,15 @@ class Command $this->initialize($input, $output); if (null !== $this->processTitle) { - if (function_exists('cli_set_process_title')) { + if (\function_exists('cli_set_process_title')) { if (!@cli_set_process_title($this->processTitle)) { if ('Darwin' === PHP_OS) { - $output->writeln('Running "cli_get_process_title" as an unprivileged user is not supported on MacOS.'); + $output->writeln('Running "cli_set_process_title" as an unprivileged user is not supported on MacOS.', OutputInterface::VERBOSITY_VERY_VERBOSE); } else { cli_set_process_title($this->processTitle); } } - } elseif (function_exists('setproctitle')) { + } elseif (\function_exists('setproctitle')) { setproctitle($this->processTitle); } elseif (OutputInterface::VERBOSITY_VERY_VERBOSE === $output->getVerbosity()) { $output->writeln('Install the proctitle PECL to be able to change the process title.'); @@ -246,7 +246,7 @@ class Command $input->validate(); if ($this->code) { - $statusCode = call_user_func($this->code, $input, $output); + $statusCode = \call_user_func($this->code, $input, $output); } else { $statusCode = $this->execute($input, $output); } @@ -542,7 +542,7 @@ class Command */ public function setAliases($aliases) { - if (!is_array($aliases) && !$aliases instanceof \Traversable) { + if (!\is_array($aliases) && !$aliases instanceof \Traversable) { throw new InvalidArgumentException('$aliases must be an array or an instance of \Traversable'); } diff --git a/vendor/symfony/console/Command/HelpCommand.php b/vendor/symfony/console/Command/HelpCommand.php index 112679b3..1e20b008 100644 --- a/vendor/symfony/console/Command/HelpCommand.php +++ b/vendor/symfony/console/Command/HelpCommand.php @@ -13,8 +13,8 @@ namespace Symfony\Component\Console\Command; use Symfony\Component\Console\Helper\DescriptorHelper; use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; /** diff --git a/vendor/symfony/console/Command/ListCommand.php b/vendor/symfony/console/Command/ListCommand.php index 179ddea5..5d932338 100644 --- a/vendor/symfony/console/Command/ListCommand.php +++ b/vendor/symfony/console/Command/ListCommand.php @@ -13,10 +13,10 @@ namespace Symfony\Component\Console\Command; use Symfony\Component\Console\Helper\DescriptorHelper; use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Input\InputDefinition; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Input\InputOption; +use Symfony\Component\Console\Output\OutputInterface; /** * ListCommand displays the list of all available commands for the application. diff --git a/vendor/symfony/console/Descriptor/Descriptor.php b/vendor/symfony/console/Descriptor/Descriptor.php index fe169cb4..151d84f7 100644 --- a/vendor/symfony/console/Descriptor/Descriptor.php +++ b/vendor/symfony/console/Descriptor/Descriptor.php @@ -13,11 +13,11 @@ namespace Symfony\Component\Console\Descriptor; use Symfony\Component\Console\Application; use Symfony\Component\Console\Command\Command; +use Symfony\Component\Console\Exception\InvalidArgumentException; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputDefinition; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Exception\InvalidArgumentException; /** * @author Jean-François Simon @@ -55,7 +55,7 @@ abstract class Descriptor implements DescriptorInterface $this->describeApplication($object, $options); break; default: - throw new InvalidArgumentException(sprintf('Object of type "%s" is not describable.', get_class($object))); + throw new InvalidArgumentException(sprintf('Object of type "%s" is not describable.', \get_class($object))); } } diff --git a/vendor/symfony/console/Descriptor/MarkdownDescriptor.php b/vendor/symfony/console/Descriptor/MarkdownDescriptor.php index d52ba553..6d8399f9 100644 --- a/vendor/symfony/console/Descriptor/MarkdownDescriptor.php +++ b/vendor/symfony/console/Descriptor/MarkdownDescriptor.php @@ -88,7 +88,7 @@ class MarkdownDescriptor extends Descriptor */ protected function describeInputDefinition(InputDefinition $definition, array $options = array()) { - if ($showArguments = count($definition->getArguments()) > 0) { + if ($showArguments = \count($definition->getArguments()) > 0) { $this->write('### Arguments'); foreach ($definition->getArguments() as $argument) { $this->write("\n\n"); @@ -96,7 +96,7 @@ class MarkdownDescriptor extends Descriptor } } - if (count($definition->getOptions()) > 0) { + if (\count($definition->getOptions()) > 0) { if ($showArguments) { $this->write("\n\n"); } diff --git a/vendor/symfony/console/Descriptor/TextDescriptor.php b/vendor/symfony/console/Descriptor/TextDescriptor.php index e44cd55b..9361b109 100644 --- a/vendor/symfony/console/Descriptor/TextDescriptor.php +++ b/vendor/symfony/console/Descriptor/TextDescriptor.php @@ -33,14 +33,14 @@ class TextDescriptor extends Descriptor */ protected function describeInputArgument(InputArgument $argument, array $options = array()) { - if (null !== $argument->getDefault() && (!is_array($argument->getDefault()) || count($argument->getDefault()))) { + if (null !== $argument->getDefault() && (!\is_array($argument->getDefault()) || \count($argument->getDefault()))) { $default = sprintf(' [default: %s]', $this->formatDefaultValue($argument->getDefault())); } else { $default = ''; } $totalWidth = isset($options['total_width']) ? $options['total_width'] : Helper::strlen($argument->getName()); - $spacingWidth = $totalWidth - strlen($argument->getName()); + $spacingWidth = $totalWidth - \strlen($argument->getName()); $this->writeText(sprintf(' %s %s%s%s', $argument->getName(), @@ -56,7 +56,7 @@ class TextDescriptor extends Descriptor */ protected function describeInputOption(InputOption $option, array $options = array()) { - if ($option->acceptValue() && null !== $option->getDefault() && (!is_array($option->getDefault()) || count($option->getDefault()))) { + if ($option->acceptValue() && null !== $option->getDefault() && (!\is_array($option->getDefault()) || \count($option->getDefault()))) { $default = sprintf(' [default: %s]', $this->formatDefaultValue($option->getDefault())); } else { $default = ''; @@ -117,7 +117,7 @@ class TextDescriptor extends Descriptor $this->writeText('Options:', $options); foreach ($definition->getOptions() as $option) { - if (strlen($option->getShortcut()) > 1) { + if (\strlen($option->getShortcut()) > 1) { $laterOptions[] = $option; continue; } @@ -284,11 +284,11 @@ class TextDescriptor extends Descriptor return 'INF'; } - if (is_string($default)) { + if (\is_string($default)) { $default = OutputFormatter::escape($default); - } elseif (is_array($default)) { + } elseif (\is_array($default)) { foreach ($default as $key => $value) { - if (is_string($value)) { + if (\is_string($value)) { $default[$key] = OutputFormatter::escape($value); } } diff --git a/vendor/symfony/console/Descriptor/XmlDescriptor.php b/vendor/symfony/console/Descriptor/XmlDescriptor.php index a2eaca3b..d0c6abdd 100644 --- a/vendor/symfony/console/Descriptor/XmlDescriptor.php +++ b/vendor/symfony/console/Descriptor/XmlDescriptor.php @@ -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()) ? array(var_export($argument->getDefault(), true)) : ($argument->getDefault() ? array($argument->getDefault()) : array())); 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()) ? array(var_export($option->getDefault(), true)) : ($option->getDefault() ? array($option->getDefault()) : array())); $objectXML->appendChild($defaultsXML = $dom->createElement('defaults')); if (!empty($defaults)) { diff --git a/vendor/symfony/console/Event/ConsoleErrorEvent.php b/vendor/symfony/console/Event/ConsoleErrorEvent.php index 3665da77..25d9b881 100644 --- a/vendor/symfony/console/Event/ConsoleErrorEvent.php +++ b/vendor/symfony/console/Event/ConsoleErrorEvent.php @@ -53,6 +53,6 @@ final class ConsoleErrorEvent extends ConsoleEvent public function getExitCode(): int { - return null !== $this->exitCode ? $this->exitCode : (is_int($this->error->getCode()) && 0 !== $this->error->getCode() ? $this->error->getCode() : 1); + return null !== $this->exitCode ? $this->exitCode : (\is_int($this->error->getCode()) && 0 !== $this->error->getCode() ? $this->error->getCode() : 1); } } diff --git a/vendor/symfony/console/Formatter/OutputFormatter.php b/vendor/symfony/console/Formatter/OutputFormatter.php index a78bd952..eebac82e 100644 --- a/vendor/symfony/console/Formatter/OutputFormatter.php +++ b/vendor/symfony/console/Formatter/OutputFormatter.php @@ -50,10 +50,10 @@ class OutputFormatter implements OutputFormatterInterface public static function escapeTrailingBackslash($text) { if ('\\' === substr($text, -1)) { - $len = strlen($text); + $len = \strlen($text); $text = rtrim($text, '\\'); $text = str_replace("\0", '', $text); - $text .= str_repeat("\0", $len - strlen($text)); + $text .= str_repeat("\0", $len - \strlen($text)); } return $text; @@ -145,7 +145,7 @@ class OutputFormatter implements OutputFormatterInterface // add the text up to the next tag $output .= $this->applyCurrentStyle(substr($message, $offset, $pos - $offset)); - $offset = $pos + strlen($text); + $offset = $pos + \strlen($text); // opening tag? if ($open = '/' != $text[1]) { @@ -225,6 +225,6 @@ class OutputFormatter implements OutputFormatterInterface */ private function applyCurrentStyle(string $text): string { - return $this->isDecorated() && strlen($text) > 0 ? $this->styleStack->getCurrent()->apply($text) : $text; + return $this->isDecorated() && \strlen($text) > 0 ? $this->styleStack->getCurrent()->apply($text) : $text; } } diff --git a/vendor/symfony/console/Formatter/OutputFormatterStyle.php b/vendor/symfony/console/Formatter/OutputFormatterStyle.php index 900f2ef3..d09994f2 100644 --- a/vendor/symfony/console/Formatter/OutputFormatterStyle.php +++ b/vendor/symfony/console/Formatter/OutputFormatterStyle.php @@ -69,7 +69,7 @@ class OutputFormatterStyle implements OutputFormatterStyleInterface if (null !== $background) { $this->setBackground($background); } - if (count($options)) { + if (\count($options)) { $this->setOptions($options); } } @@ -143,7 +143,7 @@ class OutputFormatterStyle implements OutputFormatterStyleInterface )); } - if (!in_array(static::$availableOptions[$option], $this->options)) { + if (!\in_array(static::$availableOptions[$option], $this->options)) { $this->options[] = static::$availableOptions[$option]; } } @@ -203,14 +203,14 @@ class OutputFormatterStyle implements OutputFormatterStyleInterface $setCodes[] = $this->background['set']; $unsetCodes[] = $this->background['unset']; } - if (count($this->options)) { + if (\count($this->options)) { foreach ($this->options as $option) { $setCodes[] = $option['set']; $unsetCodes[] = $option['unset']; } } - if (0 === count($setCodes)) { + if (0 === \count($setCodes)) { return $text; } diff --git a/vendor/symfony/console/Formatter/OutputFormatterStyleStack.php b/vendor/symfony/console/Formatter/OutputFormatterStyleStack.php index bf0beb70..9e7283c2 100644 --- a/vendor/symfony/console/Formatter/OutputFormatterStyleStack.php +++ b/vendor/symfony/console/Formatter/OutputFormatterStyleStack.php @@ -66,7 +66,7 @@ class OutputFormatterStyleStack foreach (array_reverse($this->styles, true) as $index => $stackedStyle) { if ($style->apply('') === $stackedStyle->apply('')) { - $this->styles = array_slice($this->styles, 0, $index); + $this->styles = \array_slice($this->styles, 0, $index); return $stackedStyle; } @@ -86,7 +86,7 @@ class OutputFormatterStyleStack return $this->emptyStyle; } - return $this->styles[count($this->styles) - 1]; + return $this->styles[\count($this->styles) - 1]; } /** diff --git a/vendor/symfony/console/Helper/DebugFormatterHelper.php b/vendor/symfony/console/Helper/DebugFormatterHelper.php index 1119b795..f5393ede 100644 --- a/vendor/symfony/console/Helper/DebugFormatterHelper.php +++ b/vendor/symfony/console/Helper/DebugFormatterHelper.php @@ -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] = array('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 6f5c8183..54d3b1af 100644 --- a/vendor/symfony/console/Helper/DescriptorHelper.php +++ b/vendor/symfony/console/Helper/DescriptorHelper.php @@ -16,8 +16,8 @@ use Symfony\Component\Console\Descriptor\JsonDescriptor; use Symfony\Component\Console\Descriptor\MarkdownDescriptor; use Symfony\Component\Console\Descriptor\TextDescriptor; use Symfony\Component\Console\Descriptor\XmlDescriptor; -use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Exception\InvalidArgumentException; +use Symfony\Component\Console\Output\OutputInterface; /** * This class adds helper method to describe objects in various formats. diff --git a/vendor/symfony/console/Helper/FormatterHelper.php b/vendor/symfony/console/Helper/FormatterHelper.php index 6a48a77f..79ab2849 100644 --- a/vendor/symfony/console/Helper/FormatterHelper.php +++ b/vendor/symfony/console/Helper/FormatterHelper.php @@ -45,7 +45,7 @@ class FormatterHelper extends Helper */ public function formatBlock($messages, $style, $large = false) { - if (!is_array($messages)) { + if (!\is_array($messages)) { $messages = array($messages); } diff --git a/vendor/symfony/console/Helper/Helper.php b/vendor/symfony/console/Helper/Helper.php index 0954bad6..50901855 100644 --- a/vendor/symfony/console/Helper/Helper.php +++ b/vendor/symfony/console/Helper/Helper.php @@ -48,7 +48,7 @@ abstract class Helper implements HelperInterface public static function strlen($string) { if (false === $encoding = mb_detect_encoding($string, null, true)) { - return strlen($string); + return \strlen($string); } return mb_strwidth($string, $encoding); @@ -89,9 +89,9 @@ abstract class Helper implements HelperInterface foreach ($timeFormats as $index => $format) { if ($secs >= $format[0]) { if ((isset($timeFormats[$index + 1]) && $secs < $timeFormats[$index + 1][0]) - || $index == count($timeFormats) - 1 + || $index == \count($timeFormats) - 1 ) { - if (2 == count($format)) { + if (2 == \count($format)) { return $format[1]; } diff --git a/vendor/symfony/console/Helper/HelperSet.php b/vendor/symfony/console/Helper/HelperSet.php index 24ce18fb..4c44b05f 100644 --- a/vendor/symfony/console/Helper/HelperSet.php +++ b/vendor/symfony/console/Helper/HelperSet.php @@ -33,7 +33,7 @@ class HelperSet implements \IteratorAggregate public function __construct(array $helpers = array()) { foreach ($helpers as $alias => $helper) { - $this->set($helper, is_int($alias) ? null : $alias); + $this->set($helper, \is_int($alias) ? null : $alias); } } diff --git a/vendor/symfony/console/Helper/InputAwareHelper.php b/vendor/symfony/console/Helper/InputAwareHelper.php index 42617674..0d0dba23 100644 --- a/vendor/symfony/console/Helper/InputAwareHelper.php +++ b/vendor/symfony/console/Helper/InputAwareHelper.php @@ -11,8 +11,8 @@ namespace Symfony\Component\Console\Helper; -use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputAwareInterface; +use Symfony\Component\Console\Input\InputInterface; /** * An implementation of InputAwareInterface for Helpers. diff --git a/vendor/symfony/console/Helper/ProcessHelper.php b/vendor/symfony/console/Helper/ProcessHelper.php index 82935bae..666f114a 100644 --- a/vendor/symfony/console/Helper/ProcessHelper.php +++ b/vendor/symfony/console/Helper/ProcessHelper.php @@ -121,7 +121,7 @@ class ProcessHelper extends Helper $output->write($formatter->progress(spl_object_hash($process), $this->escapeString($buffer), Process::ERR === $type)); if (null !== $callback) { - call_user_func($callback, $type, $buffer); + \call_user_func($callback, $type, $buffer); } }; } diff --git a/vendor/symfony/console/Helper/ProgressBar.php b/vendor/symfony/console/Helper/ProgressBar.php index a9d07867..38452b06 100644 --- a/vendor/symfony/console/Helper/ProgressBar.php +++ b/vendor/symfony/console/Helper/ProgressBar.php @@ -11,10 +11,10 @@ namespace Symfony\Component\Console\Helper; +use Symfony\Component\Console\Exception\LogicException; use Symfony\Component\Console\Output\ConsoleOutputInterface; use Symfony\Component\Console\Output\ConsoleSectionOutput; use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Exception\LogicException; use Symfony\Component\Console\Terminal; /** @@ -496,7 +496,7 @@ final class ProgressBar $regex = "{%([a-z\-_]+)(?:\:([^%]+))?%}i"; $callback = function ($matches) { if ($formatter = $this::getPlaceholderFormatterDefinition($matches[1])) { - $text = call_user_func($formatter, $this, $this->output); + $text = \call_user_func($formatter, $this, $this->output); } elseif (isset($this->messages[$matches[1]])) { $text = $this->messages[$matches[1]]; } else { diff --git a/vendor/symfony/console/Helper/ProgressIndicator.php b/vendor/symfony/console/Helper/ProgressIndicator.php index e6094647..fe516df0 100644 --- a/vendor/symfony/console/Helper/ProgressIndicator.php +++ b/vendor/symfony/console/Helper/ProgressIndicator.php @@ -53,7 +53,7 @@ class ProgressIndicator $indicatorValues = array_values($indicatorValues); - if (2 > count($indicatorValues)) { + if (2 > \count($indicatorValues)) { throw new InvalidArgumentException('Must have at least 2 indicator value characters.'); } @@ -196,7 +196,7 @@ class ProgressIndicator $this->overwrite(preg_replace_callback("{%([a-z\-_]+)(?:\:([^%]+))?%}i", function ($matches) use ($self) { if ($formatter = $self::getPlaceholderFormatterDefinition($matches[1])) { - return call_user_func($formatter, $self); + return \call_user_func($formatter, $self); } return $matches[0]; @@ -239,7 +239,7 @@ class ProgressIndicator { return array( 'indicator' => function (ProgressIndicator $indicator) { - return $indicator->indicatorValues[$indicator->indicatorCurrent % count($indicator->indicatorValues)]; + return $indicator->indicatorValues[$indicator->indicatorCurrent % \count($indicator->indicatorValues)]; }, 'message' => function (ProgressIndicator $indicator) { return $indicator->message; diff --git a/vendor/symfony/console/Helper/QuestionHelper.php b/vendor/symfony/console/Helper/QuestionHelper.php index 46e1383e..a0141c83 100644 --- a/vendor/symfony/console/Helper/QuestionHelper.php +++ b/vendor/symfony/console/Helper/QuestionHelper.php @@ -18,8 +18,8 @@ use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\StreamableInputInterface; use Symfony\Component\Console\Output\ConsoleOutputInterface; use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Question\Question; use Symfony\Component\Console\Question\ChoiceQuestion; +use Symfony\Component\Console\Question\Question; /** * The QuestionHelper class provides helpers to interact with the user. @@ -120,10 +120,10 @@ class QuestionHelper extends Helper $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, \is_array($autocomplete) ? $autocomplete : iterator_to_array($autocomplete, false))); } - $ret = strlen($ret) > 0 ? $ret : $question->getDefault(); + $ret = \strlen($ret) > 0 ? $ret : $question->getDefault(); if ($normalizer = $question->getNormalizer()) { return $normalizer($ret); @@ -184,7 +184,7 @@ class QuestionHelper extends Helper $i = 0; $ofs = -1; $matches = $autocomplete; - $numMatches = count($matches); + $numMatches = \count($matches); $sttyMode = shell_exec('stty -g'); @@ -209,7 +209,7 @@ class QuestionHelper extends Helper if (0 === $i) { $ofs = -1; $matches = $autocomplete; - $numMatches = count($matches); + $numMatches = \count($matches); } else { $numMatches = 0; } @@ -233,13 +233,13 @@ class QuestionHelper extends Helper $ofs += ('A' === $c[2]) ? -1 : 1; $ofs = ($numMatches + $ofs) % $numMatches; } - } elseif (ord($c) < 32) { + } elseif (\ord($c) < 32) { if ("\t" === $c || "\n" === $c) { if ($numMatches > 0 && -1 !== $ofs) { $ret = $matches[$ofs]; // Echo out remaining chars for current match $output->write(substr($ret, $i)); - $i = strlen($ret); + $i = \strlen($ret); } if ("\n" === $c) { @@ -296,7 +296,7 @@ class QuestionHelper extends Helper */ private function getHiddenResponse(OutputInterface $output, $inputStream): string { - if ('\\' === DIRECTORY_SEPARATOR) { + if ('\\' === \DIRECTORY_SEPARATOR) { $exe = __DIR__.'/../Resources/bin/hiddeninput.exe'; // handle code running from a phar @@ -366,7 +366,7 @@ class QuestionHelper extends Helper } try { - return call_user_func($question->getValidator(), $interviewer()); + return \call_user_func($question->getValidator(), $interviewer()); } catch (RuntimeException $e) { throw $e; } catch (\Exception $error) { diff --git a/vendor/symfony/console/Helper/SymfonyQuestionHelper.php b/vendor/symfony/console/Helper/SymfonyQuestionHelper.php index 79016b9f..96977720 100644 --- a/vendor/symfony/console/Helper/SymfonyQuestionHelper.php +++ b/vendor/symfony/console/Helper/SymfonyQuestionHelper.php @@ -11,12 +11,12 @@ namespace Symfony\Component\Console\Helper; +use Symfony\Component\Console\Formatter\OutputFormatter; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Question\ChoiceQuestion; use Symfony\Component\Console\Question\ConfirmationQuestion; use Symfony\Component\Console\Question\Question; use Symfony\Component\Console\Style\SymfonyStyle; -use Symfony\Component\Console\Formatter\OutputFormatter; /** * Symfony Style Guide compliant question helper. diff --git a/vendor/symfony/console/Helper/Table.php b/vendor/symfony/console/Helper/Table.php index 54f61dc2..f0dbec4e 100644 --- a/vendor/symfony/console/Helper/Table.php +++ b/vendor/symfony/console/Helper/Table.php @@ -11,10 +11,10 @@ namespace Symfony\Component\Console\Helper; -use Symfony\Component\Console\Output\ConsoleSectionOutput; -use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Exception\InvalidArgumentException; use Symfony\Component\Console\Exception\RuntimeException; +use Symfony\Component\Console\Output\ConsoleSectionOutput; +use Symfony\Component\Console\Output\OutputInterface; /** * Provides helpers to display a table. @@ -222,7 +222,7 @@ class Table public function setHeaders(array $headers) { $headers = array_values($headers); - if (!empty($headers) && !is_array($headers[0])) { + if (!empty($headers) && !\is_array($headers[0])) { $headers = array($headers); } @@ -255,7 +255,7 @@ class Table return $this; } - if (!is_array($row)) { + if (!\is_array($row)) { throw new InvalidArgumentException('A row must be an array or a TableSeparator instance.'); } @@ -400,7 +400,7 @@ class Table { $rowContent = $this->renderColumnSeparator(self::BORDER_OUTSIDE); $columns = $this->getRowColumns($row); - $last = count($columns) - 1; + $last = \count($columns) - 1; foreach ($columns as $i => $column) { $rowContent .= $this->renderCell($row, $column, $cellFormat); $rowContent .= $this->renderColumnSeparator($last === $i ? self::BORDER_OUTSIDE : self::BORDER_INSIDE); @@ -424,7 +424,7 @@ class Table // str_pad won't work properly with multi-byte strings, we need to fix the padding if (false !== $encoding = mb_detect_encoding($cell, null, true)) { - $width += strlen($cell) - mb_strwidth($cell, $encoding); + $width += \strlen($cell) - mb_strwidth($cell, $encoding); } $style = $this->getColumnStyle($column); @@ -459,7 +459,7 @@ class Table private function buildTableRows($rows) { $unmergedRows = array(); - for ($rowKey = 0; $rowKey < count($rows); ++$rowKey) { + for ($rowKey = 0; $rowKey < \count($rows); ++$rowKey) { $rows = $this->fillNextRows($rows, $rowKey); // Remove any new line breaks and replace it with a new line @@ -496,7 +496,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, array(new TableSeparator()), $this->rows)))); if ($this->headers) { ++$numberOfRows; // Add row for header separator @@ -516,15 +516,15 @@ class Table { $unmergedRows = array(); 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 (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); if (strstr($cell, "\n")) { $lines = explode("\n", str_replace("\n", "\n", $cell)); - $nbLines = count($lines) > $nbLines ? substr_count($cell, "\n") : $nbLines; + $nbLines = \count($lines) > $nbLines ? substr_count($cell, "\n") : $nbLines; $rows[$line][$column] = new TableCell($lines[0], array('colspan' => $cell->getColspan())); unset($lines[0]); @@ -544,7 +544,7 @@ class Table foreach ($unmergedRows as $unmergedRowKey => $unmergedRow) { // we need to know if $unmergedRow will be merged or inserted into $rows - if (isset($rows[$unmergedRowKey]) && is_array($rows[$unmergedRowKey]) && ($this->getNumberOfColumns($rows[$unmergedRowKey]) + $this->getNumberOfColumns($unmergedRows[$unmergedRowKey]) <= $this->numberOfColumns)) { + 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)); @@ -600,7 +600,7 @@ class Table */ private function getNumberOfColumns(array $row): int { - $columns = count($row); + $columns = \count($row); foreach ($row as $column) { $columns += $column instanceof TableCell ? ($column->getColspan() - 1) : 0; } @@ -652,13 +652,13 @@ class Table $lengths[] = $this->getCellWidth($row, $column); } - $this->effectiveColumnWidths[$column] = max($lengths) + strlen($this->style->getCellRowContentFormat()) - 2; + $this->effectiveColumnWidths[$column] = max($lengths) + \strlen($this->style->getCellRowContentFormat()) - 2; } } private function getColumnSeparatorWidth(): int { - return strlen(sprintf($this->style->getBorderFormat(), $this->style->getBorderChars()[3])); + return \strlen(sprintf($this->style->getBorderFormat(), $this->style->getBorderChars()[3])); } private function getCellWidth(array $row, int $column): int diff --git a/vendor/symfony/console/Helper/TableStyle.php b/vendor/symfony/console/Helper/TableStyle.php index a0d0b5b7..0536713a 100644 --- a/vendor/symfony/console/Helper/TableStyle.php +++ b/vendor/symfony/console/Helper/TableStyle.php @@ -110,7 +110,7 @@ class TableStyle */ public function setHorizontalBorderChar($horizontalBorderChar) { - @trigger_error(sprintf('Method %s() is deprecated since Symfony 4.1, use setHorizontalBorderChars() instead.', __METHOD__), E_USER_DEPRECATED); + @trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.1, use setHorizontalBorderChars() instead.', __METHOD__), E_USER_DEPRECATED); return $this->setHorizontalBorderChars($horizontalBorderChar, $horizontalBorderChar); } @@ -124,7 +124,7 @@ class TableStyle */ public function getHorizontalBorderChar() { - @trigger_error(sprintf('Method %s() is deprecated since Symfony 4.1, use getBorderChars() instead.', __METHOD__), E_USER_DEPRECATED); + @trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.1, use getBorderChars() instead.', __METHOD__), E_USER_DEPRECATED); return $this->horizontalOutsideBorderChar; } @@ -166,7 +166,7 @@ class TableStyle */ public function setVerticalBorderChar($verticalBorderChar) { - @trigger_error(sprintf('Method %s() is deprecated since Symfony 4.1, use setVerticalBorderChars() instead.', __METHOD__), E_USER_DEPRECATED); + @trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.1, use setVerticalBorderChars() instead.', __METHOD__), E_USER_DEPRECATED); return $this->setVerticalBorderChars($verticalBorderChar, $verticalBorderChar); } @@ -180,7 +180,7 @@ class TableStyle */ public function getVerticalBorderChar() { - @trigger_error(sprintf('Method %s() is deprecated since Symfony 4.1, use getBorderChars() instead.', __METHOD__), E_USER_DEPRECATED); + @trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.1, use getBorderChars() instead.', __METHOD__), E_USER_DEPRECATED); return $this->verticalOutsideBorderChar; } @@ -268,7 +268,7 @@ class TableStyle */ public function setCrossingChar($crossingChar) { - @trigger_error(sprintf('Method %s() is deprecated since Symfony 4.1. Use setDefaultCrossingChar() instead.', __METHOD__), E_USER_DEPRECATED); + @trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.1. Use setDefaultCrossingChar() instead.', __METHOD__), E_USER_DEPRECATED); return $this->setDefaultCrossingChar($crossingChar); } @@ -411,7 +411,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, array(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 edeabdbf..da268677 100644 --- a/vendor/symfony/console/Input/ArgvInput.php +++ b/vendor/symfony/console/Input/ArgvInput.php @@ -97,7 +97,7 @@ class ArgvInput extends Input { $name = substr($token, 1); - if (strlen($name) > 1) { + if (\strlen($name) > 1) { if ($this->definition->hasShortcut($name[0]) && $this->definition->getOptionForShortcut($name[0])->acceptValue()) { // an option with a value (with no space) $this->addShortOption($name[0], substr($name, 1)); @@ -118,7 +118,7 @@ class ArgvInput extends Input */ private function parseShortOptionSet($name) { - $len = strlen($name); + $len = \strlen($name); for ($i = 0; $i < $len; ++$i) { if (!$this->definition->hasShortcut($name[$i])) { throw new RuntimeException(sprintf('The "-%s" option does not exist.', $name[$i])); @@ -145,7 +145,7 @@ class ArgvInput extends Input $name = substr($token, 2); if (false !== $pos = strpos($name, '=')) { - if (0 === strlen($value = substr($name, $pos + 1))) { + if (0 === \strlen($value = substr($name, $pos + 1))) { array_unshift($this->parsed, $value); } $this->addLongOption(substr($name, 0, $pos), $value); @@ -163,7 +163,7 @@ class ArgvInput extends Input */ private function parseArgument($token) { - $c = count($this->arguments); + $c = \count($this->arguments); // if input is expecting another argument, add it if ($this->definition->hasArgument($c)) { @@ -178,7 +178,7 @@ class ArgvInput extends Input // unexpected argument } else { $all = $this->definition->getArguments(); - if (count($all)) { + if (\count($all)) { throw new RuntimeException(sprintf('Too many arguments, expected arguments "%s".', implode('" "', array_keys($all)))); } @@ -223,11 +223,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, array('', 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, array('', null), true)) { $value = $next; } else { array_unshift($this->parsed, $next); @@ -298,10 +298,10 @@ class ArgvInput extends Input $values = (array) $values; $tokens = $this->tokens; - while (0 < count($tokens)) { + while (0 < \count($tokens)) { $token = array_shift($tokens); if ($onlyParams && '--' === $token) { - return false; + return $default; } foreach ($values as $value) { @@ -313,7 +313,7 @@ class ArgvInput extends Input // For short options, test for '-o' at beginning $leading = 0 === strpos($value, '--') ? $value.'=' : $value; if ('' !== $leading && 0 === strpos($token, $leading)) { - return substr($token, strlen($leading)); + return substr($token, \strlen($leading)); } } } diff --git a/vendor/symfony/console/Input/ArrayInput.php b/vendor/symfony/console/Input/ArrayInput.php index 4d9797ba..8b6917fc 100644 --- a/vendor/symfony/console/Input/ArrayInput.php +++ b/vendor/symfony/console/Input/ArrayInput.php @@ -56,7 +56,7 @@ class ArrayInput extends Input $values = (array) $values; foreach ($this->parameters as $k => $v) { - if (!is_int($k)) { + if (!\is_int($k)) { $v = $k; } @@ -64,7 +64,7 @@ class ArrayInput extends Input return false; } - if (in_array($v, $values)) { + if (\in_array($v, $values)) { return true; } } @@ -80,15 +80,15 @@ class ArrayInput extends Input $values = (array) $values; foreach ($this->parameters as $k => $v) { - if ($onlyParams && ('--' === $k || (is_int($k) && '--' === $v))) { - return false; + if ($onlyParams && ('--' === $k || (\is_int($k) && '--' === $v))) { + return $default; } - if (is_int($k)) { - if (in_array($v, $values)) { + if (\is_int($k)) { + if (\in_array($v, $values)) { return true; } - } elseif (in_array($k, $values)) { + } elseif (\in_array($k, $values)) { return $v; } } @@ -106,7 +106,7 @@ class ArrayInput extends Input $params = array(); foreach ($this->parameters as $param => $val) { if ($param && '-' === $param[0]) { - if (is_array($val)) { + if (\is_array($val)) { foreach ($val as $v) { $params[] = $param.('' != $v ? '='.$this->escapeToken($v) : ''); } @@ -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(array($this, 'escapeToken'), $val)) : $this->escapeToken($val); } } diff --git a/vendor/symfony/console/Input/Input.php b/vendor/symfony/console/Input/Input.php index 41413252..fa5644d1 100644 --- a/vendor/symfony/console/Input/Input.php +++ b/vendor/symfony/console/Input/Input.php @@ -72,7 +72,7 @@ abstract class Input implements InputInterface, StreamableInputInterface return !array_key_exists($argument, $givenArguments) && $definition->getArgument($argument)->isRequired(); }); - if (count($missingArguments) > 0) { + if (\count($missingArguments) > 0) { throw new RuntimeException(sprintf('Not enough arguments (missing: "%s").', implode(', ', $missingArguments))); } } diff --git a/vendor/symfony/console/Input/InputArgument.php b/vendor/symfony/console/Input/InputArgument.php index b5cbbaf1..409c4c4a 100644 --- a/vendor/symfony/console/Input/InputArgument.php +++ b/vendor/symfony/console/Input/InputArgument.php @@ -99,7 +99,7 @@ class InputArgument if ($this->isArray()) { if (null === $default) { $default = array(); - } elseif (!is_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 6059b317..dc9f8b24 100644 --- a/vendor/symfony/console/Input/InputDefinition.php +++ b/vendor/symfony/console/Input/InputDefinition.php @@ -135,7 +135,7 @@ class InputDefinition throw new InvalidArgumentException(sprintf('The "%s" argument does not exist.', $name)); } - $arguments = is_int($name) ? array_values($this->arguments) : $this->arguments; + $arguments = \is_int($name) ? array_values($this->arguments) : $this->arguments; return $arguments[$name]; } @@ -149,7 +149,7 @@ class InputDefinition */ public function hasArgument($name) { - $arguments = is_int($name) ? array_values($this->arguments) : $this->arguments; + $arguments = \is_int($name) ? array_values($this->arguments) : $this->arguments; return isset($arguments[$name]); } @@ -171,7 +171,7 @@ class InputDefinition */ public function getArgumentCount() { - return $this->hasAnArrayArgument ? PHP_INT_MAX : count($this->arguments); + return $this->hasAnArrayArgument ? PHP_INT_MAX : \count($this->arguments); } /** @@ -378,7 +378,7 @@ class InputDefinition } } - if (count($elements) && $this->getArguments()) { + if (\count($elements) && $this->getArguments()) { $elements[] = '[--]'; } diff --git a/vendor/symfony/console/Input/InputOption.php b/vendor/symfony/console/Input/InputOption.php index 184e369b..a8dade4d 100644 --- a/vendor/symfony/console/Input/InputOption.php +++ b/vendor/symfony/console/Input/InputOption.php @@ -56,7 +56,7 @@ class InputOption } if (null !== $shortcut) { - if (is_array($shortcut)) { + if (\is_array($shortcut)) { $shortcut = implode('|', $shortcut); } $shortcuts = preg_split('{(\|)-?}', ltrim($shortcut, '-')); @@ -162,7 +162,7 @@ class InputOption if ($this->isArray()) { if (null === $default) { $default = array(); - } elseif (!is_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 d1394ece..61e29481 100644 --- a/vendor/symfony/console/Input/StringInput.php +++ b/vendor/symfony/console/Input/StringInput.php @@ -49,14 +49,14 @@ class StringInput extends ArgvInput private function tokenize($input) { $tokens = array(); - $length = strlen($input); + $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(array('"\'', '\'"', '\'\'', '""'), '', 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)); + $tokens[] = stripcslashes(substr($match[0], 1, \strlen($match[0]) - 2)); } elseif (preg_match('/'.self::REGEX_STRING.'/A', $input, $match, null, $cursor)) { $tokens[] = stripcslashes($match[1]); } else { @@ -64,7 +64,7 @@ class StringInput extends ArgvInput throw new InvalidArgumentException(sprintf('Unable to parse input near "... %s ..."', substr($input, $cursor, 10))); } - $cursor += strlen($match[0]); + $cursor += \strlen($match[0]); } return $tokens; diff --git a/vendor/symfony/console/Logger/ConsoleLogger.php b/vendor/symfony/console/Logger/ConsoleLogger.php index 9f07e1fb..0f7d551a 100644 --- a/vendor/symfony/console/Logger/ConsoleLogger.php +++ b/vendor/symfony/console/Logger/ConsoleLogger.php @@ -14,8 +14,8 @@ namespace Symfony\Component\Console\Logger; use Psr\Log\AbstractLogger; use Psr\Log\InvalidArgumentException; use Psr\Log\LogLevel; -use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Output\ConsoleOutputInterface; +use Symfony\Component\Console\Output\OutputInterface; /** * PSR-3 compliant console logger. diff --git a/vendor/symfony/console/Output/ConsoleOutput.php b/vendor/symfony/console/Output/ConsoleOutput.php index 87d93b88..e106d4f2 100644 --- a/vendor/symfony/console/Output/ConsoleOutput.php +++ b/vendor/symfony/console/Output/ConsoleOutput.php @@ -131,7 +131,7 @@ class ConsoleOutput extends StreamOutput implements ConsoleOutputInterface private function isRunningOS400() { $checks = array( - function_exists('php_uname') ? php_uname('s') : '', + \function_exists('php_uname') ? php_uname('s') : '', getenv('OSTYPE'), PHP_OS, ); diff --git a/vendor/symfony/console/Output/Output.php b/vendor/symfony/console/Output/Output.php index ab92dd83..00852e28 100644 --- a/vendor/symfony/console/Output/Output.php +++ b/vendor/symfony/console/Output/Output.php @@ -11,8 +11,8 @@ namespace Symfony\Component\Console\Output; -use Symfony\Component\Console\Formatter\OutputFormatterInterface; use Symfony\Component\Console\Formatter\OutputFormatter; +use Symfony\Component\Console\Formatter\OutputFormatterInterface; /** * Base class for output classes. diff --git a/vendor/symfony/console/Output/OutputInterface.php b/vendor/symfony/console/Output/OutputInterface.php index 5742e553..0dfd12b9 100644 --- a/vendor/symfony/console/Output/OutputInterface.php +++ b/vendor/symfony/console/Output/OutputInterface.php @@ -33,7 +33,7 @@ interface OutputInterface /** * Writes a message to the output. * - * @param string|iterable $messages The message as an iterable of lines or a single string + * @param string|iterable $messages The message as an iterable of strings or a single string * @param bool $newline Whether to add a newline * @param int $options A bitmask of options (one of the OUTPUT or VERBOSITY constants), 0 is considered the same as self::OUTPUT_NORMAL | self::VERBOSITY_NORMAL */ @@ -42,7 +42,7 @@ interface OutputInterface /** * Writes a message to the output and adds a newline at the end. * - * @param string|iterable $messages The message as an iterable of lines of a single string + * @param string|iterable $messages The message as an iterable of strings or a single string * @param int $options A bitmask of options (one of the OUTPUT or VERBOSITY constants), 0 is considered the same as self::OUTPUT_NORMAL | self::VERBOSITY_NORMAL */ public function writeln($messages, $options = 0); diff --git a/vendor/symfony/console/Output/StreamOutput.php b/vendor/symfony/console/Output/StreamOutput.php index 476b2fa0..210ce007 100644 --- a/vendor/symfony/console/Output/StreamOutput.php +++ b/vendor/symfony/console/Output/StreamOutput.php @@ -42,7 +42,7 @@ class StreamOutput extends Output */ public function __construct($stream, int $verbosity = self::VERBOSITY_NORMAL, bool $decorated = null, OutputFormatterInterface $formatter = null) { - if (!is_resource($stream) || 'stream' !== get_resource_type($stream)) { + if (!\is_resource($stream) || 'stream' !== get_resource_type($stream)) { throw new InvalidArgumentException('The StreamOutput class needs a stream as its first argument.'); } @@ -93,19 +93,23 @@ class StreamOutput extends Output */ protected function hasColorSupport() { - if (DIRECTORY_SEPARATOR === '\\') { - return (function_exists('sapi_windows_vt100_support') + if ('Hyper' === getenv('TERM_PROGRAM')) { + return true; + } + + if (\DIRECTORY_SEPARATOR === '\\') { + return (\function_exists('sapi_windows_vt100_support') && @sapi_windows_vt100_support($this->stream)) || false !== getenv('ANSICON') || 'ON' === getenv('ConEmuANSI') || 'xterm' === getenv('TERM'); } - if (function_exists('stream_isatty')) { + if (\function_exists('stream_isatty')) { return @stream_isatty($this->stream); } - if (function_exists('posix_isatty')) { + if (\function_exists('posix_isatty')) { return @posix_isatty($this->stream); } diff --git a/vendor/symfony/console/Question/ChoiceQuestion.php b/vendor/symfony/console/Question/ChoiceQuestion.php index b66f2c68..4aa6f672 100644 --- a/vendor/symfony/console/Question/ChoiceQuestion.php +++ b/vendor/symfony/console/Question/ChoiceQuestion.php @@ -151,7 +151,7 @@ class ChoiceQuestion extends Question } } - if (count($results) > 1) { + if (\count($results) > 1) { throw new InvalidArgumentException(sprintf('The provided answer is ambiguous. Value should be one of %s.', implode(' or ', $results))); } diff --git a/vendor/symfony/console/Question/ConfirmationQuestion.php b/vendor/symfony/console/Question/ConfirmationQuestion.php index 7a15e5af..26eea6a1 100644 --- a/vendor/symfony/console/Question/ConfirmationQuestion.php +++ b/vendor/symfony/console/Question/ConfirmationQuestion.php @@ -44,7 +44,7 @@ class ConfirmationQuestion extends Question $regex = $this->trueAnswerRegex; return function ($answer) use ($default, $regex) { - if (is_bool($answer)) { + if (\is_bool($answer)) { return $answer; } diff --git a/vendor/symfony/console/Question/Question.php b/vendor/symfony/console/Question/Question.php index 68399854..4e05758b 100644 --- a/vendor/symfony/console/Question/Question.php +++ b/vendor/symfony/console/Question/Question.php @@ -136,11 +136,11 @@ class Question */ public function setAutocompleterValues($values) { - if (is_array($values)) { + 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) { + if (null !== $values && !\is_array($values) && !$values instanceof \Traversable) { throw new InvalidArgumentException('Autocompleter values can be either an array, `null` or a `Traversable` object.'); } @@ -241,6 +241,6 @@ class Question protected function isAssoc($array) { - return (bool) count(array_filter(array_keys($array), 'is_string')); + return (bool) \count(array_filter(array_keys($array), 'is_string')); } } diff --git a/vendor/symfony/console/Style/OutputStyle.php b/vendor/symfony/console/Style/OutputStyle.php index ad886411..b1262b55 100644 --- a/vendor/symfony/console/Style/OutputStyle.php +++ b/vendor/symfony/console/Style/OutputStyle.php @@ -13,8 +13,8 @@ namespace Symfony\Component\Console\Style; use Symfony\Component\Console\Formatter\OutputFormatterInterface; use Symfony\Component\Console\Helper\ProgressBar; -use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Output\ConsoleOutputInterface; +use Symfony\Component\Console\Output\OutputInterface; /** * Decorates output to add console style guide helpers. diff --git a/vendor/symfony/console/Style/SymfonyStyle.php b/vendor/symfony/console/Style/SymfonyStyle.php index 08f86225..eb56a1f7 100644 --- a/vendor/symfony/console/Style/SymfonyStyle.php +++ b/vendor/symfony/console/Style/SymfonyStyle.php @@ -46,7 +46,7 @@ class SymfonyStyle extends OutputStyle $this->bufferedOutput = new BufferedOutput($output->getVerbosity(), false, clone $output->getFormatter()); // Windows cmd wraps lines as soon as the terminal width is reached, whether there are following chars or not. $width = (new Terminal())->getWidth() ?: self::MAX_LINE_LENGTH; - $this->lineLength = min($width - (int) (DIRECTORY_SEPARATOR === '\\'), self::MAX_LINE_LENGTH); + $this->lineLength = min($width - (int) (\DIRECTORY_SEPARATOR === '\\'), self::MAX_LINE_LENGTH); parent::__construct($output); } @@ -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) : array($messages); $this->autoPrependBlock(); $this->writeln($this->createBlock($messages, $type, $style, $prefix, $padding, $escape)); @@ -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) : array($message); foreach ($messages as $message) { $this->writeln(sprintf(' %s', $message)); } @@ -269,7 +269,7 @@ class SymfonyStyle extends OutputStyle { $progressBar = parent::createProgressBar($max); - if ('\\' !== DIRECTORY_SEPARATOR) { + if ('\\' !== \DIRECTORY_SEPARATOR || 'Hyper' === getenv('TERM_PROGRAM')) { $progressBar->setEmptyBarCharacter('░'); // light shade character \u2591 $progressBar->setProgressCharacter(''); $progressBar->setBarCharacter('▓'); // dark shade character \u2593 @@ -396,7 +396,7 @@ class SymfonyStyle extends OutputStyle if (null !== $type) { $type = sprintf('[%s] ', $type); - $indentLength = strlen($type); + $indentLength = \strlen($type); $lineIndentation = str_repeat(' ', $indentLength); } @@ -408,7 +408,7 @@ class SymfonyStyle extends OutputStyle $lines = array_merge($lines, explode(PHP_EOL, wordwrap($message, $this->lineLength - $prefixLength - $indentLength, PHP_EOL, true))); - if (count($messages) > 1 && $key < count($messages) - 1) { + if (\count($messages) > 1 && $key < \count($messages) - 1) { $lines[] = ''; } } diff --git a/vendor/symfony/console/Terminal.php b/vendor/symfony/console/Terminal.php index 927dfc4d..3930ca0c 100644 --- a/vendor/symfony/console/Terminal.php +++ b/vendor/symfony/console/Terminal.php @@ -56,7 +56,7 @@ class Terminal private static function initDimensions() { - if ('\\' === DIRECTORY_SEPARATOR) { + if ('\\' === \DIRECTORY_SEPARATOR) { if (preg_match('/^(\d+)x(\d+)(?: \((\d+)x(\d+)\))?$/', trim(getenv('ANSICON')), $matches)) { // extract [w, H] from "wxh (WxH)" // or [w, h] from "wxh" @@ -87,7 +87,7 @@ class Terminal */ private static function getConsoleMode() { - if (!function_exists('proc_open')) { + if (!\function_exists('proc_open')) { return; } @@ -96,7 +96,7 @@ class Terminal 2 => array('pipe', 'w'), ); $process = proc_open('mode CON', $descriptorspec, $pipes, null, null, array('suppress_errors' => true)); - if (is_resource($process)) { + if (\is_resource($process)) { $info = stream_get_contents($pipes[1]); fclose($pipes[1]); fclose($pipes[2]); @@ -115,7 +115,7 @@ class Terminal */ private static function getSttyColumns() { - if (!function_exists('proc_open')) { + if (!\function_exists('proc_open')) { return; } @@ -125,7 +125,7 @@ class Terminal ); $process = proc_open('stty -a | grep columns', $descriptorspec, $pipes, null, null, array('suppress_errors' => true)); - if (is_resource($process)) { + if (\is_resource($process)) { $info = stream_get_contents($pipes[1]); fclose($pipes[1]); fclose($pipes[2]); diff --git a/vendor/symfony/console/Tests/ApplicationTest.php b/vendor/symfony/console/Tests/ApplicationTest.php index 1444ffe1..28c37bb4 100644 --- a/vendor/symfony/console/Tests/ApplicationTest.php +++ b/vendor/symfony/console/Tests/ApplicationTest.php @@ -16,24 +16,24 @@ use Symfony\Component\Console\Application; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\CommandLoader\FactoryCommandLoader; use Symfony\Component\Console\DependencyInjection\AddConsoleCommandPass; +use Symfony\Component\Console\Event\ConsoleCommandEvent; +use Symfony\Component\Console\Event\ConsoleErrorEvent; +use Symfony\Component\Console\Event\ConsoleTerminateEvent; +use Symfony\Component\Console\Exception\CommandNotFoundException; use Symfony\Component\Console\Exception\NamespaceNotFoundException; -use Symfony\Component\Console\Helper\HelperSet; use Symfony\Component\Console\Helper\FormatterHelper; +use Symfony\Component\Console\Helper\HelperSet; use Symfony\Component\Console\Input\ArgvInput; use Symfony\Component\Console\Input\ArrayInput; -use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputDefinition; +use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\NullOutput; use Symfony\Component\Console\Output\Output; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Output\StreamOutput; use Symfony\Component\Console\Tester\ApplicationTester; -use Symfony\Component\Console\Event\ConsoleCommandEvent; -use Symfony\Component\Console\Event\ConsoleErrorEvent; -use Symfony\Component\Console\Event\ConsoleTerminateEvent; -use Symfony\Component\Console\Exception\CommandNotFoundException; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\EventDispatcher\EventDispatcher; diff --git a/vendor/symfony/console/Tests/Command/CommandTest.php b/vendor/symfony/console/Tests/Command/CommandTest.php index 0e516321..78e4d906 100644 --- a/vendor/symfony/console/Tests/Command/CommandTest.php +++ b/vendor/symfony/console/Tests/Command/CommandTest.php @@ -12,16 +12,16 @@ namespace Symfony\Component\Console\Tests\Command; use PHPUnit\Framework\TestCase; +use Symfony\Component\Console\Application; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Helper\FormatterHelper; -use Symfony\Component\Console\Application; -use Symfony\Component\Console\Input\InputDefinition; use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputOption; +use Symfony\Component\Console\Input\InputDefinition; use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Input\StringInput; -use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Output\NullOutput; +use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Tester\CommandTester; class CommandTest extends TestCase @@ -340,7 +340,7 @@ class CommandTest extends TestCase $command->setApplication(new Application()); $command->setProcessTitle('foo'); $this->assertSame(0, $command->run(new StringInput(''), new NullOutput())); - if (function_exists('cli_set_process_title')) { + if (\function_exists('cli_set_process_title')) { if (null === @cli_get_process_title() && 'Darwin' === PHP_OS) { $this->markTestSkipped('Running "cli_get_process_title" as an unprivileged user is not supported on MacOS.'); } diff --git a/vendor/symfony/console/Tests/Command/HelpCommandTest.php b/vendor/symfony/console/Tests/Command/HelpCommandTest.php index 4d618ac1..30fe2b6e 100644 --- a/vendor/symfony/console/Tests/Command/HelpCommandTest.php +++ b/vendor/symfony/console/Tests/Command/HelpCommandTest.php @@ -12,10 +12,10 @@ namespace Symfony\Component\Console\Tests\Command; use PHPUnit\Framework\TestCase; -use Symfony\Component\Console\Tester\CommandTester; +use Symfony\Component\Console\Application; use Symfony\Component\Console\Command\HelpCommand; use Symfony\Component\Console\Command\ListCommand; -use Symfony\Component\Console\Application; +use Symfony\Component\Console\Tester\CommandTester; class HelpCommandTest extends TestCase { diff --git a/vendor/symfony/console/Tests/Command/ListCommandTest.php b/vendor/symfony/console/Tests/Command/ListCommandTest.php index 64478ecc..b39f7ec5 100644 --- a/vendor/symfony/console/Tests/Command/ListCommandTest.php +++ b/vendor/symfony/console/Tests/Command/ListCommandTest.php @@ -12,8 +12,8 @@ namespace Symfony\Component\Console\Tests\Command; use PHPUnit\Framework\TestCase; -use Symfony\Component\Console\Tester\CommandTester; use Symfony\Component\Console\Application; +use Symfony\Component\Console\Tester\CommandTester; class ListCommandTest extends TestCase { diff --git a/vendor/symfony/console/Tests/EventListener/ErrorListenerTest.php b/vendor/symfony/console/Tests/EventListener/ErrorListenerTest.php index 3794a266..b3f3fb45 100644 --- a/vendor/symfony/console/Tests/EventListener/ErrorListenerTest.php +++ b/vendor/symfony/console/Tests/EventListener/ErrorListenerTest.php @@ -20,8 +20,8 @@ use Symfony\Component\Console\EventListener\ErrorListener; use Symfony\Component\Console\Input\ArgvInput; use Symfony\Component\Console\Input\ArrayInput; use Symfony\Component\Console\Input\Input; -use Symfony\Component\Console\Input\StringInput; use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Input\StringInput; use Symfony\Component\Console\Output\OutputInterface; class ErrorListenerTest extends TestCase diff --git a/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_8.php b/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_8.php index 922ef1f9..16b26b52 100644 --- a/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_8.php +++ b/vendor/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_8.php @@ -1,9 +1,9 @@ markTestSkipped('This test is not supported on Windows'); } @@ -276,7 +276,7 @@ class QuestionHelperTest extends AbstractQuestionHelperTest $error = 'This is not a color!'; $validator = function ($color) use ($error) { - if (!in_array($color, array('white', 'black'))) { + if (!\in_array($color, array('white', 'black'))) { throw new \InvalidArgumentException($error); } diff --git a/vendor/symfony/console/Tests/Helper/SymfonyQuestionHelperTest.php b/vendor/symfony/console/Tests/Helper/SymfonyQuestionHelperTest.php index ce946e5b..fff72d42 100644 --- a/vendor/symfony/console/Tests/Helper/SymfonyQuestionHelperTest.php +++ b/vendor/symfony/console/Tests/Helper/SymfonyQuestionHelperTest.php @@ -6,8 +6,8 @@ use Symfony\Component\Console\Helper\FormatterHelper; use Symfony\Component\Console\Helper\HelperSet; use Symfony\Component\Console\Helper\SymfonyQuestionHelper; use Symfony\Component\Console\Output\StreamOutput; -use Symfony\Component\Console\Question\Question; use Symfony\Component\Console\Question\ChoiceQuestion; +use Symfony\Component\Console\Question\Question; /** * @group tty diff --git a/vendor/symfony/console/Tests/Helper/TableTest.php b/vendor/symfony/console/Tests/Helper/TableTest.php index 5d450e64..508db666 100644 --- a/vendor/symfony/console/Tests/Helper/TableTest.php +++ b/vendor/symfony/console/Tests/Helper/TableTest.php @@ -14,9 +14,9 @@ namespace Symfony\Component\Console\Tests\Helper; use PHPUnit\Framework\TestCase; use Symfony\Component\Console\Formatter\OutputFormatter; use Symfony\Component\Console\Helper\Table; -use Symfony\Component\Console\Helper\TableStyle; -use Symfony\Component\Console\Helper\TableSeparator; use Symfony\Component\Console\Helper\TableCell; +use Symfony\Component\Console\Helper\TableSeparator; +use Symfony\Component\Console\Helper\TableStyle; use Symfony\Component\Console\Output\ConsoleSectionOutput; use Symfony\Component\Console\Output\StreamOutput; diff --git a/vendor/symfony/console/Tests/Input/ArgvInputTest.php b/vendor/symfony/console/Tests/Input/ArgvInputTest.php index 61d1723e..75742409 100644 --- a/vendor/symfony/console/Tests/Input/ArgvInputTest.php +++ b/vendor/symfony/console/Tests/Input/ArgvInputTest.php @@ -13,8 +13,8 @@ namespace Symfony\Component\Console\Tests\Input; use PHPUnit\Framework\TestCase; use Symfony\Component\Console\Input\ArgvInput; -use Symfony\Component\Console\Input\InputDefinition; use Symfony\Component\Console\Input\InputArgument; +use Symfony\Component\Console\Input\InputDefinition; use Symfony\Component\Console\Input\InputOption; class ArgvInputTest extends TestCase @@ -395,25 +395,26 @@ class ArgvInputTest extends TestCase /** * @dataProvider provideGetParameterOptionValues */ - public function testGetParameterOptionEqualSign($argv, $key, $onlyParams, $expected) + public function testGetParameterOptionEqualSign($argv, $key, $default, $onlyParams, $expected) { $input = new ArgvInput($argv); - $this->assertEquals($expected, $input->getParameterOption($key, false, $onlyParams), '->getParameterOption() returns the expected value'); + $this->assertEquals($expected, $input->getParameterOption($key, $default, $onlyParams), '->getParameterOption() returns the expected value'); } public function provideGetParameterOptionValues() { return array( - array(array('app/console', 'foo:bar', '-e', 'dev'), '-e', false, 'dev'), - array(array('app/console', 'foo:bar', '--env=dev'), '--env', false, 'dev'), - array(array('app/console', 'foo:bar', '-e', 'dev'), array('-e', '--env'), false, 'dev'), - array(array('app/console', 'foo:bar', '--env=dev'), array('-e', '--env'), false, 'dev'), - array(array('app/console', 'foo:bar', '--env=dev', '--en=1'), array('--en'), false, '1'), - array(array('app/console', 'foo:bar', '--env=dev', '', '--en=1'), array('--en'), false, '1'), - array(array('app/console', 'foo:bar', '--env', 'val'), '--env', false, 'val'), - array(array('app/console', 'foo:bar', '--env', 'val', '--dummy'), '--env', false, 'val'), - array(array('app/console', 'foo:bar', '--', '--env=dev'), '--env', false, 'dev'), - array(array('app/console', 'foo:bar', '--', '--env=dev'), '--env', true, false), + 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'), ); } diff --git a/vendor/symfony/console/Tests/Input/ArrayInputTest.php b/vendor/symfony/console/Tests/Input/ArrayInputTest.php index 6b443e0b..4bc83b3c 100644 --- a/vendor/symfony/console/Tests/Input/ArrayInputTest.php +++ b/vendor/symfony/console/Tests/Input/ArrayInputTest.php @@ -13,8 +13,8 @@ namespace Symfony\Component\Console\Tests\Input; use PHPUnit\Framework\TestCase; use Symfony\Component\Console\Input\ArrayInput; -use Symfony\Component\Console\Input\InputDefinition; use Symfony\Component\Console\Input\InputArgument; +use Symfony\Component\Console\Input\InputDefinition; use Symfony\Component\Console\Input\InputOption; class ArrayInputTest extends TestCase @@ -47,14 +47,14 @@ class ArrayInputTest extends TestCase { $input = new ArrayInput(array('name' => 'Fabien', '--foo' => 'bar')); $this->assertEquals('bar', $input->getParameterOption('--foo'), '->getParameterOption() returns the option of specified name'); - $this->assertFalse($input->getParameterOption('--bar'), '->getParameterOption() returns the default if an option is not present in the passed parameters'); + $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')); $this->assertEquals('bar', $input->getParameterOption('--foo'), '->getParameterOption() returns the option of specified name'); $input = new ArrayInput(array('--foo', '--', '--bar' => 'woop')); $this->assertEquals('woop', $input->getParameterOption('--bar'), '->getParameterOption() returns the correct value if an option is present in the passed parameters'); - $this->assertFalse($input->getParameterOption('--bar', false, true), '->getParameterOption() returns false if an option is present in the passed parameters after an end of options signal'); + $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() diff --git a/vendor/symfony/console/Tests/Input/InputDefinitionTest.php b/vendor/symfony/console/Tests/Input/InputDefinitionTest.php index 6bebca58..0fd43421 100644 --- a/vendor/symfony/console/Tests/Input/InputDefinitionTest.php +++ b/vendor/symfony/console/Tests/Input/InputDefinitionTest.php @@ -12,8 +12,8 @@ namespace Symfony\Component\Console\Tests\Input; use PHPUnit\Framework\TestCase; -use Symfony\Component\Console\Input\InputDefinition; use Symfony\Component\Console\Input\InputArgument; +use Symfony\Component\Console\Input\InputDefinition; use Symfony\Component\Console\Input\InputOption; class InputDefinitionTest extends TestCase diff --git a/vendor/symfony/console/Tests/Input/InputTest.php b/vendor/symfony/console/Tests/Input/InputTest.php index 4410d2f5..7cf1d244 100644 --- a/vendor/symfony/console/Tests/Input/InputTest.php +++ b/vendor/symfony/console/Tests/Input/InputTest.php @@ -13,8 +13,8 @@ namespace Symfony\Component\Console\Tests\Input; use PHPUnit\Framework\TestCase; use Symfony\Component\Console\Input\ArrayInput; -use Symfony\Component\Console\Input\InputDefinition; use Symfony\Component\Console\Input\InputArgument; +use Symfony\Component\Console\Input\InputDefinition; use Symfony\Component\Console\Input\InputOption; class InputTest extends TestCase diff --git a/vendor/symfony/console/Tests/Logger/ConsoleLoggerTest.php b/vendor/symfony/console/Tests/Logger/ConsoleLoggerTest.php index 734a153e..95e78fc2 100644 --- a/vendor/symfony/console/Tests/Logger/ConsoleLoggerTest.php +++ b/vendor/symfony/console/Tests/Logger/ConsoleLoggerTest.php @@ -16,8 +16,8 @@ use Psr\Log\LoggerInterface; use Psr\Log\LogLevel; use Symfony\Component\Console\Logger\ConsoleLogger; use Symfony\Component\Console\Output\BufferedOutput; -use Symfony\Component\Console\Tests\Fixtures\DummyOutput; use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\Console\Tests\Fixtures\DummyOutput; /** * Console logger test. diff --git a/vendor/symfony/console/Tests/Output/OutputTest.php b/vendor/symfony/console/Tests/Output/OutputTest.php index 6ee2dbdb..24347f62 100644 --- a/vendor/symfony/console/Tests/Output/OutputTest.php +++ b/vendor/symfony/console/Tests/Output/OutputTest.php @@ -12,8 +12,8 @@ namespace Symfony\Component\Console\Tests\Output; use PHPUnit\Framework\TestCase; -use Symfony\Component\Console\Output\Output; use Symfony\Component\Console\Formatter\OutputFormatterStyle; +use Symfony\Component\Console\Output\Output; class OutputTest extends TestCase { diff --git a/vendor/symfony/console/Tests/Style/SymfonyStyleTest.php b/vendor/symfony/console/Tests/Style/SymfonyStyleTest.php index 865bb33f..308030bb 100644 --- a/vendor/symfony/console/Tests/Style/SymfonyStyleTest.php +++ b/vendor/symfony/console/Tests/Style/SymfonyStyleTest.php @@ -13,12 +13,12 @@ namespace Symfony\Component\Console\Tests\Style; use PHPUnit\Framework\TestCase; use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Tester\CommandTester; use Symfony\Component\Console\Formatter\OutputFormatter; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Output\ConsoleOutputInterface; use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\ConsoleOutputInterface; +use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Style\SymfonyStyle; +use Symfony\Component\Console\Tester\CommandTester; class SymfonyStyleTest extends TestCase { diff --git a/vendor/symfony/console/Tests/Tester/CommandTesterTest.php b/vendor/symfony/console/Tests/Tester/CommandTesterTest.php index 8d86da43..58eb8103 100644 --- a/vendor/symfony/console/Tests/Tester/CommandTesterTest.php +++ b/vendor/symfony/console/Tests/Tester/CommandTesterTest.php @@ -14,12 +14,12 @@ namespace Symfony\Component\Console\Tests\Tester; use PHPUnit\Framework\TestCase; use Symfony\Component\Console\Application; use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Output\Output; -use Symfony\Component\Console\Tester\CommandTester; -use Symfony\Component\Console\Question\Question; use Symfony\Component\Console\Helper\HelperSet; use Symfony\Component\Console\Helper\QuestionHelper; +use Symfony\Component\Console\Output\Output; +use Symfony\Component\Console\Question\Question; use Symfony\Component\Console\Style\SymfonyStyle; +use Symfony\Component\Console\Tester\CommandTester; class CommandTesterTest extends TestCase { diff --git a/vendor/symfony/css-selector/Node/AbstractNode.php b/vendor/symfony/css-selector/Node/AbstractNode.php index 123ef1b1..aac3f0a5 100644 --- a/vendor/symfony/css-selector/Node/AbstractNode.php +++ b/vendor/symfony/css-selector/Node/AbstractNode.php @@ -34,7 +34,7 @@ abstract class AbstractNode implements NodeInterface public function getNodeName(): string { if (null === $this->nodeName) { - $this->nodeName = preg_replace('~.*\\\\([^\\\\]+)Node$~', '$1', get_called_class()); + $this->nodeName = preg_replace('~.*\\\\([^\\\\]+)Node$~', '$1', \get_called_class()); } return $this->nodeName; diff --git a/vendor/symfony/css-selector/Parser/Handler/HashHandler.php b/vendor/symfony/css-selector/Parser/Handler/HashHandler.php index f40807cd..7ae9b438 100644 --- a/vendor/symfony/css-selector/Parser/Handler/HashHandler.php +++ b/vendor/symfony/css-selector/Parser/Handler/HashHandler.php @@ -13,9 +13,9 @@ namespace Symfony\Component\CssSelector\Parser\Handler; use Symfony\Component\CssSelector\Parser\Reader; use Symfony\Component\CssSelector\Parser\Token; -use Symfony\Component\CssSelector\Parser\TokenStream; use Symfony\Component\CssSelector\Parser\Tokenizer\TokenizerEscaping; use Symfony\Component\CssSelector\Parser\Tokenizer\TokenizerPatterns; +use Symfony\Component\CssSelector\Parser\TokenStream; /** * CSS selector comment handler. @@ -51,7 +51,7 @@ class HashHandler implements HandlerInterface $value = $this->escaping->escapeUnicode($match[1]); $stream->push(new Token(Token::TYPE_HASH, $value, $reader->getPosition())); - $reader->moveForward(strlen($match[0])); + $reader->moveForward(\strlen($match[0])); return true; } diff --git a/vendor/symfony/css-selector/Parser/Handler/IdentifierHandler.php b/vendor/symfony/css-selector/Parser/Handler/IdentifierHandler.php index 5ea0d5fd..7b2a14e2 100644 --- a/vendor/symfony/css-selector/Parser/Handler/IdentifierHandler.php +++ b/vendor/symfony/css-selector/Parser/Handler/IdentifierHandler.php @@ -13,9 +13,9 @@ namespace Symfony\Component\CssSelector\Parser\Handler; use Symfony\Component\CssSelector\Parser\Reader; use Symfony\Component\CssSelector\Parser\Token; -use Symfony\Component\CssSelector\Parser\TokenStream; use Symfony\Component\CssSelector\Parser\Tokenizer\TokenizerEscaping; use Symfony\Component\CssSelector\Parser\Tokenizer\TokenizerPatterns; +use Symfony\Component\CssSelector\Parser\TokenStream; /** * CSS selector comment handler. @@ -51,7 +51,7 @@ class IdentifierHandler implements HandlerInterface $value = $this->escaping->escapeUnicode($match[0]); $stream->push(new Token(Token::TYPE_IDENTIFIER, $value, $reader->getPosition())); - $reader->moveForward(strlen($match[0])); + $reader->moveForward(\strlen($match[0])); return true; } diff --git a/vendor/symfony/css-selector/Parser/Handler/NumberHandler.php b/vendor/symfony/css-selector/Parser/Handler/NumberHandler.php index 41e5844e..8291a68d 100644 --- a/vendor/symfony/css-selector/Parser/Handler/NumberHandler.php +++ b/vendor/symfony/css-selector/Parser/Handler/NumberHandler.php @@ -13,8 +13,8 @@ namespace Symfony\Component\CssSelector\Parser\Handler; use Symfony\Component\CssSelector\Parser\Reader; use Symfony\Component\CssSelector\Parser\Token; -use Symfony\Component\CssSelector\Parser\TokenStream; use Symfony\Component\CssSelector\Parser\Tokenizer\TokenizerPatterns; +use Symfony\Component\CssSelector\Parser\TokenStream; /** * CSS selector comment handler. @@ -47,7 +47,7 @@ class NumberHandler implements HandlerInterface } $stream->push(new Token(Token::TYPE_NUMBER, $match[0], $reader->getPosition())); - $reader->moveForward(strlen($match[0])); + $reader->moveForward(\strlen($match[0])); return true; } diff --git a/vendor/symfony/css-selector/Parser/Handler/StringHandler.php b/vendor/symfony/css-selector/Parser/Handler/StringHandler.php index fe92c1fc..eea1aa9b 100644 --- a/vendor/symfony/css-selector/Parser/Handler/StringHandler.php +++ b/vendor/symfony/css-selector/Parser/Handler/StringHandler.php @@ -15,9 +15,9 @@ use Symfony\Component\CssSelector\Exception\InternalErrorException; use Symfony\Component\CssSelector\Exception\SyntaxErrorException; use Symfony\Component\CssSelector\Parser\Reader; use Symfony\Component\CssSelector\Parser\Token; -use Symfony\Component\CssSelector\Parser\TokenStream; use Symfony\Component\CssSelector\Parser\Tokenizer\TokenizerEscaping; use Symfony\Component\CssSelector\Parser\Tokenizer\TokenizerPatterns; +use Symfony\Component\CssSelector\Parser\TokenStream; /** * CSS selector comment handler. @@ -47,7 +47,7 @@ class StringHandler implements HandlerInterface { $quote = $reader->getSubstring(1); - if (!in_array($quote, array("'", '"'))) { + if (!\in_array($quote, array("'", '"'))) { return false; } @@ -59,18 +59,18 @@ class StringHandler implements HandlerInterface } // check unclosed strings - if (strlen($match[0]) === $reader->getRemainingLength()) { + if (\strlen($match[0]) === $reader->getRemainingLength()) { throw SyntaxErrorException::unclosedString($reader->getPosition() - 1); } // check quotes pairs validity - if ($quote !== $reader->getSubstring(1, strlen($match[0]))) { + if ($quote !== $reader->getSubstring(1, \strlen($match[0]))) { throw SyntaxErrorException::unclosedString($reader->getPosition() - 1); } $string = $this->escaping->escapeUnicodeAndNewLine($match[0]); $stream->push(new Token(Token::TYPE_STRING, $string, $reader->getPosition())); - $reader->moveForward(strlen($match[0]) + 1); + $reader->moveForward(\strlen($match[0]) + 1); return true; } diff --git a/vendor/symfony/css-selector/Parser/Handler/WhitespaceHandler.php b/vendor/symfony/css-selector/Parser/Handler/WhitespaceHandler.php index ebf8a19f..21345e32 100644 --- a/vendor/symfony/css-selector/Parser/Handler/WhitespaceHandler.php +++ b/vendor/symfony/css-selector/Parser/Handler/WhitespaceHandler.php @@ -39,7 +39,7 @@ class WhitespaceHandler implements HandlerInterface } $stream->push(new Token(Token::TYPE_WHITESPACE, $match[0], $reader->getPosition())); - $reader->moveForward(strlen($match[0])); + $reader->moveForward(\strlen($match[0])); return true; } diff --git a/vendor/symfony/css-selector/Parser/Parser.php b/vendor/symfony/css-selector/Parser/Parser.php index dc84cc18..d42bdca6 100644 --- a/vendor/symfony/css-selector/Parser/Parser.php +++ b/vendor/symfony/css-selector/Parser/Parser.php @@ -150,7 +150,7 @@ class Parser implements ParserInterface { $stream->skipWhitespace(); - $selectorStart = count($stream->getUsed()); + $selectorStart = \count($stream->getUsed()); $result = $this->parseElementNode($stream); $pseudoElement = null; @@ -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), array('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; @@ -253,7 +253,7 @@ class Parser implements ParserInterface } } - if (count($stream->getUsed()) === $selectorStart) { + if (\count($stream->getUsed()) === $selectorStart) { throw SyntaxErrorException::unexpectedToken('selector', $stream->getPeek()); } diff --git a/vendor/symfony/css-selector/Parser/Reader.php b/vendor/symfony/css-selector/Parser/Reader.php index adfd3c21..4b43effe 100644 --- a/vendor/symfony/css-selector/Parser/Reader.php +++ b/vendor/symfony/css-selector/Parser/Reader.php @@ -30,7 +30,7 @@ class Reader public function __construct(string $source) { $this->source = $source; - $this->length = strlen($source); + $this->length = \strlen($source); } public function isEOF(): bool diff --git a/vendor/symfony/css-selector/Parser/Token.php b/vendor/symfony/css-selector/Parser/Token.php index 554deb8e..91a98f71 100644 --- a/vendor/symfony/css-selector/Parser/Token.php +++ b/vendor/symfony/css-selector/Parser/Token.php @@ -72,7 +72,7 @@ class Token return true; } - return in_array($this->value, $values); + return \in_array($this->value, $values); } public function isWhitespace(): bool diff --git a/vendor/symfony/css-selector/Parser/Tokenizer/TokenizerEscaping.php b/vendor/symfony/css-selector/Parser/Tokenizer/TokenizerEscaping.php index 2df63f51..200272f2 100644 --- a/vendor/symfony/css-selector/Parser/Tokenizer/TokenizerEscaping.php +++ b/vendor/symfony/css-selector/Parser/Tokenizer/TokenizerEscaping.php @@ -50,13 +50,13 @@ class TokenizerEscaping $c = hexdec($match[1]); if (0x80 > $c %= 0x200000) { - return chr($c); + return \chr($c); } if (0x800 > $c) { - return chr(0xC0 | $c >> 6).chr(0x80 | $c & 0x3F); + return \chr(0xC0 | $c >> 6).\chr(0x80 | $c & 0x3F); } if (0x10000 > $c) { - return chr(0xE0 | $c >> 12).chr(0x80 | $c >> 6 & 0x3F).chr(0x80 | $c & 0x3F); + return \chr(0xE0 | $c >> 12).\chr(0x80 | $c >> 6 & 0x3F).\chr(0x80 | $c & 0x3F); } }, $value); } diff --git a/vendor/symfony/css-selector/Tests/Node/HashNodeTest.php b/vendor/symfony/css-selector/Tests/Node/HashNodeTest.php index 8554b226..3bc74da9 100644 --- a/vendor/symfony/css-selector/Tests/Node/HashNodeTest.php +++ b/vendor/symfony/css-selector/Tests/Node/HashNodeTest.php @@ -11,8 +11,8 @@ namespace Symfony\Component\CssSelector\Tests\Node; -use Symfony\Component\CssSelector\Node\HashNode; use Symfony\Component\CssSelector\Node\ElementNode; +use Symfony\Component\CssSelector\Node\HashNode; class HashNodeTest extends AbstractNodeTest { diff --git a/vendor/symfony/css-selector/Tests/Node/NegationNodeTest.php b/vendor/symfony/css-selector/Tests/Node/NegationNodeTest.php index edf4552b..ed4d2482 100644 --- a/vendor/symfony/css-selector/Tests/Node/NegationNodeTest.php +++ b/vendor/symfony/css-selector/Tests/Node/NegationNodeTest.php @@ -12,8 +12,8 @@ namespace Symfony\Component\CssSelector\Tests\Node; use Symfony\Component\CssSelector\Node\ClassNode; -use Symfony\Component\CssSelector\Node\NegationNode; use Symfony\Component\CssSelector\Node\ElementNode; +use Symfony\Component\CssSelector\Node\NegationNode; class NegationNodeTest extends AbstractNodeTest { diff --git a/vendor/symfony/css-selector/Tests/Parser/Handler/AbstractHandlerTest.php b/vendor/symfony/css-selector/Tests/Parser/Handler/AbstractHandlerTest.php index 8005616a..f5c9dc8b 100644 --- a/vendor/symfony/css-selector/Tests/Parser/Handler/AbstractHandlerTest.php +++ b/vendor/symfony/css-selector/Tests/Parser/Handler/AbstractHandlerTest.php @@ -63,7 +63,7 @@ abstract class AbstractHandlerTest extends TestCase $this->assertEquals(0, $reader->getRemainingLength()); $this->assertTrue($reader->isEOF()); } else { - $this->assertEquals(strlen($remainingContent), $reader->getRemainingLength()); + $this->assertEquals(\strlen($remainingContent), $reader->getRemainingLength()); $this->assertEquals(0, $reader->getOffset($remainingContent)); } } diff --git a/vendor/symfony/css-selector/Tests/Parser/Handler/HashHandlerTest.php b/vendor/symfony/css-selector/Tests/Parser/Handler/HashHandlerTest.php index b7fa00a2..5730120b 100644 --- a/vendor/symfony/css-selector/Tests/Parser/Handler/HashHandlerTest.php +++ b/vendor/symfony/css-selector/Tests/Parser/Handler/HashHandlerTest.php @@ -13,8 +13,8 @@ namespace Symfony\Component\CssSelector\Tests\Parser\Handler; use Symfony\Component\CssSelector\Parser\Handler\HashHandler; use Symfony\Component\CssSelector\Parser\Token; -use Symfony\Component\CssSelector\Parser\Tokenizer\TokenizerPatterns; use Symfony\Component\CssSelector\Parser\Tokenizer\TokenizerEscaping; +use Symfony\Component\CssSelector\Parser\Tokenizer\TokenizerPatterns; class HashHandlerTest extends AbstractHandlerTest { diff --git a/vendor/symfony/css-selector/Tests/Parser/Handler/IdentifierHandlerTest.php b/vendor/symfony/css-selector/Tests/Parser/Handler/IdentifierHandlerTest.php index 44d35749..f56430c7 100644 --- a/vendor/symfony/css-selector/Tests/Parser/Handler/IdentifierHandlerTest.php +++ b/vendor/symfony/css-selector/Tests/Parser/Handler/IdentifierHandlerTest.php @@ -13,8 +13,8 @@ namespace Symfony\Component\CssSelector\Tests\Parser\Handler; use Symfony\Component\CssSelector\Parser\Handler\IdentifierHandler; use Symfony\Component\CssSelector\Parser\Token; -use Symfony\Component\CssSelector\Parser\Tokenizer\TokenizerPatterns; use Symfony\Component\CssSelector\Parser\Tokenizer\TokenizerEscaping; +use Symfony\Component\CssSelector\Parser\Tokenizer\TokenizerPatterns; class IdentifierHandlerTest extends AbstractHandlerTest { diff --git a/vendor/symfony/css-selector/Tests/Parser/Handler/StringHandlerTest.php b/vendor/symfony/css-selector/Tests/Parser/Handler/StringHandlerTest.php index 89eff8bd..8ea5d4d5 100644 --- a/vendor/symfony/css-selector/Tests/Parser/Handler/StringHandlerTest.php +++ b/vendor/symfony/css-selector/Tests/Parser/Handler/StringHandlerTest.php @@ -13,8 +13,8 @@ namespace Symfony\Component\CssSelector\Tests\Parser\Handler; use Symfony\Component\CssSelector\Parser\Handler\StringHandler; use Symfony\Component\CssSelector\Parser\Token; -use Symfony\Component\CssSelector\Parser\Tokenizer\TokenizerPatterns; use Symfony\Component\CssSelector\Parser\Tokenizer\TokenizerEscaping; +use Symfony\Component\CssSelector\Parser\Tokenizer\TokenizerPatterns; class StringHandlerTest extends AbstractHandlerTest { diff --git a/vendor/symfony/css-selector/Tests/XPath/TranslatorTest.php b/vendor/symfony/css-selector/Tests/XPath/TranslatorTest.php index 51941783..61045829 100644 --- a/vendor/symfony/css-selector/Tests/XPath/TranslatorTest.php +++ b/vendor/symfony/css-selector/Tests/XPath/TranslatorTest.php @@ -37,9 +37,9 @@ class TranslatorTest extends TestCase $translator = new Translator(); $document = new \SimpleXMLElement(file_get_contents(__DIR__.'/Fixtures/lang.xml')); $elements = $document->xpath($translator->cssToXPath($css)); - $this->assertCount(count($elementsId), $elements); + $this->assertCount(\count($elementsId), $elements); foreach ($elements as $element) { - $this->assertTrue(in_array($element->attributes()->id, $elementsId)); + $this->assertTrue(\in_array($element->attributes()->id, $elementsId)); } } @@ -54,10 +54,10 @@ class TranslatorTest extends TestCase $document->loadHTMLFile(__DIR__.'/Fixtures/ids.html'); $document = simplexml_import_dom($document); $elements = $document->xpath($translator->cssToXPath($css)); - $this->assertCount(count($elementsId), $elementsId); + $this->assertCount(\count($elementsId), $elementsId); foreach ($elements as $element) { if (null !== $element->attributes()->id) { - $this->assertTrue(in_array($element->attributes()->id, $elementsId)); + $this->assertTrue(\in_array($element->attributes()->id, $elementsId)); } } libxml_clear_errors(); diff --git a/vendor/symfony/css-selector/XPath/Extension/AttributeMatchingExtension.php b/vendor/symfony/css-selector/XPath/Extension/AttributeMatchingExtension.php index ee8976fd..8a4d8842 100644 --- a/vendor/symfony/css-selector/XPath/Extension/AttributeMatchingExtension.php +++ b/vendor/symfony/css-selector/XPath/Extension/AttributeMatchingExtension.php @@ -86,7 +86,7 @@ class AttributeMatchingExtension extends AbstractExtension return $xpath->addCondition($value ? sprintf( '%1$s and substring(%1$s, string-length(%1$s)-%2$s) = %3$s', $attribute, - strlen($value) - 1, + \strlen($value) - 1, Translator::getXpathLiteral($value) ) : '0'); } diff --git a/vendor/symfony/css-selector/XPath/Translator.php b/vendor/symfony/css-selector/XPath/Translator.php index 73b54821..2b44e5fb 100644 --- a/vendor/symfony/css-selector/XPath/Translator.php +++ b/vendor/symfony/css-selector/XPath/Translator.php @@ -155,7 +155,7 @@ class Translator implements TranslatorInterface throw new ExpressionErrorException(sprintf('Node "%s" not supported.', $node->getNodeName())); } - return call_user_func($this->nodeTranslators[$node->getNodeName()], $node, $this); + return \call_user_func($this->nodeTranslators[$node->getNodeName()], $node, $this); } /** @@ -167,7 +167,7 @@ class Translator implements TranslatorInterface throw new ExpressionErrorException(sprintf('Combiner "%s" not supported.', $combiner)); } - return call_user_func($this->combinationTranslators[$combiner], $this->nodeToXPath($xpath), $this->nodeToXPath($combinedXpath)); + return \call_user_func($this->combinationTranslators[$combiner], $this->nodeToXPath($xpath), $this->nodeToXPath($combinedXpath)); } /** @@ -179,7 +179,7 @@ class Translator implements TranslatorInterface throw new ExpressionErrorException(sprintf('Function "%s" not supported.', $function->getName())); } - return call_user_func($this->functionTranslators[$function->getName()], $xpath, $function); + return \call_user_func($this->functionTranslators[$function->getName()], $xpath, $function); } /** @@ -191,7 +191,7 @@ class Translator implements TranslatorInterface throw new ExpressionErrorException(sprintf('Pseudo-class "%s" not supported.', $pseudoClass)); } - return call_user_func($this->pseudoClassTranslators[$pseudoClass], $xpath); + return \call_user_func($this->pseudoClassTranslators[$pseudoClass], $xpath); } /** @@ -203,7 +203,7 @@ class Translator implements TranslatorInterface throw new ExpressionErrorException(sprintf('Attribute matcher operator "%s" not supported.', $operator)); } - return call_user_func($this->attributeMatchingTranslators[$operator], $xpath, $attribute, $value); + return \call_user_func($this->attributeMatchingTranslators[$operator], $xpath, $attribute, $value); } /** diff --git a/vendor/symfony/debug/Debug.php b/vendor/symfony/debug/Debug.php index 92117104..3f657032 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, array('cli', 'phpdbg'), true)) { ini_set('display_errors', 0); ExceptionHandler::register(); } elseif ($displayErrors && (!ini_get('log_errors') || ini_get('error_log'))) { diff --git a/vendor/symfony/debug/DebugClassLoader.php b/vendor/symfony/debug/DebugClassLoader.php index f9c80d04..ecf92516 100644 --- a/vendor/symfony/debug/DebugClassLoader.php +++ b/vendor/symfony/debug/DebugClassLoader.php @@ -39,11 +39,11 @@ class DebugClassLoader public function __construct(callable $classLoader) { $this->classLoader = $classLoader; - $this->isFinder = is_array($classLoader) && method_exists($classLoader[0], 'findFile'); + $this->isFinder = \is_array($classLoader) && method_exists($classLoader[0], 'findFile'); if (!isset(self::$caseCheck)) { - $file = file_exists(__FILE__) ? __FILE__ : rtrim(realpath('.'), DIRECTORY_SEPARATOR); - $i = strrpos($file, DIRECTORY_SEPARATOR); + $file = file_exists(__FILE__) ? __FILE__ : rtrim(realpath('.'), \DIRECTORY_SEPARATOR); + $i = strrpos($file, \DIRECTORY_SEPARATOR); $dir = substr($file, 0, 1 + $i); $file = substr($file, 1 + $i); $test = strtoupper($file) === $file ? strtolower($file) : strtoupper($file); @@ -52,7 +52,7 @@ class DebugClassLoader if (false === $test || false === $i) { // filesystem is case sensitive self::$caseCheck = 0; - } elseif (substr($test, -strlen($file)) === $file) { + } elseif (substr($test, -\strlen($file)) === $file) { // filesystem is case insensitive and realpath() normalizes the case of characters self::$caseCheck = 1; } elseif (false !== stripos(PHP_OS, 'darwin')) { @@ -84,7 +84,7 @@ class DebugClassLoader class_exists('Symfony\Component\Debug\ErrorHandler'); class_exists('Psr\Log\LogLevel'); - if (!is_array($functions = spl_autoload_functions())) { + if (!\is_array($functions = spl_autoload_functions())) { return; } @@ -93,7 +93,7 @@ class DebugClassLoader } foreach ($functions as $function) { - if (!is_array($function) || !$function[0] instanceof self) { + if (!\is_array($function) || !$function[0] instanceof self) { $function = array(new static($function), 'loadClass'); } @@ -106,7 +106,7 @@ class DebugClassLoader */ public static function disable() { - if (!is_array($functions = spl_autoload_functions())) { + if (!\is_array($functions = spl_autoload_functions())) { return; } @@ -115,7 +115,7 @@ class DebugClassLoader } foreach ($functions as $function) { - if (is_array($function) && $function[0] instanceof self) { + if (\is_array($function) && $function[0] instanceof self) { $function = $function[0]->getClassLoader(); } @@ -149,7 +149,7 @@ class DebugClassLoader } } } else { - call_user_func($this->classLoader, $class); + \call_user_func($this->classLoader, $class); $file = false; } } finally { @@ -289,10 +289,10 @@ class DebugClassLoader } if (self::$caseCheck) { $real = explode('\\', $class.strrchr($file, '.')); - $tail = explode(DIRECTORY_SEPARATOR, str_replace('/', DIRECTORY_SEPARATOR, $file)); + $tail = explode(\DIRECTORY_SEPARATOR, str_replace('/', \DIRECTORY_SEPARATOR, $file)); - $i = count($tail) - 1; - $j = count($real) - 1; + $i = \count($tail) - 1; + $j = \count($real) - 1; while (isset($tail[$i], $real[$j]) && $tail[$i] === $real[$j]) { --$i; @@ -302,8 +302,8 @@ class DebugClassLoader array_splice($tail, 0, $i + 1); } if (self::$caseCheck && $tail) { - $tail = DIRECTORY_SEPARATOR.implode(DIRECTORY_SEPARATOR, $tail); - $tailLen = strlen($tail); + $tail = \DIRECTORY_SEPARATOR.implode(\DIRECTORY_SEPARATOR, $tail); + $tailLen = \strlen($tail); $real = $refl->getFileName(); if (2 === self::$caseCheck) { @@ -328,7 +328,7 @@ class DebugClassLoader $dir = $real; $k = $kDir; - $i = strlen($dir) - 1; + $i = \strlen($dir) - 1; while (!isset(self::$darwinCache[$k])) { self::$darwinCache[$k] = array($dir, array()); self::$darwinCache[$dir] = &self::$darwinCache[$k]; diff --git a/vendor/symfony/debug/ErrorHandler.php b/vendor/symfony/debug/ErrorHandler.php index 2702b415..caffd541 100644 --- a/vendor/symfony/debug/ErrorHandler.php +++ b/vendor/symfony/debug/ErrorHandler.php @@ -11,16 +11,16 @@ namespace Symfony\Component\Debug; -use Psr\Log\LogLevel; use Psr\Log\LoggerInterface; +use Psr\Log\LogLevel; use Symfony\Component\Debug\Exception\FatalErrorException; use Symfony\Component\Debug\Exception\FatalThrowableError; use Symfony\Component\Debug\Exception\OutOfMemoryException; use Symfony\Component\Debug\Exception\SilencedErrorContext; -use Symfony\Component\Debug\FatalErrorHandler\UndefinedFunctionFatalErrorHandler; -use Symfony\Component\Debug\FatalErrorHandler\UndefinedMethodFatalErrorHandler; use Symfony\Component\Debug\FatalErrorHandler\ClassNotFoundFatalErrorHandler; use Symfony\Component\Debug\FatalErrorHandler\FatalErrorHandlerInterface; +use Symfony\Component\Debug\FatalErrorHandler\UndefinedFunctionFatalErrorHandler; +use Symfony\Component\Debug\FatalErrorHandler\UndefinedMethodFatalErrorHandler; /** * A generic ErrorHandler for the PHP engine. @@ -127,17 +127,17 @@ class ErrorHandler $handler->isRoot = true; } - if ($handlerIsNew && is_array($prev) && $prev[0] instanceof self) { + if ($handlerIsNew && \is_array($prev) && $prev[0] instanceof self) { $handler = $prev[0]; $replace = false; } if (!$replace && $prev) { restore_error_handler(); - $handlerIsRegistered = is_array($prev) && $handler === $prev[0]; + $handlerIsRegistered = \is_array($prev) && $handler === $prev[0]; } else { $handlerIsRegistered = true; } - if (is_array($prev = set_exception_handler(array($handler, 'handleException'))) && $prev[0] instanceof self) { + if (\is_array($prev = set_exception_handler(array($handler, 'handleException'))) && $prev[0] instanceof self) { restore_exception_handler(); if (!$handlerIsRegistered) { $handler = $prev[0]; @@ -177,7 +177,7 @@ class ErrorHandler { $loggers = array(); - if (is_array($levels)) { + 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); @@ -217,7 +217,7 @@ class ErrorHandler if (!isset($prev[$type])) { throw new \InvalidArgumentException('Unknown error type: '.$type); } - if (!is_array($log)) { + if (!\is_array($log)) { $log = array($log); } elseif (!array_key_exists(0, $log)) { throw new \InvalidArgumentException('No logger provided'); @@ -350,7 +350,7 @@ class ErrorHandler { if ($prev !== $this->thrownErrors | $this->loggedErrors) { $handler = set_error_handler('var_dump'); - $handler = is_array($handler) ? $handler[0] : null; + $handler = \is_array($handler) ? $handler[0] : null; restore_error_handler(); if ($handler === $this) { restore_error_handler(); @@ -393,7 +393,7 @@ class ErrorHandler } $scope = $this->scopedErrors & $type; - if (4 < $numArgs = func_num_args()) { + if (4 < $numArgs = \func_num_args()) { $context = $scope ? (func_get_arg(4) ?: array()) : array(); } else { $context = array(); @@ -583,7 +583,7 @@ class ErrorHandler $previousHandler = null; $sameHandlerLimit = 10; - while (!is_array($handler) || !$handler[0] instanceof self) { + while (!\is_array($handler) || !$handler[0] instanceof self) { $handler = set_exception_handler('var_dump'); restore_exception_handler(); @@ -667,7 +667,7 @@ class ErrorHandler for ($i = 0; isset($backtrace[$i]); ++$i) { if (isset($backtrace[$i]['file'], $backtrace[$i]['line']) && $backtrace[$i]['line'] === $line && $backtrace[$i]['file'] === $file) { - $lightTrace = array_slice($lightTrace, 1 + $i); + $lightTrace = \array_slice($lightTrace, 1 + $i); break; } } diff --git a/vendor/symfony/debug/Exception/FatalErrorException.php b/vendor/symfony/debug/Exception/FatalErrorException.php index c6c52a93..8305d392 100644 --- a/vendor/symfony/debug/Exception/FatalErrorException.php +++ b/vendor/symfony/debug/Exception/FatalErrorException.php @@ -31,7 +31,7 @@ class FatalErrorException extends \ErrorException $this->setTrace($trace); } elseif (null !== $traceOffset) { - if (function_exists('xdebug_get_function_stack')) { + if (\function_exists('xdebug_get_function_stack')) { $trace = xdebug_get_function_stack(); if (0 < $traceOffset) { array_splice($trace, -$traceOffset); diff --git a/vendor/symfony/debug/Exception/FlattenException.php b/vendor/symfony/debug/Exception/FlattenException.php index f7008516..b091b55b 100644 --- a/vendor/symfony/debug/Exception/FlattenException.php +++ b/vendor/symfony/debug/Exception/FlattenException.php @@ -186,7 +186,7 @@ class FlattenException */ public function setTraceFromException(\Exception $exception) { - @trigger_error(sprintf('"%s" is deprecated since Symfony 4.1, use "setTraceFromThrowable()" instead.', __METHOD__), E_USER_DEPRECATED); + @trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.1, use "setTraceFromThrowable()" instead.', __METHOD__), E_USER_DEPRECATED); $this->setTraceFromThrowable($exception); } @@ -241,9 +241,9 @@ class FlattenException if ($value instanceof \__PHP_Incomplete_Class) { // is_object() returns false on PHP<=7.1 $result[$key] = array('incomplete-object', $this->getClassNameFromIncomplete($value)); - } elseif (is_object($value)) { - $result[$key] = array('object', get_class($value)); - } elseif (is_array($value)) { + } elseif (\is_object($value)) { + $result[$key] = array('object', \get_class($value)); + } elseif (\is_array($value)) { if ($level > 10) { $result[$key] = array('array', '*DEEP NESTED ARRAY*'); } else { @@ -251,13 +251,13 @@ class FlattenException } } elseif (null === $value) { $result[$key] = array('null', null); - } elseif (is_bool($value)) { + } elseif (\is_bool($value)) { $result[$key] = array('boolean', $value); - } elseif (is_int($value)) { + } elseif (\is_int($value)) { $result[$key] = array('integer', $value); - } elseif (is_float($value)) { + } elseif (\is_float($value)) { $result[$key] = array('float', $value); - } elseif (is_resource($value)) { + } elseif (\is_resource($value)) { $result[$key] = array('resource', get_resource_type($value)); } else { $result[$key] = array('string', (string) $value); diff --git a/vendor/symfony/debug/ExceptionHandler.php b/vendor/symfony/debug/ExceptionHandler.php index a67637ea..1845bc88 100644 --- a/vendor/symfony/debug/ExceptionHandler.php +++ b/vendor/symfony/debug/ExceptionHandler.php @@ -57,7 +57,7 @@ class ExceptionHandler $handler = new static($debug, $charset, $fileLinkFormat); $prev = set_exception_handler(array($handler, 'handle')); - if (is_array($prev) && $prev[0] instanceof ErrorHandler) { + if (\is_array($prev) && $prev[0] instanceof ErrorHandler) { restore_exception_handler(); $prev[0]->setExceptionHandler(array($handler, 'handle')); } @@ -142,7 +142,7 @@ class ExceptionHandler $this->caughtBuffer = null; try { - call_user_func($this->handler, $exception); + \call_user_func($this->handler, $exception); $this->caughtLength = $caughtLength; } catch (\Exception $e) { if (!$caughtLength) { @@ -208,48 +208,54 @@ class ExceptionHandler $title = 'Whoops, looks like something went wrong.'; } - $content = ''; - if ($this->debug) { - try { - $count = count($exception->getAllPrevious()); - $total = $count + 1; - foreach ($exception->toArray() as $position => $e) { - $ind = $count - $position + 1; - $class = $this->formatClass($e['class']); - $message = nl2br($this->escapeHtml($e['message'])); - $content .= sprintf(<<<'EOF' -
- - - -EOF - , $ind, $total, $class, $message); - foreach ($e['trace'] as $trace) { - $content .= '\n"; - } + if (!$this->debug) { + return << +

$title

+ +EOF; + } - $content .= "
\n
-

- (%d/%d) - %s -

-

%s

-
'; - if ($trace['function']) { - $content .= sprintf('at %s%s%s(%s)', $this->formatClass($trace['class']), $trace['type'], $trace['function'], $this->formatArgs($trace['args'])); - } - if (isset($trace['file']) && isset($trace['line'])) { - $content .= $this->formatPath($trace['file'], $trace['line']); - } - $content .= "
\n
\n"; - } - } catch (\Exception $e) { - // something nasty happened and we cannot throw an exception anymore - if ($this->debug) { - $title = sprintf('Exception thrown when handling an exception (%s: %s)', get_class($e), $this->escapeHtml($e->getMessage())); - } else { - $title = 'Whoops, looks like something went wrong.'; + $content = ''; + try { + $count = \count($exception->getAllPrevious()); + $total = $count + 1; + foreach ($exception->toArray() as $position => $e) { + $ind = $count - $position + 1; + $class = $this->formatClass($e['class']); + $message = nl2br($this->escapeHtml($e['message'])); + $content .= sprintf(<<<'EOF' +
+ + + +EOF + , $ind, $total, $class, $message); + foreach ($e['trace'] as $trace) { + $content .= '\n"; } + + $content .= "\n
+

+ (%d/%d) + %s +

+

%s

+
'; + if ($trace['function']) { + $content .= sprintf('at %s%s%s(%s)', $this->formatClass($trace['class']), $trace['type'], $trace['function'], $this->formatArgs($trace['args'])); + } + if (isset($trace['file']) && isset($trace['line'])) { + $content .= $this->formatPath($trace['file'], $trace['line']); + } + $content .= "
\n
\n"; + } + } catch (\Exception $e) { + // something nasty happened and we cannot throw an exception anymore + if ($this->debug) { + $title = sprintf('Exception thrown when handling an exception (%s: %s)', \get_class($e), $this->escapeHtml($e->getMessage())); + } else { + $title = 'Whoops, looks like something went wrong.'; } } @@ -278,6 +284,14 @@ EOF; */ public function getStylesheet(FlattenException $exception) { + if (!$this->debug) { + return <<<'EOF' + body { background-color: #fff; color: #222; font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; margin: 0; } + .container { margin: 30px; max-width: 600px; } + h1 { color: #dc3545; font-size: 24px; } +EOF; + } + return <<<'EOF' body { background-color: #F9F9F9; color: #222; font: 14px/1.4 Helvetica, Arial, sans-serif; margin: 0; padding-bottom: 45px; } @@ -362,12 +376,12 @@ EOF; } if (\is_string($fmt)) { - $i = strpos($f = $fmt, '&', max(strrpos($f, '%f'), strrpos($f, '%l'))) ?: strlen($f); + $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); for ($i = 1; isset($fmt[$i]); ++$i) { if (0 === strpos($path, $k = $fmt[$i++])) { - $path = substr_replace($path, $fmt[$i], 0, strlen($k)); + $path = substr_replace($path, $fmt[$i], 0, \strlen($k)); break; } } @@ -394,7 +408,7 @@ EOF; if ('object' === $item[0]) { $formattedValue = sprintf('object(%s)', $this->formatClass($item[1])); } elseif ('array' === $item[0]) { - $formattedValue = sprintf('array(%s)', is_array($item[1]) ? $this->formatArgs($item[1]) : $item[1]); + $formattedValue = sprintf('array(%s)', \is_array($item[1]) ? $this->formatArgs($item[1]) : $item[1]); } elseif ('null' === $item[0]) { $formattedValue = 'null'; } elseif ('boolean' === $item[0]) { @@ -405,7 +419,7 @@ EOF; $formattedValue = str_replace("\n", '', $this->escapeHtml(var_export($item[1], true))); } - $result[] = is_int($key) ? $formattedValue : sprintf("'%s' => %s", $this->escapeHtml($key), $formattedValue); + $result[] = \is_int($key) ? $formattedValue : sprintf("'%s' => %s", $this->escapeHtml($key), $formattedValue); } return implode(', ', $result); diff --git a/vendor/symfony/debug/FatalErrorHandler/ClassNotFoundFatalErrorHandler.php b/vendor/symfony/debug/FatalErrorHandler/ClassNotFoundFatalErrorHandler.php index 25030e56..4ccd16fe 100644 --- a/vendor/symfony/debug/FatalErrorHandler/ClassNotFoundFatalErrorHandler.php +++ b/vendor/symfony/debug/FatalErrorHandler/ClassNotFoundFatalErrorHandler.php @@ -11,11 +11,11 @@ namespace Symfony\Component\Debug\FatalErrorHandler; -use Symfony\Component\Debug\Exception\ClassNotFoundException; -use Symfony\Component\Debug\Exception\FatalErrorException; -use Symfony\Component\Debug\DebugClassLoader; use Composer\Autoload\ClassLoader as ComposerClassLoader; use Symfony\Component\ClassLoader\ClassLoader as SymfonyClassLoader; +use Symfony\Component\Debug\DebugClassLoader; +use Symfony\Component\Debug\Exception\ClassNotFoundException; +use Symfony\Component\Debug\Exception\FatalErrorException; /** * ErrorHandler for classes that do not exist. @@ -29,9 +29,9 @@ class ClassNotFoundFatalErrorHandler implements FatalErrorHandlerInterface */ public function handleError(array $error, FatalErrorException $exception) { - $messageLen = strlen($error['message']); + $messageLen = \strlen($error['message']); $notFoundSuffix = '\' not found'; - $notFoundSuffixLen = strlen($notFoundSuffix); + $notFoundSuffixLen = \strlen($notFoundSuffix); if ($notFoundSuffixLen > $messageLen) { return; } @@ -42,7 +42,7 @@ class ClassNotFoundFatalErrorHandler implements FatalErrorHandlerInterface foreach (array('class', 'interface', 'trait') as $typeName) { $prefix = ucfirst($typeName).' \''; - $prefixLen = strlen($prefix); + $prefixLen = \strlen($prefix); if (0 !== strpos($error['message'], $prefix)) { continue; } @@ -85,7 +85,7 @@ class ClassNotFoundFatalErrorHandler implements FatalErrorHandlerInterface */ private function getClassCandidates(string $class): array { - if (!is_array($functions = spl_autoload_functions())) { + if (!\is_array($functions = spl_autoload_functions())) { return array(); } @@ -93,14 +93,14 @@ class ClassNotFoundFatalErrorHandler implements FatalErrorHandlerInterface $classes = array(); foreach ($functions as $function) { - if (!is_array($function)) { + if (!\is_array($function)) { continue; } // get class loaders wrapped by DebugClassLoader if ($function[0] instanceof DebugClassLoader) { $function = $function[0]->getClassLoader(); - if (!is_array($function)) { + if (!\is_array($function)) { continue; } } @@ -126,7 +126,7 @@ 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)) { + if (!$path = realpath($path.'/'.strtr($prefix, '\\_', '//')) ?: realpath($path.'/'.\dirname(strtr($prefix, '\\_', '//'))) ?: realpath($path)) { return array(); } @@ -145,7 +145,7 @@ class ClassNotFoundFatalErrorHandler implements FatalErrorHandlerInterface { $candidates = array( // namespaced class - $namespacedClass = str_replace(array($path.DIRECTORY_SEPARATOR, '.php', '/'), array('', '', '\\'), $file), + $namespacedClass = str_replace(array($path.\DIRECTORY_SEPARATOR, '.php', '/'), array('', '', '\\'), $file), // namespaced class (with target dir) $prefix.$namespacedClass, // namespaced class (with target dir and separator) diff --git a/vendor/symfony/debug/FatalErrorHandler/UndefinedFunctionFatalErrorHandler.php b/vendor/symfony/debug/FatalErrorHandler/UndefinedFunctionFatalErrorHandler.php index c6f391a7..db241803 100644 --- a/vendor/symfony/debug/FatalErrorHandler/UndefinedFunctionFatalErrorHandler.php +++ b/vendor/symfony/debug/FatalErrorHandler/UndefinedFunctionFatalErrorHandler.php @@ -11,8 +11,8 @@ namespace Symfony\Component\Debug\FatalErrorHandler; -use Symfony\Component\Debug\Exception\UndefinedFunctionException; use Symfony\Component\Debug\Exception\FatalErrorException; +use Symfony\Component\Debug\Exception\UndefinedFunctionException; /** * ErrorHandler for undefined functions. @@ -26,9 +26,9 @@ class UndefinedFunctionFatalErrorHandler implements FatalErrorHandlerInterface */ public function handleError(array $error, FatalErrorException $exception) { - $messageLen = strlen($error['message']); + $messageLen = \strlen($error['message']); $notFoundSuffix = '()'; - $notFoundSuffixLen = strlen($notFoundSuffix); + $notFoundSuffixLen = \strlen($notFoundSuffix); if ($notFoundSuffixLen > $messageLen) { return; } @@ -38,7 +38,7 @@ class UndefinedFunctionFatalErrorHandler implements FatalErrorHandlerInterface } $prefix = 'Call to undefined function '; - $prefixLen = strlen($prefix); + $prefixLen = \strlen($prefix); if (0 !== strpos($error['message'], $prefix)) { return; } diff --git a/vendor/symfony/debug/FatalErrorHandler/UndefinedMethodFatalErrorHandler.php b/vendor/symfony/debug/FatalErrorHandler/UndefinedMethodFatalErrorHandler.php index 6fa62b6f..618a2c20 100644 --- a/vendor/symfony/debug/FatalErrorHandler/UndefinedMethodFatalErrorHandler.php +++ b/vendor/symfony/debug/FatalErrorHandler/UndefinedMethodFatalErrorHandler.php @@ -44,7 +44,7 @@ class UndefinedMethodFatalErrorHandler implements FatalErrorHandlerInterface $candidates = array(); foreach ($methods as $definedMethodName) { $lev = levenshtein($methodName, $definedMethodName); - if ($lev <= strlen($methodName) / 3 || false !== strpos($definedMethodName, $methodName)) { + if ($lev <= \strlen($methodName) / 3 || false !== strpos($definedMethodName, $methodName)) { $candidates[] = $definedMethodName; } } diff --git a/vendor/symfony/debug/Tests/ErrorHandlerTest.php b/vendor/symfony/debug/Tests/ErrorHandlerTest.php index eee8e9dc..15e47638 100644 --- a/vendor/symfony/debug/Tests/ErrorHandlerTest.php +++ b/vendor/symfony/debug/Tests/ErrorHandlerTest.php @@ -480,7 +480,7 @@ class ErrorHandlerTest extends TestCase $handler = new ErrorHandler(); $handler->setExceptionHandler(function () use (&$args) { - $args = func_get_args(); + $args = \func_get_args(); }); $handler->handleException($exception); diff --git a/vendor/symfony/debug/Tests/Exception/FlattenExceptionTest.php b/vendor/symfony/debug/Tests/Exception/FlattenExceptionTest.php index 8b6f77b2..4bac1609 100644 --- a/vendor/symfony/debug/Tests/Exception/FlattenExceptionTest.php +++ b/vendor/symfony/debug/Tests/Exception/FlattenExceptionTest.php @@ -15,19 +15,19 @@ use PHPUnit\Framework\TestCase; use Symfony\Component\Debug\Exception\FatalThrowableError; use Symfony\Component\Debug\Exception\FlattenException; use Symfony\Component\HttpFoundation\Exception\SuspiciousOperationException; -use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; -use Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException; -use Symfony\Component\HttpKernel\Exception\UnauthorizedHttpException; -use Symfony\Component\HttpKernel\Exception\BadRequestHttpException; -use Symfony\Component\HttpKernel\Exception\NotAcceptableHttpException; -use Symfony\Component\HttpKernel\Exception\ConflictHttpException; use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException; +use Symfony\Component\HttpKernel\Exception\BadRequestHttpException; +use Symfony\Component\HttpKernel\Exception\ConflictHttpException; use Symfony\Component\HttpKernel\Exception\GoneHttpException; use Symfony\Component\HttpKernel\Exception\LengthRequiredHttpException; +use Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException; +use Symfony\Component\HttpKernel\Exception\NotAcceptableHttpException; +use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Symfony\Component\HttpKernel\Exception\PreconditionFailedHttpException; use Symfony\Component\HttpKernel\Exception\PreconditionRequiredHttpException; use Symfony\Component\HttpKernel\Exception\ServiceUnavailableHttpException; use Symfony\Component\HttpKernel\Exception\TooManyRequestsHttpException; +use Symfony\Component\HttpKernel\Exception\UnauthorizedHttpException; use Symfony\Component\HttpKernel\Exception\UnsupportedMediaTypeHttpException; class FlattenExceptionTest extends TestCase diff --git a/vendor/symfony/debug/Tests/ExceptionHandlerTest.php b/vendor/symfony/debug/Tests/ExceptionHandlerTest.php index 0285eff1..6ff6a74f 100644 --- a/vendor/symfony/debug/Tests/ExceptionHandlerTest.php +++ b/vendor/symfony/debug/Tests/ExceptionHandlerTest.php @@ -12,10 +12,10 @@ namespace Symfony\Component\Debug\Tests; use PHPUnit\Framework\TestCase; -use Symfony\Component\Debug\ExceptionHandler; use Symfony\Component\Debug\Exception\OutOfMemoryException; -use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; +use Symfony\Component\Debug\ExceptionHandler; use Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException; +use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; require_once __DIR__.'/HeaderMock.php'; diff --git a/vendor/symfony/debug/Tests/FatalErrorHandler/ClassNotFoundFatalErrorHandlerTest.php b/vendor/symfony/debug/Tests/FatalErrorHandler/ClassNotFoundFatalErrorHandlerTest.php index 65c80fc1..5cdac2f1 100644 --- a/vendor/symfony/debug/Tests/FatalErrorHandler/ClassNotFoundFatalErrorHandlerTest.php +++ b/vendor/symfony/debug/Tests/FatalErrorHandler/ClassNotFoundFatalErrorHandlerTest.php @@ -11,18 +11,18 @@ namespace Symfony\Component\Debug\Tests\FatalErrorHandler; +use Composer\Autoload\ClassLoader as ComposerClassLoader; use PHPUnit\Framework\TestCase; +use Symfony\Component\Debug\DebugClassLoader; use Symfony\Component\Debug\Exception\FatalErrorException; use Symfony\Component\Debug\FatalErrorHandler\ClassNotFoundFatalErrorHandler; -use Symfony\Component\Debug\DebugClassLoader; -use Composer\Autoload\ClassLoader as ComposerClassLoader; class ClassNotFoundFatalErrorHandlerTest extends TestCase { public static function setUpBeforeClass() { foreach (spl_autoload_functions() as $function) { - if (!is_array($function)) { + if (!\is_array($function)) { continue; } @@ -32,7 +32,7 @@ class ClassNotFoundFatalErrorHandlerTest extends TestCase } if ($function[0] instanceof ComposerClassLoader) { - $function[0]->add('Symfony_Component_Debug_Tests_Fixtures', dirname(dirname(dirname(dirname(dirname(__DIR__)))))); + $function[0]->add('Symfony_Component_Debug_Tests_Fixtures', \dirname(\dirname(\dirname(\dirname(\dirname(__DIR__)))))); break; } } diff --git a/vendor/symfony/debug/Tests/HeaderMock.php b/vendor/symfony/debug/Tests/HeaderMock.php index 65d0b588..3d8d84c5 100644 --- a/vendor/symfony/debug/Tests/HeaderMock.php +++ b/vendor/symfony/debug/Tests/HeaderMock.php @@ -27,12 +27,12 @@ function testHeader() { static $headers = array(); - if (!$h = func_get_args()) { + if (!$h = \func_get_args()) { $h = $headers; $headers = array(); return $h; } - $headers[] = func_get_args(); + $headers[] = \func_get_args(); } diff --git a/vendor/symfony/debug/Tests/phpt/debug_class_loader.phpt b/vendor/symfony/debug/Tests/phpt/debug_class_loader.phpt index 685280bc..41c56c93 100644 --- a/vendor/symfony/debug/Tests/phpt/debug_class_loader.phpt +++ b/vendor/symfony/debug/Tests/phpt/debug_class_loader.phpt @@ -9,7 +9,7 @@ use Symfony\Component\Debug\DebugClassLoader; $vendor = __DIR__; while (!file_exists($vendor.'/vendor')) { - $vendor = dirname($vendor); + $vendor = \dirname($vendor); } require $vendor.'/vendor/autoload.php'; diff --git a/vendor/symfony/debug/Tests/phpt/decorate_exception_hander.phpt b/vendor/symfony/debug/Tests/phpt/decorate_exception_hander.phpt index 7ce7b9dc..7211afbd 100644 --- a/vendor/symfony/debug/Tests/phpt/decorate_exception_hander.phpt +++ b/vendor/symfony/debug/Tests/phpt/decorate_exception_hander.phpt @@ -7,7 +7,7 @@ namespace Symfony\Component\Debug; $vendor = __DIR__; while (!file_exists($vendor.'/vendor')) { - $vendor = dirname($vendor); + $vendor = \dirname($vendor); } require $vendor.'/vendor/autoload.php'; @@ -38,8 +38,7 @@ Did you forget a "use" statement for another namespace?" ["line":protected]=> int(%d) ["trace":"Exception":private]=> - array(0) { - } + array(%d) {%A} ["previous":"Exception":private]=> NULL ["severity":protected]=> diff --git a/vendor/symfony/debug/Tests/phpt/exception_rethrown.phpt b/vendor/symfony/debug/Tests/phpt/exception_rethrown.phpt index 9df0a65c..3f455954 100644 --- a/vendor/symfony/debug/Tests/phpt/exception_rethrown.phpt +++ b/vendor/symfony/debug/Tests/phpt/exception_rethrown.phpt @@ -7,7 +7,7 @@ namespace Symfony\Component\Debug; $vendor = __DIR__; while (!file_exists($vendor.'/vendor')) { - $vendor = dirname($vendor); + $vendor = \dirname($vendor); } require $vendor.'/vendor/autoload.php'; diff --git a/vendor/symfony/debug/Tests/phpt/fatal_with_nested_handlers.phpt b/vendor/symfony/debug/Tests/phpt/fatal_with_nested_handlers.phpt index 5c5245c0..2b74e5c6 100644 --- a/vendor/symfony/debug/Tests/phpt/fatal_with_nested_handlers.phpt +++ b/vendor/symfony/debug/Tests/phpt/fatal_with_nested_handlers.phpt @@ -7,7 +7,7 @@ namespace Symfony\Component\Debug; $vendor = __DIR__; while (!file_exists($vendor.'/vendor')) { - $vendor = dirname($vendor); + $vendor = \dirname($vendor); } require $vendor.'/vendor/autoload.php'; diff --git a/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php b/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php index 3b6e7cc3..aae32752 100644 --- a/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php +++ b/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php @@ -11,11 +11,11 @@ namespace Symfony\Component\EventDispatcher\Debug; +use Psr\Log\LoggerInterface; +use Symfony\Component\EventDispatcher\Event; use Symfony\Component\EventDispatcher\EventDispatcherInterface; use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\EventDispatcher\Event; use Symfony\Component\Stopwatch\Stopwatch; -use Psr\Log\LoggerInterface; /** * Collects some data about event listeners. @@ -217,6 +217,7 @@ class TraceableEventDispatcher implements TraceableEventDispatcherInterface public function reset() { $this->called = array(); + $this->orphanedEvents = array(); } /** @@ -229,7 +230,7 @@ class TraceableEventDispatcher implements TraceableEventDispatcherInterface */ public function __call($method, $arguments) { - return call_user_func_array(array($this->dispatcher, $method), $arguments); + return \call_user_func_array(array($this->dispatcher, $method), $arguments); } /** @@ -314,11 +315,11 @@ class TraceableEventDispatcher implements TraceableEventDispatcherInterface private function sortListenersByPriority($a, $b) { - if (is_int($a['priority']) && !is_int($b['priority'])) { + if (\is_int($a['priority']) && !\is_int($b['priority'])) { return 1; } - if (!is_int($a['priority']) && is_int($b['priority'])) { + if (!\is_int($a['priority']) && \is_int($b['priority'])) { return -1; } diff --git a/vendor/symfony/event-dispatcher/Debug/WrappedListener.php b/vendor/symfony/event-dispatcher/Debug/WrappedListener.php index f7b0273e..2d8126a6 100644 --- a/vendor/symfony/event-dispatcher/Debug/WrappedListener.php +++ b/vendor/symfony/event-dispatcher/Debug/WrappedListener.php @@ -11,9 +11,9 @@ namespace Symfony\Component\EventDispatcher\Debug; -use Symfony\Component\Stopwatch\Stopwatch; use Symfony\Component\EventDispatcher\Event; use Symfony\Component\EventDispatcher\EventDispatcherInterface; +use Symfony\Component\Stopwatch\Stopwatch; use Symfony\Component\VarDumper\Caster\ClassStub; /** @@ -40,15 +40,15 @@ class WrappedListener $this->called = false; $this->stoppedPropagation = false; - if (is_array($listener)) { - $this->name = is_object($listener[0]) ? get_class($listener[0]) : $listener[0]; + if (\is_array($listener)) { + $this->name = \is_object($listener[0]) ? \get_class($listener[0]) : $listener[0]; $this->pretty = $this->name.'::'.$listener[1]; } elseif ($listener instanceof \Closure) { $this->pretty = $this->name = 'closure'; - } elseif (is_string($listener)) { + } elseif (\is_string($listener)) { $this->pretty = $this->name = $listener; } else { - $this->name = get_class($listener); + $this->name = \get_class($listener); $this->pretty = $this->name.'::__invoke'; } @@ -101,7 +101,7 @@ class WrappedListener $e = $this->stopwatch->start($this->name, 'event_listener'); - call_user_func($this->listener, $event, $eventName, $this->dispatcher ?: $dispatcher); + \call_user_func($this->listener, $event, $eventName, $this->dispatcher ?: $dispatcher); if ($e->isStarted()) { $e->stop(); diff --git a/vendor/symfony/event-dispatcher/DependencyInjection/RegisterListenersPass.php b/vendor/symfony/event-dispatcher/DependencyInjection/RegisterListenersPass.php index 17a89e7f..4c8db4c6 100644 --- a/vendor/symfony/event-dispatcher/DependencyInjection/RegisterListenersPass.php +++ b/vendor/symfony/event-dispatcher/DependencyInjection/RegisterListenersPass.php @@ -12,8 +12,8 @@ namespace Symfony\Component\EventDispatcher\DependencyInjection; use Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument; -use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; +use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; use Symfony\Component\DependencyInjection\Reference; use Symfony\Component\EventDispatcher\EventDispatcher; diff --git a/vendor/symfony/event-dispatcher/EventDispatcher.php b/vendor/symfony/event-dispatcher/EventDispatcher.php index bc79a958..4e75c63e 100644 --- a/vendor/symfony/event-dispatcher/EventDispatcher.php +++ b/vendor/symfony/event-dispatcher/EventDispatcher.php @@ -82,13 +82,13 @@ class EventDispatcher implements EventDispatcherInterface return; } - if (is_array($listener) && isset($listener[0]) && $listener[0] instanceof \Closure) { + if (\is_array($listener) && isset($listener[0]) && $listener[0] instanceof \Closure) { $listener[0] = $listener[0](); } 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) { + if ($v !== $listener && \is_array($v) && isset($v[0]) && $v[0] instanceof \Closure) { $v[0] = $v[0](); $this->listeners[$eventName][$priority][$k] = $v; } @@ -135,13 +135,13 @@ class EventDispatcher implements EventDispatcherInterface return; } - if (is_array($listener) && isset($listener[0]) && $listener[0] instanceof \Closure) { + if (\is_array($listener) && isset($listener[0]) && $listener[0] instanceof \Closure) { $listener[0] = $listener[0](); } 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) { + if ($v !== $listener && \is_array($v) && isset($v[0]) && $v[0] instanceof \Closure) { $v[0] = $v[0](); } if ($v === $listener) { @@ -165,9 +165,9 @@ class EventDispatcher implements EventDispatcherInterface public function addSubscriber(EventSubscriberInterface $subscriber) { foreach ($subscriber->getSubscribedEvents() as $eventName => $params) { - if (is_string($params)) { + if (\is_string($params)) { $this->addListener($eventName, array($subscriber, $params)); - } elseif (is_string($params[0])) { + } elseif (\is_string($params[0])) { $this->addListener($eventName, array($subscriber, $params[0]), isset($params[1]) ? $params[1] : 0); } else { foreach ($params as $listener) { @@ -183,12 +183,12 @@ class EventDispatcher implements EventDispatcherInterface public function removeSubscriber(EventSubscriberInterface $subscriber) { foreach ($subscriber->getSubscribedEvents() as $eventName => $params) { - if (is_array($params) && is_array($params[0])) { + if (\is_array($params) && \is_array($params[0])) { foreach ($params as $listener) { $this->removeListener($eventName, array($subscriber, $listener[0])); } } else { - $this->removeListener($eventName, array($subscriber, is_string($params) ? $params : $params[0])); + $this->removeListener($eventName, array($subscriber, \is_string($params) ? $params : $params[0])); } } } diff --git a/vendor/symfony/event-dispatcher/Tests/Debug/TraceableEventDispatcherTest.php b/vendor/symfony/event-dispatcher/Tests/Debug/TraceableEventDispatcherTest.php index 2521f741..b5c53528 100644 --- a/vendor/symfony/event-dispatcher/Tests/Debug/TraceableEventDispatcherTest.php +++ b/vendor/symfony/event-dispatcher/Tests/Debug/TraceableEventDispatcherTest.php @@ -13,10 +13,10 @@ namespace Symfony\Component\EventDispatcher\Tests\Debug; use PHPUnit\Framework\TestCase; use Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher; +use Symfony\Component\EventDispatcher\Event; +use Symfony\Component\EventDispatcher\EventDispatcher; use Symfony\Component\EventDispatcher\EventDispatcherInterface; use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\EventDispatcher\EventDispatcher; -use Symfony\Component\EventDispatcher\Event; use Symfony\Component\Stopwatch\Stopwatch; class TraceableEventDispatcherTest extends TestCase @@ -271,6 +271,17 @@ class TraceableEventDispatcherTest extends TestCase $this->assertCount(1, $eventDispatcher->getListeners('foo'), 'expected listener1 to be removed'); } + + public function testClearOrphanedEvents() + { + $tdispatcher = new TraceableEventDispatcher(new EventDispatcher(), new Stopwatch()); + $tdispatcher->dispatch('foo'); + $events = $tdispatcher->getOrphanedEvents(); + $this->assertCount(1, $events); + $tdispatcher->reset(); + $events = $tdispatcher->getOrphanedEvents(); + $this->assertCount(0, $events); + } } class EventSubscriber implements EventSubscriberInterface diff --git a/vendor/symfony/finder/Comparator/Comparator.php b/vendor/symfony/finder/Comparator/Comparator.php index 4f5e1ffe..ea37566d 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, array('>', '<', '>=', '<=', '==', '!='))) { throw new \InvalidArgumentException(sprintf('Invalid operator "%s".', $operator)); } diff --git a/vendor/symfony/finder/Finder.php b/vendor/symfony/finder/Finder.php index 105acc70..056c836d 100644 --- a/vendor/symfony/finder/Finder.php +++ b/vendor/symfony/finder/Finder.php @@ -541,7 +541,7 @@ class Finder implements \IteratorAggregate, \Countable 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)) { + } elseif ($glob = glob($dir, (\defined('GLOB_BRACE') ? GLOB_BRACE : 0) | GLOB_ONLYDIR)) { $resolvedDirs = array_merge($resolvedDirs, array_map(array($this, 'normalizeDir'), $glob)); } else { throw new \InvalidArgumentException(sprintf('The "%s" directory does not exist.', $dir)); @@ -564,11 +564,11 @@ class Finder implements \IteratorAggregate, \Countable */ public function getIterator() { - if (0 === count($this->dirs) && 0 === count($this->iterators)) { + if (0 === \count($this->dirs) && 0 === \count($this->iterators)) { throw new \LogicException('You must call one of in() or append() methods before iterating over a Finder.'); } - if (1 === count($this->dirs) && 0 === count($this->iterators)) { + if (1 === \count($this->dirs) && 0 === \count($this->iterators)) { return $this->searchInDirectory($this->dirs[0]); } @@ -601,7 +601,7 @@ class Finder implements \IteratorAggregate, \Countable $this->iterators[] = $iterator->getIterator(); } elseif ($iterator instanceof \Iterator) { $this->iterators[] = $iterator; - } elseif ($iterator instanceof \Traversable || is_array($iterator)) { + } elseif ($iterator instanceof \Traversable || \is_array($iterator)) { $it = new \ArrayIterator(); foreach ($iterator as $file) { $it->append($file instanceof \SplFileInfo ? $file : new \SplFileInfo($file)); diff --git a/vendor/symfony/finder/Glob.php b/vendor/symfony/finder/Glob.php index df8b86fa..d8df62bf 100644 --- a/vendor/symfony/finder/Glob.php +++ b/vendor/symfony/finder/Glob.php @@ -51,7 +51,7 @@ class Glob $escaping = false; $inCurlies = 0; $regex = ''; - $sizeGlob = strlen($glob); + $sizeGlob = \strlen($glob); for ($i = 0; $i < $sizeGlob; ++$i) { $car = $glob[$i]; if ($firstByte && $strictLeadingDot && '.' !== $car) { diff --git a/vendor/symfony/finder/Iterator/CustomFilterIterator.php b/vendor/symfony/finder/Iterator/CustomFilterIterator.php index 031bc157..77bd3ac8 100644 --- a/vendor/symfony/finder/Iterator/CustomFilterIterator.php +++ b/vendor/symfony/finder/Iterator/CustomFilterIterator.php @@ -32,7 +32,7 @@ class CustomFilterIterator extends \FilterIterator public function __construct(\Iterator $iterator, array $filters) { foreach ($filters as $filter) { - if (!is_callable($filter)) { + if (!\is_callable($filter)) { throw new \InvalidArgumentException('Invalid PHP callback.'); } } @@ -51,7 +51,7 @@ class CustomFilterIterator extends \FilterIterator $fileinfo = $this->current(); foreach ($this->filters as $filter) { - if (false === call_user_func($filter, $fileinfo)) { + if (false === \call_user_func($filter, $fileinfo)) { return false; } } diff --git a/vendor/symfony/finder/Iterator/PathFilterIterator.php b/vendor/symfony/finder/Iterator/PathFilterIterator.php index dadfc8ed..3fda557b 100644 --- a/vendor/symfony/finder/Iterator/PathFilterIterator.php +++ b/vendor/symfony/finder/Iterator/PathFilterIterator.php @@ -28,7 +28,7 @@ class PathFilterIterator extends MultiplePcreFilterIterator { $filename = $this->current()->getRelativePathname(); - if ('\\' === DIRECTORY_SEPARATOR) { + if ('\\' === \DIRECTORY_SEPARATOR) { $filename = str_replace('\\', '/', $filename); } diff --git a/vendor/symfony/finder/Iterator/RecursiveDirectoryIterator.php b/vendor/symfony/finder/Iterator/RecursiveDirectoryIterator.php index acd5a376..844ba469 100644 --- a/vendor/symfony/finder/Iterator/RecursiveDirectoryIterator.php +++ b/vendor/symfony/finder/Iterator/RecursiveDirectoryIterator.php @@ -48,8 +48,8 @@ class RecursiveDirectoryIterator extends \RecursiveDirectoryIterator parent::__construct($path, $flags); $this->ignoreUnreadableDirs = $ignoreUnreadableDirs; $this->rootPath = $path; - if ('/' !== DIRECTORY_SEPARATOR && !($flags & self::UNIX_PATHS)) { - $this->directorySeparator = DIRECTORY_SEPARATOR; + if ('/' !== \DIRECTORY_SEPARATOR && !($flags & self::UNIX_PATHS)) { + $this->directorySeparator = \DIRECTORY_SEPARATOR; } } diff --git a/vendor/symfony/finder/Iterator/SortableIterator.php b/vendor/symfony/finder/Iterator/SortableIterator.php index c2f54b93..53f8e31c 100644 --- a/vendor/symfony/finder/Iterator/SortableIterator.php +++ b/vendor/symfony/finder/Iterator/SortableIterator.php @@ -63,7 +63,7 @@ class SortableIterator implements \IteratorAggregate $this->sort = function ($a, $b) { return $a->getMTime() - $b->getMTime(); }; - } elseif (is_callable($sort)) { + } elseif (\is_callable($sort)) { $this->sort = $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/Tests/FinderTest.php b/vendor/symfony/finder/Tests/FinderTest.php index c7908fa8..fbdcc36e 100644 --- a/vendor/symfony/finder/Tests/FinderTest.php +++ b/vendor/symfony/finder/Tests/FinderTest.php @@ -58,7 +58,7 @@ class FinderTest extends Iterator\RealIteratorTestCase public function testSymlinksNotResolved() { - if ('\\' === DIRECTORY_SEPARATOR) { + if ('\\' === \DIRECTORY_SEPARATOR) { $this->markTestSkipped('symlinks are not supported on Windows'); } @@ -265,7 +265,7 @@ class FinderTest extends Iterator\RealIteratorTestCase public function testFollowLinks() { - if ('\\' == DIRECTORY_SEPARATOR) { + if ('\\' == \DIRECTORY_SEPARATOR) { $this->markTestSkipped('symlinks are not supported on Windows'); } @@ -280,9 +280,9 @@ class FinderTest extends Iterator\RealIteratorTestCase $iterator = $finder->files()->name('*.php')->depth('< 1')->in(array(self::$tmpDir, __DIR__))->getIterator(); $expected = array( - self::$tmpDir.DIRECTORY_SEPARATOR.'test.php', - __DIR__.DIRECTORY_SEPARATOR.'FinderTest.php', - __DIR__.DIRECTORY_SEPARATOR.'GlobTest.php', + self::$tmpDir.\DIRECTORY_SEPARATOR.'test.php', + __DIR__.\DIRECTORY_SEPARATOR.'FinderTest.php', + __DIR__.\DIRECTORY_SEPARATOR.'GlobTest.php', ); $this->assertIterator($expected, $iterator); @@ -384,7 +384,7 @@ class FinderTest extends Iterator\RealIteratorTestCase $paths[] = $file->getRelativePathname(); } - $ref = array('test.php', 'toto', 'test.py', 'foo', 'foo'.DIRECTORY_SEPARATOR.'bar.tmp', 'foo bar'); + $ref = array('test.php', 'toto', 'test.py', 'foo', 'foo'.\DIRECTORY_SEPARATOR.'bar.tmp', 'foo bar'); sort($paths); sort($ref); @@ -395,7 +395,7 @@ class FinderTest extends Iterator\RealIteratorTestCase public function testAppendWithAFinder() { $finder = $this->buildFinder(); - $finder->files()->in(self::$tmpDir.DIRECTORY_SEPARATOR.'foo'); + $finder->files()->in(self::$tmpDir.\DIRECTORY_SEPARATOR.'foo'); $finder1 = $this->buildFinder(); $finder1->directories()->in(self::$tmpDir); @@ -408,7 +408,7 @@ class FinderTest extends Iterator\RealIteratorTestCase public function testAppendWithAnArray() { $finder = $this->buildFinder(); - $finder->files()->in(self::$tmpDir.DIRECTORY_SEPARATOR.'foo'); + $finder->files()->in(self::$tmpDir.\DIRECTORY_SEPARATOR.'foo'); $finder->append($this->toAbsolute(array('foo', 'toto'))); @@ -423,7 +423,7 @@ class FinderTest extends Iterator\RealIteratorTestCase public function testAppendDoesNotRequireIn() { $finder = $this->buildFinder(); - $finder->in(self::$tmpDir.DIRECTORY_SEPARATOR.'foo'); + $finder->in(self::$tmpDir.\DIRECTORY_SEPARATOR.'foo'); $finder1 = Finder::create()->append($finder); @@ -444,7 +444,7 @@ class FinderTest extends Iterator\RealIteratorTestCase public function testCountFiles() { - $files = Finder::create()->files()->in(__DIR__.DIRECTORY_SEPARATOR.'Fixtures'); + $files = Finder::create()->files()->in(__DIR__.\DIRECTORY_SEPARATOR.'Fixtures'); $i = 0; foreach ($files as $file) { @@ -460,7 +460,7 @@ class FinderTest extends Iterator\RealIteratorTestCase public function testCountWithoutIn() { $finder = Finder::create()->files(); - count($finder); + \count($finder); } public function testHasResults() @@ -483,7 +483,7 @@ class FinderTest extends Iterator\RealIteratorTestCase public function testContains($matchPatterns, $noMatchPatterns, $expected) { $finder = $this->buildFinder(); - $finder->in(__DIR__.DIRECTORY_SEPARATOR.'Fixtures') + $finder->in(__DIR__.\DIRECTORY_SEPARATOR.'Fixtures') ->name('*.txt')->sortByName() ->contains($matchPatterns) ->notContains($noMatchPatterns); @@ -546,15 +546,15 @@ class FinderTest extends Iterator\RealIteratorTestCase { $locations = array( __DIR__.'/Fixtures/one', - self::$tmpDir.DIRECTORY_SEPARATOR.'toto', + self::$tmpDir.\DIRECTORY_SEPARATOR.'toto', ); $finder = $this->buildFinder(); $finder->in($locations)->depth('< 10')->name('*.neon'); $expected = array( - __DIR__.'/Fixtures/one'.DIRECTORY_SEPARATOR.'b'.DIRECTORY_SEPARATOR.'c.neon', - __DIR__.'/Fixtures/one'.DIRECTORY_SEPARATOR.'b'.DIRECTORY_SEPARATOR.'d.neon', + __DIR__.'/Fixtures/one'.\DIRECTORY_SEPARATOR.'b'.\DIRECTORY_SEPARATOR.'c.neon', + __DIR__.'/Fixtures/one'.\DIRECTORY_SEPARATOR.'b'.\DIRECTORY_SEPARATOR.'d.neon', ); $this->assertIterator($expected, $finder); @@ -575,10 +575,10 @@ class FinderTest extends Iterator\RealIteratorTestCase public function testRegexSpecialCharsLocationWithPathRestrictionContainingStartFlag() { $finder = $this->buildFinder(); - $finder->in(__DIR__.DIRECTORY_SEPARATOR.'Fixtures'.DIRECTORY_SEPARATOR.'r+e.gex[c]a(r)s') + $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 = 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'); $this->assertIterator($this->toAbsoluteFixtures($expected), $finder); } @@ -612,7 +612,7 @@ class FinderTest extends Iterator\RealIteratorTestCase public function testPath($matchPatterns, $noMatchPatterns, array $expected) { $finder = $this->buildFinder(); - $finder->in(__DIR__.DIRECTORY_SEPARATOR.'Fixtures') + $finder->in(__DIR__.\DIRECTORY_SEPARATOR.'Fixtures') ->path($matchPatterns) ->notPath($noMatchPatterns); @@ -624,41 +624,41 @@ class FinderTest extends Iterator\RealIteratorTestCase return array( array('', '', array()), array('/^A\/B\/C/', '/C$/', - array('A'.DIRECTORY_SEPARATOR.'B'.DIRECTORY_SEPARATOR.'C'.DIRECTORY_SEPARATOR.'abc.dat'), + array('A'.\DIRECTORY_SEPARATOR.'B'.\DIRECTORY_SEPARATOR.'C'.\DIRECTORY_SEPARATOR.'abc.dat'), ), array('/^A\/B/', 'foobar', array( - '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', + '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'.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', + '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( //dirs - 'A'.DIRECTORY_SEPARATOR.'B', - 'A'.DIRECTORY_SEPARATOR.'B'.DIRECTORY_SEPARATOR.'C', - 'copy'.DIRECTORY_SEPARATOR.'A'.DIRECTORY_SEPARATOR.'B', - 'copy'.DIRECTORY_SEPARATOR.'A'.DIRECTORY_SEPARATOR.'B'.DIRECTORY_SEPARATOR.'C', + 'A'.\DIRECTORY_SEPARATOR.'B', + 'A'.\DIRECTORY_SEPARATOR.'B'.\DIRECTORY_SEPARATOR.'C', + 'copy'.\DIRECTORY_SEPARATOR.'A'.\DIRECTORY_SEPARATOR.'B', + 'copy'.\DIRECTORY_SEPARATOR.'A'.\DIRECTORY_SEPARATOR.'B'.\DIRECTORY_SEPARATOR.'C', //files - 'A'.DIRECTORY_SEPARATOR.'B'.DIRECTORY_SEPARATOR.'ab.dat', - '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', + 'A'.\DIRECTORY_SEPARATOR.'B'.\DIRECTORY_SEPARATOR.'ab.dat', + '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'.DIRECTORY_SEPARATOR.'foo.txt', + 'with space'.\DIRECTORY_SEPARATOR.'foo.txt', ), ), ); @@ -666,7 +666,7 @@ class FinderTest extends Iterator\RealIteratorTestCase public function testAccessDeniedException() { - if ('\\' === DIRECTORY_SEPARATOR) { + if ('\\' === \DIRECTORY_SEPARATOR) { $this->markTestSkipped('chmod is not supported on Windows'); } @@ -674,7 +674,7 @@ class FinderTest extends Iterator\RealIteratorTestCase $finder->files()->in(self::$tmpDir); // make 'foo' directory non-readable - $testDir = self::$tmpDir.DIRECTORY_SEPARATOR.'foo'; + $testDir = self::$tmpDir.\DIRECTORY_SEPARATOR.'foo'; chmod($testDir, 0333); if (false === $couldRead = is_readable($testDir)) { @@ -706,7 +706,7 @@ class FinderTest extends Iterator\RealIteratorTestCase public function testIgnoredAccessDeniedException() { - if ('\\' === DIRECTORY_SEPARATOR) { + if ('\\' === \DIRECTORY_SEPARATOR) { $this->markTestSkipped('chmod is not supported on Windows'); } @@ -714,7 +714,7 @@ class FinderTest extends Iterator\RealIteratorTestCase $finder->files()->ignoreUnreadableDirs()->in(self::$tmpDir); // make 'foo' directory non-readable - $testDir = self::$tmpDir.DIRECTORY_SEPARATOR.'foo'; + $testDir = self::$tmpDir.\DIRECTORY_SEPARATOR.'foo'; chmod($testDir, 0333); if (false === ($couldRead = is_readable($testDir))) { diff --git a/vendor/symfony/finder/Tests/GlobTest.php b/vendor/symfony/finder/Tests/GlobTest.php index d48ac1fc..3a5aab31 100644 --- a/vendor/symfony/finder/Tests/GlobTest.php +++ b/vendor/symfony/finder/Tests/GlobTest.php @@ -32,9 +32,9 @@ class GlobTest extends TestCase $regex = Glob::toRegex('/**/*.neon'); foreach ($finder->in(__DIR__) as $k => $v) { - $k = str_replace(DIRECTORY_SEPARATOR, '/', $k); - if (preg_match($regex, substr($k, strlen(__DIR__)))) { - $match[] = substr($k, 10 + strlen(__DIR__)); + $k = str_replace(\DIRECTORY_SEPARATOR, '/', $k); + if (preg_match($regex, substr($k, \strlen(__DIR__)))) { + $match[] = substr($k, 10 + \strlen(__DIR__)); } } sort($match); @@ -49,9 +49,9 @@ class GlobTest extends TestCase $regex = Glob::toRegex('/**/*.neon', false); foreach ($finder->in(__DIR__) as $k => $v) { - $k = str_replace(DIRECTORY_SEPARATOR, '/', $k); - if (preg_match($regex, substr($k, strlen(__DIR__)))) { - $match[] = substr($k, 10 + strlen(__DIR__)); + $k = str_replace(\DIRECTORY_SEPARATOR, '/', $k); + if (preg_match($regex, substr($k, \strlen(__DIR__)))) { + $match[] = substr($k, 10 + \strlen(__DIR__)); } } sort($match); @@ -66,9 +66,9 @@ class GlobTest extends TestCase $regex = Glob::toRegex('/Fixtures/one/**'); foreach ($finder->in(__DIR__) as $k => $v) { - $k = str_replace(DIRECTORY_SEPARATOR, '/', $k); - if (preg_match($regex, substr($k, strlen(__DIR__)))) { - $match[] = substr($k, 10 + strlen(__DIR__)); + $k = str_replace(\DIRECTORY_SEPARATOR, '/', $k); + if (preg_match($regex, substr($k, \strlen(__DIR__)))) { + $match[] = substr($k, 10 + \strlen(__DIR__)); } } sort($match); @@ -83,9 +83,9 @@ class GlobTest extends TestCase $regex = Glob::toRegex('/Fixtures/one/**', false); foreach ($finder->in(__DIR__) as $k => $v) { - $k = str_replace(DIRECTORY_SEPARATOR, '/', $k); - if (preg_match($regex, substr($k, strlen(__DIR__)))) { - $match[] = substr($k, 10 + strlen(__DIR__)); + $k = str_replace(\DIRECTORY_SEPARATOR, '/', $k); + if (preg_match($regex, substr($k, \strlen(__DIR__)))) { + $match[] = substr($k, 10 + \strlen(__DIR__)); } } sort($match); diff --git a/vendor/symfony/finder/Tests/Iterator/DateRangeFilterIteratorTest.php b/vendor/symfony/finder/Tests/Iterator/DateRangeFilterIteratorTest.php index 1ec70518..3226f706 100644 --- a/vendor/symfony/finder/Tests/Iterator/DateRangeFilterIteratorTest.php +++ b/vendor/symfony/finder/Tests/Iterator/DateRangeFilterIteratorTest.php @@ -11,8 +11,8 @@ namespace Symfony\Component\Finder\Tests\Iterator; -use Symfony\Component\Finder\Iterator\DateRangeFilterIterator; use Symfony\Component\Finder\Comparator\DateComparator; +use Symfony\Component\Finder\Iterator\DateRangeFilterIterator; class DateRangeFilterIteratorTest extends RealIteratorTestCase { diff --git a/vendor/symfony/finder/Tests/Iterator/IteratorTestCase.php b/vendor/symfony/finder/Tests/Iterator/IteratorTestCase.php index c724a75c..89f042ae 100644 --- a/vendor/symfony/finder/Tests/Iterator/IteratorTestCase.php +++ b/vendor/symfony/finder/Tests/Iterator/IteratorTestCase.php @@ -19,9 +19,9 @@ abstract class IteratorTestCase extends TestCase { // set iterator_to_array $use_key to false to avoid values merge // this made FinderTest::testAppendWithAnArray() fail with GnuFinderAdapter - $values = array_map(function (\SplFileInfo $fileinfo) { return str_replace('/', DIRECTORY_SEPARATOR, $fileinfo->getPathname()); }, iterator_to_array($iterator, false)); + $values = array_map(function (\SplFileInfo $fileinfo) { return str_replace('/', \DIRECTORY_SEPARATOR, $fileinfo->getPathname()); }, iterator_to_array($iterator, false)); - $expected = array_map(function ($path) { return str_replace('/', DIRECTORY_SEPARATOR, $path); }, $expected); + $expected = array_map(function ($path) { return str_replace('/', \DIRECTORY_SEPARATOR, $path); }, $expected); sort($values); sort($expected); @@ -52,7 +52,7 @@ abstract class IteratorTestCase extends TestCase foreach ($expected as $subarray) { $temp = array(); - while (count($values) && count($temp) < count($subarray)) { + while (\count($values) && \count($temp) < \count($subarray)) { $temp[] = array_shift($values); } sort($temp); diff --git a/vendor/symfony/finder/Tests/Iterator/MockSplFileInfo.php b/vendor/symfony/finder/Tests/Iterator/MockSplFileInfo.php index cfe31c90..36e6528d 100644 --- a/vendor/symfony/finder/Tests/Iterator/MockSplFileInfo.php +++ b/vendor/symfony/finder/Tests/Iterator/MockSplFileInfo.php @@ -25,9 +25,9 @@ class MockSplFileInfo extends \SplFileInfo public function __construct($param) { - if (is_string($param)) { + if (\is_string($param)) { parent::__construct($param); - } elseif (is_array($param)) { + } elseif (\is_array($param)) { $defaults = array( 'name' => 'file.txt', 'contents' => null, @@ -92,7 +92,7 @@ class MockSplFileInfo extends \SplFileInfo public function setType($type) { - if (is_string($type)) { + if (\is_string($type)) { switch ($type) { case 'directory': case 'd': diff --git a/vendor/symfony/finder/Tests/Iterator/PathFilterIteratorTest.php b/vendor/symfony/finder/Tests/Iterator/PathFilterIteratorTest.php index 6e10550c..38ed966a 100644 --- a/vendor/symfony/finder/Tests/Iterator/PathFilterIteratorTest.php +++ b/vendor/symfony/finder/Tests/Iterator/PathFilterIteratorTest.php @@ -31,37 +31,37 @@ class PathFilterIteratorTest extends IteratorTestCase //PATH: A/B/C/abc.dat $inner[] = new MockSplFileInfo(array( 'name' => 'abc.dat', - 'relativePathname' => 'A'.DIRECTORY_SEPARATOR.'B'.DIRECTORY_SEPARATOR.'C'.DIRECTORY_SEPARATOR.'abc.dat', + 'relativePathname' => 'A'.\DIRECTORY_SEPARATOR.'B'.\DIRECTORY_SEPARATOR.'C'.\DIRECTORY_SEPARATOR.'abc.dat', )); //PATH: A/B/ab.dat $inner[] = new MockSplFileInfo(array( 'name' => 'ab.dat', - 'relativePathname' => 'A'.DIRECTORY_SEPARATOR.'B'.DIRECTORY_SEPARATOR.'ab.dat', + 'relativePathname' => 'A'.\DIRECTORY_SEPARATOR.'B'.\DIRECTORY_SEPARATOR.'ab.dat', )); //PATH: A/a.dat $inner[] = new MockSplFileInfo(array( 'name' => 'a.dat', - 'relativePathname' => 'A'.DIRECTORY_SEPARATOR.'a.dat', + 'relativePathname' => 'A'.\DIRECTORY_SEPARATOR.'a.dat', )); //PATH: copy/A/B/C/abc.dat.copy $inner[] = new MockSplFileInfo(array( 'name' => 'abc.dat.copy', - 'relativePathname' => 'copy'.DIRECTORY_SEPARATOR.'A'.DIRECTORY_SEPARATOR.'B'.DIRECTORY_SEPARATOR.'C'.DIRECTORY_SEPARATOR.'abc.dat', + '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( 'name' => 'ab.dat.copy', - 'relativePathname' => 'copy'.DIRECTORY_SEPARATOR.'A'.DIRECTORY_SEPARATOR.'B'.DIRECTORY_SEPARATOR.'ab.dat', + 'relativePathname' => 'copy'.\DIRECTORY_SEPARATOR.'A'.\DIRECTORY_SEPARATOR.'B'.\DIRECTORY_SEPARATOR.'ab.dat', )); //PATH: copy/A/a.dat.copy $inner[] = new MockSplFileInfo(array( 'name' => 'a.dat.copy', - 'relativePathname' => 'copy'.DIRECTORY_SEPARATOR.'A'.DIRECTORY_SEPARATOR.'a.dat', + 'relativePathname' => 'copy'.\DIRECTORY_SEPARATOR.'A'.\DIRECTORY_SEPARATOR.'a.dat', )); return array( diff --git a/vendor/symfony/finder/Tests/Iterator/RealIteratorTestCase.php b/vendor/symfony/finder/Tests/Iterator/RealIteratorTestCase.php index 4f274e2d..b0223b78 100644 --- a/vendor/symfony/finder/Tests/Iterator/RealIteratorTestCase.php +++ b/vendor/symfony/finder/Tests/Iterator/RealIteratorTestCase.php @@ -18,7 +18,7 @@ abstract class RealIteratorTestCase extends IteratorTestCase public static function setUpBeforeClass() { - self::$tmpDir = realpath(sys_get_temp_dir()).DIRECTORY_SEPARATOR.'symfony_finder'; + self::$tmpDir = realpath(sys_get_temp_dir()).\DIRECTORY_SEPARATOR.'symfony_finder'; self::$files = array( '.git/', @@ -44,7 +44,7 @@ abstract class RealIteratorTestCase extends IteratorTestCase } foreach (self::$files as $file) { - if (DIRECTORY_SEPARATOR === $file[strlen($file) - 1]) { + if (\DIRECTORY_SEPARATOR === $file[\strlen($file) - 1]) { mkdir($file); } else { touch($file); @@ -84,24 +84,24 @@ abstract class RealIteratorTestCase extends IteratorTestCase * Without the call to setUpBeforeClass() property can be null. */ if (!self::$tmpDir) { - self::$tmpDir = realpath(sys_get_temp_dir()).DIRECTORY_SEPARATOR.'symfony_finder'; + self::$tmpDir = realpath(sys_get_temp_dir()).\DIRECTORY_SEPARATOR.'symfony_finder'; } - if (is_array($files)) { + if (\is_array($files)) { $f = array(); foreach ($files as $file) { - if (is_array($file)) { + if (\is_array($file)) { $f[] = self::toAbsolute($file); } else { - $f[] = self::$tmpDir.DIRECTORY_SEPARATOR.str_replace('/', DIRECTORY_SEPARATOR, $file); + $f[] = self::$tmpDir.\DIRECTORY_SEPARATOR.str_replace('/', \DIRECTORY_SEPARATOR, $file); } } return $f; } - if (is_string($files)) { - return self::$tmpDir.DIRECTORY_SEPARATOR.str_replace('/', DIRECTORY_SEPARATOR, $files); + if (\is_string($files)) { + return self::$tmpDir.\DIRECTORY_SEPARATOR.str_replace('/', \DIRECTORY_SEPARATOR, $files); } return self::$tmpDir; @@ -111,7 +111,7 @@ abstract class RealIteratorTestCase extends IteratorTestCase { $f = array(); foreach ($files as $file) { - $f[] = realpath(__DIR__.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'Fixtures'.DIRECTORY_SEPARATOR.$file); + $f[] = realpath(__DIR__.\DIRECTORY_SEPARATOR.'..'.\DIRECTORY_SEPARATOR.'Fixtures'.\DIRECTORY_SEPARATOR.$file); } return $f; diff --git a/vendor/symfony/finder/Tests/Iterator/RecursiveDirectoryIteratorTest.php b/vendor/symfony/finder/Tests/Iterator/RecursiveDirectoryIteratorTest.php index 3a3ddc4d..0c9aca24 100644 --- a/vendor/symfony/finder/Tests/Iterator/RecursiveDirectoryIteratorTest.php +++ b/vendor/symfony/finder/Tests/Iterator/RecursiveDirectoryIteratorTest.php @@ -43,8 +43,8 @@ class RecursiveDirectoryIteratorTest extends IteratorTestCase } $contains = array( - 'ftp://speedtest.tele2.net'.DIRECTORY_SEPARATOR.'1000GB.zip', - 'ftp://speedtest.tele2.net'.DIRECTORY_SEPARATOR.'100GB.zip', + 'ftp://speedtest.tele2.net'.\DIRECTORY_SEPARATOR.'1000GB.zip', + 'ftp://speedtest.tele2.net'.\DIRECTORY_SEPARATOR.'100GB.zip', ); $actual = array(); diff --git a/vendor/symfony/finder/Tests/Iterator/SizeRangeFilterIteratorTest.php b/vendor/symfony/finder/Tests/Iterator/SizeRangeFilterIteratorTest.php index 6d75b0f2..068fc7b0 100644 --- a/vendor/symfony/finder/Tests/Iterator/SizeRangeFilterIteratorTest.php +++ b/vendor/symfony/finder/Tests/Iterator/SizeRangeFilterIteratorTest.php @@ -11,8 +11,8 @@ namespace Symfony\Component\Finder\Tests\Iterator; -use Symfony\Component\Finder\Iterator\SizeRangeFilterIterator; use Symfony\Component\Finder\Comparator\NumberComparator; +use Symfony\Component\Finder\Iterator\SizeRangeFilterIterator; class SizeRangeFilterIteratorTest extends RealIteratorTestCase { diff --git a/vendor/symfony/finder/Tests/Iterator/SortableIteratorTest.php b/vendor/symfony/finder/Tests/Iterator/SortableIteratorTest.php index 444654a2..a35a12b5 100644 --- a/vendor/symfony/finder/Tests/Iterator/SortableIteratorTest.php +++ b/vendor/symfony/finder/Tests/Iterator/SortableIteratorTest.php @@ -30,10 +30,10 @@ class SortableIteratorTest extends RealIteratorTestCase */ public function testAccept($mode, $expected) { - if (!is_callable($mode)) { + if (!\is_callable($mode)) { switch ($mode) { case SortableIterator::SORT_BY_ACCESSED_TIME: - if ('\\' === DIRECTORY_SEPARATOR) { + if ('\\' === \DIRECTORY_SEPARATOR) { touch(self::toAbsolute('.git')); } else { file_get_contents(self::toAbsolute('.git')); @@ -62,7 +62,7 @@ class SortableIteratorTest extends RealIteratorTestCase || SortableIterator::SORT_BY_CHANGED_TIME === $mode || SortableIterator::SORT_BY_MODIFIED_TIME === $mode ) { - if ('\\' === DIRECTORY_SEPARATOR && SortableIterator::SORT_BY_MODIFIED_TIME !== $mode) { + if ('\\' === \DIRECTORY_SEPARATOR && SortableIterator::SORT_BY_MODIFIED_TIME !== $mode) { $this->markTestSkipped('Sorting by atime or ctime is not supported on Windows'); } $this->assertOrderedIteratorForGroups($expected, $iterator); diff --git a/vendor/symfony/http-foundation/AcceptHeaderItem.php b/vendor/symfony/http-foundation/AcceptHeaderItem.php index f8742598..97f60c8a 100644 --- a/vendor/symfony/http-foundation/AcceptHeaderItem.php +++ b/vendor/symfony/http-foundation/AcceptHeaderItem.php @@ -56,7 +56,7 @@ class AcceptHeaderItem public function __toString() { $string = $this->value.($this->quality < 1 ? ';q='.$this->quality : ''); - if (count($this->attributes) > 0) { + if (\count($this->attributes) > 0) { $string .= '; '.HeaderUtils::toString($this->attributes, ';'); } diff --git a/vendor/symfony/http-foundation/ApacheRequest.php b/vendor/symfony/http-foundation/ApacheRequest.php index 84803eba..4e99186d 100644 --- a/vendor/symfony/http-foundation/ApacheRequest.php +++ b/vendor/symfony/http-foundation/ApacheRequest.php @@ -35,7 +35,7 @@ class ApacheRequest extends Request if (false === strpos($this->server->get('REQUEST_URI'), $baseUrl)) { // assume mod_rewrite - return rtrim(dirname($baseUrl), '/\\'); + return rtrim(\dirname($baseUrl), '/\\'); } return $baseUrl; diff --git a/vendor/symfony/http-foundation/BinaryFileResponse.php b/vendor/symfony/http-foundation/BinaryFileResponse.php index b549c24b..34a415fc 100644 --- a/vendor/symfony/http-foundation/BinaryFileResponse.php +++ b/vendor/symfony/http-foundation/BinaryFileResponse.php @@ -11,8 +11,8 @@ namespace Symfony\Component\HttpFoundation; -use Symfony\Component\HttpFoundation\File\File; use Symfony\Component\HttpFoundation\File\Exception\FileException; +use Symfony\Component\HttpFoundation\File\File; /** * BinaryFileResponse represents an HTTP response delivering a file. @@ -31,8 +31,8 @@ class BinaryFileResponse extends Response * @var File */ protected $file; - protected $offset; - protected $maxlen; + protected $offset = 0; + protected $maxlen = -1; protected $deleteFileAfterSend = false; /** @@ -165,7 +165,7 @@ class BinaryFileResponse extends Response for ($i = 0, $filenameLength = mb_strlen($filename, $encoding); $i < $filenameLength; ++$i) { $char = mb_substr($filename, $i, 1, $encoding); - if ('%' === $char || ord($char) < 32 || ord($char) > 126) { + if ('%' === $char || \ord($char) < 32 || \ord($char) > 126) { $filenameFallback .= '_'; } else { $filenameFallback .= $char; @@ -221,8 +221,8 @@ class BinaryFileResponse extends Response $parts = HeaderUtils::split($request->headers->get('X-Accel-Mapping', ''), ',='); $mappings = HeaderUtils::combine($parts); foreach ($mappings as $pathPrefix => $location) { - if (substr($path, 0, strlen($pathPrefix)) === $pathPrefix) { - $path = $location.substr($path, strlen($pathPrefix)); + if (substr($path, 0, \strlen($pathPrefix)) === $pathPrefix) { + $path = $location.substr($path, \strlen($pathPrefix)); break; } } diff --git a/vendor/symfony/http-foundation/CHANGELOG.md b/vendor/symfony/http-foundation/CHANGELOG.md index 83e98a0e..8d851c6b 100644 --- a/vendor/symfony/http-foundation/CHANGELOG.md +++ b/vendor/symfony/http-foundation/CHANGELOG.md @@ -1,6 +1,12 @@ CHANGELOG ========= +4.1.3 +----- + + * [BC BREAK] Support for the IIS-only `X_ORIGINAL_URL` and `X_REWRITE_URL` + HTTP headers has been dropped for security reasons. + 4.1.0 ----- diff --git a/vendor/symfony/http-foundation/Cookie.php b/vendor/symfony/http-foundation/Cookie.php index ff74aee5..2332bb4d 100644 --- a/vendor/symfony/http-foundation/Cookie.php +++ b/vendor/symfony/http-foundation/Cookie.php @@ -114,7 +114,7 @@ class Cookie $sameSite = strtolower($sameSite); } - if (!in_array($sameSite, array(self::SAMESITE_LAX, self::SAMESITE_STRICT, null), true)) { + if (!\in_array($sameSite, array(self::SAMESITE_LAX, self::SAMESITE_STRICT, null), true)) { throw new \InvalidArgumentException('The "sameSite" parameter value is not valid.'); } @@ -252,7 +252,7 @@ class Cookie */ public function isCleared() { - return $this->expire < time(); + return 0 !== $this->expire && $this->expire < time(); } /** diff --git a/vendor/symfony/http-foundation/File/Exception/UnexpectedTypeException.php b/vendor/symfony/http-foundation/File/Exception/UnexpectedTypeException.php index 82e6691f..82b982b3 100644 --- a/vendor/symfony/http-foundation/File/Exception/UnexpectedTypeException.php +++ b/vendor/symfony/http-foundation/File/Exception/UnexpectedTypeException.php @@ -15,6 +15,6 @@ class UnexpectedTypeException extends FileException { public function __construct($value, string $expectedType) { - parent::__construct(sprintf('Expected argument of type %s, %s given', $expectedType, is_object($value) ? get_class($value) : gettype($value))); + parent::__construct(sprintf('Expected argument of type %s, %s given', $expectedType, \is_object($value) ? \get_class($value) : \gettype($value))); } } diff --git a/vendor/symfony/http-foundation/File/File.php b/vendor/symfony/http-foundation/File/File.php index 44ac3925..de7b0809 100644 --- a/vendor/symfony/http-foundation/File/File.php +++ b/vendor/symfony/http-foundation/File/File.php @@ -13,8 +13,8 @@ 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\MimeTypeGuesser; use Symfony\Component\HttpFoundation\File\MimeType\ExtensionGuesser; +use Symfony\Component\HttpFoundation\File\MimeType\MimeTypeGuesser; /** * A file in the file system. @@ -115,7 +115,7 @@ class File extends \SplFileInfo throw new FileException(sprintf('Unable to write in the "%s" directory', $directory)); } - $target = rtrim($directory, '/\\').DIRECTORY_SEPARATOR.(null === $name ? $this->getBasename() : $this->getName($name)); + $target = rtrim($directory, '/\\').\DIRECTORY_SEPARATOR.(null === $name ? $this->getBasename() : $this->getName($name)); return new self($target, false); } diff --git a/vendor/symfony/http-foundation/File/MimeType/FileBinaryMimeTypeGuesser.php b/vendor/symfony/http-foundation/File/MimeType/FileBinaryMimeTypeGuesser.php index 83be44af..31300019 100644 --- a/vendor/symfony/http-foundation/File/MimeType/FileBinaryMimeTypeGuesser.php +++ b/vendor/symfony/http-foundation/File/MimeType/FileBinaryMimeTypeGuesser.php @@ -11,8 +11,8 @@ namespace Symfony\Component\HttpFoundation\File\MimeType; -use Symfony\Component\HttpFoundation\File\Exception\FileNotFoundException; use Symfony\Component\HttpFoundation\File\Exception\AccessDeniedException; +use Symfony\Component\HttpFoundation\File\Exception\FileNotFoundException; /** * Guesses the mime type with the binary "file" (only available on *nix). @@ -49,7 +49,7 @@ class FileBinaryMimeTypeGuesser implements MimeTypeGuesserInterface return $supported; } - if ('\\' === DIRECTORY_SEPARATOR || !function_exists('passthru') || !function_exists('escapeshellarg')) { + if ('\\' === \DIRECTORY_SEPARATOR || !\function_exists('passthru') || !\function_exists('escapeshellarg')) { return $supported = false; } diff --git a/vendor/symfony/http-foundation/File/MimeType/FileinfoMimeTypeGuesser.php b/vendor/symfony/http-foundation/File/MimeType/FileinfoMimeTypeGuesser.php index d3ba8b31..cee9ef3f 100644 --- a/vendor/symfony/http-foundation/File/MimeType/FileinfoMimeTypeGuesser.php +++ b/vendor/symfony/http-foundation/File/MimeType/FileinfoMimeTypeGuesser.php @@ -11,8 +11,8 @@ namespace Symfony\Component\HttpFoundation\File\MimeType; -use Symfony\Component\HttpFoundation\File\Exception\FileNotFoundException; use Symfony\Component\HttpFoundation\File\Exception\AccessDeniedException; +use Symfony\Component\HttpFoundation\File\Exception\FileNotFoundException; /** * Guesses the mime type using the PECL extension FileInfo. @@ -40,7 +40,7 @@ class FileinfoMimeTypeGuesser implements MimeTypeGuesserInterface */ public static function isSupported() { - return function_exists('finfo_open'); + return \function_exists('finfo_open'); } /** diff --git a/vendor/symfony/http-foundation/File/MimeType/MimeTypeGuesser.php b/vendor/symfony/http-foundation/File/MimeType/MimeTypeGuesser.php index d78c7606..dae47a7c 100644 --- a/vendor/symfony/http-foundation/File/MimeType/MimeTypeGuesser.php +++ b/vendor/symfony/http-foundation/File/MimeType/MimeTypeGuesser.php @@ -11,8 +11,8 @@ namespace Symfony\Component\HttpFoundation\File\MimeType; -use Symfony\Component\HttpFoundation\File\Exception\FileNotFoundException; use Symfony\Component\HttpFoundation\File\Exception\AccessDeniedException; +use Symfony\Component\HttpFoundation\File\Exception\FileNotFoundException; /** * A singleton mime type guesser. diff --git a/vendor/symfony/http-foundation/File/MimeType/MimeTypeGuesserInterface.php b/vendor/symfony/http-foundation/File/MimeType/MimeTypeGuesserInterface.php index f8c3ad22..5ac1acb8 100644 --- a/vendor/symfony/http-foundation/File/MimeType/MimeTypeGuesserInterface.php +++ b/vendor/symfony/http-foundation/File/MimeType/MimeTypeGuesserInterface.php @@ -11,8 +11,8 @@ namespace Symfony\Component\HttpFoundation\File\MimeType; -use Symfony\Component\HttpFoundation\File\Exception\FileNotFoundException; use Symfony\Component\HttpFoundation\File\Exception\AccessDeniedException; +use Symfony\Component\HttpFoundation\File\Exception\FileNotFoundException; /** * Guesses the mime type of a file. diff --git a/vendor/symfony/http-foundation/File/UploadedFile.php b/vendor/symfony/http-foundation/File/UploadedFile.php index 252f46ad..63fa6c73 100644 --- a/vendor/symfony/http-foundation/File/UploadedFile.php +++ b/vendor/symfony/http-foundation/File/UploadedFile.php @@ -65,10 +65,10 @@ class UploadedFile extends File $this->originalName = $this->getName($originalName); $this->mimeType = $mimeType ?: 'application/octet-stream'; - if (4 < func_num_args() ? !is_bool($test) : null !== $error && @filesize($path) === $error) { + if (4 < \func_num_args() ? !\is_bool($test) : null !== $error && @filesize($path) === $error) { @trigger_error(sprintf('Passing a size as 4th argument to the constructor of "%s" is deprecated since Symfony 4.1.', __CLASS__), E_USER_DEPRECATED); $error = $test; - $test = 5 < func_num_args() ? func_get_arg(5) : false; + $test = 5 < \func_num_args() ? func_get_arg(5) : false; } $this->error = $error ?: UPLOAD_ERR_OK; @@ -158,7 +158,7 @@ class UploadedFile extends File */ public function getClientSize() { - @trigger_error(sprintf('"%s" is deprecated since Symfony 4.1. Use getSize() instead.', __METHOD__), E_USER_DEPRECATED); + @trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.1. Use getSize() instead.', __METHOD__), E_USER_DEPRECATED); return $this->getSize(); } @@ -254,9 +254,9 @@ class UploadedFile extends File $max = ltrim($iniMax, '+'); if (0 === strpos($max, '0x')) { - $max = intval($max, 16); + $max = \intval($max, 16); } elseif (0 === strpos($max, '0')) { - $max = intval($max, 8); + $max = \intval($max, 8); } else { $max = (int) $max; } diff --git a/vendor/symfony/http-foundation/FileBag.php b/vendor/symfony/http-foundation/FileBag.php index f0d97cac..f37e10f2 100644 --- a/vendor/symfony/http-foundation/FileBag.php +++ b/vendor/symfony/http-foundation/FileBag.php @@ -45,7 +45,7 @@ class FileBag extends ParameterBag */ public function set($key, $value) { - if (!is_array($value) && !$value instanceof UploadedFile) { + if (!\is_array($value) && !$value instanceof UploadedFile) { throw new \InvalidArgumentException('An uploaded file must be an array or an instance of UploadedFile.'); } @@ -76,7 +76,7 @@ class FileBag extends ParameterBag } $file = $this->fixPhpFilesArray($file); - if (is_array($file)) { + if (\is_array($file)) { $keys = array_keys($file); sort($keys); @@ -113,14 +113,14 @@ class FileBag extends ParameterBag */ protected function fixPhpFilesArray($data) { - if (!is_array($data)) { + if (!\is_array($data)) { return $data; } $keys = array_keys($data); sort($keys); - if (self::$fileKeys != $keys || !isset($data['name']) || !is_array($data['name'])) { + if (self::$fileKeys != $keys || !isset($data['name']) || !\is_array($data['name'])) { return $data; } diff --git a/vendor/symfony/http-foundation/HeaderBag.php b/vendor/symfony/http-foundation/HeaderBag.php index 7026732f..221ff61b 100644 --- a/vendor/symfony/http-foundation/HeaderBag.php +++ b/vendor/symfony/http-foundation/HeaderBag.php @@ -101,11 +101,11 @@ class HeaderBag implements \IteratorAggregate, \Countable /** * Returns a header value by name. * - * @param string $key The header name - * @param string|string[] $default The default value - * @param bool $first Whether to return the first value or all header values + * @param string $key The header name + * @param string|string[]|null $default The default value + * @param bool $first Whether to return the first value or all header values * - * @return string|string[] The first header value or default value if $first is true, an array of values otherwise + * @return string|string[]|null The first header value or default value if $first is true, an array of values otherwise */ public function get($key, $default = null, $first = true) { @@ -181,7 +181,7 @@ class HeaderBag implements \IteratorAggregate, \Countable */ public function contains($key, $value) { - return in_array($value, $this->get($key, null, false)); + return \in_array($value, $this->get($key, null, false)); } /** @@ -289,7 +289,7 @@ class HeaderBag implements \IteratorAggregate, \Countable */ public function count() { - return count($this->headers); + return \count($this->headers); } protected function getCacheControlHeader() diff --git a/vendor/symfony/http-foundation/IpUtils.php b/vendor/symfony/http-foundation/IpUtils.php index 86d135b2..a1bfa908 100644 --- a/vendor/symfony/http-foundation/IpUtils.php +++ b/vendor/symfony/http-foundation/IpUtils.php @@ -37,7 +37,7 @@ class IpUtils */ public static function checkIp($requestIp, $ips) { - if (!is_array($ips)) { + if (!\is_array($ips)) { $ips = array($ips); } @@ -116,7 +116,7 @@ class IpUtils return self::$checkedIps[$cacheKey]; } - if (!((extension_loaded('sockets') && defined('AF_INET6')) || @inet_pton('::1'))) { + if (!((\extension_loaded('sockets') && \defined('AF_INET6')) || @inet_pton('::1'))) { throw new \RuntimeException('Unable to check Ipv6. Check that PHP was not compiled with option "disable-ipv6".'); } diff --git a/vendor/symfony/http-foundation/JsonResponse.php b/vendor/symfony/http-foundation/JsonResponse.php index 72926402..f10262e8 100644 --- a/vendor/symfony/http-foundation/JsonResponse.php +++ b/vendor/symfony/http-foundation/JsonResponse.php @@ -101,7 +101,7 @@ class JsonResponse extends Response ); $parts = explode('.', $callback); foreach ($parts as $part) { - if (!preg_match($pattern, $part) || in_array($part, $reserved, true)) { + if (!preg_match($pattern, $part) || \in_array($part, $reserved, true)) { throw new \InvalidArgumentException('The callback name is not valid.'); } } @@ -142,7 +142,7 @@ class JsonResponse extends Response try { $data = json_encode($data, $this->encodingOptions); } catch (\Exception $e) { - if ('Exception' === get_class($e) && 0 === strpos($e->getMessage(), 'Failed calling ')) { + if ('Exception' === \get_class($e) && 0 === strpos($e->getMessage(), 'Failed calling ')) { throw $e->getPrevious() ?: $e; } throw $e; diff --git a/vendor/symfony/http-foundation/ParameterBag.php b/vendor/symfony/http-foundation/ParameterBag.php index 257ef8bc..e3be0a9b 100644 --- a/vendor/symfony/http-foundation/ParameterBag.php +++ b/vendor/symfony/http-foundation/ParameterBag.php @@ -200,12 +200,12 @@ class ParameterBag implements \IteratorAggregate, \Countable $value = $this->get($key, $default); // Always turn $options into an array - this allows filter_var option shortcuts. - if (!is_array($options) && $options) { + if (!\is_array($options) && $options) { $options = array('flags' => $options); } // Add a convenience check for arrays. - if (is_array($value) && !isset($options['flags'])) { + if (\is_array($value) && !isset($options['flags'])) { $options['flags'] = FILTER_REQUIRE_ARRAY; } @@ -229,6 +229,6 @@ class ParameterBag implements \IteratorAggregate, \Countable */ public function count() { - return count($this->parameters); + return \count($this->parameters); } } diff --git a/vendor/symfony/http-foundation/Request.php b/vendor/symfony/http-foundation/Request.php index 82240738..ab524173 100644 --- a/vendor/symfony/http-foundation/Request.php +++ b/vendor/symfony/http-foundation/Request.php @@ -281,7 +281,7 @@ class Request $request = self::createRequestFromFactory($_GET, $_POST, array(), $_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')), array('PUT', 'DELETE', 'PATCH')) ) { parse_str($request->getContent(), $data); $request->request = new ParameterBag($data); @@ -533,7 +533,7 @@ 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, array('CONTENT_TYPE', 'CONTENT_LENGTH'))) { $_SERVER[$key] = implode(', ', $value); } else { $_SERVER['HTTP_'.$key] = implode(', ', $value); @@ -1072,7 +1072,7 @@ class Request } $targetDirs[] = $targetFile; - $path = str_repeat('../', count($sourceDirs)).implode('/', $targetDirs); + $path = str_repeat('../', \count($sourceDirs)).implode('/', $targetDirs); // A reference to the same base directory or an empty subdirectory must be prefixed with "./". // This also applies to a segment with a colon character (e.g., "file:colon") that cannot be used @@ -1111,7 +1111,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]), array('https', 'on', 'ssl', '1'), true); } $https = $this->server->get('HTTPS'); @@ -1157,10 +1157,10 @@ class Request throw new SuspiciousOperationException(sprintf('Invalid Host "%s".', $host)); } - if (count(self::$trustedHostPatterns) > 0) { + if (\count(self::$trustedHostPatterns) > 0) { // to avoid host header injection attacks, you should provide a list of trusted host patterns - if (in_array($host, self::$trustedHosts)) { + if (\in_array($host, self::$trustedHosts)) { return $host; } @@ -1218,7 +1218,10 @@ class Request if ($method = $this->headers->get('X-HTTP-METHOD-OVERRIDE')) { $this->method = strtoupper($method); } elseif (self::$httpMethodParameterOverride) { - $this->method = strtoupper($this->request->get('_method', $this->query->get('_method', 'POST'))); + $method = $this->request->get('_method', $this->query->get('_method', 'POST')); + if (\is_string($method)) { + $this->method = strtoupper($method); + } } } } @@ -1289,10 +1292,10 @@ class Request } foreach (static::$formats as $format => $mimeTypes) { - if (in_array($mimeType, (array) $mimeTypes)) { + if (\in_array($mimeType, (array) $mimeTypes)) { return $format; } - if (null !== $canonicalMimeType && in_array($canonicalMimeType, (array) $mimeTypes)) { + if (null !== $canonicalMimeType && \in_array($canonicalMimeType, (array) $mimeTypes)) { return $format; } } @@ -1310,7 +1313,7 @@ class Request static::initializeFormats(); } - static::$formats[$format] = is_array($mimeTypes) ? $mimeTypes : array($mimeTypes); + static::$formats[$format] = \is_array($mimeTypes) ? $mimeTypes : array($mimeTypes); } /** @@ -1422,12 +1425,12 @@ class Request */ public function isMethodSafe(/* $andCacheable = true */) { - if (!func_num_args() || func_get_arg(0)) { + if (!\func_num_args() || func_get_arg(0)) { // setting $andCacheable to false should be deprecated in 4.1 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(), array('GET', 'HEAD', 'OPTIONS', 'TRACE')); } /** @@ -1437,7 +1440,7 @@ class Request */ public function isMethodIdempotent() { - return in_array($this->getMethod(), array('HEAD', 'GET', 'PUT', 'DELETE', 'TRACE', 'OPTIONS', 'PURGE')); + return \in_array($this->getMethod(), array('HEAD', 'GET', 'PUT', 'DELETE', 'TRACE', 'OPTIONS', 'PURGE')); } /** @@ -1449,7 +1452,7 @@ class Request */ public function isMethodCacheable() { - return in_array($this->getMethod(), array('GET', 'HEAD')); + return \in_array($this->getMethod(), array('GET', 'HEAD')); } /** @@ -1487,7 +1490,7 @@ class Request */ public function getContent($asResource = false) { - $currentContentIsResource = is_resource($this->content); + $currentContentIsResource = \is_resource($this->content); if (true === $asResource) { if ($currentContentIsResource) { @@ -1497,7 +1500,7 @@ class Request } // Content passed in parameter (test) - if (is_string($this->content)) { + if (\is_string($this->content)) { $resource = fopen('php://temp', 'r+'); fwrite($resource, $this->content); rewind($resource); @@ -1565,7 +1568,7 @@ class Request $extendedPreferredLanguages[] = $language; if (false !== $position = strpos($language, '_')) { $superLanguage = substr($language, 0, $position); - if (!in_array($superLanguage, $preferredLanguages)) { + if (!\in_array($superLanguage, $preferredLanguages)) { $extendedPreferredLanguages[] = $superLanguage; } } @@ -1596,11 +1599,11 @@ class Request // Language not listed in ISO 639 that are not variants // of any listed language, which can be registered with the // i-prefix, such as i-cherokee - if (count($codes) > 1) { + if (\count($codes) > 1) { $lang = $codes[1]; } } else { - for ($i = 0, $max = count($codes); $i < $max; ++$i) { + for ($i = 0, $max = \count($codes); $i < $max; ++$i) { if (0 === $i) { $lang = strtolower($codes[0]); } else { @@ -1685,18 +1688,7 @@ class Request { $requestUri = ''; - if ($this->headers->has('X_ORIGINAL_URL')) { - // IIS with Microsoft Rewrite Module - $requestUri = $this->headers->get('X_ORIGINAL_URL'); - $this->headers->remove('X_ORIGINAL_URL'); - $this->server->remove('HTTP_X_ORIGINAL_URL'); - $this->server->remove('UNENCODED_URL'); - $this->server->remove('IIS_WasUrlRewritten'); - } elseif ($this->headers->has('X_REWRITE_URL')) { - // IIS with ISAPI_Rewrite - $requestUri = $this->headers->get('X_REWRITE_URL'); - $this->headers->remove('X_REWRITE_URL'); - } elseif ('1' == $this->server->get('IIS_WasUrlRewritten') && '' != $this->server->get('UNENCODED_URL')) { + if ('1' == $this->server->get('IIS_WasUrlRewritten') && '' != $this->server->get('UNENCODED_URL')) { // IIS7 with URL Rewrite: make sure we get the unencoded URL (double slash problem) $requestUri = $this->server->get('UNENCODED_URL'); $this->server->remove('UNENCODED_URL'); @@ -1706,7 +1698,7 @@ class Request // HTTP proxy reqs setup request URI with scheme and host [and port] + the URL path, only use URL path $schemeAndHttpHost = $this->getSchemeAndHttpHost(); if (0 === strpos($requestUri, $schemeAndHttpHost)) { - $requestUri = substr($requestUri, strlen($schemeAndHttpHost)); + $requestUri = substr($requestUri, \strlen($schemeAndHttpHost)); } } elseif ($this->server->has('ORIG_PATH_INFO')) { // IIS 5.0, PHP as CGI @@ -1746,7 +1738,7 @@ class Request $segs = explode('/', trim($file, '/')); $segs = array_reverse($segs); $index = 0; - $last = count($segs); + $last = \count($segs); $baseUrl = ''; do { $seg = $segs[$index]; @@ -1766,9 +1758,9 @@ class Request return $prefix; } - if ($baseUrl && false !== $prefix = $this->getUrlencodedPrefix($requestUri, rtrim(dirname($baseUrl), '/'.DIRECTORY_SEPARATOR).'/')) { + if ($baseUrl && false !== $prefix = $this->getUrlencodedPrefix($requestUri, rtrim(\dirname($baseUrl), '/'.\DIRECTORY_SEPARATOR).'/')) { // directory portion of $baseUrl matches - return rtrim($prefix, '/'.DIRECTORY_SEPARATOR); + return rtrim($prefix, '/'.\DIRECTORY_SEPARATOR); } $truncatedRequestUri = $requestUri; @@ -1785,11 +1777,11 @@ class Request // If using mod_rewrite or ISAPI_Rewrite strip the script filename // out of baseUrl. $pos !== 0 makes sure it is not matching a value // from PATH_INFO or QUERY_STRING - if (strlen($requestUri) >= strlen($baseUrl) && (false !== $pos = strpos($requestUri, $baseUrl)) && 0 !== $pos) { - $baseUrl = substr($requestUri, 0, $pos + strlen($baseUrl)); + if (\strlen($requestUri) >= \strlen($baseUrl) && (false !== $pos = strpos($requestUri, $baseUrl)) && 0 !== $pos) { + $baseUrl = substr($requestUri, 0, $pos + \strlen($baseUrl)); } - return rtrim($baseUrl, '/'.DIRECTORY_SEPARATOR); + return rtrim($baseUrl, '/'.\DIRECTORY_SEPARATOR); } /** @@ -1806,12 +1798,12 @@ class Request $filename = basename($this->server->get('SCRIPT_FILENAME')); if (basename($baseUrl) === $filename) { - $basePath = dirname($baseUrl); + $basePath = \dirname($baseUrl); } else { $basePath = $baseUrl; } - if ('\\' === DIRECTORY_SEPARATOR) { + if ('\\' === \DIRECTORY_SEPARATOR) { $basePath = str_replace('\\', '/', $basePath); } @@ -1841,7 +1833,7 @@ class Request return $requestUri; } - $pathInfo = substr($requestUri, strlen($baseUrl)); + $pathInfo = substr($requestUri, \strlen($baseUrl)); if (false === $pathInfo || '' === $pathInfo) { // If substr() returns false then PATH_INFO is set to an empty string return '/'; @@ -1895,7 +1887,7 @@ class Request return false; } - $len = strlen($prefix); + $len = \strlen($prefix); if (preg_match(sprintf('#^(%%[[:xdigit:]]{2}|.){%d}#', $len), $string, $match)) { return $match[0]; @@ -1907,7 +1899,7 @@ class Request private static function createRequestFromFactory(array $query = array(), array $request = array(), array $attributes = array(), array $cookies = array(), array $files = array(), array $server = array(), $content = null) { if (self::$requestFactory) { - $request = call_user_func(self::$requestFactory, $query, $request, $attributes, $cookies, $files, $server, $content); + $request = \call_user_func(self::$requestFactory, $query, $request, $attributes, $cookies, $files, $server, $content); if (!$request instanceof self) { throw new \LogicException('The Request factory must return an instance of Symfony\Component\HttpFoundation\Request.'); @@ -1949,10 +1941,16 @@ class Request $forwardedValues = array(); $param = self::$forwardedParams[$type]; foreach ($parts as $subParts) { - $assoc = HeaderUtils::combine($subParts); - if (isset($assoc[$param])) { - $forwardedValues[] = $assoc[$param]; + if (null === $v = HeaderUtils::combine($subParts)[$param] ?? null) { + continue; } + if (self::HEADER_X_FORWARDED_PORT === $type) { + if (']' === substr($v, -1) || false === $v = strrchr($v, ':')) { + $v = $this->isSecure() ? ':443' : ':80'; + } + $v = '0.0.0.0'.$v; + } + $forwardedValues[] = $v; } } @@ -1993,7 +1991,7 @@ class Request if ($i) { $clientIps[$key] = $clientIp = substr($clientIp, 0, $i); } - } elseif ('[' == $clientIp[0]) { + } elseif (0 === strpos($clientIp, '[')) { // Strip brackets and :port from IPv6 addresses. $i = strpos($clientIp, ']', 1); $clientIps[$key] = $clientIp = substr($clientIp, 1, $i - 1); diff --git a/vendor/symfony/http-foundation/RequestMatcher.php b/vendor/symfony/http-foundation/RequestMatcher.php index cc13f71a..57fa48e4 100644 --- a/vendor/symfony/http-foundation/RequestMatcher.php +++ b/vendor/symfony/http-foundation/RequestMatcher.php @@ -145,11 +145,11 @@ class RequestMatcher implements RequestMatcherInterface */ public function matches(Request $request) { - if ($this->schemes && !in_array($request->getScheme(), $this->schemes, true)) { + if ($this->schemes && !\in_array($request->getScheme(), $this->schemes, true)) { return false; } - if ($this->methods && !in_array($request->getMethod(), $this->methods, true)) { + if ($this->methods && !\in_array($request->getMethod(), $this->methods, true)) { return false; } @@ -173,6 +173,6 @@ class RequestMatcher implements RequestMatcherInterface // Note to future implementors: add additional checks above the // foreach above or else your check might not be run! - return 0 === count($this->ips); + return 0 === \count($this->ips); } } diff --git a/vendor/symfony/http-foundation/RequestStack.php b/vendor/symfony/http-foundation/RequestStack.php index 3d9cfd0c..40123f66 100644 --- a/vendor/symfony/http-foundation/RequestStack.php +++ b/vendor/symfony/http-foundation/RequestStack.php @@ -92,7 +92,7 @@ class RequestStack */ public function getParentRequest() { - $pos = count($this->requests) - 2; + $pos = \count($this->requests) - 2; if (!isset($this->requests[$pos])) { return; diff --git a/vendor/symfony/http-foundation/Response.php b/vendor/symfony/http-foundation/Response.php index 7cc9d91a..7f6ae7cd 100644 --- a/vendor/symfony/http-foundation/Response.php +++ b/vendor/symfony/http-foundation/Response.php @@ -64,7 +64,12 @@ class Response const HTTP_UNPROCESSABLE_ENTITY = 422; // RFC4918 const HTTP_LOCKED = 423; // RFC4918 const HTTP_FAILED_DEPENDENCY = 424; // RFC4918 + + /** + * @deprecated + */ const HTTP_RESERVED_FOR_WEBDAV_ADVANCED_COLLECTIONS_EXPIRED_PROPOSAL = 425; // RFC2817 + const HTTP_TOO_EARLY = 425; // RFC-ietf-httpbis-replay-04 const HTTP_UPGRADE_REQUIRED = 426; // RFC2817 const HTTP_PRECONDITION_REQUIRED = 428; // RFC6585 const HTTP_TOO_MANY_REQUESTS = 429; // RFC6585 @@ -169,7 +174,7 @@ class Response 422 => 'Unprocessable Entity', // RFC4918 423 => 'Locked', // RFC4918 424 => 'Failed Dependency', // RFC4918 - 425 => 'Reserved for WebDAV advanced collections expired proposal', // RFC2817 + 425 => 'Too Early', // RFC-ietf-httpbis-replay-04 426 => 'Upgrade Required', // RFC2817 428 => 'Precondition Required', // RFC6585 429 => 'Too Many Requests', // RFC6585 @@ -324,12 +329,17 @@ class Response } // headers - foreach ($this->headers->allPreserveCase() as $name => $values) { + foreach ($this->headers->allPreserveCaseWithoutCookies() as $name => $values) { foreach ($values as $value) { header($name.': '.$value, false, $this->statusCode); } } + // cookies + foreach ($this->headers->getCookies() as $cookie) { + header('Set-Cookie: '.$cookie->getName().strstr($cookie, '='), false, $this->statusCode); + } + // status header(sprintf('HTTP/%s %s %s', $this->version, $this->statusCode, $this->statusText), true, $this->statusCode); @@ -358,9 +368,9 @@ class Response $this->sendHeaders(); $this->sendContent(); - if (function_exists('fastcgi_finish_request')) { + if (\function_exists('fastcgi_finish_request')) { fastcgi_finish_request(); - } elseif (!\in_array(PHP_SAPI, array('cli', 'phpdbg'), true)) { + } elseif (!\in_array(\PHP_SAPI, array('cli', 'phpdbg'), true)) { static::closeOutputBuffers(0, true); } @@ -380,8 +390,8 @@ class Response */ public function setContent($content) { - if (null !== $content && !is_string($content) && !is_numeric($content) && !is_callable(array($content, '__toString'))) { - throw new \UnexpectedValueException(sprintf('The Response content must be a string or object implementing __toString(), "%s" given.', gettype($content))); + if (null !== $content && !\is_string($content) && !is_numeric($content) && !\is_callable(array($content, '__toString'))) { + throw new \UnexpectedValueException(sprintf('The Response content must be a string or object implementing __toString(), "%s" given.', \gettype($content))); } $this->content = (string) $content; @@ -512,7 +522,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, array(200, 203, 300, 301, 302, 404, 410))) { return false; } @@ -679,6 +689,7 @@ class Response { if ($this->isFresh()) { $this->headers->set('Age', $this->getMaxAge()); + $this->headers->remove('Expires'); } return $this; @@ -1057,7 +1068,7 @@ class Response $modifiedSince = $request->headers->get('If-Modified-Since'); if ($etags = $request->getETags()) { - $notModified = in_array($this->getEtag(), $etags) || in_array('*', $etags); + $notModified = \in_array($this->getEtag(), $etags) || \in_array('*', $etags); } if ($modifiedSince && $lastModified) { @@ -1170,7 +1181,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, array(201, 301, 302, 303, 307, 308)) && (null === $location ?: $location == $this->headers->get('Location')); } /** @@ -1180,7 +1191,7 @@ class Response */ public function isEmpty(): bool { - return in_array($this->statusCode, array(204, 304)); + return \in_array($this->statusCode, array(204, 304)); } /** @@ -1193,7 +1204,7 @@ class Response public static function closeOutputBuffers(int $targetLevel, bool $flush) { $status = ob_get_status(true); - $level = count($status); + $level = \count($status); $flags = PHP_OUTPUT_HANDLER_REMOVABLE | ($flush ? PHP_OUTPUT_HANDLER_FLUSHABLE : PHP_OUTPUT_HANDLER_CLEANABLE); while ($level-- > $targetLevel && ($s = $status[$level]) && (!isset($s['del']) ? !isset($s['flags']) || ($s['flags'] & $flags) === $flags : $s['del'])) { diff --git a/vendor/symfony/http-foundation/ResponseHeaderBag.php b/vendor/symfony/http-foundation/ResponseHeaderBag.php index 2f1abf58..ed2e0cfb 100644 --- a/vendor/symfony/http-foundation/ResponseHeaderBag.php +++ b/vendor/symfony/http-foundation/ResponseHeaderBag.php @@ -216,7 +216,7 @@ class ResponseHeaderBag extends HeaderBag */ public function getCookies($format = self::COOKIES_FLAT) { - if (!in_array($format, array(self::COOKIES_FLAT, self::COOKIES_ARRAY))) { + 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)))); } @@ -267,7 +267,7 @@ class ResponseHeaderBag extends HeaderBag */ public function makeDisposition($disposition, $filename, $filenameFallback = '') { - if (!in_array($disposition, array(self::DISPOSITION_ATTACHMENT, self::DISPOSITION_INLINE))) { + if (!\in_array($disposition, array(self::DISPOSITION_ATTACHMENT, self::DISPOSITION_INLINE))) { throw new \InvalidArgumentException(sprintf('The disposition must be either "%s" or "%s".', self::DISPOSITION_ATTACHMENT, self::DISPOSITION_INLINE)); } diff --git a/vendor/symfony/http-foundation/ServerBag.php b/vendor/symfony/http-foundation/ServerBag.php index 19d2022e..d8ab561a 100644 --- a/vendor/symfony/http-foundation/ServerBag.php +++ b/vendor/symfony/http-foundation/ServerBag.php @@ -68,7 +68,7 @@ class ServerBag extends ParameterBag if (0 === stripos($authorizationHeader, 'basic ')) { // Decode AUTHORIZATION header into PHP_AUTH_USER and PHP_AUTH_PW when authorization header is basic $exploded = explode(':', base64_decode(substr($authorizationHeader, 6)), 2); - if (2 == count($exploded)) { + if (2 == \count($exploded)) { list($headers['PHP_AUTH_USER'], $headers['PHP_AUTH_PW']) = $exploded; } } elseif (empty($this->parameters['PHP_AUTH_DIGEST']) && (0 === stripos($authorizationHeader, 'digest '))) { diff --git a/vendor/symfony/http-foundation/Session/Attribute/AttributeBag.php b/vendor/symfony/http-foundation/Session/Attribute/AttributeBag.php index 286534b8..82577b80 100644 --- a/vendor/symfony/http-foundation/Session/Attribute/AttributeBag.php +++ b/vendor/symfony/http-foundation/Session/Attribute/AttributeBag.php @@ -143,6 +143,6 @@ class AttributeBag implements AttributeBagInterface, \IteratorAggregate, \Counta */ public function count() { - return count($this->attributes); + return \count($this->attributes); } } diff --git a/vendor/symfony/http-foundation/Session/Attribute/NamespacedAttributeBag.php b/vendor/symfony/http-foundation/Session/Attribute/NamespacedAttributeBag.php index 19b57762..50cd740d 100644 --- a/vendor/symfony/http-foundation/Session/Attribute/NamespacedAttributeBag.php +++ b/vendor/symfony/http-foundation/Session/Attribute/NamespacedAttributeBag.php @@ -110,7 +110,7 @@ class NamespacedAttributeBag extends AttributeBag } $parts = explode($this->namespaceCharacter, $name); - if (count($parts) < 2) { + if (\count($parts) < 2) { if (!$writeContext) { return $array; } @@ -120,11 +120,17 @@ class NamespacedAttributeBag extends AttributeBag return $array; } - unset($parts[count($parts) - 1]); + unset($parts[\count($parts) - 1]); foreach ($parts as $part) { if (null !== $array && !array_key_exists($part, $array)) { - $array[$part] = $writeContext ? array() : null; + if (!$writeContext) { + $null = null; + + return $null; + } + + $array[$part] = array(); } $array = &$array[$part]; diff --git a/vendor/symfony/http-foundation/Session/Flash/FlashBagInterface.php b/vendor/symfony/http-foundation/Session/Flash/FlashBagInterface.php index 80e97f17..f53c9dae 100644 --- a/vendor/symfony/http-foundation/Session/Flash/FlashBagInterface.php +++ b/vendor/symfony/http-foundation/Session/Flash/FlashBagInterface.php @@ -24,7 +24,7 @@ interface FlashBagInterface extends SessionBagInterface * Adds a flash message for type. * * @param string $type - * @param string $message + * @param mixed $message */ public function add($type, $message); diff --git a/vendor/symfony/http-foundation/Session/Session.php b/vendor/symfony/http-foundation/Session/Session.php index f0379c16..8a33a9c3 100644 --- a/vendor/symfony/http-foundation/Session/Session.php +++ b/vendor/symfony/http-foundation/Session/Session.php @@ -11,12 +11,12 @@ namespace Symfony\Component\HttpFoundation\Session; -use Symfony\Component\HttpFoundation\Session\Storage\SessionStorageInterface; use Symfony\Component\HttpFoundation\Session\Attribute\AttributeBag; use Symfony\Component\HttpFoundation\Session\Attribute\AttributeBagInterface; use Symfony\Component\HttpFoundation\Session\Flash\FlashBag; use Symfony\Component\HttpFoundation\Session\Flash\FlashBagInterface; use Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage; +use Symfony\Component\HttpFoundation\Session\Storage\SessionStorageInterface; /** * @author Fabien Potencier @@ -54,8 +54,6 @@ class Session implements SessionInterface, \IteratorAggregate, \Countable */ public function start() { - ++$this->usageIndex; - return $this->storage->start(); } @@ -140,7 +138,7 @@ class Session implements SessionInterface, \IteratorAggregate, \Countable */ public function count() { - return count($this->getAttributeBag()->all()); + return \count($this->getAttributeBag()->all()); } /** @@ -160,7 +158,9 @@ class Session implements SessionInterface, \IteratorAggregate, \Countable */ public function isEmpty() { - ++$this->usageIndex; + if ($this->isStarted()) { + ++$this->usageIndex; + } foreach ($this->data as &$data) { if (!empty($data)) { return false; @@ -185,8 +185,6 @@ class Session implements SessionInterface, \IteratorAggregate, \Countable */ public function migrate($destroy = false, $lifetime = null) { - ++$this->usageIndex; - return $this->storage->regenerate($destroy, $lifetime); } @@ -195,8 +193,6 @@ class Session implements SessionInterface, \IteratorAggregate, \Countable */ public function save() { - ++$this->usageIndex; - $this->storage->save(); } diff --git a/vendor/symfony/http-foundation/Session/SessionBagProxy.php b/vendor/symfony/http-foundation/Session/SessionBagProxy.php index 88005ee0..3504bdfe 100644 --- a/vendor/symfony/http-foundation/Session/SessionBagProxy.php +++ b/vendor/symfony/http-foundation/Session/SessionBagProxy.php @@ -44,6 +44,9 @@ final class SessionBagProxy implements SessionBagInterface */ public function isEmpty() { + if (!isset($this->data[$this->bag->getStorageKey()])) { + return true; + } ++$this->usageIndex; return empty($this->data[$this->bag->getStorageKey()]); @@ -81,8 +84,6 @@ final class SessionBagProxy implements SessionBagInterface */ public function clear() { - ++$this->usageIndex; - return $this->bag->clear(); } } diff --git a/vendor/symfony/http-foundation/Session/Storage/Handler/AbstractSessionHandler.php b/vendor/symfony/http-foundation/Session/Storage/Handler/AbstractSessionHandler.php index 1d3500a9..b1465716 100644 --- a/vendor/symfony/http-foundation/Session/Storage/Handler/AbstractSessionHandler.php +++ b/vendor/symfony/http-foundation/Session/Storage/Handler/AbstractSessionHandler.php @@ -119,7 +119,7 @@ abstract class AbstractSessionHandler implements \SessionHandlerInterface, \Sess { if (!headers_sent() && ini_get('session.use_cookies')) { if (!$this->sessionName) { - throw new \LogicException(sprintf('Session name cannot be empty, did you forget to call "parent::open()" in "%s"?.', get_class($this))); + throw new \LogicException(sprintf('Session name cannot be empty, did you forget to call "parent::open()" in "%s"?.', \get_class($this))); } $sessionCookie = sprintf(' %s=', urlencode($this->sessionName)); $sessionCookieWithId = sprintf('%s%s;', $sessionCookie, urlencode($sessionId)); diff --git a/vendor/symfony/http-foundation/Session/Storage/Handler/MongoDbSessionHandler.php b/vendor/symfony/http-foundation/Session/Storage/Handler/MongoDbSessionHandler.php index 9cc7055e..853b0bc7 100644 --- a/vendor/symfony/http-foundation/Session/Storage/Handler/MongoDbSessionHandler.php +++ b/vendor/symfony/http-foundation/Session/Storage/Handler/MongoDbSessionHandler.php @@ -24,7 +24,7 @@ class MongoDbSessionHandler extends AbstractSessionHandler private $mongo; /** - * @var \MongoCollection + * @var \MongoDB\Collection */ private $collection; @@ -143,21 +143,12 @@ class MongoDbSessionHandler extends AbstractSessionHandler { $expiry = new \MongoDB\BSON\UTCDateTime((time() + (int) ini_get('session.gc_maxlifetime')) * 1000); - if ($this->mongo instanceof \MongoDB\Client) { - $methodName = 'updateOne'; - $options = array(); - } else { - $methodName = 'update'; - $options = array('multiple' => false); - } - - $this->getCollection()->$methodName( + $this->getCollection()->updateOne( array($this->options['id_field'] => $sessionId), array('$set' => array( $this->options['time_field'] => new \MongoDB\BSON\UTCDateTime(), $this->options['expiry_field'] => $expiry, - )), - $options + )) ); return true; @@ -181,7 +172,7 @@ class MongoDbSessionHandler extends AbstractSessionHandler } /** - * @return \MongoCollection + * @return \MongoDB\Collection */ private function getCollection() { diff --git a/vendor/symfony/http-foundation/Session/Storage/Handler/PdoSessionHandler.php b/vendor/symfony/http-foundation/Session/Storage/Handler/PdoSessionHandler.php index 0fd34dc1..d1e45167 100644 --- a/vendor/symfony/http-foundation/Session/Storage/Handler/PdoSessionHandler.php +++ b/vendor/symfony/http-foundation/Session/Storage/Handler/PdoSessionHandler.php @@ -178,7 +178,7 @@ class PdoSessionHandler extends AbstractSessionHandler $this->pdo = $pdoOrDsn; $this->driver = $this->pdo->getAttribute(\PDO::ATTR_DRIVER_NAME); - } elseif (is_string($pdoOrDsn) && false !== strpos($pdoOrDsn, '://')) { + } elseif (\is_string($pdoOrDsn) && false !== strpos($pdoOrDsn, '://')) { $this->dsn = $this->buildDsnFromUrl($pdoOrDsn); } else { $this->dsn = $pdoOrDsn; @@ -629,7 +629,7 @@ class PdoSessionHandler extends AbstractSessionHandler return ''; } - return is_resource($sessionRows[0][0]) ? stream_get_contents($sessionRows[0][0]) : $sessionRows[0][0]; + return \is_resource($sessionRows[0][0]) ? stream_get_contents($sessionRows[0][0]) : $sessionRows[0][0]; } if (null !== $insertStmt) { @@ -735,11 +735,11 @@ class PdoSessionHandler extends AbstractSessionHandler private function convertStringToInt(string $string): int { if (4 === \PHP_INT_SIZE) { - return (ord($string[3]) << 24) + (ord($string[2]) << 16) + (ord($string[1]) << 8) + ord($string[0]); + return (\ord($string[3]) << 24) + (\ord($string[2]) << 16) + (\ord($string[1]) << 8) + \ord($string[0]); } - $int1 = (ord($string[7]) << 24) + (ord($string[6]) << 16) + (ord($string[5]) << 8) + ord($string[4]); - $int2 = (ord($string[3]) << 24) + (ord($string[2]) << 16) + (ord($string[1]) << 8) + ord($string[0]); + $int1 = (\ord($string[7]) << 24) + (\ord($string[6]) << 16) + (\ord($string[5]) << 8) + \ord($string[4]); + $int2 = (\ord($string[3]) << 24) + (\ord($string[2]) << 16) + (\ord($string[1]) << 8) + \ord($string[0]); return $int2 + ($int1 << 32); } diff --git a/vendor/symfony/http-foundation/Session/Storage/Handler/RedisSessionHandler.php b/vendor/symfony/http-foundation/Session/Storage/Handler/RedisSessionHandler.php index 59242ef3..36adf242 100644 --- a/vendor/symfony/http-foundation/Session/Storage/Handler/RedisSessionHandler.php +++ b/vendor/symfony/http-foundation/Session/Storage/Handler/RedisSessionHandler.php @@ -12,6 +12,7 @@ namespace Symfony\Component\HttpFoundation\Session\Storage\Handler; use Predis\Response\ErrorInterface; +use Symfony\Component\Cache\Traits\RedisProxy; /** * Redis based session storage handler based on the Redis class @@ -32,15 +33,21 @@ class RedisSessionHandler extends AbstractSessionHandler * List of available options: * * prefix: The prefix to use for the keys in order to avoid collision on the Redis server. * - * @param \Redis|\RedisArray|\RedisCluster|\Predis\Client $redis - * @param array $options An associative array of options + * @param \Redis|\RedisArray|\RedisCluster|\Predis\Client|RedisProxy $redis + * @param array $options An associative array of options * * @throws \InvalidArgumentException When unsupported client or options are passed */ public function __construct($redis, array $options = array()) { - if (!$redis instanceof \Redis && !$redis instanceof \RedisArray && !$redis instanceof \Predis\Client && !$redis instanceof RedisProxy) { - 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 ( + !$redis instanceof \Redis && + !$redis instanceof \RedisArray && + !$redis instanceof \RedisCluster && + !$redis instanceof \Predis\Client && + !$redis instanceof RedisProxy + ) { + 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'))) { diff --git a/vendor/symfony/http-foundation/Session/Storage/Handler/StrictSessionHandler.php b/vendor/symfony/http-foundation/Session/Storage/Handler/StrictSessionHandler.php index 22811929..83a1f2c0 100644 --- a/vendor/symfony/http-foundation/Session/Storage/Handler/StrictSessionHandler.php +++ b/vendor/symfony/http-foundation/Session/Storage/Handler/StrictSessionHandler.php @@ -24,7 +24,7 @@ class StrictSessionHandler extends AbstractSessionHandler public function __construct(\SessionHandlerInterface $handler) { if ($handler instanceof \SessionUpdateTimestampHandlerInterface) { - throw new \LogicException(sprintf('"%s" is already an instance of "SessionUpdateTimestampHandlerInterface", you cannot wrap it with "%s".', get_class($handler), self::class)); + throw new \LogicException(sprintf('"%s" is already an instance of "SessionUpdateTimestampHandlerInterface", you cannot wrap it with "%s".', \get_class($handler), self::class)); } $this->handler = $handler; diff --git a/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php b/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php index 12e32df3..bf54f19e 100644 --- a/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php +++ b/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php @@ -248,7 +248,7 @@ class NativeSessionStorage implements SessionStorageInterface $handler = $handler->getHandler(); } - trigger_error(sprintf('session_write_close(): Failed to write session data with %s handler', get_class($handler)), E_USER_WARNING); + trigger_error(sprintf('session_write_close(): Failed to write session data with %s handler', \get_class($handler)), E_USER_WARNING); } $this->closed = true; @@ -407,8 +407,6 @@ class NativeSessionStorage implements SessionStorageInterface } if ($this->saveHandler instanceof SessionHandlerProxy) { - session_set_save_handler($this->saveHandler->getHandler(), false); - } elseif ($this->saveHandler instanceof \SessionHandlerInterface) { session_set_save_handler($this->saveHandler, false); } } diff --git a/vendor/symfony/http-foundation/Session/Storage/Proxy/SessionHandlerProxy.php b/vendor/symfony/http-foundation/Session/Storage/Proxy/SessionHandlerProxy.php index 53c1209a..b11cc397 100644 --- a/vendor/symfony/http-foundation/Session/Storage/Proxy/SessionHandlerProxy.php +++ b/vendor/symfony/http-foundation/Session/Storage/Proxy/SessionHandlerProxy.php @@ -14,7 +14,7 @@ namespace Symfony\Component\HttpFoundation\Session\Storage\Proxy; /** * @author Drak */ -class SessionHandlerProxy extends AbstractProxy implements \SessionHandlerInterface +class SessionHandlerProxy extends AbstractProxy implements \SessionHandlerInterface, \SessionUpdateTimestampHandlerInterface { protected $handler; @@ -82,4 +82,20 @@ class SessionHandlerProxy extends AbstractProxy implements \SessionHandlerInterf { return (bool) $this->handler->gc($maxlifetime); } + + /** + * {@inheritdoc} + */ + public function validateId($sessionId) + { + return !$this->handler instanceof \SessionUpdateTimestampHandlerInterface || $this->handler->validateId($sessionId); + } + + /** + * {@inheritdoc} + */ + public function updateTimestamp($sessionId, $data) + { + return $this->handler instanceof \SessionUpdateTimestampHandlerInterface ? $this->handler->updateTimestamp($sessionId, $data) : $this->write($sessionId, $data); + } } diff --git a/vendor/symfony/http-foundation/StreamedResponse.php b/vendor/symfony/http-foundation/StreamedResponse.php index a7c21502..6dba703d 100644 --- a/vendor/symfony/http-foundation/StreamedResponse.php +++ b/vendor/symfony/http-foundation/StreamedResponse.php @@ -111,7 +111,7 @@ class StreamedResponse extends Response throw new \LogicException('The Response callback must not be null.'); } - call_user_func($this->callback); + \call_user_func($this->callback); return $this; } @@ -141,4 +141,16 @@ class StreamedResponse extends Response { return false; } + + /** + * {@inheritdoc} + * + * @return $this + */ + public function setNotModified() + { + $this->setCallback(function () {}); + + return parent::setNotModified(); + } } diff --git a/vendor/symfony/http-foundation/Tests/BinaryFileResponseTest.php b/vendor/symfony/http-foundation/Tests/BinaryFileResponseTest.php index ce47157f..a3253d18 100644 --- a/vendor/symfony/http-foundation/Tests/BinaryFileResponseTest.php +++ b/vendor/symfony/http-foundation/Tests/BinaryFileResponseTest.php @@ -208,6 +208,19 @@ class BinaryFileResponseTest extends ResponseTestCase ); } + public function testUnpreparedResponseSendsFullFile() + { + $response = BinaryFileResponse::create(__DIR__.'/File/Fixtures/test.gif', 200); + + $data = file_get_contents(__DIR__.'/File/Fixtures/test.gif'); + + $this->expectOutputString($data); + $response = clone $response; + $response->sendContent(); + + $this->assertEquals(200, $response->getStatusCode()); + } + /** * @dataProvider provideInvalidRanges */ diff --git a/vendor/symfony/http-foundation/Tests/CookieTest.php b/vendor/symfony/http-foundation/Tests/CookieTest.php index 81b868e0..390d42a6 100644 --- a/vendor/symfony/http-foundation/Tests/CookieTest.php +++ b/vendor/symfony/http-foundation/Tests/CookieTest.php @@ -154,6 +154,18 @@ class CookieTest extends TestCase $cookie = new Cookie('foo', 'bar', time() - 20); $this->assertTrue($cookie->isCleared(), '->isCleared() returns true if the cookie has expired'); + + $cookie = new Cookie('foo', 'bar'); + + $this->assertFalse($cookie->isCleared()); + + $cookie = new Cookie('foo', 'bar', 0); + + $this->assertFalse($cookie->isCleared()); + + $cookie = new Cookie('foo', 'bar', -1); + + $this->assertFalse($cookie->isCleared()); } public function testToString() diff --git a/vendor/symfony/http-foundation/Tests/File/MimeType/MimeTypeTest.php b/vendor/symfony/http-foundation/Tests/File/MimeType/MimeTypeTest.php index b3f1f026..bb88807a 100644 --- a/vendor/symfony/http-foundation/Tests/File/MimeType/MimeTypeTest.php +++ b/vendor/symfony/http-foundation/Tests/File/MimeType/MimeTypeTest.php @@ -12,8 +12,8 @@ namespace Symfony\Component\HttpFoundation\Tests\File\MimeType; use PHPUnit\Framework\TestCase; -use Symfony\Component\HttpFoundation\File\MimeType\MimeTypeGuesser; use Symfony\Component\HttpFoundation\File\MimeType\FileBinaryMimeTypeGuesser; +use Symfony\Component\HttpFoundation\File\MimeType\MimeTypeGuesser; /** * @requires extension fileinfo @@ -59,7 +59,7 @@ class MimeTypeTest extends TestCase public function testGuessWithNonReadablePath() { - if ('\\' === DIRECTORY_SEPARATOR) { + if ('\\' === \DIRECTORY_SEPARATOR) { $this->markTestSkipped('Can not verify chmod operations on Windows'); } diff --git a/vendor/symfony/http-foundation/Tests/File/UploadedFileTest.php b/vendor/symfony/http-foundation/Tests/File/UploadedFileTest.php index 9ba22735..6a0b550d 100644 --- a/vendor/symfony/http-foundation/Tests/File/UploadedFileTest.php +++ b/vendor/symfony/http-foundation/Tests/File/UploadedFileTest.php @@ -53,7 +53,7 @@ class UploadedFileTest extends TestCase $this->assertEquals('application/octet-stream', $file->getClientMimeType()); - if (extension_loaded('fileinfo')) { + if (\extension_loaded('fileinfo')) { $this->assertEquals('image/gif', $file->getMimeType()); } } diff --git a/vendor/symfony/http-foundation/Tests/Fixtures/response-functional/cookie_urlencode.expected b/vendor/symfony/http-foundation/Tests/Fixtures/response-functional/cookie_urlencode.expected index 4e9c4c07..14e44a39 100644 --- a/vendor/symfony/http-foundation/Tests/Fixtures/response-functional/cookie_urlencode.expected +++ b/vendor/symfony/http-foundation/Tests/Fixtures/response-functional/cookie_urlencode.expected @@ -4,7 +4,7 @@ Array [0] => Content-Type: text/plain; charset=utf-8 [1] => Cache-Control: no-cache, private [2] => Date: Sat, 12 Nov 1955 20:04:00 GMT - [3] => Set-Cookie: %3F%2A%28%29%3A%40%26%2B%24%2F%25%23%5B%5D=%3F%2A%28%29%3A%40%26%2B%24%2F%25%23%5B%5D; path=/ + [3] => Set-Cookie: ?*():@&+$/%#[]=%3F%2A%28%29%3A%40%26%2B%24%2F%25%23%5B%5D; path=/ [4] => Set-Cookie: ?*():@&+$/%#[]=%3F%2A%28%29%3A%40%26%2B%24%2F%25%23%5B%5D; path=/ ) shutdown diff --git a/vendor/symfony/http-foundation/Tests/HeaderBagTest.php b/vendor/symfony/http-foundation/Tests/HeaderBagTest.php index 6d19ceb0..c5a437f9 100644 --- a/vendor/symfony/http-foundation/Tests/HeaderBagTest.php +++ b/vendor/symfony/http-foundation/Tests/HeaderBagTest.php @@ -192,7 +192,7 @@ class HeaderBagTest extends TestCase $this->assertEquals(array($headers[$key]), $val); } - $this->assertEquals(count($headers), $i); + $this->assertEquals(\count($headers), $i); } public function testCount() @@ -200,6 +200,6 @@ class HeaderBagTest extends TestCase $headers = array('foo' => 'bar', 'HELLO' => 'WORLD'); $headerBag = new HeaderBag($headers); - $this->assertCount(count($headers), $headerBag); + $this->assertCount(\count($headers), $headerBag); } } diff --git a/vendor/symfony/http-foundation/Tests/IpUtilsTest.php b/vendor/symfony/http-foundation/Tests/IpUtilsTest.php index 7a93f994..232a2040 100644 --- a/vendor/symfony/http-foundation/Tests/IpUtilsTest.php +++ b/vendor/symfony/http-foundation/Tests/IpUtilsTest.php @@ -47,7 +47,7 @@ class IpUtilsTest extends TestCase */ public function testIpv6($matches, $remoteAddr, $cidr) { - if (!defined('AF_INET6')) { + if (!\defined('AF_INET6')) { $this->markTestSkipped('Only works when PHP is compiled without the option "disable-ipv6".'); } @@ -78,7 +78,7 @@ class IpUtilsTest extends TestCase */ public function testAnIpv6WithOptionDisabledIpv6() { - if (defined('AF_INET6')) { + if (\defined('AF_INET6')) { $this->markTestSkipped('Only works when PHP is compiled with the option "disable-ipv6".'); } diff --git a/vendor/symfony/http-foundation/Tests/ParameterBagTest.php b/vendor/symfony/http-foundation/Tests/ParameterBagTest.php index ab908d8d..dccfd4f3 100644 --- a/vendor/symfony/http-foundation/Tests/ParameterBagTest.php +++ b/vendor/symfony/http-foundation/Tests/ParameterBagTest.php @@ -171,7 +171,7 @@ class ParameterBagTest extends TestCase $this->assertEquals($parameters[$key], $val); } - $this->assertEquals(count($parameters), $i); + $this->assertEquals(\count($parameters), $i); } public function testCount() @@ -179,7 +179,7 @@ class ParameterBagTest extends TestCase $parameters = array('foo' => 'bar', 'hello' => 'world'); $bag = new ParameterBag($parameters); - $this->assertCount(count($parameters), $bag); + $this->assertCount(\count($parameters), $bag); } public function testGetBoolean() diff --git a/vendor/symfony/http-foundation/Tests/RequestMatcherTest.php b/vendor/symfony/http-foundation/Tests/RequestMatcherTest.php index b5d80048..10d764a7 100644 --- a/vendor/symfony/http-foundation/Tests/RequestMatcherTest.php +++ b/vendor/symfony/http-foundation/Tests/RequestMatcherTest.php @@ -12,8 +12,8 @@ namespace Symfony\Component\HttpFoundation\Tests; use PHPUnit\Framework\TestCase; -use Symfony\Component\HttpFoundation\RequestMatcher; use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\RequestMatcher; class RequestMatcherTest extends TestCase { diff --git a/vendor/symfony/http-foundation/Tests/RequestTest.php b/vendor/symfony/http-foundation/Tests/RequestTest.php index a1bb951f..52392add 100644 --- a/vendor/symfony/http-foundation/Tests/RequestTest.php +++ b/vendor/symfony/http-foundation/Tests/RequestTest.php @@ -13,9 +13,9 @@ namespace Symfony\Component\HttpFoundation\Tests; use PHPUnit\Framework\TestCase; use Symfony\Component\HttpFoundation\Exception\SuspiciousOperationException; -use Symfony\Component\HttpFoundation\Session\Storage\MockArraySessionStorage; -use Symfony\Component\HttpFoundation\Session\Session; use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Session\Session; +use Symfony\Component\HttpFoundation\Session\Storage\MockArraySessionStorage; class RequestTest extends TestCase { @@ -854,6 +854,11 @@ class RequestTest extends TestCase $request->setMethod('POST'); $request->headers->set('X-HTTP-METHOD-OVERRIDE', 'delete'); $this->assertEquals('DELETE', $request->getMethod(), '->getMethod() returns the method from X-HTTP-Method-Override if defined and POST'); + + $request = new Request(); + $request->setMethod('POST'); + $request->query->set('_method', array('delete', 'patch')); + $this->assertSame('POST', $request->getMethod(), '->getMethod() returns the request method if invalid type is defined in query'); } /** @@ -901,7 +906,7 @@ class RequestTest extends TestCase public function getClientIpsProvider() { - // $expected $remoteAddr $httpForwardedFor $trustedProxies + // $expected $remoteAddr $httpForwardedFor $trustedProxies return array( // simple IPv4 array(array('88.88.88.88'), '88.88.88.88', null, null), @@ -915,8 +920,8 @@ class RequestTest extends TestCase // forwarded for with remote IPv4 addr not trusted array(array('127.0.0.1'), '127.0.0.1', '88.88.88.88', null), - // forwarded for with remote IPv4 addr trusted - array(array('88.88.88.88'), '127.0.0.1', '88.88.88.88', array('127.0.0.1')), + // 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')), // 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')), // forwarded for with remote IPv4 range trusted @@ -1020,7 +1025,7 @@ class RequestTest extends TestCase 'HTTP_X_FORWARDED_FOR' => $httpXForwardedFor, ); - Request::setTrustedProxies(array('88.88.88.88'), Request::HEADER_X_FORWARDED_ALL); + Request::setTrustedProxies(array('88.88.88.88'), -1); $request->initialize(array(), array(), array(), array(), array(), $server); @@ -1831,20 +1836,6 @@ class RequestTest extends TestCase public function iisRequestUriProvider() { return array( - array( - array( - 'X_ORIGINAL_URL' => '/foo/bar', - ), - array(), - '/foo/bar', - ), - array( - array( - 'X_REWRITE_URL' => '/foo/bar', - ), - array(), - '/foo/bar', - ), array( array(), array( @@ -1853,36 +1844,6 @@ class RequestTest extends TestCase ), '/foo/bar', ), - array( - array( - 'X_ORIGINAL_URL' => '/foo/bar', - ), - array( - 'HTTP_X_ORIGINAL_URL' => '/foo/bar', - ), - '/foo/bar', - ), - array( - array( - 'X_ORIGINAL_URL' => '/foo/bar', - ), - array( - 'IIS_WasUrlRewritten' => '1', - 'UNENCODED_URL' => '/foo/bar', - ), - '/foo/bar', - ), - array( - array( - 'X_ORIGINAL_URL' => '/foo/bar', - ), - array( - 'HTTP_X_ORIGINAL_URL' => '/foo/bar', - 'IIS_WasUrlRewritten' => '1', - 'UNENCODED_URL' => '/foo/bar', - ), - '/foo/bar', - ), array( array(), array( @@ -2192,6 +2153,55 @@ class RequestTest extends TestCase $this->assertEquals($expectedBaseUrl, $request->getBaseUrl()); $this->assertEquals($expectedBasePath, $request->getBasePath()); } + + public function testTrustedHost() + { + Request::setTrustedProxies(array('1.1.1.1'), -1); + + $request = Request::create('/'); + $request->server->set('REMOTE_ADDR', '1.1.1.1'); + $request->headers->set('Forwarded', 'host=localhost:8080'); + $request->headers->set('X-Forwarded-Host', 'localhost:8080'); + + $this->assertSame('localhost:8080', $request->getHttpHost()); + $this->assertSame(8080, $request->getPort()); + + $request = Request::create('/'); + $request->server->set('REMOTE_ADDR', '1.1.1.1'); + $request->headers->set('Forwarded', 'host="[::1]:443"'); + $request->headers->set('X-Forwarded-Host', '[::1]:443'); + $request->headers->set('X-Forwarded-Port', 443); + + $this->assertSame('[::1]:443', $request->getHttpHost()); + $this->assertSame(443, $request->getPort()); + } + + public function testTrustedPort() + { + Request::setTrustedProxies(array('1.1.1.1'), -1); + + $request = Request::create('/'); + $request->server->set('REMOTE_ADDR', '1.1.1.1'); + $request->headers->set('Forwarded', 'host=localhost:8080'); + $request->headers->set('X-Forwarded-Port', 8080); + + $this->assertSame(8080, $request->getPort()); + + $request = Request::create('/'); + $request->server->set('REMOTE_ADDR', '1.1.1.1'); + $request->headers->set('Forwarded', 'host=localhost'); + $request->headers->set('X-Forwarded-Port', 80); + + $this->assertSame(80, $request->getPort()); + + $request = Request::create('/'); + $request->server->set('REMOTE_ADDR', '1.1.1.1'); + $request->headers->set('Forwarded', 'host="[::1]"'); + $request->headers->set('X-Forwarded-Proto', 'https'); + $request->headers->set('X-Forwarded-Port', 443); + + $this->assertSame(443, $request->getPort()); + } } class RequestContentProxy extends Request diff --git a/vendor/symfony/http-foundation/Tests/ResponseHeaderBagTest.php b/vendor/symfony/http-foundation/Tests/ResponseHeaderBagTest.php index 167fb4b8..e987677d 100644 --- a/vendor/symfony/http-foundation/Tests/ResponseHeaderBagTest.php +++ b/vendor/symfony/http-foundation/Tests/ResponseHeaderBagTest.php @@ -12,8 +12,8 @@ namespace Symfony\Component\HttpFoundation\Tests; use PHPUnit\Framework\TestCase; -use Symfony\Component\HttpFoundation\ResponseHeaderBag; use Symfony\Component\HttpFoundation\Cookie; +use Symfony\Component\HttpFoundation\ResponseHeaderBag; /** * @group time-sensitive diff --git a/vendor/symfony/http-foundation/Tests/ResponseTest.php b/vendor/symfony/http-foundation/Tests/ResponseTest.php index b4af82dd..f9b5ef4f 100644 --- a/vendor/symfony/http-foundation/Tests/ResponseTest.php +++ b/vendor/symfony/http-foundation/Tests/ResponseTest.php @@ -126,7 +126,7 @@ class ResponseTest extends ResponseTestCase public function testSetNotModified() { - $response = new Response(); + $response = new Response('foo'); $modified = $response->setNotModified(); $this->assertObjectHasAttribute('headers', $modified); $this->assertObjectHasAttribute('content', $modified); @@ -135,6 +135,11 @@ class ResponseTest extends ResponseTestCase $this->assertObjectHasAttribute('statusText', $modified); $this->assertObjectHasAttribute('charset', $modified); $this->assertEquals(304, $modified->getStatusCode()); + + ob_start(); + $modified->sendContent(); + $string = ob_get_clean(); + $this->assertEmpty($string); } public function testIsSuccessful() @@ -357,6 +362,11 @@ class ResponseTest extends ResponseTestCase $response->headers->set('Expires', -1); $response->expire(); $this->assertNull($response->headers->get('Age'), '->expire() does not set the Age when the response is expired'); + + $response = new Response(); + $response->headers->set('Expires', date(DATE_RFC2822, time() + 600)); + $response->expire(); + $this->assertNull($response->headers->get('Expires'), '->expire() removes the Expires header when the response is fresh'); } public function testGetTtl() @@ -969,7 +979,7 @@ class ResponseTest extends ResponseTestCase */ public function ianaCodesReasonPhrasesProvider() { - if (!in_array('https', stream_get_wrappers(), true)) { + if (!\in_array('https', stream_get_wrappers(), true)) { $this->markTestSkipped('The "https" wrapper is not available'); } @@ -997,7 +1007,7 @@ 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, array('Unassigned', '(Unused)'), true)) { continue; } diff --git a/vendor/symfony/http-foundation/Tests/Session/Attribute/AttributeBagTest.php b/vendor/symfony/http-foundation/Tests/Session/Attribute/AttributeBagTest.php index 724a0b98..43644e23 100644 --- a/vendor/symfony/http-foundation/Tests/Session/Attribute/AttributeBagTest.php +++ b/vendor/symfony/http-foundation/Tests/Session/Attribute/AttributeBagTest.php @@ -176,11 +176,11 @@ class AttributeBagTest extends TestCase ++$i; } - $this->assertEquals(count($this->array), $i); + $this->assertEquals(\count($this->array), $i); } public function testCount() { - $this->assertCount(count($this->array), $this->bag); + $this->assertCount(\count($this->array), $this->bag); } } diff --git a/vendor/symfony/http-foundation/Tests/Session/Attribute/NamespacedAttributeBagTest.php b/vendor/symfony/http-foundation/Tests/Session/Attribute/NamespacedAttributeBagTest.php index f074ce1b..ec4cd5ad 100644 --- a/vendor/symfony/http-foundation/Tests/Session/Attribute/NamespacedAttributeBagTest.php +++ b/vendor/symfony/http-foundation/Tests/Session/Attribute/NamespacedAttributeBagTest.php @@ -82,6 +82,17 @@ class NamespacedAttributeBagTest extends TestCase $this->assertEquals($exists, $this->bag->has($key)); } + /** + * @dataProvider attributesProvider + */ + public function testHasNoSideEffect($key, $value, $expected) + { + $expected = json_encode($this->bag->all()); + $this->bag->has($key); + + $this->assertEquals($expected, json_encode($this->bag->all())); + } + /** * @dataProvider attributesProvider */ @@ -96,6 +107,17 @@ class NamespacedAttributeBagTest extends TestCase $this->assertEquals('default', $this->bag->get('user2.login', 'default')); } + /** + * @dataProvider attributesProvider + */ + public function testGetNoSideEffect($key, $value, $expected) + { + $expected = json_encode($this->bag->all()); + $this->bag->get($key); + + $this->assertEquals($expected, json_encode($this->bag->all())); + } + /** * @dataProvider attributesProvider */ diff --git a/vendor/symfony/http-foundation/Tests/Session/Flash/FlashBagTest.php b/vendor/symfony/http-foundation/Tests/Session/Flash/FlashBagTest.php index c4e75b1b..905a1f75 100644 --- a/vendor/symfony/http-foundation/Tests/Session/Flash/FlashBagTest.php +++ b/vendor/symfony/http-foundation/Tests/Session/Flash/FlashBagTest.php @@ -74,6 +74,18 @@ class FlashBagTest extends TestCase $this->assertEquals(array('A previous flash message'), $this->bag->peek('notice')); } + public function testAdd() + { + $tab = array('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')); + } + public function testGet() { $this->assertEquals(array(), $this->bag->get('non_existing')); @@ -112,6 +124,19 @@ class FlashBagTest extends TestCase $this->assertEquals(array('notice'), $this->bag->keys()); } + public function testSetAll() + { + $this->bag->add('one_flash', 'Foo'); + $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->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()); + } + public function testPeekAll() { $this->bag->set('notice', 'Foo'); diff --git a/vendor/symfony/http-foundation/Tests/Session/SessionTest.php b/vendor/symfony/http-foundation/Tests/Session/SessionTest.php index 41720e4b..37d72266 100644 --- a/vendor/symfony/http-foundation/Tests/Session/SessionTest.php +++ b/vendor/symfony/http-foundation/Tests/Session/SessionTest.php @@ -12,9 +12,9 @@ namespace Symfony\Component\HttpFoundation\Tests\Session; use PHPUnit\Framework\TestCase; -use Symfony\Component\HttpFoundation\Session\Session; -use Symfony\Component\HttpFoundation\Session\Flash\FlashBag; use Symfony\Component\HttpFoundation\Session\Attribute\AttributeBag; +use Symfony\Component\HttpFoundation\Session\Flash\FlashBag; +use Symfony\Component\HttpFoundation\Session\Session; use Symfony\Component\HttpFoundation\Session\Storage\MockArraySessionStorage; /** @@ -206,7 +206,7 @@ class SessionTest extends TestCase ++$i; } - $this->assertEquals(count($attributes), $i); + $this->assertEquals(\count($attributes), $i); } public function testGetCount() 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 dd72525f..a2bf168d 100644 --- a/vendor/symfony/http-foundation/Tests/Session/Storage/Handler/AbstractRedisSessionHandlerTestCase.php +++ b/vendor/symfony/http-foundation/Tests/Session/Storage/Handler/AbstractRedisSessionHandlerTestCase.php @@ -32,11 +32,6 @@ abstract class AbstractRedisSessionHandlerTestCase extends TestCase */ protected $redisClient; - /** - * @var \Redis - */ - protected $validator; - /** * @return \Redis|\RedisArray|\RedisCluster|\Predis\Client */ @@ -46,15 +41,12 @@ abstract class AbstractRedisSessionHandlerTestCase extends TestCase { parent::setUp(); - if (!extension_loaded('redis')) { + if (!\extension_loaded('redis')) { self::markTestSkipped('Extension redis required.'); } $host = getenv('REDIS_HOST') ?: 'localhost'; - $this->validator = new \Redis(); - $this->validator->connect($host); - $this->redisClient = $this->createRedisClient($host); $this->storage = new RedisSessionHandler( $this->redisClient, @@ -82,8 +74,8 @@ abstract class AbstractRedisSessionHandlerTestCase extends TestCase public function testReadSession() { - $this->setFixture(self::PREFIX.'id1', null); - $this->setFixture(self::PREFIX.'id2', 'abc123'); + $this->redisClient->set(self::PREFIX.'id1', null); + $this->redisClient->set(self::PREFIX.'id2', 'abc123'); $this->assertEquals('', $this->storage->read('id1')); $this->assertEquals('abc123', $this->storage->read('id2')); @@ -93,14 +85,14 @@ abstract class AbstractRedisSessionHandlerTestCase extends TestCase { $this->assertTrue($this->storage->write('id', 'data')); - $this->assertTrue($this->hasFixture(self::PREFIX.'id')); - $this->assertEquals('data', $this->getFixture(self::PREFIX.'id')); + $this->assertTrue((bool) $this->redisClient->exists(self::PREFIX.'id')); + $this->assertEquals('data', $this->redisClient->get(self::PREFIX.'id')); } public function testUseSessionGcMaxLifetimeAsTimeToLive() { $this->storage->write('id', 'data'); - $ttl = $this->fixtureTtl(self::PREFIX.'id'); + $ttl = $this->redisClient->ttl(self::PREFIX.'id'); $this->assertLessThanOrEqual(ini_get('session.gc_maxlifetime'), $ttl); $this->assertGreaterThanOrEqual(0, $ttl); @@ -108,11 +100,11 @@ abstract class AbstractRedisSessionHandlerTestCase extends TestCase public function testDestroySession() { - $this->setFixture(self::PREFIX.'id', 'foo'); + $this->redisClient->set(self::PREFIX.'id', 'foo'); - $this->assertTrue($this->hasFixture(self::PREFIX.'id')); + $this->assertTrue((bool) $this->redisClient->exists(self::PREFIX.'id')); $this->assertTrue($this->storage->destroy('id')); - $this->assertFalse($this->hasFixture(self::PREFIX.'id')); + $this->assertFalse((bool) $this->redisClient->exists(self::PREFIX.'id')); } public function testGcSession() @@ -122,12 +114,12 @@ abstract class AbstractRedisSessionHandlerTestCase extends TestCase public function testUpdateTimestamp() { - $lowTTL = 10; + $lowTtl = 10; - $this->setFixture(self::PREFIX.'id', 'foo', $lowTTL); + $this->redisClient->setex(self::PREFIX.'id', $lowTtl, 'foo'); $this->storage->updateTimestamp('id', array()); - $this->assertGreaterThan($lowTTL, $this->fixtureTtl(self::PREFIX.'id')); + $this->assertGreaterThan($lowTtl, $this->redisClient->ttl(self::PREFIX.'id')); } /** @@ -150,28 +142,4 @@ abstract class AbstractRedisSessionHandlerTestCase extends TestCase array(array('prefix' => 'sfs', 'foo' => 'bar'), false), ); } - - protected function setFixture($key, $value, $ttl = null) - { - if (null !== $ttl) { - $this->validator->setex($key, $ttl, $value); - } else { - $this->validator->set($key, $value); - } - } - - protected function getFixture($key) - { - return $this->validator->get($key); - } - - protected function hasFixture($key): bool - { - return $this->validator->exists($key); - } - - protected function fixtureTtl($key): int - { - return $this->validator->ttl($key); - } } 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 718fd0f8..9a2212b8 100644 --- a/vendor/symfony/http-foundation/Tests/Session/Storage/Handler/NullSessionHandlerTest.php +++ b/vendor/symfony/http-foundation/Tests/Session/Storage/Handler/NullSessionHandlerTest.php @@ -12,9 +12,9 @@ namespace Symfony\Component\HttpFoundation\Tests\Session\Storage\Handler; use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\Session\Session; use Symfony\Component\HttpFoundation\Session\Storage\Handler\NullSessionHandler; use Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage; -use Symfony\Component\HttpFoundation\Session\Session; /** * Test class for 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 d9d0efe9..e8478189 100644 --- a/vendor/symfony/http-foundation/Tests/Session/Storage/Handler/PdoSessionHandlerTest.php +++ b/vendor/symfony/http-foundation/Tests/Session/Storage/Handler/PdoSessionHandlerTest.php @@ -389,8 +389,8 @@ class MockPdo extends \PDO public function prepare($statement, $driverOptions = array()) { - return is_callable($this->prepareResult) - ? call_user_func($this->prepareResult, $statement, $driverOptions) + return \is_callable($this->prepareResult) + ? \call_user_func($this->prepareResult, $statement, $driverOptions) : $this->prepareResult; } 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 ffb2d41a..45810010 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(array(array('host' => $host))); } } diff --git a/vendor/symfony/http-foundation/Tests/Session/Storage/MockArraySessionStorageTest.php b/vendor/symfony/http-foundation/Tests/Session/Storage/MockArraySessionStorageTest.php index 82df5543..0c182e0b 100644 --- a/vendor/symfony/http-foundation/Tests/Session/Storage/MockArraySessionStorageTest.php +++ b/vendor/symfony/http-foundation/Tests/Session/Storage/MockArraySessionStorageTest.php @@ -12,9 +12,9 @@ namespace Symfony\Component\HttpFoundation\Tests\Session\Storage; use PHPUnit\Framework\TestCase; -use Symfony\Component\HttpFoundation\Session\Storage\MockArraySessionStorage; use Symfony\Component\HttpFoundation\Session\Attribute\AttributeBag; use Symfony\Component\HttpFoundation\Session\Flash\FlashBag; +use Symfony\Component\HttpFoundation\Session\Storage\MockArraySessionStorage; /** * Test class for MockArraySessionStorage. diff --git a/vendor/symfony/http-foundation/Tests/Session/Storage/MockFileSessionStorageTest.php b/vendor/symfony/http-foundation/Tests/Session/Storage/MockFileSessionStorageTest.php index 53accd38..16957981 100644 --- a/vendor/symfony/http-foundation/Tests/Session/Storage/MockFileSessionStorageTest.php +++ b/vendor/symfony/http-foundation/Tests/Session/Storage/MockFileSessionStorageTest.php @@ -12,9 +12,9 @@ namespace Symfony\Component\HttpFoundation\Tests\Session\Storage; use PHPUnit\Framework\TestCase; -use Symfony\Component\HttpFoundation\Session\Storage\MockFileSessionStorage; -use Symfony\Component\HttpFoundation\Session\Flash\FlashBag; use Symfony\Component\HttpFoundation\Session\Attribute\AttributeBag; +use Symfony\Component\HttpFoundation\Session\Flash\FlashBag; +use Symfony\Component\HttpFoundation\Session\Storage\MockFileSessionStorage; /** * Test class for MockFileSessionStorage. diff --git a/vendor/symfony/http-foundation/Tests/Session/Storage/NativeSessionStorageTest.php b/vendor/symfony/http-foundation/Tests/Session/Storage/NativeSessionStorageTest.php index 382707b0..52da2947 100644 --- a/vendor/symfony/http-foundation/Tests/Session/Storage/NativeSessionStorageTest.php +++ b/vendor/symfony/http-foundation/Tests/Session/Storage/NativeSessionStorageTest.php @@ -184,7 +184,7 @@ class NativeSessionStorageTest extends TestCase public function testSessionOptions() { - if (defined('HHVM_VERSION')) { + if (\defined('HHVM_VERSION')) { $this->markTestSkipped('HHVM is not handled in this test case.'); } diff --git a/vendor/symfony/http-foundation/Tests/Session/Storage/PhpBridgeSessionStorageTest.php b/vendor/symfony/http-foundation/Tests/Session/Storage/PhpBridgeSessionStorageTest.php index 0b3b7e14..303f36d3 100644 --- a/vendor/symfony/http-foundation/Tests/Session/Storage/PhpBridgeSessionStorageTest.php +++ b/vendor/symfony/http-foundation/Tests/Session/Storage/PhpBridgeSessionStorageTest.php @@ -12,8 +12,8 @@ namespace Symfony\Component\HttpFoundation\Tests\Session\Storage; use PHPUnit\Framework\TestCase; -use Symfony\Component\HttpFoundation\Session\Storage\PhpBridgeSessionStorage; use Symfony\Component\HttpFoundation\Session\Attribute\AttributeBag; +use Symfony\Component\HttpFoundation\Session\Storage\PhpBridgeSessionStorage; /** * Test class for PhpSessionStorage. 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 68282535..0b48250e 100644 --- a/vendor/symfony/http-foundation/Tests/Session/Storage/Proxy/SessionHandlerProxyTest.php +++ b/vendor/symfony/http-foundation/Tests/Session/Storage/Proxy/SessionHandlerProxyTest.php @@ -121,4 +121,37 @@ class SessionHandlerProxyTest extends TestCase $this->proxy->gc(86400); } + + /** + * @requires PHPUnit 5.1 + */ + public function testValidateId() + { + $mock = $this->getMockBuilder(array('SessionHandlerInterface', 'SessionUpdateTimestampHandlerInterface'))->getMock(); + $mock->expects($this->once()) + ->method('validateId'); + + $proxy = new SessionHandlerProxy($mock); + $proxy->validateId('id'); + + $this->assertTrue($this->proxy->validateId('id')); + } + + /** + * @requires PHPUnit 5.1 + */ + public function testUpdateTimestamp() + { + $mock = $this->getMockBuilder(array('SessionHandlerInterface', 'SessionUpdateTimestampHandlerInterface'))->getMock(); + $mock->expects($this->once()) + ->method('updateTimestamp'); + + $proxy = new SessionHandlerProxy($mock); + $proxy->updateTimestamp('id', 'data'); + + $this->mock->expects($this->once()) + ->method('write'); + + $this->proxy->updateTimestamp('id', 'data'); + } } diff --git a/vendor/symfony/http-foundation/Tests/StreamedResponseTest.php b/vendor/symfony/http-foundation/Tests/StreamedResponseTest.php index c2ded996..699222e3 100644 --- a/vendor/symfony/http-foundation/Tests/StreamedResponseTest.php +++ b/vendor/symfony/http-foundation/Tests/StreamedResponseTest.php @@ -123,4 +123,22 @@ class StreamedResponseTest extends TestCase $this->assertInstanceOf('Symfony\Component\HttpFoundation\StreamedResponse', $response->sendHeaders()); $this->assertInstanceOf('Symfony\Component\HttpFoundation\StreamedResponse', $response->sendHeaders()); } + + public function testSetNotModified() + { + $response = new StreamedResponse(function () { echo 'foo'; }); + $modified = $response->setNotModified(); + $this->assertObjectHasAttribute('headers', $modified); + $this->assertObjectHasAttribute('content', $modified); + $this->assertObjectHasAttribute('version', $modified); + $this->assertObjectHasAttribute('statusCode', $modified); + $this->assertObjectHasAttribute('statusText', $modified); + $this->assertObjectHasAttribute('charset', $modified); + $this->assertEquals(304, $modified->getStatusCode()); + + ob_start(); + $modified->sendContent(); + $string = ob_get_clean(); + $this->assertEmpty($string); + } } diff --git a/vendor/symfony/http-kernel/Bundle/Bundle.php b/vendor/symfony/http-kernel/Bundle/Bundle.php index 46a0c893..23e09337 100644 --- a/vendor/symfony/http-kernel/Bundle/Bundle.php +++ b/vendor/symfony/http-kernel/Bundle/Bundle.php @@ -11,10 +11,10 @@ namespace Symfony\Component\HttpKernel\Bundle; +use Symfony\Component\Console\Application; +use Symfony\Component\DependencyInjection\Container; use Symfony\Component\DependencyInjection\ContainerAwareTrait; use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Container; -use Symfony\Component\Console\Application; use Symfony\Component\DependencyInjection\Extension\ExtensionInterface; /** @@ -72,7 +72,7 @@ abstract class Bundle implements BundleInterface if (null !== $extension) { if (!$extension instanceof ExtensionInterface) { - throw new \LogicException(sprintf('Extension %s must implement Symfony\Component\DependencyInjection\Extension\ExtensionInterface.', get_class($extension))); + throw new \LogicException(sprintf('Extension %s must implement Symfony\Component\DependencyInjection\Extension\ExtensionInterface.', \get_class($extension))); } // check naming convention @@ -120,7 +120,7 @@ abstract class Bundle implements BundleInterface { if (null === $this->path) { $reflected = new \ReflectionObject($this); - $this->path = dirname($reflected->getFileName()); + $this->path = \dirname($reflected->getFileName()); } return $this->path; diff --git a/vendor/symfony/http-kernel/CacheWarmer/CacheWarmer.php b/vendor/symfony/http-kernel/CacheWarmer/CacheWarmer.php index dba35a63..52dc2ad2 100644 --- a/vendor/symfony/http-kernel/CacheWarmer/CacheWarmer.php +++ b/vendor/symfony/http-kernel/CacheWarmer/CacheWarmer.php @@ -20,7 +20,7 @@ abstract class CacheWarmer implements CacheWarmerInterface { protected function writeCacheFile($file, $content) { - $tmpFile = @tempnam(dirname($file), basename($file)); + $tmpFile = @tempnam(\dirname($file), basename($file)); if (false !== @file_put_contents($tmpFile, $content) && @rename($tmpFile, $file)) { @chmod($file, 0666 & ~umask()); diff --git a/vendor/symfony/http-kernel/Client.php b/vendor/symfony/http-kernel/Client.php index 623ce34e..d3ca8cee 100644 --- a/vendor/symfony/http-kernel/Client.php +++ b/vendor/symfony/http-kernel/Client.php @@ -12,10 +12,10 @@ namespace Symfony\Component\HttpKernel; use Symfony\Component\BrowserKit\Client as BaseClient; +use Symfony\Component\BrowserKit\CookieJar; +use Symfony\Component\BrowserKit\History; use Symfony\Component\BrowserKit\Request as DomRequest; use Symfony\Component\BrowserKit\Response as DomResponse; -use Symfony\Component\BrowserKit\History; -use Symfony\Component\BrowserKit\CookieJar; use Symfony\Component\HttpFoundation\File\UploadedFile; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; @@ -89,7 +89,7 @@ class Client extends BaseClient foreach (get_declared_classes() as $class) { if (0 === strpos($class, 'ComposerAutoloaderInit')) { $r = new \ReflectionClass($class); - $file = dirname(dirname($r->getFileName())).'/autoload.php'; + $file = \dirname(\dirname($r->getFileName())).'/autoload.php'; if (file_exists($file)) { $requires .= "require_once '".str_replace("'", "\\'", $file)."';\n"; } @@ -160,7 +160,7 @@ EOF; { $filtered = array(); foreach ($files as $key => $value) { - if (is_array($value)) { + if (\is_array($value)) { $filtered[$key] = $this->filterFiles($value); } elseif ($value instanceof UploadedFile) { if ($value->isValid() && $value->getSize() > UploadedFile::getMaxFilesize()) { diff --git a/vendor/symfony/http-kernel/Controller/ArgumentResolver.php b/vendor/symfony/http-kernel/Controller/ArgumentResolver.php index 186007eb..142a6d54 100644 --- a/vendor/symfony/http-kernel/Controller/ArgumentResolver.php +++ b/vendor/symfony/http-kernel/Controller/ArgumentResolver.php @@ -56,7 +56,7 @@ final class ArgumentResolver implements ArgumentResolverInterface $resolved = $resolver->resolve($request, $metadata); if (!$resolved instanceof \Generator) { - throw new \InvalidArgumentException(sprintf('%s::resolve() must yield at least one value.', get_class($resolver))); + throw new \InvalidArgumentException(sprintf('%s::resolve() must yield at least one value.', \get_class($resolver))); } foreach ($resolved as $append) { @@ -69,10 +69,10 @@ final class ArgumentResolver implements ArgumentResolverInterface $representative = $controller; - if (is_array($representative)) { - $representative = sprintf('%s::%s()', get_class($representative[0]), $representative[1]); - } elseif (is_object($representative)) { - $representative = get_class($representative); + if (\is_array($representative)) { + $representative = sprintf('%s::%s()', \get_class($representative[0]), $representative[1]); + } elseif (\is_object($representative)) { + $representative = \get_class($representative); } throw new \RuntimeException(sprintf('Controller "%s" requires that you provide a value for the "$%s" argument. Either the argument is nullable and no null value has been provided, no default value has been provided or because there is a non optional argument after this one.', $representative, $metadata->getName())); diff --git a/vendor/symfony/http-kernel/Controller/ArgumentResolver/VariadicValueResolver.php b/vendor/symfony/http-kernel/Controller/ArgumentResolver/VariadicValueResolver.php index 56ae5f19..7ee2d7af 100644 --- a/vendor/symfony/http-kernel/Controller/ArgumentResolver/VariadicValueResolver.php +++ b/vendor/symfony/http-kernel/Controller/ArgumentResolver/VariadicValueResolver.php @@ -37,8 +37,8 @@ final class VariadicValueResolver implements ArgumentValueResolverInterface { $values = $request->attributes->get($argument->getName()); - if (!is_array($values)) { - throw new \InvalidArgumentException(sprintf('The action argument "...$%1$s" is required to be an array, the request attribute "%1$s" contains a type of "%2$s" instead.', $argument->getName(), gettype($values))); + if (!\is_array($values)) { + throw new \InvalidArgumentException(sprintf('The action argument "...$%1$s" is required to be an array, the request attribute "%1$s" contains a type of "%2$s" instead.', $argument->getName(), \gettype($values))); } foreach ($values as $value) { diff --git a/vendor/symfony/http-kernel/Controller/ControllerResolver.php b/vendor/symfony/http-kernel/Controller/ControllerResolver.php index dce640e3..04c5fcf5 100644 --- a/vendor/symfony/http-kernel/Controller/ControllerResolver.php +++ b/vendor/symfony/http-kernel/Controller/ControllerResolver.php @@ -43,8 +43,8 @@ class ControllerResolver implements ControllerResolverInterface return false; } - if (is_array($controller)) { - if (isset($controller[0]) && is_string($controller[0]) && isset($controller[1])) { + if (\is_array($controller)) { + if (isset($controller[0]) && \is_string($controller[0]) && isset($controller[1])) { try { $controller[0] = $this->instantiateController($controller[0]); } catch (\Error | \LogicException $e) { @@ -63,28 +63,28 @@ class ControllerResolver implements ControllerResolverInterface } } - if (!is_callable($controller)) { + if (!\is_callable($controller)) { throw new \InvalidArgumentException(sprintf('The controller for URI "%s" is not callable. %s', $request->getPathInfo(), $this->getControllerError($controller))); } return $controller; } - if (is_object($controller)) { - if (!is_callable($controller)) { + if (\is_object($controller)) { + if (!\is_callable($controller)) { throw new \InvalidArgumentException(sprintf('The controller for URI "%s" is not callable. %s', $request->getPathInfo(), $this->getControllerError($controller))); } return $controller; } - if (function_exists($controller)) { + if (\function_exists($controller)) { return $controller; } $callable = $this->createController($controller); - if (!is_callable($callable)) { + if (!\is_callable($callable)) { throw new \InvalidArgumentException(sprintf('The controller for URI "%s" is not callable. %s', $request->getPathInfo(), $this->getControllerError($callable))); } @@ -135,7 +135,7 @@ class ControllerResolver implements ControllerResolverInterface private function getControllerError($callable) { - if (is_string($callable)) { + if (\is_string($callable)) { if (false !== strpos($callable, '::')) { $callable = explode('::', $callable, 2); } else { @@ -143,28 +143,28 @@ class ControllerResolver implements ControllerResolverInterface } } - if (is_object($callable)) { + if (\is_object($callable)) { $availableMethods = $this->getClassMethodsWithoutMagicMethods($callable); $alternativeMsg = $availableMethods ? sprintf(' or use one of the available methods: "%s"', implode('", "', $availableMethods)) : ''; - return sprintf('Controller class "%s" cannot be called without a method name. You need to implement "__invoke"%s.', get_class($callable), $alternativeMsg); + return sprintf('Controller class "%s" cannot be called without a method name. You need to implement "__invoke"%s.', \get_class($callable), $alternativeMsg); } - if (!is_array($callable)) { - return sprintf('Invalid type for controller given, expected string, array or object, got "%s".', gettype($callable)); + if (!\is_array($callable)) { + return sprintf('Invalid type for controller given, expected string, array or object, got "%s".', \gettype($callable)); } - if (!isset($callable[0]) || !isset($callable[1]) || 2 !== count($callable)) { + if (!isset($callable[0]) || !isset($callable[1]) || 2 !== \count($callable)) { return 'Invalid array callable, expected array(controller, method).'; } list($controller, $method) = $callable; - if (is_string($controller) && !class_exists($controller)) { + if (\is_string($controller) && !class_exists($controller)) { return sprintf('Class "%s" does not exist.', $controller); } - $className = is_object($controller) ? get_class($controller) : $controller; + $className = \is_object($controller) ? \get_class($controller) : $controller; if (method_exists($controller, $method)) { return sprintf('Method "%s" on class "%s" should be public and non-abstract.', $method, $className); @@ -177,7 +177,7 @@ class ControllerResolver implements ControllerResolverInterface foreach ($collection as $item) { $lev = levenshtein($method, $item); - if ($lev <= strlen($method) / 3 || false !== strpos($item, $method)) { + if ($lev <= \strlen($method) / 3 || false !== strpos($item, $method)) { $alternatives[] = $item; } } @@ -186,7 +186,7 @@ class ControllerResolver implements ControllerResolverInterface $message = sprintf('Expected method "%s" on class "%s"', $method, $className); - if (count($alternatives) > 0) { + if (\count($alternatives) > 0) { $message .= sprintf(', did you mean "%s"?', implode('", "', $alternatives)); } else { $message .= sprintf('. Available methods: "%s".', implode('", "', $collection)); diff --git a/vendor/symfony/http-kernel/Controller/TraceableArgumentResolver.php b/vendor/symfony/http-kernel/Controller/TraceableArgumentResolver.php index 6fb0fa66..39848127 100644 --- a/vendor/symfony/http-kernel/Controller/TraceableArgumentResolver.php +++ b/vendor/symfony/http-kernel/Controller/TraceableArgumentResolver.php @@ -11,8 +11,8 @@ namespace Symfony\Component\HttpKernel\Controller; -use Symfony\Component\Stopwatch\Stopwatch; use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\Stopwatch\Stopwatch; /** * @author Fabien Potencier diff --git a/vendor/symfony/http-kernel/Controller/TraceableControllerResolver.php b/vendor/symfony/http-kernel/Controller/TraceableControllerResolver.php index adaaa26d..bf6b6aa1 100644 --- a/vendor/symfony/http-kernel/Controller/TraceableControllerResolver.php +++ b/vendor/symfony/http-kernel/Controller/TraceableControllerResolver.php @@ -11,8 +11,8 @@ namespace Symfony\Component\HttpKernel\Controller; -use Symfony\Component\Stopwatch\Stopwatch; use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\Stopwatch\Stopwatch; /** * @author Fabien Potencier diff --git a/vendor/symfony/http-kernel/ControllerMetadata/ArgumentMetadataFactory.php b/vendor/symfony/http-kernel/ControllerMetadata/ArgumentMetadataFactory.php index 86683d55..10e851b6 100644 --- a/vendor/symfony/http-kernel/ControllerMetadata/ArgumentMetadataFactory.php +++ b/vendor/symfony/http-kernel/ControllerMetadata/ArgumentMetadataFactory.php @@ -25,9 +25,9 @@ final class ArgumentMetadataFactory implements ArgumentMetadataFactoryInterface { $arguments = array(); - if (is_array($controller)) { + if (\is_array($controller)) { $reflection = new \ReflectionMethod($controller[0], $controller[1]); - } elseif (is_object($controller) && !$controller instanceof \Closure) { + } elseif (\is_object($controller) && !$controller instanceof \Closure) { $reflection = (new \ReflectionObject($controller))->getMethod('__invoke'); } else { $reflection = new \ReflectionFunction($controller); diff --git a/vendor/symfony/http-kernel/DataCollector/ConfigDataCollector.php b/vendor/symfony/http-kernel/DataCollector/ConfigDataCollector.php index 14abce76..76ad4a8c 100644 --- a/vendor/symfony/http-kernel/DataCollector/ConfigDataCollector.php +++ b/vendor/symfony/http-kernel/DataCollector/ConfigDataCollector.php @@ -11,10 +11,10 @@ namespace Symfony\Component\HttpKernel\DataCollector; -use Symfony\Component\HttpKernel\KernelInterface; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpKernel\Kernel; +use Symfony\Component\HttpKernel\KernelInterface; use Symfony\Component\VarDumper\Caster\LinkStub; /** @@ -67,11 +67,11 @@ class ConfigDataCollector extends DataCollector implements LateDataCollectorInte 'php_architecture' => PHP_INT_SIZE * 8, 'php_intl_locale' => class_exists('Locale', false) && \Locale::getDefault() ? \Locale::getDefault() : 'n/a', 'php_timezone' => date_default_timezone_get(), - 'xdebug_enabled' => extension_loaded('xdebug'), - 'apcu_enabled' => extension_loaded('apcu') && ini_get('apc.enabled'), - 'zend_opcache_enabled' => extension_loaded('Zend OPcache') && ini_get('opcache.enable'), + 'xdebug_enabled' => \extension_loaded('xdebug'), + 'apcu_enabled' => \extension_loaded('apcu') && ini_get('apc.enabled'), + 'zend_opcache_enabled' => \extension_loaded('Zend OPcache') && ini_get('opcache.enable'), 'bundles' => array(), - 'sapi_name' => PHP_SAPI, + 'sapi_name' => \PHP_SAPI, ); if (isset($this->kernel)) { diff --git a/vendor/symfony/http-kernel/DataCollector/DataCollector.php b/vendor/symfony/http-kernel/DataCollector/DataCollector.php index faa0d9e3..a3d8c99d 100644 --- a/vendor/symfony/http-kernel/DataCollector/DataCollector.php +++ b/vendor/symfony/http-kernel/DataCollector/DataCollector.php @@ -80,7 +80,7 @@ abstract class DataCollector implements DataCollectorInterface, \Serializable '*' => function ($v, array $a, Stub $s, $isNested) { if (!$v instanceof Stub) { foreach ($a as $k => $v) { - if (is_object($v) && !$v instanceof \DateTimeInterface && !$v instanceof Stub) { + if (\is_object($v) && !$v instanceof \DateTimeInterface && !$v instanceof Stub) { $a[$k] = new CutStub($v); } } diff --git a/vendor/symfony/http-kernel/DataCollector/DumpDataCollector.php b/vendor/symfony/http-kernel/DataCollector/DumpDataCollector.php index 8e43faa9..1ca85255 100644 --- a/vendor/symfony/http-kernel/DataCollector/DumpDataCollector.php +++ b/vendor/symfony/http-kernel/DataCollector/DumpDataCollector.php @@ -19,8 +19,8 @@ use Symfony\Component\VarDumper\Cloner\Data; use Symfony\Component\VarDumper\Cloner\VarCloner; use Symfony\Component\VarDumper\Dumper\CliDumper; use Symfony\Component\VarDumper\Dumper\ContextProvider\SourceContextProvider; -use Symfony\Component\VarDumper\Dumper\HtmlDumper; use Symfony\Component\VarDumper\Dumper\DataDumperInterface; +use Symfony\Component\VarDumper\Dumper\HtmlDumper; use Symfony\Component\VarDumper\Server\Connection; /** @@ -154,7 +154,7 @@ class DumpDataCollector extends DataCollector implements DataDumperInterface parent::unserialize($data); $charset = array_pop($this->data); $fileLinkFormat = array_pop($this->data); - $this->dataCount = count($this->data); + $this->dataCount = \count($this->data); self::__construct($this->stopwatch, $fileLinkFormat, $charset); } @@ -198,13 +198,13 @@ class DumpDataCollector extends DataCollector implements DataDumperInterface $this->isCollected = true; $h = headers_list(); - $i = count($h); + $i = \count($h); array_unshift($h, 'Content-Type: '.ini_get('default_mimetype')); while (0 !== stripos($h[$i], 'Content-Type:')) { --$i; } - if (!\in_array(PHP_SAPI, array('cli', 'phpdbg'), true) && stripos($h[$i], 'html')) { + if (!\in_array(\PHP_SAPI, array('cli', 'phpdbg'), true) && stripos($h[$i], 'html')) { $dumper = new HtmlDumper('php://output', $this->charset); $dumper->setDisplayOptions(array('fileLinkFormat' => $this->fileLinkFormat)); } else { @@ -230,7 +230,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, array('%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/LoggerDataCollector.php b/vendor/symfony/http-kernel/DataCollector/LoggerDataCollector.php index 6218c0c2..533d3217 100644 --- a/vendor/symfony/http-kernel/DataCollector/LoggerDataCollector.php +++ b/vendor/symfony/http-kernel/DataCollector/LoggerDataCollector.php @@ -223,7 +223,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(), array(E_DEPRECATED, E_USER_DEPRECATED), true)) { return true; } diff --git a/vendor/symfony/http-kernel/DataCollector/MemoryDataCollector.php b/vendor/symfony/http-kernel/DataCollector/MemoryDataCollector.php index 8d8cc1a0..310b2f91 100644 --- a/vendor/symfony/http-kernel/DataCollector/MemoryDataCollector.php +++ b/vendor/symfony/http-kernel/DataCollector/MemoryDataCollector.php @@ -98,9 +98,9 @@ class MemoryDataCollector extends DataCollector implements LateDataCollectorInte $memoryLimit = strtolower($memoryLimit); $max = strtolower(ltrim($memoryLimit, '+')); if (0 === strpos($max, '0x')) { - $max = intval($max, 16); + $max = \intval($max, 16); } elseif (0 === strpos($max, '0')) { - $max = intval($max, 8); + $max = \intval($max, 8); } else { $max = (int) $max; } diff --git a/vendor/symfony/http-kernel/DataCollector/RequestDataCollector.php b/vendor/symfony/http-kernel/DataCollector/RequestDataCollector.php index 36e5634e..4c34cf90 100644 --- a/vendor/symfony/http-kernel/DataCollector/RequestDataCollector.php +++ b/vendor/symfony/http-kernel/DataCollector/RequestDataCollector.php @@ -11,14 +11,14 @@ namespace Symfony\Component\HttpKernel\DataCollector; +use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Symfony\Component\HttpFoundation\Cookie; use Symfony\Component\HttpFoundation\ParameterBag; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpKernel\Event\FilterControllerEvent; use Symfony\Component\HttpKernel\Event\FilterResponseEvent; use Symfony\Component\HttpKernel\KernelEvents; -use Symfony\Component\HttpKernel\Event\FilterControllerEvent; -use Symfony\Component\EventDispatcher\EventSubscriberInterface; /** * @author Fabien Potencier @@ -42,7 +42,7 @@ class RequestDataCollector extends DataCollector implements EventSubscriberInter $route = ''; foreach ($request->attributes->all() as $key => $value) { if ('_route' === $key) { - $route = is_object($value) ? $value->getPath() : $value; + $route = \is_object($value) ? $value->getPath() : $value; $attributes[$key] = $route; } else { $attributes[$key] = $value; @@ -124,7 +124,7 @@ class RequestDataCollector extends DataCollector implements EventSubscriberInter } foreach ($this->data as $key => $value) { - if (!is_array($value)) { + if (!\is_array($value)) { continue; } if ('request_headers' === $key || 'response_headers' === $key) { @@ -157,7 +157,7 @@ class RequestDataCollector extends DataCollector implements EventSubscriberInter )); } - $this->data['identifier'] = $this->data['route'] ?: (is_array($this->data['controller']) ? $this->data['controller']['class'].'::'.$this->data['controller']['method'].'()' : $this->data['controller']); + $this->data['identifier'] = $this->data['route'] ?: (\is_array($this->data['controller']) ? $this->data['controller']['class'].'::'.$this->data['controller']['method'].'()' : $this->data['controller']); if ($response->headers->has('x-previous-debug-token')) { $this->data['forward_token'] = $response->headers->get('x-previous-debug-token'); @@ -372,25 +372,25 @@ class RequestDataCollector extends DataCollector implements EventSubscriberInter */ protected function parseController($controller) { - if (is_string($controller) && false !== strpos($controller, '::')) { + if (\is_string($controller) && false !== strpos($controller, '::')) { $controller = explode('::', $controller); } - if (is_array($controller)) { + if (\is_array($controller)) { try { $r = new \ReflectionMethod($controller[0], $controller[1]); return array( - 'class' => is_object($controller[0]) ? get_class($controller[0]) : $controller[0], + '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)) { + if (\is_callable($controller)) { // using __call or __callStatic return array( - 'class' => is_object($controller[0]) ? get_class($controller[0]) : $controller[0], + 'class' => \is_object($controller[0]) ? \get_class($controller[0]) : $controller[0], 'method' => $controller[1], 'file' => 'n/a', 'line' => 'n/a', @@ -410,7 +410,7 @@ class RequestDataCollector extends DataCollector implements EventSubscriberInter ); } - if (is_object($controller)) { + if (\is_object($controller)) { $r = new \ReflectionClass($controller); return array( @@ -421,6 +421,6 @@ class RequestDataCollector extends DataCollector implements EventSubscriberInter ); } - return is_string($controller) ? $controller : 'n/a'; + 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 afd34f8a..481747b3 100644 --- a/vendor/symfony/http-kernel/DataCollector/RouterDataCollector.php +++ b/vendor/symfony/http-kernel/DataCollector/RouterDataCollector.php @@ -11,9 +11,9 @@ namespace Symfony\Component\HttpKernel\DataCollector; +use Symfony\Component\HttpFoundation\RedirectResponse; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpFoundation\RedirectResponse; use Symfony\Component\HttpKernel\Event\FilterControllerEvent; /** diff --git a/vendor/symfony/http-kernel/Debug/FileLinkFormatter.php b/vendor/symfony/http-kernel/Debug/FileLinkFormatter.php index a4aa6c79..bafb5095 100644 --- a/vendor/symfony/http-kernel/Debug/FileLinkFormatter.php +++ b/vendor/symfony/http-kernel/Debug/FileLinkFormatter.php @@ -34,8 +34,8 @@ class FileLinkFormatter implements \Serializable public function __construct($fileLinkFormat = null, RequestStack $requestStack = null, string $baseDir = null, $urlFormat = null) { $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); + 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); } @@ -50,7 +50,7 @@ class FileLinkFormatter implements \Serializable if ($fmt = $this->getFileLinkFormat()) { for ($i = 1; isset($fmt[$i]); ++$i) { if (0 === strpos($file, $k = $fmt[$i++])) { - $file = substr_replace($file, $fmt[$i], 0, strlen($k)); + $file = substr_replace($file, $fmt[$i], 0, \strlen($k)); break; } } @@ -97,7 +97,7 @@ class FileLinkFormatter implements \Serializable return array( $request->getSchemeAndHttpHost().$request->getBaseUrl().$this->urlFormat, - $this->baseDir.DIRECTORY_SEPARATOR, '', + $this->baseDir.\DIRECTORY_SEPARATOR, '', ); } } diff --git a/vendor/symfony/http-kernel/Debug/TraceableEventDispatcher.php b/vendor/symfony/http-kernel/Debug/TraceableEventDispatcher.php index fbc49dff..ddf4fa7c 100644 --- a/vendor/symfony/http-kernel/Debug/TraceableEventDispatcher.php +++ b/vendor/symfony/http-kernel/Debug/TraceableEventDispatcher.php @@ -12,8 +12,8 @@ namespace Symfony\Component\HttpKernel\Debug; use Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher as BaseTraceableEventDispatcher; -use Symfony\Component\HttpKernel\KernelEvents; use Symfony\Component\EventDispatcher\Event; +use Symfony\Component\HttpKernel\KernelEvents; /** * Collects some data about event listeners. diff --git a/vendor/symfony/http-kernel/DependencyInjection/AddAnnotatedClassesToCachePass.php b/vendor/symfony/http-kernel/DependencyInjection/AddAnnotatedClassesToCachePass.php index 8a86c692..54f87edd 100644 --- a/vendor/symfony/http-kernel/DependencyInjection/AddAnnotatedClassesToCachePass.php +++ b/vendor/symfony/http-kernel/DependencyInjection/AddAnnotatedClassesToCachePass.php @@ -13,8 +13,8 @@ namespace Symfony\Component\HttpKernel\DependencyInjection; use Composer\Autoload\ClassLoader; use Symfony\Component\Debug\DebugClassLoader; -use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; +use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\HttpKernel\Kernel; /** @@ -88,7 +88,7 @@ class AddAnnotatedClassesToCachePass implements CompilerPassInterface $classes = array(); foreach (spl_autoload_functions() as $function) { - if (!is_array($function)) { + if (!\is_array($function)) { continue; } @@ -96,7 +96,7 @@ class AddAnnotatedClassesToCachePass implements CompilerPassInterface $function = $function[0]->getClassLoader(); } - if (is_array($function) && $function[0] instanceof ClassLoader) { + if (\is_array($function) && $function[0] instanceof ClassLoader) { $classes += array_filter($function[0]->getClassMap()); } } diff --git a/vendor/symfony/http-kernel/DependencyInjection/FragmentRendererPass.php b/vendor/symfony/http-kernel/DependencyInjection/FragmentRendererPass.php index 825038b6..2a8c1b1b 100644 --- a/vendor/symfony/http-kernel/DependencyInjection/FragmentRendererPass.php +++ b/vendor/symfony/http-kernel/DependencyInjection/FragmentRendererPass.php @@ -11,9 +11,9 @@ namespace Symfony\Component\HttpKernel\DependencyInjection; +use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; use Symfony\Component\DependencyInjection\Compiler\ServiceLocatorTagPass; use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; use Symfony\Component\DependencyInjection\Reference; use Symfony\Component\HttpKernel\Fragment\FragmentRendererInterface; diff --git a/vendor/symfony/http-kernel/DependencyInjection/LoggerPass.php b/vendor/symfony/http-kernel/DependencyInjection/LoggerPass.php index 2ad7f322..b6df1f6e 100644 --- a/vendor/symfony/http-kernel/DependencyInjection/LoggerPass.php +++ b/vendor/symfony/http-kernel/DependencyInjection/LoggerPass.php @@ -12,9 +12,9 @@ namespace Symfony\Component\HttpKernel\DependencyInjection; use Psr\Log\LoggerInterface; -use Symfony\Component\HttpKernel\Log\Logger; use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\HttpKernel\Log\Logger; /** * Registers the default logger if necessary. diff --git a/vendor/symfony/http-kernel/DependencyInjection/MergeExtensionConfigurationPass.php b/vendor/symfony/http-kernel/DependencyInjection/MergeExtensionConfigurationPass.php index dcd73828..1dbf7f7b 100644 --- a/vendor/symfony/http-kernel/DependencyInjection/MergeExtensionConfigurationPass.php +++ b/vendor/symfony/http-kernel/DependencyInjection/MergeExtensionConfigurationPass.php @@ -31,7 +31,7 @@ class MergeExtensionConfigurationPass extends BaseMergeExtensionConfigurationPas public function process(ContainerBuilder $container) { foreach ($this->extensions as $extension) { - if (!count($container->getExtensionConfig($extension))) { + if (!\count($container->getExtensionConfig($extension))) { $container->loadFromExtension($extension, array()); } } diff --git a/vendor/symfony/http-kernel/DependencyInjection/RegisterControllerArgumentLocatorsPass.php b/vendor/symfony/http-kernel/DependencyInjection/RegisterControllerArgumentLocatorsPass.php index 490b595b..06adfe4a 100644 --- a/vendor/symfony/http-kernel/DependencyInjection/RegisterControllerArgumentLocatorsPass.php +++ b/vendor/symfony/http-kernel/DependencyInjection/RegisterControllerArgumentLocatorsPass.php @@ -62,7 +62,7 @@ class RegisterControllerArgumentLocatorsPass implements CompilerPassInterface while ($def instanceof ChildDefinition) { $def = $container->findDefinition($def->getParent()); $class = $class ?: $def->getClass(); - $bindings = $def->getBindings(); + $bindings += $def->getBindings(); } $class = $parameterBag->resolveValue($class); diff --git a/vendor/symfony/http-kernel/Event/FilterControllerArgumentsEvent.php b/vendor/symfony/http-kernel/Event/FilterControllerArgumentsEvent.php index 309647bc..5e178f2b 100644 --- a/vendor/symfony/http-kernel/Event/FilterControllerArgumentsEvent.php +++ b/vendor/symfony/http-kernel/Event/FilterControllerArgumentsEvent.php @@ -11,8 +11,8 @@ namespace Symfony\Component\HttpKernel\Event; -use Symfony\Component\HttpKernel\HttpKernelInterface; use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpKernel\HttpKernelInterface; /** * Allows filtering of controller arguments. diff --git a/vendor/symfony/http-kernel/Event/FilterControllerEvent.php b/vendor/symfony/http-kernel/Event/FilterControllerEvent.php index cbbfd0fe..7eab4493 100644 --- a/vendor/symfony/http-kernel/Event/FilterControllerEvent.php +++ b/vendor/symfony/http-kernel/Event/FilterControllerEvent.php @@ -11,8 +11,8 @@ namespace Symfony\Component\HttpKernel\Event; -use Symfony\Component\HttpKernel\HttpKernelInterface; use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpKernel\HttpKernelInterface; /** * Allows filtering of a controller callable. diff --git a/vendor/symfony/http-kernel/Event/FilterResponseEvent.php b/vendor/symfony/http-kernel/Event/FilterResponseEvent.php index 4cdc207f..04589f7b 100644 --- a/vendor/symfony/http-kernel/Event/FilterResponseEvent.php +++ b/vendor/symfony/http-kernel/Event/FilterResponseEvent.php @@ -11,9 +11,9 @@ namespace Symfony\Component\HttpKernel\Event; -use Symfony\Component\HttpKernel\HttpKernelInterface; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpKernel\HttpKernelInterface; /** * Allows to filter a Response object. diff --git a/vendor/symfony/http-kernel/Event/GetResponseEvent.php b/vendor/symfony/http-kernel/Event/GetResponseEvent.php index f7745ea3..c25a0f1c 100644 --- a/vendor/symfony/http-kernel/Event/GetResponseEvent.php +++ b/vendor/symfony/http-kernel/Event/GetResponseEvent.php @@ -29,7 +29,7 @@ class GetResponseEvent extends KernelEvent /** * Returns the response object. * - * @return Response + * @return Response|null */ public function getResponse() { diff --git a/vendor/symfony/http-kernel/Event/GetResponseForControllerResultEvent.php b/vendor/symfony/http-kernel/Event/GetResponseForControllerResultEvent.php index 592653d7..a0082821 100644 --- a/vendor/symfony/http-kernel/Event/GetResponseForControllerResultEvent.php +++ b/vendor/symfony/http-kernel/Event/GetResponseForControllerResultEvent.php @@ -11,8 +11,8 @@ namespace Symfony\Component\HttpKernel\Event; -use Symfony\Component\HttpKernel\HttpKernelInterface; use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpKernel\HttpKernelInterface; /** * Allows to create a response for the return value of a controller. diff --git a/vendor/symfony/http-kernel/Event/GetResponseForExceptionEvent.php b/vendor/symfony/http-kernel/Event/GetResponseForExceptionEvent.php index cf0fcd16..7fab006d 100644 --- a/vendor/symfony/http-kernel/Event/GetResponseForExceptionEvent.php +++ b/vendor/symfony/http-kernel/Event/GetResponseForExceptionEvent.php @@ -11,8 +11,8 @@ namespace Symfony\Component\HttpKernel\Event; -use Symfony\Component\HttpKernel\HttpKernelInterface; use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpKernel\HttpKernelInterface; /** * Allows to create a response for a thrown exception. diff --git a/vendor/symfony/http-kernel/Event/KernelEvent.php b/vendor/symfony/http-kernel/Event/KernelEvent.php index 0dcf879f..f3db8a60 100644 --- a/vendor/symfony/http-kernel/Event/KernelEvent.php +++ b/vendor/symfony/http-kernel/Event/KernelEvent.php @@ -11,9 +11,9 @@ namespace Symfony\Component\HttpKernel\Event; -use Symfony\Component\HttpKernel\HttpKernelInterface; -use Symfony\Component\HttpFoundation\Request; use Symfony\Component\EventDispatcher\Event; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpKernel\HttpKernelInterface; /** * Base class for events thrown in the HttpKernel component. diff --git a/vendor/symfony/http-kernel/Event/PostResponseEvent.php b/vendor/symfony/http-kernel/Event/PostResponseEvent.php index 2406fddb..0981e64c 100644 --- a/vendor/symfony/http-kernel/Event/PostResponseEvent.php +++ b/vendor/symfony/http-kernel/Event/PostResponseEvent.php @@ -11,9 +11,9 @@ namespace Symfony\Component\HttpKernel\Event; -use Symfony\Component\HttpKernel\HttpKernelInterface; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpKernel\HttpKernelInterface; /** * Allows to execute logic after a response was sent. diff --git a/vendor/symfony/http-kernel/EventListener/AbstractSessionListener.php b/vendor/symfony/http-kernel/EventListener/AbstractSessionListener.php index 2636c65f..08a6ac63 100644 --- a/vendor/symfony/http-kernel/EventListener/AbstractSessionListener.php +++ b/vendor/symfony/http-kernel/EventListener/AbstractSessionListener.php @@ -12,13 +12,13 @@ namespace Symfony\Component\HttpKernel\EventListener; use Psr\Container\ContainerInterface; +use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Symfony\Component\HttpFoundation\Session\Session; use Symfony\Component\HttpFoundation\Session\SessionInterface; use Symfony\Component\HttpKernel\Event\FilterResponseEvent; use Symfony\Component\HttpKernel\Event\FinishRequestEvent; use Symfony\Component\HttpKernel\Event\GetResponseEvent; use Symfony\Component\HttpKernel\KernelEvents; -use Symfony\Component\EventDispatcher\EventSubscriberInterface; /** * Sets the session onto the request on the "kernel.request" event and saves @@ -62,7 +62,7 @@ abstract class AbstractSessionListener implements EventSubscriberInterface } $session = $session ?? ($this->container && $this->container->has('initialized_session') ? $this->container->get('initialized_session') : null); - $this->sessionUsageStack[] = $session instanceof Session ? $session->getUsageIndex() : null; + $this->sessionUsageStack[] = $session instanceof Session ? $session->getUsageIndex() : 0; } public function onKernelResponse(FilterResponseEvent $event) diff --git a/vendor/symfony/http-kernel/EventListener/AbstractTestSessionListener.php b/vendor/symfony/http-kernel/EventListener/AbstractTestSessionListener.php index f07647f8..7f07e7f1 100644 --- a/vendor/symfony/http-kernel/EventListener/AbstractTestSessionListener.php +++ b/vendor/symfony/http-kernel/EventListener/AbstractTestSessionListener.php @@ -11,13 +11,13 @@ namespace Symfony\Component\HttpKernel\EventListener; +use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Symfony\Component\HttpFoundation\Cookie; use Symfony\Component\HttpFoundation\Session\Session; use Symfony\Component\HttpFoundation\Session\SessionInterface; -use Symfony\Component\HttpKernel\KernelEvents; use Symfony\Component\HttpKernel\Event\FilterResponseEvent; use Symfony\Component\HttpKernel\Event\GetResponseEvent; -use Symfony\Component\EventDispatcher\EventSubscriberInterface; +use Symfony\Component\HttpKernel\KernelEvents; /** * TestSessionListener. @@ -73,6 +73,13 @@ abstract class AbstractTestSessionListener implements EventSubscriberInterface if ($session instanceof Session ? !$session->isEmpty() || (null !== $this->sessionId && $session->getId() !== $this->sessionId) : $wasStarted) { $params = session_get_cookie_params(); + + foreach ($event->getResponse()->headers->getCookies() as $cookie) { + if ($session->getName() === $cookie->getName() && $params['path'] === $cookie->getPath() && $params['domain'] == $cookie->getDomain()) { + return; + } + } + $event->getResponse()->headers->setCookie(new Cookie($session->getName(), $session->getId(), 0 === $params['lifetime'] ? 0 : time() + $params['lifetime'], $params['path'], $params['domain'], $params['secure'], $params['httponly'])); $this->sessionId = $session->getId(); } diff --git a/vendor/symfony/http-kernel/EventListener/AddRequestFormatsListener.php b/vendor/symfony/http-kernel/EventListener/AddRequestFormatsListener.php index f21fc6ab..5ec52841 100644 --- a/vendor/symfony/http-kernel/EventListener/AddRequestFormatsListener.php +++ b/vendor/symfony/http-kernel/EventListener/AddRequestFormatsListener.php @@ -12,8 +12,8 @@ namespace Symfony\Component\HttpKernel\EventListener; use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\HttpKernel\KernelEvents; use Symfony\Component\HttpKernel\Event\GetResponseEvent; +use Symfony\Component\HttpKernel\KernelEvents; /** * Adds configured formats to each request. diff --git a/vendor/symfony/http-kernel/EventListener/DebugHandlersListener.php b/vendor/symfony/http-kernel/EventListener/DebugHandlersListener.php index 4c2398cc..47fe05c5 100644 --- a/vendor/symfony/http-kernel/EventListener/DebugHandlersListener.php +++ b/vendor/symfony/http-kernel/EventListener/DebugHandlersListener.php @@ -12,15 +12,15 @@ namespace Symfony\Component\HttpKernel\EventListener; use Psr\Log\LoggerInterface; +use Symfony\Component\Console\ConsoleEvents; +use Symfony\Component\Console\Event\ConsoleEvent; +use Symfony\Component\Console\Output\ConsoleOutputInterface; use Symfony\Component\Debug\ErrorHandler; use Symfony\Component\Debug\ExceptionHandler; use Symfony\Component\EventDispatcher\Event; use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Symfony\Component\HttpKernel\Event\KernelEvent; use Symfony\Component\HttpKernel\KernelEvents; -use Symfony\Component\Console\ConsoleEvents; -use Symfony\Component\Console\Event\ConsoleEvent; -use Symfony\Component\Console\Output\ConsoleOutputInterface; /** * Configures errors and exceptions handlers. @@ -70,14 +70,14 @@ class DebugHandlersListener implements EventSubscriberInterface $this->firstCall = $this->hasTerminatedWithException = false; $handler = set_exception_handler('var_dump'); - $handler = is_array($handler) ? $handler[0] : null; + $handler = \is_array($handler) ? $handler[0] : null; restore_exception_handler(); if ($this->logger || null !== $this->throwAt) { if ($handler instanceof ErrorHandler) { if ($this->logger) { $handler->setDefaultLogger($this->logger, $this->levels); - if (is_array($this->levels)) { + if (\is_array($this->levels)) { $levels = 0; foreach ($this->levels as $type => $log) { $levels |= $type; @@ -126,7 +126,7 @@ class DebugHandlersListener implements EventSubscriberInterface if ($this->exceptionHandler) { if ($handler instanceof ErrorHandler) { $h = $handler->setExceptionHandler('var_dump'); - if (is_array($h) && $h[0] instanceof ExceptionHandler) { + if (\is_array($h) && $h[0] instanceof ExceptionHandler) { $handler->setExceptionHandler($h); $handler = $h[0]; } else { @@ -147,7 +147,7 @@ class DebugHandlersListener implements EventSubscriberInterface { $events = array(KernelEvents::REQUEST => array('configure', 2048)); - if ('cli' === PHP_SAPI && defined('Symfony\Component\Console\ConsoleEvents::COMMAND')) { + if ('cli' === \PHP_SAPI && \defined('Symfony\Component\Console\ConsoleEvents::COMMAND')) { $events[ConsoleEvents::COMMAND] = array('configure', 2048); } diff --git a/vendor/symfony/http-kernel/EventListener/ExceptionListener.php b/vendor/symfony/http-kernel/EventListener/ExceptionListener.php index 0895366a..559872a1 100644 --- a/vendor/symfony/http-kernel/EventListener/ExceptionListener.php +++ b/vendor/symfony/http-kernel/EventListener/ExceptionListener.php @@ -14,14 +14,14 @@ namespace Symfony\Component\HttpKernel\EventListener; use Psr\Log\LoggerInterface; use Symfony\Component\Debug\Exception\FlattenException; use Symfony\Component\EventDispatcher\EventDispatcherInterface; +use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpKernel\Event\FilterResponseEvent; -use Symfony\Component\HttpKernel\Log\DebugLoggerInterface; use Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent; -use Symfony\Component\HttpKernel\KernelEvents; -use Symfony\Component\HttpKernel\HttpKernelInterface; use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface; -use Symfony\Component\EventDispatcher\EventSubscriberInterface; +use Symfony\Component\HttpKernel\HttpKernelInterface; +use Symfony\Component\HttpKernel\KernelEvents; +use Symfony\Component\HttpKernel\Log\DebugLoggerInterface; /** * ExceptionListener. @@ -45,19 +45,19 @@ class ExceptionListener implements EventSubscriberInterface { $exception = $event->getException(); - $this->logException($exception, sprintf('Uncaught PHP Exception %s: "%s" at %s line %s', get_class($exception), $exception->getMessage(), $exception->getFile(), $exception->getLine())); + $this->logException($exception, sprintf('Uncaught PHP Exception %s: "%s" at %s line %s', \get_class($exception), $exception->getMessage(), $exception->getFile(), $exception->getLine())); } public function onKernelException(GetResponseForExceptionEvent $event) { $exception = $event->getException(); $request = $this->duplicateRequest($exception, $event->getRequest()); - $eventDispatcher = func_num_args() > 2 ? func_get_arg(2) : null; + $eventDispatcher = \func_num_args() > 2 ? func_get_arg(2) : null; try { $response = $event->getKernel()->handle($request, HttpKernelInterface::SUB_REQUEST, false); } catch (\Exception $e) { - $this->logException($e, sprintf('Exception thrown when handling an exception (%s: %s at %s line %s)', get_class($e), $e->getMessage(), $e->getFile(), $e->getLine())); + $this->logException($e, sprintf('Exception thrown when handling an exception (%s: %s at %s line %s)', \get_class($e), $e->getMessage(), $e->getFile(), $e->getLine())); $wrapper = $e; diff --git a/vendor/symfony/http-kernel/EventListener/FragmentListener.php b/vendor/symfony/http-kernel/EventListener/FragmentListener.php index f6bfd6cc..b47aa7cc 100644 --- a/vendor/symfony/http-kernel/EventListener/FragmentListener.php +++ b/vendor/symfony/http-kernel/EventListener/FragmentListener.php @@ -11,12 +11,12 @@ namespace Symfony\Component\HttpKernel\EventListener; +use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpKernel\Event\GetResponseEvent; -use Symfony\Component\HttpKernel\KernelEvents; use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException; +use Symfony\Component\HttpKernel\KernelEvents; use Symfony\Component\HttpKernel\UriSigner; -use Symfony\Component\EventDispatcher\EventSubscriberInterface; /** * Handles content fragments represented by special URIs. diff --git a/vendor/symfony/http-kernel/EventListener/LocaleListener.php b/vendor/symfony/http-kernel/EventListener/LocaleListener.php index 6c2b5098..1067e8a0 100644 --- a/vendor/symfony/http-kernel/EventListener/LocaleListener.php +++ b/vendor/symfony/http-kernel/EventListener/LocaleListener.php @@ -11,13 +11,13 @@ namespace Symfony\Component\HttpKernel\EventListener; -use Symfony\Component\HttpKernel\Event\GetResponseEvent; -use Symfony\Component\HttpKernel\Event\FinishRequestEvent; -use Symfony\Component\HttpKernel\KernelEvents; -use Symfony\Component\HttpFoundation\RequestStack; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\Routing\RequestContextAwareInterface; 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\GetResponseEvent; +use Symfony\Component\HttpKernel\KernelEvents; +use Symfony\Component\Routing\RequestContextAwareInterface; /** * Initializes the locale based on the current request. diff --git a/vendor/symfony/http-kernel/EventListener/ProfilerListener.php b/vendor/symfony/http-kernel/EventListener/ProfilerListener.php index 045e0834..03344be7 100644 --- a/vendor/symfony/http-kernel/EventListener/ProfilerListener.php +++ b/vendor/symfony/http-kernel/EventListener/ProfilerListener.php @@ -11,14 +11,14 @@ namespace Symfony\Component\HttpKernel\EventListener; -use Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent; +use Symfony\Component\EventDispatcher\EventSubscriberInterface; +use Symfony\Component\HttpFoundation\RequestMatcherInterface; +use Symfony\Component\HttpFoundation\RequestStack; use Symfony\Component\HttpKernel\Event\FilterResponseEvent; +use Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent; use Symfony\Component\HttpKernel\Event\PostResponseEvent; use Symfony\Component\HttpKernel\KernelEvents; use Symfony\Component\HttpKernel\Profiler\Profiler; -use Symfony\Component\HttpFoundation\RequestMatcherInterface; -use Symfony\Component\HttpFoundation\RequestStack; -use Symfony\Component\EventDispatcher\EventSubscriberInterface; /** * ProfilerListener collects data for the current request by listening to the kernel events. diff --git a/vendor/symfony/http-kernel/EventListener/ResponseListener.php b/vendor/symfony/http-kernel/EventListener/ResponseListener.php index 01475c2a..0550c023 100644 --- a/vendor/symfony/http-kernel/EventListener/ResponseListener.php +++ b/vendor/symfony/http-kernel/EventListener/ResponseListener.php @@ -11,9 +11,9 @@ namespace Symfony\Component\HttpKernel\EventListener; +use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Symfony\Component\HttpKernel\Event\FilterResponseEvent; use Symfony\Component\HttpKernel\KernelEvents; -use Symfony\Component\EventDispatcher\EventSubscriberInterface; /** * ResponseListener fixes the Response headers based on the Request. diff --git a/vendor/symfony/http-kernel/EventListener/RouterListener.php b/vendor/symfony/http-kernel/EventListener/RouterListener.php index f7cf446e..39192845 100644 --- a/vendor/symfony/http-kernel/EventListener/RouterListener.php +++ b/vendor/symfony/http-kernel/EventListener/RouterListener.php @@ -12,25 +12,25 @@ namespace Symfony\Component\HttpKernel\EventListener; use Psr\Log\LoggerInterface; +use Symfony\Component\EventDispatcher\EventSubscriberInterface; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\RequestStack; use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpKernel\Event\FinishRequestEvent; use Symfony\Component\HttpKernel\Event\GetResponseEvent; use Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent; -use Symfony\Component\HttpKernel\Event\FinishRequestEvent; -use Symfony\Component\HttpKernel\Kernel; -use Symfony\Component\HttpKernel\KernelEvents; use Symfony\Component\HttpKernel\Exception\BadRequestHttpException; use Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; -use Symfony\Component\HttpFoundation\RequestStack; +use Symfony\Component\HttpKernel\Kernel; +use Symfony\Component\HttpKernel\KernelEvents; use Symfony\Component\Routing\Exception\MethodNotAllowedException; use Symfony\Component\Routing\Exception\NoConfigurationException; use Symfony\Component\Routing\Exception\ResourceNotFoundException; -use Symfony\Component\Routing\Matcher\UrlMatcherInterface; use Symfony\Component\Routing\Matcher\RequestMatcherInterface; +use Symfony\Component\Routing\Matcher\UrlMatcherInterface; use Symfony\Component\Routing\RequestContext; use Symfony\Component\Routing\RequestContextAwareInterface; -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\HttpFoundation\Request; /** * Initializes the context from the request and sets request attributes based on a matching route. @@ -167,7 +167,7 @@ class RouterListener implements EventSubscriberInterface private function createWelcomeResponse() { $version = Kernel::VERSION; - $baseDir = realpath($this->projectDir).DIRECTORY_SEPARATOR; + $baseDir = realpath($this->projectDir).\DIRECTORY_SEPARATOR; $docVersion = substr(Kernel::VERSION, 0, 3); ob_start(); diff --git a/vendor/symfony/http-kernel/EventListener/StreamedResponseListener.php b/vendor/symfony/http-kernel/EventListener/StreamedResponseListener.php index 671db5d8..2c616b91 100644 --- a/vendor/symfony/http-kernel/EventListener/StreamedResponseListener.php +++ b/vendor/symfony/http-kernel/EventListener/StreamedResponseListener.php @@ -11,10 +11,10 @@ namespace Symfony\Component\HttpKernel\EventListener; +use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Symfony\Component\HttpFoundation\StreamedResponse; use Symfony\Component\HttpKernel\Event\FilterResponseEvent; use Symfony\Component\HttpKernel\KernelEvents; -use Symfony\Component\EventDispatcher\EventSubscriberInterface; /** * StreamedResponseListener is responsible for sending the Response diff --git a/vendor/symfony/http-kernel/EventListener/SurrogateListener.php b/vendor/symfony/http-kernel/EventListener/SurrogateListener.php index 37d1b9d0..63435338 100644 --- a/vendor/symfony/http-kernel/EventListener/SurrogateListener.php +++ b/vendor/symfony/http-kernel/EventListener/SurrogateListener.php @@ -11,11 +11,11 @@ namespace Symfony\Component\HttpKernel\EventListener; +use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Symfony\Component\HttpKernel\Event\FilterResponseEvent; use Symfony\Component\HttpKernel\HttpCache\HttpCache; use Symfony\Component\HttpKernel\HttpCache\SurrogateInterface; use Symfony\Component\HttpKernel\KernelEvents; -use Symfony\Component\EventDispatcher\EventSubscriberInterface; /** * SurrogateListener adds a Surrogate-Control HTTP header when the Response needs to be parsed for Surrogates. diff --git a/vendor/symfony/http-kernel/EventListener/TranslatorListener.php b/vendor/symfony/http-kernel/EventListener/TranslatorListener.php index 6967ad02..2a5fc712 100644 --- a/vendor/symfony/http-kernel/EventListener/TranslatorListener.php +++ b/vendor/symfony/http-kernel/EventListener/TranslatorListener.php @@ -13,10 +13,10 @@ namespace Symfony\Component\HttpKernel\EventListener; use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpKernel\Event\GetResponseEvent; -use Symfony\Component\HttpKernel\Event\FinishRequestEvent; -use Symfony\Component\HttpKernel\KernelEvents; use Symfony\Component\HttpFoundation\RequestStack; +use Symfony\Component\HttpKernel\Event\FinishRequestEvent; +use Symfony\Component\HttpKernel\Event\GetResponseEvent; +use Symfony\Component\HttpKernel\KernelEvents; use Symfony\Component\Translation\TranslatorInterface; /** diff --git a/vendor/symfony/http-kernel/Fragment/AbstractSurrogateFragmentRenderer.php b/vendor/symfony/http-kernel/Fragment/AbstractSurrogateFragmentRenderer.php index ba1f3687..6ab6ec1f 100644 --- a/vendor/symfony/http-kernel/Fragment/AbstractSurrogateFragmentRenderer.php +++ b/vendor/symfony/http-kernel/Fragment/AbstractSurrogateFragmentRenderer.php @@ -92,13 +92,13 @@ abstract class AbstractSurrogateFragmentRenderer extends RoutableFragmentRendere // we need to sign the absolute URI, but want to return the path only. $fragmentUri = $this->signer->sign($this->generateFragmentUri($uri, $request, true)); - return substr($fragmentUri, strlen($request->getSchemeAndHttpHost())); + return substr($fragmentUri, \strlen($request->getSchemeAndHttpHost())); } private function containsNonScalars(array $values): bool { foreach ($values as $value) { - if (is_array($value)) { + if (\is_array($value)) { return $this->containsNonScalars($value); } elseif (!is_scalar($value) && null !== $value) { return true; diff --git a/vendor/symfony/http-kernel/Fragment/FragmentHandler.php b/vendor/symfony/http-kernel/Fragment/FragmentHandler.php index aa61bd1f..0c31826b 100644 --- a/vendor/symfony/http-kernel/Fragment/FragmentHandler.php +++ b/vendor/symfony/http-kernel/Fragment/FragmentHandler.php @@ -11,9 +11,9 @@ namespace Symfony\Component\HttpKernel\Fragment; +use Symfony\Component\HttpFoundation\RequestStack; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\StreamedResponse; -use Symfony\Component\HttpFoundation\RequestStack; use Symfony\Component\HttpKernel\Controller\ControllerReference; /** diff --git a/vendor/symfony/http-kernel/Fragment/FragmentRendererInterface.php b/vendor/symfony/http-kernel/Fragment/FragmentRendererInterface.php index b177c3ac..bcf4e994 100644 --- a/vendor/symfony/http-kernel/Fragment/FragmentRendererInterface.php +++ b/vendor/symfony/http-kernel/Fragment/FragmentRendererInterface.php @@ -12,8 +12,8 @@ namespace Symfony\Component\HttpKernel\Fragment; use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpKernel\Controller\ControllerReference; use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpKernel\Controller\ControllerReference; /** * Interface implemented by all rendering strategies. diff --git a/vendor/symfony/http-kernel/Fragment/HIncludeFragmentRenderer.php b/vendor/symfony/http-kernel/Fragment/HIncludeFragmentRenderer.php index e737a141..3ee0cfa2 100644 --- a/vendor/symfony/http-kernel/Fragment/HIncludeFragmentRenderer.php +++ b/vendor/symfony/http-kernel/Fragment/HIncludeFragmentRenderer.php @@ -13,9 +13,9 @@ namespace Symfony\Component\HttpKernel\Fragment; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\Templating\EngineInterface; use Symfony\Component\HttpKernel\Controller\ControllerReference; use Symfony\Component\HttpKernel\UriSigner; +use Symfony\Component\Templating\EngineInterface; use Twig\Environment; use Twig\Error\LoaderError; use Twig\Loader\ExistsLoaderInterface; @@ -89,7 +89,7 @@ class HIncludeFragmentRenderer extends RoutableFragmentRenderer } // we need to sign the absolute URI, but want to return the path only. - $uri = substr($this->signer->sign($this->generateFragmentUri($uri, $request, true)), strlen($request->getSchemeAndHttpHost())); + $uri = substr($this->signer->sign($this->generateFragmentUri($uri, $request, true)), \strlen($request->getSchemeAndHttpHost())); } // We need to replace ampersands in the URI with the encoded form in order to return valid html/xml content. @@ -102,12 +102,12 @@ 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'] : array(); if (isset($options['id']) && $options['id']) { $attributes['id'] = $options['id']; } $renderedAttributes = ''; - if (count($attributes) > 0) { + if (\count($attributes) > 0) { $flags = ENT_QUOTES | ENT_SUBSTITUTE; foreach ($attributes as $attribute => $value) { $renderedAttributes .= sprintf( @@ -126,7 +126,7 @@ class HIncludeFragmentRenderer extends RoutableFragmentRenderer if ($this->templating instanceof EngineInterface) { try { return $this->templating->exists($template); - } catch (\InvalidArgumentException $e) { + } catch (\Exception $e) { return false; } } diff --git a/vendor/symfony/http-kernel/Fragment/InlineFragmentRenderer.php b/vendor/symfony/http-kernel/Fragment/InlineFragmentRenderer.php index 75cc0781..f523e7c4 100644 --- a/vendor/symfony/http-kernel/Fragment/InlineFragmentRenderer.php +++ b/vendor/symfony/http-kernel/Fragment/InlineFragmentRenderer.php @@ -11,13 +11,14 @@ namespace Symfony\Component\HttpKernel\Fragment; +use Symfony\Component\EventDispatcher\EventDispatcherInterface; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\HttpKernelInterface; use Symfony\Component\HttpKernel\Controller\ControllerReference; -use Symfony\Component\HttpKernel\KernelEvents; use Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent; -use Symfony\Component\EventDispatcher\EventDispatcherInterface; +use Symfony\Component\HttpKernel\HttpCache\SubRequestHandler; +use Symfony\Component\HttpKernel\HttpKernelInterface; +use Symfony\Component\HttpKernel\KernelEvents; /** * Implements the inline rendering strategy where the Request is rendered by the current HTTP kernel. @@ -76,7 +77,7 @@ class InlineFragmentRenderer extends RoutableFragmentRenderer $level = ob_get_level(); try { - return $this->kernel->handle($subRequest, HttpKernelInterface::SUB_REQUEST, false); + 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 @@ -109,15 +110,6 @@ class InlineFragmentRenderer extends RoutableFragmentRenderer $cookies = $request->cookies->all(); $server = $request->server->all(); - if (Request::HEADER_X_FORWARDED_FOR & Request::getTrustedHeaderSet()) { - $currentXForwardedFor = $request->headers->get('X_FORWARDED_FOR', ''); - - $server['HTTP_X_FORWARDED_FOR'] = ($currentXForwardedFor ? $currentXForwardedFor.', ' : '').$request->getClientIp(); - } - - $trustedProxies = Request::getTrustedProxies(); - $server['REMOTE_ADDR'] = $trustedProxies ? reset($trustedProxies) : '127.0.0.1'; - unset($server['HTTP_IF_MODIFIED_SINCE']); unset($server['HTTP_IF_NONE_MATCH']); diff --git a/vendor/symfony/http-kernel/Fragment/RoutableFragmentRenderer.php b/vendor/symfony/http-kernel/Fragment/RoutableFragmentRenderer.php index d7eeb89a..0c1b95d4 100644 --- a/vendor/symfony/http-kernel/Fragment/RoutableFragmentRenderer.php +++ b/vendor/symfony/http-kernel/Fragment/RoutableFragmentRenderer.php @@ -11,8 +11,8 @@ namespace Symfony\Component\HttpKernel\Fragment; -use Symfony\Component\HttpKernel\Controller\ControllerReference; use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpKernel\Controller\ControllerReference; use Symfony\Component\HttpKernel\EventListener\FragmentListener; /** @@ -80,7 +80,7 @@ abstract class RoutableFragmentRenderer implements FragmentRendererInterface private function checkNonScalar($values) { foreach ($values as $key => $value) { - if (is_array($value)) { + if (\is_array($value)) { $this->checkNonScalar($value); } elseif (!is_scalar($value) && null !== $value) { throw new \LogicException(sprintf('Controller attributes cannot contain non-scalar/non-null values (value for key "%s" is not a scalar or null).', $key)); diff --git a/vendor/symfony/http-kernel/HttpCache/Esi.php b/vendor/symfony/http-kernel/HttpCache/Esi.php index d09907ea..69134c71 100644 --- a/vendor/symfony/http-kernel/HttpCache/Esi.php +++ b/vendor/symfony/http-kernel/HttpCache/Esi.php @@ -71,7 +71,7 @@ class Esi extends AbstractSurrogate } $parts = explode(';', $type); - if (!in_array($parts[0], $this->contentTypes)) { + if (!\in_array($parts[0], $this->contentTypes)) { return $response; } diff --git a/vendor/symfony/http-kernel/HttpCache/HttpCache.php b/vendor/symfony/http-kernel/HttpCache/HttpCache.php index aa234f13..fa3be46c 100644 --- a/vendor/symfony/http-kernel/HttpCache/HttpCache.php +++ b/vendor/symfony/http-kernel/HttpCache/HttpCache.php @@ -15,10 +15,10 @@ namespace Symfony\Component\HttpKernel\HttpCache; -use Symfony\Component\HttpKernel\HttpKernelInterface; -use Symfony\Component\HttpKernel\TerminableInterface; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpKernel\HttpKernelInterface; +use Symfony\Component\HttpKernel\TerminableInterface; /** * Cache provides HTTP caching. @@ -370,7 +370,7 @@ class HttpCache implements HttpKernelInterface, TerminableInterface // return the response and not the cache entry if the response is valid but not cached $etag = $response->getEtag(); - if ($etag && in_array($etag, $requestEtags) && !in_array($etag, $cachedEtags)) { + if ($etag && \in_array($etag, $requestEtags) && !\in_array($etag, $cachedEtags)) { return $response; } @@ -444,30 +444,11 @@ class HttpCache implements HttpKernelInterface, TerminableInterface $this->surrogate->addSurrogateCapability($request); } - // modify the X-Forwarded-For header if needed - $forwardedFor = $request->headers->get('X-Forwarded-For'); - if ($forwardedFor) { - $request->headers->set('X-Forwarded-For', $forwardedFor.', '.$request->server->get('REMOTE_ADDR')); - } else { - $request->headers->set('X-Forwarded-For', $request->server->get('REMOTE_ADDR')); - } - - // fix the client IP address by setting it to 127.0.0.1 as HttpCache - // is always called from the same process as the backend. - $request->server->set('REMOTE_ADDR', '127.0.0.1'); - - // make sure HttpCache is a trusted proxy - if (!in_array('127.0.0.1', $trustedProxies = Request::getTrustedProxies())) { - $trustedProxies[] = '127.0.0.1'; - Request::setTrustedProxies($trustedProxies, Request::HEADER_X_FORWARDED_ALL); - } - // always a "master" request (as the real master request can be in cache) - $response = $this->kernel->handle($request, HttpKernelInterface::MASTER_REQUEST, $catch); - // FIXME: we probably need to also catch exceptions if raw === true + $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(), array(500, 502, 503, 504))) { if (null === $age = $entry->headers->getCacheControlDirective('stale-if-error')) { $age = $this->options['stale_if_error']; } @@ -606,7 +587,7 @@ class HttpCache implements HttpKernelInterface, TerminableInterface $response->setContent(ob_get_clean()); $response->headers->remove('X-Body-Eval'); if (!$response->headers->has('Transfer-Encoding')) { - $response->headers->set('Content-Length', strlen($response->getContent())); + $response->headers->set('Content-Length', \strlen($response->getContent())); } } elseif ($response->headers->has('X-Body-File')) { // Response does not include possibly dynamic content (ESI, SSI), so we need @@ -640,7 +621,7 @@ class HttpCache implements HttpKernelInterface, TerminableInterface $key = strtolower(str_replace('HTTP_', '', $key)); if ('cookie' === $key) { - if (count($request->cookies->all())) { + if (\count($request->cookies->all())) { return true; } } elseif ($request->headers->has($key)) { diff --git a/vendor/symfony/http-kernel/HttpCache/Ssi.php b/vendor/symfony/http-kernel/HttpCache/Ssi.php index 3178c335..58df1760 100644 --- a/vendor/symfony/http-kernel/HttpCache/Ssi.php +++ b/vendor/symfony/http-kernel/HttpCache/Ssi.php @@ -58,7 +58,7 @@ class Ssi extends AbstractSurrogate } $parts = explode(';', $type); - if (!in_array($parts[0], $this->contentTypes)) { + if (!\in_array($parts[0], $this->contentTypes)) { return $response; } diff --git a/vendor/symfony/http-kernel/HttpCache/Store.php b/vendor/symfony/http-kernel/HttpCache/Store.php index 5f54dbe6..925ca96f 100644 --- a/vendor/symfony/http-kernel/HttpCache/Store.php +++ b/vendor/symfony/http-kernel/HttpCache/Store.php @@ -66,7 +66,7 @@ class Store implements StoreInterface if (!isset($this->locks[$key])) { $path = $this->getPath($key); - if (!file_exists(dirname($path)) && false === @mkdir(dirname($path), 0777, true) && !is_dir(dirname($path))) { + if (!file_exists(\dirname($path)) && false === @mkdir(\dirname($path), 0777, true) && !is_dir(\dirname($path))) { return $path; } $h = fopen($path, 'cb'); @@ -185,7 +185,7 @@ class Store implements StoreInterface $response->headers->set('X-Content-Digest', $digest); if (!$response->headers->has('Transfer-Encoding')) { - $response->headers->set('Content-Length', strlen($response->getContent())); + $response->headers->set('Content-Length', \strlen($response->getContent())); } } @@ -373,17 +373,17 @@ class Store implements StoreInterface @ftruncate($fp, 0); @fseek($fp, 0); $len = @fwrite($fp, $data); - if (strlen($data) !== $len) { + if (\strlen($data) !== $len) { @ftruncate($fp, 0); return false; } } else { - if (!file_exists(dirname($path)) && false === @mkdir(dirname($path), 0777, true) && !is_dir(dirname($path))) { + if (!file_exists(\dirname($path)) && false === @mkdir(\dirname($path), 0777, true) && !is_dir(\dirname($path))) { return false; } - $tmpFile = tempnam(dirname($path), basename($path)); + $tmpFile = tempnam(\dirname($path), basename($path)); if (false === $fp = @fopen($tmpFile, 'wb')) { @unlink($tmpFile); @@ -410,7 +410,7 @@ class Store implements StoreInterface public function getPath($key) { - return $this->root.DIRECTORY_SEPARATOR.substr($key, 0, 2).DIRECTORY_SEPARATOR.substr($key, 2, 2).DIRECTORY_SEPARATOR.substr($key, 4, 2).DIRECTORY_SEPARATOR.substr($key, 6); + return $this->root.\DIRECTORY_SEPARATOR.substr($key, 0, 2).\DIRECTORY_SEPARATOR.substr($key, 2, 2).\DIRECTORY_SEPARATOR.substr($key, 4, 2).\DIRECTORY_SEPARATOR.substr($key, 6); } /** diff --git a/vendor/symfony/http-kernel/HttpKernel.php b/vendor/symfony/http-kernel/HttpKernel.php index d4ef09e8..06d21005 100644 --- a/vendor/symfony/http-kernel/HttpKernel.php +++ b/vendor/symfony/http-kernel/HttpKernel.php @@ -11,13 +11,15 @@ namespace Symfony\Component\HttpKernel; +use Symfony\Component\EventDispatcher\EventDispatcherInterface; +use Symfony\Component\HttpFoundation\Exception\RequestExceptionInterface; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\RequestStack; +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\Exception\BadRequestHttpException; -use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; -use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface; use Symfony\Component\HttpKernel\Event\FilterControllerEvent; use Symfony\Component\HttpKernel\Event\FilterResponseEvent; use Symfony\Component\HttpKernel\Event\FinishRequestEvent; @@ -25,11 +27,9 @@ 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\HttpFoundation\Exception\RequestExceptionInterface; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\RequestStack; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\EventDispatcher\EventDispatcherInterface; +use Symfony\Component\HttpKernel\Exception\BadRequestHttpException; +use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface; +use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; /** * HttpKernel notifies events to convert a Request object to a Response one. @@ -250,11 +250,11 @@ class HttpKernel implements HttpKernelInterface, TerminableInterface private function varToString($var): string { - if (is_object($var)) { - return sprintf('Object(%s)', get_class($var)); + if (\is_object($var)) { + return sprintf('Object(%s)', \get_class($var)); } - if (is_array($var)) { + if (\is_array($var)) { $a = array(); foreach ($var as $k => $v) { $a[] = sprintf('%s => %s', $k, $this->varToString($v)); @@ -263,7 +263,7 @@ class HttpKernel implements HttpKernelInterface, TerminableInterface return sprintf('Array(%s)', implode(', ', $a)); } - if (is_resource($var)) { + if (\is_resource($var)) { return sprintf('Resource(%s)', get_resource_type($var)); } diff --git a/vendor/symfony/http-kernel/Kernel.php b/vendor/symfony/http-kernel/Kernel.php index 1d5d2227..9404cc0f 100644 --- a/vendor/symfony/http-kernel/Kernel.php +++ b/vendor/symfony/http-kernel/Kernel.php @@ -13,28 +13,28 @@ namespace Symfony\Component\HttpKernel; use Symfony\Bridge\ProxyManager\LazyProxy\Instantiator\RuntimeInstantiator; use Symfony\Bridge\ProxyManager\LazyProxy\PhpDumper\ProxyDumper; +use Symfony\Component\Config\ConfigCache; +use Symfony\Component\Config\Loader\DelegatingLoader; +use Symfony\Component\Config\Loader\LoaderResolver; use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; use Symfony\Component\DependencyInjection\Compiler\PassConfig; -use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\DependencyInjection\Dumper\PhpDumper; -use Symfony\Component\DependencyInjection\Loader\XmlFileLoader; -use Symfony\Component\DependencyInjection\Loader\YamlFileLoader; +use Symfony\Component\DependencyInjection\Loader\ClosureLoader; +use Symfony\Component\DependencyInjection\Loader\DirectoryLoader; +use Symfony\Component\DependencyInjection\Loader\GlobFileLoader; use Symfony\Component\DependencyInjection\Loader\IniFileLoader; use Symfony\Component\DependencyInjection\Loader\PhpFileLoader; -use Symfony\Component\DependencyInjection\Loader\GlobFileLoader; -use Symfony\Component\DependencyInjection\Loader\DirectoryLoader; -use Symfony\Component\DependencyInjection\Loader\ClosureLoader; +use Symfony\Component\DependencyInjection\Loader\XmlFileLoader; +use Symfony\Component\DependencyInjection\Loader\YamlFileLoader; use Symfony\Component\Filesystem\Filesystem; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpKernel\Bundle\BundleInterface; use Symfony\Component\HttpKernel\Config\FileLocator; -use Symfony\Component\HttpKernel\DependencyInjection\MergeExtensionConfigurationPass; use Symfony\Component\HttpKernel\DependencyInjection\AddAnnotatedClassesToCachePass; -use Symfony\Component\Config\Loader\LoaderResolver; -use Symfony\Component\Config\Loader\DelegatingLoader; -use Symfony\Component\Config\ConfigCache; +use Symfony\Component\HttpKernel\DependencyInjection\MergeExtensionConfigurationPass; /** * The Kernel is the heart of the Symfony system. @@ -63,11 +63,11 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl private $requestStackSize = 0; private $resetServices = false; - const VERSION = '4.1.1'; - const VERSION_ID = 40101; + const VERSION = '4.1.4'; + const VERSION_ID = 40104; const MAJOR_VERSION = 4; const MINOR_VERSION = 1; - const RELEASE_VERSION = 1; + const RELEASE_VERSION = 4; const EXTRA_VERSION = ''; const END_OF_MAINTENANCE = '01/2019'; @@ -215,7 +215,7 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl public function getBundle($name) { if (!isset($this->bundles[$name])) { - throw new \InvalidArgumentException(sprintf('Bundle "%s" does not exist or it is not enabled. Maybe you forgot to add it in the registerBundles() method of your %s.php file?', $name, get_class($this))); + throw new \InvalidArgumentException(sprintf('Bundle "%s" does not exist or it is not enabled. Maybe you forgot to add it in the registerBundles() method of your %s.php file?', $name, \get_class($this))); } return $this->bundles[$name]; @@ -268,7 +268,7 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl $resourceBundle = $bundle->getName(); } - if (count($files) > 0) { + if (\count($files) > 0) { return $first && $isResource ? $files[0] : $files; } @@ -313,7 +313,7 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl { if (null === $this->rootDir) { $r = new \ReflectionObject($this); - $this->rootDir = dirname($r->getFileName()); + $this->rootDir = \dirname($r->getFileName()); } return $this->rootDir; @@ -328,12 +328,12 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl { if (null === $this->projectDir) { $r = new \ReflectionObject($this); - $dir = $rootDir = dirname($r->getFileName()); + $dir = $rootDir = \dirname($r->getFileName()); while (!file_exists($dir.'/composer.json')) { - if ($dir === dirname($dir)) { + if ($dir === \dirname($dir)) { return $this->projectDir = $rootDir; } - $dir = dirname($dir); + $dir = \dirname($dir); } $this->projectDir = $dir; } @@ -481,7 +481,7 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl if ($this->debug) { $collectedLogs = array(); - $previousHandler = defined('PHPUNIT_COMPOSER_INSTALL'); + $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) { return $previousHandler ? $previousHandler($type, $message, $file, $line) : false; @@ -497,7 +497,7 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl // Clean the trace by removing first frames added by the error handler itself. for ($i = 0; isset($backtrace[$i]); ++$i) { if (isset($backtrace[$i]['file'], $backtrace[$i]['line']) && $backtrace[$i]['line'] === $line && $backtrace[$i]['file'] === $file) { - $backtrace = array_slice($backtrace, 1 + $i); + $backtrace = \array_slice($backtrace, 1 + $i); break; } } @@ -536,20 +536,20 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl error_reporting($errorLevel); } } - $oldContainer = is_object($oldContainer) ? new \ReflectionClass($oldContainer) : false; + $oldContainer = \is_object($oldContainer) ? new \ReflectionClass($oldContainer) : false; $this->dumpContainer($cache, $container, $class, $this->getContainerBaseClass()); $this->container = require $cache->getPath(); $this->container->set('kernel', $this); - if ($oldContainer && get_class($this->container) !== $oldContainer->name) { + if ($oldContainer && \get_class($this->container) !== $oldContainer->name) { // 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(); - $oldContainerDir = dirname($oldContainer->getFileName()); + $oldContainerDir = \dirname($oldContainer->getFileName()); $legacyContainers[$oldContainerDir.'.legacy'] = true; - foreach (glob(dirname($oldContainerDir).DIRECTORY_SEPARATOR.'*.legacy') as $legacyContainer) { + foreach (glob(\dirname($oldContainerDir).\DIRECTORY_SEPARATOR.'*.legacy') as $legacyContainer) { if (!isset($legacyContainers[$legacyContainer]) && @unlink($legacyContainer)) { (new Filesystem())->remove(substr($legacyContainer, 0, -7)); } @@ -574,7 +574,7 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl $bundlesMetadata = array(); foreach ($this->bundles as $name => $bundle) { - $bundles[$name] = get_class($bundle); + $bundles[$name] = \get_class($bundle); $bundlesMetadata[$name] = array( 'path' => $bundle->getPath(), 'namespace' => $bundle->getNamespace(), @@ -705,14 +705,14 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl )); $rootCode = array_pop($content); - $dir = dirname($cache->getPath()).'/'; + $dir = \dirname($cache->getPath()).'/'; $fs = new Filesystem(); foreach ($content as $file => $code) { $fs->dumpFile($dir.$file, $code); @chmod($dir.$file, 0666 & ~umask()); } - @unlink(dirname($dir.$file).'.legacy'); + @unlink(\dirname($dir.$file).'.legacy'); $cache->write($rootCode, $container->getResources()); } @@ -750,7 +750,7 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl */ public static function stripComments($source) { - if (!function_exists('token_get_all')) { + if (!\function_exists('token_get_all')) { return $source; } @@ -778,7 +778,7 @@ 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))) { + } elseif (\in_array($token[0], array(T_COMMENT, T_DOC_COMMENT))) { $ignoreSpace = true; } else { $rawChunk .= $token[1]; diff --git a/vendor/symfony/http-kernel/KernelInterface.php b/vendor/symfony/http-kernel/KernelInterface.php index 925e37b0..b9904078 100644 --- a/vendor/symfony/http-kernel/KernelInterface.php +++ b/vendor/symfony/http-kernel/KernelInterface.php @@ -11,9 +11,9 @@ namespace Symfony\Component\HttpKernel; +use Symfony\Component\Config\Loader\LoaderInterface; use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\HttpKernel\Bundle\BundleInterface; -use Symfony\Component\Config\Loader\LoaderInterface; /** * The Kernel is the heart of the Symfony system. diff --git a/vendor/symfony/http-kernel/Log/Logger.php b/vendor/symfony/http-kernel/Log/Logger.php index bf6ab492..8b671d84 100644 --- a/vendor/symfony/http-kernel/Log/Logger.php +++ b/vendor/symfony/http-kernel/Log/Logger.php @@ -58,7 +58,7 @@ class Logger extends AbstractLogger $this->minLevelIndex = self::$levels[$minLevel]; $this->formatter = $formatter ?: array($this, 'format'); - if (false === $this->handle = is_resource($output) ? $output : @fopen($output, 'a')) { + if (false === $this->handle = \is_resource($output) ? $output : @fopen($output, 'a')) { throw new InvalidArgumentException(sprintf('Unable to open "%s".', $output)); } } diff --git a/vendor/symfony/http-kernel/Profiler/FileProfilerStorage.php b/vendor/symfony/http-kernel/Profiler/FileProfilerStorage.php index d7179e12..955afed5 100644 --- a/vendor/symfony/http-kernel/Profiler/FileProfilerStorage.php +++ b/vendor/symfony/http-kernel/Profiler/FileProfilerStorage.php @@ -59,7 +59,7 @@ class FileProfilerStorage implements ProfilerStorageInterface fseek($file, 0, SEEK_END); $result = array(); - while (count($result) < $limit && $line = $this->readLineFromFile($file)) { + while (\count($result) < $limit && $line = $this->readLineFromFile($file)) { $values = str_getcsv($line); list($csvToken, $csvIp, $csvMethod, $csvUrl, $csvTime, $csvParent, $csvStatusCode) = $values; $csvTime = (int) $csvTime; @@ -134,7 +134,7 @@ class FileProfilerStorage implements ProfilerStorageInterface $profileIndexed = is_file($file); if (!$profileIndexed) { // Create directory - $dir = dirname($file); + $dir = \dirname($file); if (!is_dir($dir) && false === @mkdir($dir, 0777, true) && !is_dir($dir)) { throw new \RuntimeException(sprintf('Unable to create the storage directory (%s).', $dir)); } diff --git a/vendor/symfony/http-kernel/Profiler/Profiler.php b/vendor/symfony/http-kernel/Profiler/Profiler.php index a97d63b0..b4b0681b 100644 --- a/vendor/symfony/http-kernel/Profiler/Profiler.php +++ b/vendor/symfony/http-kernel/Profiler/Profiler.php @@ -11,12 +11,12 @@ namespace Symfony\Component\HttpKernel\Profiler; +use Psr\Log\LoggerInterface; use Symfony\Component\HttpFoundation\Exception\ConflictingHeadersException; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpKernel\DataCollector\DataCollectorInterface; use Symfony\Component\HttpKernel\DataCollector\LateDataCollectorInterface; -use Psr\Log\LoggerInterface; /** * Profiler. @@ -100,7 +100,7 @@ class Profiler } 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.', array('configured_storage' => \get_class($this->storage))); } return $ret; diff --git a/vendor/symfony/http-kernel/Tests/CacheClearer/Psr6CacheClearerTest.php b/vendor/symfony/http-kernel/Tests/CacheClearer/Psr6CacheClearerTest.php index 588fd300..e1d2fe82 100644 --- a/vendor/symfony/http-kernel/Tests/CacheClearer/Psr6CacheClearerTest.php +++ b/vendor/symfony/http-kernel/Tests/CacheClearer/Psr6CacheClearerTest.php @@ -12,8 +12,8 @@ namespace Symfony\Component\HttpKernel\Tests\CacheClearer; use PHPUnit\Framework\TestCase; -use Symfony\Component\HttpKernel\CacheClearer\Psr6CacheClearer; use Psr\Cache\CacheItemPoolInterface; +use Symfony\Component\HttpKernel\CacheClearer\Psr6CacheClearer; class Psr6CacheClearerTest extends TestCase { diff --git a/vendor/symfony/http-kernel/Tests/CacheWarmer/CacheWarmerTest.php b/vendor/symfony/http-kernel/Tests/CacheWarmer/CacheWarmerTest.php index 05666cb0..4d34e7bf 100644 --- a/vendor/symfony/http-kernel/Tests/CacheWarmer/CacheWarmerTest.php +++ b/vendor/symfony/http-kernel/Tests/CacheWarmer/CacheWarmerTest.php @@ -31,7 +31,7 @@ class CacheWarmerTest extends TestCase public function testWriteCacheFileCreatesTheFile() { $warmer = new TestCacheWarmer(self::$cacheFile); - $warmer->warmUp(dirname(self::$cacheFile)); + $warmer->warmUp(\dirname(self::$cacheFile)); $this->assertFileExists(self::$cacheFile); } @@ -43,7 +43,7 @@ class CacheWarmerTest extends TestCase { $nonWritableFile = '/this/file/is/very/probably/not/writable'; $warmer = new TestCacheWarmer($nonWritableFile); - $warmer->warmUp(dirname($nonWritableFile)); + $warmer->warmUp(\dirname($nonWritableFile)); } } diff --git a/vendor/symfony/http-kernel/Tests/ClientTest.php b/vendor/symfony/http-kernel/Tests/ClientTest.php index 08989fb0..17cbe368 100644 --- a/vendor/symfony/http-kernel/Tests/ClientTest.php +++ b/vendor/symfony/http-kernel/Tests/ClientTest.php @@ -12,11 +12,11 @@ namespace Symfony\Component\HttpKernel\Tests; use PHPUnit\Framework\TestCase; -use Symfony\Component\HttpKernel\Client; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpFoundation\StreamedResponse; use Symfony\Component\HttpFoundation\Cookie; use Symfony\Component\HttpFoundation\File\UploadedFile; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpFoundation\StreamedResponse; +use Symfony\Component\HttpKernel\Client; use Symfony\Component\HttpKernel\Tests\Fixtures\TestClient; /** @@ -119,7 +119,7 @@ class ClientTest extends TestCase $this->assertEquals(1, $file->getSize()); } - $file->move(dirname($target), basename($target)); + $file->move(\dirname($target), basename($target)); $this->assertFileExists($target); unlink($target); diff --git a/vendor/symfony/http-kernel/Tests/Controller/ArgumentResolverTest.php b/vendor/symfony/http-kernel/Tests/Controller/ArgumentResolverTest.php index 6a5926f8..bb4e0661 100644 --- a/vendor/symfony/http-kernel/Tests/Controller/ArgumentResolverTest.php +++ b/vendor/symfony/http-kernel/Tests/Controller/ArgumentResolverTest.php @@ -12,6 +12,7 @@ namespace Symfony\Component\HttpKernel\Tests\Controller; use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Session\Session; use Symfony\Component\HttpFoundation\Session\SessionInterface; use Symfony\Component\HttpFoundation\Session\Storage\MockArraySessionStorage; @@ -23,7 +24,6 @@ use Symfony\Component\HttpKernel\Tests\Fixtures\Controller\ExtendingRequest; use Symfony\Component\HttpKernel\Tests\Fixtures\Controller\ExtendingSession; use Symfony\Component\HttpKernel\Tests\Fixtures\Controller\NullableController; use Symfony\Component\HttpKernel\Tests\Fixtures\Controller\VariadicController; -use Symfony\Component\HttpFoundation\Request; class ArgumentResolverTest extends TestCase { diff --git a/vendor/symfony/http-kernel/Tests/Controller/ControllerResolverTest.php b/vendor/symfony/http-kernel/Tests/Controller/ControllerResolverTest.php index a9ba9274..fe624f7b 100644 --- a/vendor/symfony/http-kernel/Tests/Controller/ControllerResolverTest.php +++ b/vendor/symfony/http-kernel/Tests/Controller/ControllerResolverTest.php @@ -13,8 +13,8 @@ namespace Symfony\Component\HttpKernel\Tests\Controller; use PHPUnit\Framework\TestCase; use Psr\Log\LoggerInterface; -use Symfony\Component\HttpKernel\Controller\ControllerResolver; use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpKernel\Controller\ControllerResolver; class ControllerResolverTest extends TestCase { @@ -146,8 +146,8 @@ class ControllerResolverTest extends TestCase public function getStaticControllers() { return array( - array(AbstractController::class.'::staticAction', 'foo'), - array(array(AbstractController::class, 'staticAction'), 'foo'), + array(TestAbstractController::class.'::staticAction', 'foo'), + array(array(TestAbstractController::class, 'staticAction'), 'foo'), array(PrivateConstructorController::class.'::staticAction', 'bar'), array(array(PrivateConstructorController::class, 'staticAction'), 'bar'), ); @@ -238,7 +238,7 @@ class InvokableController } } -abstract class AbstractController +abstract class TestAbstractController { public static function staticAction() { diff --git a/vendor/symfony/http-kernel/Tests/DataCollector/ConfigDataCollectorTest.php b/vendor/symfony/http-kernel/Tests/DataCollector/ConfigDataCollectorTest.php index 4fb36afd..a99e34ad 100644 --- a/vendor/symfony/http-kernel/Tests/DataCollector/ConfigDataCollectorTest.php +++ b/vendor/symfony/http-kernel/Tests/DataCollector/ConfigDataCollectorTest.php @@ -12,11 +12,11 @@ namespace Symfony\Component\HttpKernel\Tests\DataCollector; use PHPUnit\Framework\TestCase; -use Symfony\Component\HttpKernel\DataCollector\ConfigDataCollector; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Config\Loader\LoaderInterface; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpKernel\DataCollector\ConfigDataCollector; +use Symfony\Component\HttpKernel\Kernel; class ConfigDataCollectorTest extends TestCase { @@ -38,9 +38,9 @@ class ConfigDataCollectorTest extends TestCase $this->assertSame(date_default_timezone_get(), $c->getPhpTimezone()); $this->assertSame(Kernel::VERSION, $c->getSymfonyVersion()); $this->assertNull($c->getToken()); - $this->assertSame(extension_loaded('xdebug'), $c->hasXDebug()); - $this->assertSame(extension_loaded('Zend OPcache') && ini_get('opcache.enable'), $c->hasZendOpcache()); - $this->assertSame(extension_loaded('apcu') && ini_get('apc.enabled'), $c->hasApcu()); + $this->assertSame(\extension_loaded('xdebug'), $c->hasXDebug()); + $this->assertSame(\extension_loaded('Zend OPcache') && ini_get('opcache.enable'), $c->hasZendOpcache()); + $this->assertSame(\extension_loaded('apcu') && ini_get('apc.enabled'), $c->hasApcu()); } } diff --git a/vendor/symfony/http-kernel/Tests/DataCollector/ExceptionDataCollectorTest.php b/vendor/symfony/http-kernel/Tests/DataCollector/ExceptionDataCollectorTest.php index 178f1f01..1e8d186c 100644 --- a/vendor/symfony/http-kernel/Tests/DataCollector/ExceptionDataCollectorTest.php +++ b/vendor/symfony/http-kernel/Tests/DataCollector/ExceptionDataCollectorTest.php @@ -13,9 +13,9 @@ namespace Symfony\Component\HttpKernel\Tests\DataCollector; use PHPUnit\Framework\TestCase; use Symfony\Component\Debug\Exception\FlattenException; -use Symfony\Component\HttpKernel\DataCollector\ExceptionDataCollector; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpKernel\DataCollector\ExceptionDataCollector; class ExceptionDataCollectorTest extends TestCase { diff --git a/vendor/symfony/http-kernel/Tests/DataCollector/MemoryDataCollectorTest.php b/vendor/symfony/http-kernel/Tests/DataCollector/MemoryDataCollectorTest.php index ab78e9e8..1435d05e 100644 --- a/vendor/symfony/http-kernel/Tests/DataCollector/MemoryDataCollectorTest.php +++ b/vendor/symfony/http-kernel/Tests/DataCollector/MemoryDataCollectorTest.php @@ -12,9 +12,9 @@ namespace Symfony\Component\HttpKernel\Tests\DataCollector; use PHPUnit\Framework\TestCase; -use Symfony\Component\HttpKernel\DataCollector\MemoryDataCollector; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpKernel\DataCollector\MemoryDataCollector; class MemoryDataCollectorTest extends TestCase { diff --git a/vendor/symfony/http-kernel/Tests/DataCollector/RequestDataCollectorTest.php b/vendor/symfony/http-kernel/Tests/DataCollector/RequestDataCollectorTest.php index 69bef76d..cce08e27 100644 --- a/vendor/symfony/http-kernel/Tests/DataCollector/RequestDataCollectorTest.php +++ b/vendor/symfony/http-kernel/Tests/DataCollector/RequestDataCollectorTest.php @@ -12,20 +12,20 @@ namespace Symfony\Component\HttpKernel\Tests\DataCollector; use PHPUnit\Framework\TestCase; +use Symfony\Component\EventDispatcher\EventDispatcher; +use Symfony\Component\HttpFoundation\Cookie; use Symfony\Component\HttpFoundation\ParameterBag; use Symfony\Component\HttpFoundation\RedirectResponse; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\Session\Session; use Symfony\Component\HttpFoundation\Session\Storage\MockArraySessionStorage; use Symfony\Component\HttpKernel\Controller\ArgumentResolverInterface; +use Symfony\Component\HttpKernel\DataCollector\RequestDataCollector; +use Symfony\Component\HttpKernel\Event\FilterControllerEvent; use Symfony\Component\HttpKernel\Event\FilterResponseEvent; use Symfony\Component\HttpKernel\HttpKernel; use Symfony\Component\HttpKernel\HttpKernelInterface; -use Symfony\Component\HttpKernel\DataCollector\RequestDataCollector; -use Symfony\Component\HttpKernel\Event\FilterControllerEvent; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpFoundation\Cookie; -use Symfony\Component\EventDispatcher\EventDispatcher; class RequestDataCollectorTest extends TestCase { diff --git a/vendor/symfony/http-kernel/Tests/DataCollector/TimeDataCollectorTest.php b/vendor/symfony/http-kernel/Tests/DataCollector/TimeDataCollectorTest.php index 8048cc37..cf6a8669 100644 --- a/vendor/symfony/http-kernel/Tests/DataCollector/TimeDataCollectorTest.php +++ b/vendor/symfony/http-kernel/Tests/DataCollector/TimeDataCollectorTest.php @@ -12,9 +12,9 @@ namespace Symfony\Component\HttpKernel\Tests\DataCollector; use PHPUnit\Framework\TestCase; -use Symfony\Component\HttpKernel\DataCollector\TimeDataCollector; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpKernel\DataCollector\TimeDataCollector; /** * @group time-sensitive diff --git a/vendor/symfony/http-kernel/Tests/Debug/FileLinkFormatterTest.php b/vendor/symfony/http-kernel/Tests/Debug/FileLinkFormatterTest.php index d616098a..e14780ac 100644 --- a/vendor/symfony/http-kernel/Tests/Debug/FileLinkFormatterTest.php +++ b/vendor/symfony/http-kernel/Tests/Debug/FileLinkFormatterTest.php @@ -27,7 +27,7 @@ class FileLinkFormatterTest extends TestCase public function testWhenFileLinkFormatAndNoRequest() { - $file = __DIR__.DIRECTORY_SEPARATOR.'file.php'; + $file = __DIR__.\DIRECTORY_SEPARATOR.'file.php'; $sut = new FileLinkFormatter('debug://open?url=file://%f&line=%l', new RequestStack()); @@ -36,7 +36,7 @@ class FileLinkFormatterTest extends TestCase public function testWhenFileLinkFormatAndRequest() { - $file = __DIR__.DIRECTORY_SEPARATOR.'file.php'; + $file = __DIR__.\DIRECTORY_SEPARATOR.'file.php'; $baseDir = __DIR__; $requestStack = new RequestStack(); $request = new Request(); @@ -49,7 +49,7 @@ class FileLinkFormatterTest extends TestCase public function testWhenNoFileLinkFormatAndRequest() { - $file = __DIR__.DIRECTORY_SEPARATOR.'file.php'; + $file = __DIR__.\DIRECTORY_SEPARATOR.'file.php'; $requestStack = new RequestStack(); $request = new Request(); $requestStack->push($request); diff --git a/vendor/symfony/http-kernel/Tests/Debug/TraceableEventDispatcherTest.php b/vendor/symfony/http-kernel/Tests/Debug/TraceableEventDispatcherTest.php index aaa82d52..3de147c7 100644 --- a/vendor/symfony/http-kernel/Tests/Debug/TraceableEventDispatcherTest.php +++ b/vendor/symfony/http-kernel/Tests/Debug/TraceableEventDispatcherTest.php @@ -13,11 +13,11 @@ namespace Symfony\Component\HttpKernel\Tests\Debug; use PHPUnit\Framework\TestCase; use Symfony\Component\EventDispatcher\EventDispatcher; +use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\RequestStack; +use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpKernel\Debug\TraceableEventDispatcher; use Symfony\Component\HttpKernel\HttpKernel; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Stopwatch\Stopwatch; class TraceableEventDispatcherTest extends TestCase diff --git a/vendor/symfony/http-kernel/Tests/DependencyInjection/LazyLoadingFragmentHandlerTest.php b/vendor/symfony/http-kernel/Tests/DependencyInjection/LazyLoadingFragmentHandlerTest.php index 7e664954..2bc84a53 100644 --- a/vendor/symfony/http-kernel/Tests/DependencyInjection/LazyLoadingFragmentHandlerTest.php +++ b/vendor/symfony/http-kernel/Tests/DependencyInjection/LazyLoadingFragmentHandlerTest.php @@ -12,9 +12,9 @@ namespace Symfony\Component\HttpKernel\Tests\DependencyInjection; use PHPUnit\Framework\TestCase; -use Symfony\Component\HttpKernel\DependencyInjection\LazyLoadingFragmentHandler; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpKernel\DependencyInjection\LazyLoadingFragmentHandler; class LazyLoadingFragmentHandlerTest extends TestCase { diff --git a/vendor/symfony/http-kernel/Tests/DependencyInjection/LoggerPassTest.php b/vendor/symfony/http-kernel/Tests/DependencyInjection/LoggerPassTest.php index b199e11d..cb504877 100644 --- a/vendor/symfony/http-kernel/Tests/DependencyInjection/LoggerPassTest.php +++ b/vendor/symfony/http-kernel/Tests/DependencyInjection/LoggerPassTest.php @@ -13,9 +13,9 @@ namespace Symfony\Component\HttpKernel\Tests\DependencyInjection; use PHPUnit\Framework\TestCase; use Psr\Log\LoggerInterface; +use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\HttpKernel\DependencyInjection\LoggerPass; use Symfony\Component\HttpKernel\Log\Logger; -use Symfony\Component\DependencyInjection\ContainerBuilder; /** * @author Kévin Dunglas diff --git a/vendor/symfony/http-kernel/Tests/DependencyInjection/RegisterControllerArgumentLocatorsPassTest.php b/vendor/symfony/http-kernel/Tests/DependencyInjection/RegisterControllerArgumentLocatorsPassTest.php index 98c77f4a..6c036e88 100644 --- a/vendor/symfony/http-kernel/Tests/DependencyInjection/RegisterControllerArgumentLocatorsPassTest.php +++ b/vendor/symfony/http-kernel/Tests/DependencyInjection/RegisterControllerArgumentLocatorsPassTest.php @@ -13,13 +13,14 @@ namespace Symfony\Component\HttpKernel\Tests\DependencyInjection; use PHPUnit\Framework\TestCase; use Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument; +use Symfony\Component\DependencyInjection\ChildDefinition; use Symfony\Component\DependencyInjection\ContainerAwareInterface; use Symfony\Component\DependencyInjection\ContainerAwareTrait; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\ContainerInterface; +use Symfony\Component\DependencyInjection\Reference; use Symfony\Component\DependencyInjection\ServiceLocator; use Symfony\Component\DependencyInjection\TypedReference; -use Symfony\Component\DependencyInjection\Reference; use Symfony\Component\HttpKernel\DependencyInjection\RegisterControllerArgumentLocatorsPass; class RegisterControllerArgumentLocatorsPassTest extends TestCase @@ -339,6 +340,29 @@ class RegisterControllerArgumentLocatorsPassTest extends TestCase $this->assertTrue($container->has((string) $reference)); $this->assertSame('foo_val', $container->get((string) $reference)); } + + public function testBindingsOnChildDefinitions() + { + $container = new ContainerBuilder(); + $resolver = $container->register('argument_resolver.service')->addArgument(array()); + + $container->register('parent', ArgumentWithoutTypeController::class); + + $container->setDefinition('child', (new ChildDefinition('parent')) + ->setBindings(array('$someArg' => new Reference('parent'))) + ->addTag('controller.service_arguments') + ); + + $pass = new RegisterControllerArgumentLocatorsPass(); + $pass->process($container); + + $locator = $container->getDefinition((string) $resolver->getArgument(0))->getArgument(0); + $this->assertInstanceOf(ServiceClosureArgument::class, $locator['child::fooAction']); + + $locator = $container->getDefinition((string) $locator['child::fooAction']->getValues()[0])->getArgument(0); + $this->assertInstanceOf(ServiceClosureArgument::class, $locator['someArg']); + $this->assertEquals(new Reference('parent'), $locator['someArg']->getValues()[0]); + } } class RegisterTestController diff --git a/vendor/symfony/http-kernel/Tests/Event/FilterControllerArgumentsEventTest.php b/vendor/symfony/http-kernel/Tests/Event/FilterControllerArgumentsEventTest.php index 9165d31f..f1e440b2 100644 --- a/vendor/symfony/http-kernel/Tests/Event/FilterControllerArgumentsEventTest.php +++ b/vendor/symfony/http-kernel/Tests/Event/FilterControllerArgumentsEventTest.php @@ -2,9 +2,9 @@ namespace Symfony\Component\HttpKernel\Tests\Event; +use PHPUnit\Framework\TestCase; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpKernel\Event\FilterControllerArgumentsEvent; -use PHPUnit\Framework\TestCase; use Symfony\Component\HttpKernel\Tests\TestHttpKernel; class FilterControllerArgumentsEventTest extends TestCase diff --git a/vendor/symfony/http-kernel/Tests/EventListener/AddRequestFormatsListenerTest.php b/vendor/symfony/http-kernel/Tests/EventListener/AddRequestFormatsListenerTest.php index f4878f62..3ffb9f3d 100644 --- a/vendor/symfony/http-kernel/Tests/EventListener/AddRequestFormatsListenerTest.php +++ b/vendor/symfony/http-kernel/Tests/EventListener/AddRequestFormatsListenerTest.php @@ -12,8 +12,8 @@ namespace Symfony\Component\HttpKernel\Tests\EventListener; use PHPUnit\Framework\TestCase; -use Symfony\Component\HttpKernel\EventListener\AddRequestFormatsListener; use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpKernel\EventListener\AddRequestFormatsListener; use Symfony\Component\HttpKernel\KernelEvents; /** diff --git a/vendor/symfony/http-kernel/Tests/EventListener/DebugHandlersListenerTest.php b/vendor/symfony/http-kernel/Tests/EventListener/DebugHandlersListenerTest.php index 467b8dde..9a9c17ed 100644 --- a/vendor/symfony/http-kernel/Tests/EventListener/DebugHandlersListenerTest.php +++ b/vendor/symfony/http-kernel/Tests/EventListener/DebugHandlersListenerTest.php @@ -13,9 +13,9 @@ namespace Symfony\Component\HttpKernel\Tests\EventListener; use PHPUnit\Framework\TestCase; use Psr\Log\LogLevel; -use Symfony\Component\Console\Event\ConsoleEvent; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\ConsoleEvents; +use Symfony\Component\Console\Event\ConsoleEvent; use Symfony\Component\Console\Helper\HelperSet; use Symfony\Component\Console\Input\ArgvInput; use Symfony\Component\Console\Output\ConsoleOutput; diff --git a/vendor/symfony/http-kernel/Tests/EventListener/ExceptionListenerTest.php b/vendor/symfony/http-kernel/Tests/EventListener/ExceptionListenerTest.php index 330dbe97..5743696c 100644 --- a/vendor/symfony/http-kernel/Tests/EventListener/ExceptionListenerTest.php +++ b/vendor/symfony/http-kernel/Tests/EventListener/ExceptionListenerTest.php @@ -13,14 +13,14 @@ namespace Symfony\Component\HttpKernel\Tests\EventListener; use PHPUnit\Framework\TestCase; use Symfony\Component\EventDispatcher\EventDispatcher; -use Symfony\Component\HttpKernel\Event\FilterResponseEvent; -use Symfony\Component\HttpKernel\HttpKernelInterface; -use Symfony\Component\HttpKernel\EventListener\ExceptionListener; -use Symfony\Component\HttpKernel\KernelEvents; -use Symfony\Component\HttpKernel\Log\DebugLoggerInterface; -use Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent; 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\EventListener\ExceptionListener; +use Symfony\Component\HttpKernel\HttpKernelInterface; +use Symfony\Component\HttpKernel\KernelEvents; +use Symfony\Component\HttpKernel\Log\DebugLoggerInterface; use Symfony\Component\HttpKernel\Tests\Logger; /** @@ -37,9 +37,9 @@ class ExceptionListenerTest extends TestCase $logger = new TestLogger(); $l = new ExceptionListener('foo', $logger); - $_logger = new \ReflectionProperty(get_class($l), 'logger'); + $_logger = new \ReflectionProperty(\get_class($l), 'logger'); $_logger->setAccessible(true); - $_controller = new \ReflectionProperty(get_class($l), 'controller'); + $_controller = new \ReflectionProperty(\get_class($l), 'controller'); $_controller->setAccessible(true); $this->assertSame($logger, $_logger->getValue($l)); @@ -161,7 +161,7 @@ class TestLogger extends Logger implements DebugLoggerInterface { public function countErrors() { - return count($this->logs['critical']); + return \count($this->logs['critical']); } } diff --git a/vendor/symfony/http-kernel/Tests/EventListener/FragmentListenerTest.php b/vendor/symfony/http-kernel/Tests/EventListener/FragmentListenerTest.php index 464b2ab4..edf04982 100644 --- a/vendor/symfony/http-kernel/Tests/EventListener/FragmentListenerTest.php +++ b/vendor/symfony/http-kernel/Tests/EventListener/FragmentListenerTest.php @@ -12,10 +12,10 @@ namespace Symfony\Component\HttpKernel\Tests\EventListener; use PHPUnit\Framework\TestCase; -use Symfony\Component\HttpKernel\EventListener\FragmentListener; use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpKernel\HttpKernelInterface; use Symfony\Component\HttpKernel\Event\GetResponseEvent; +use Symfony\Component\HttpKernel\EventListener\FragmentListener; +use Symfony\Component\HttpKernel\HttpKernelInterface; use Symfony\Component\HttpKernel\UriSigner; class FragmentListenerTest extends TestCase diff --git a/vendor/symfony/http-kernel/Tests/EventListener/LocaleListenerTest.php b/vendor/symfony/http-kernel/Tests/EventListener/LocaleListenerTest.php index 332393ee..f442235a 100644 --- a/vendor/symfony/http-kernel/Tests/EventListener/LocaleListenerTest.php +++ b/vendor/symfony/http-kernel/Tests/EventListener/LocaleListenerTest.php @@ -13,9 +13,9 @@ namespace Symfony\Component\HttpKernel\Tests\EventListener; use PHPUnit\Framework\TestCase; use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpKernel\Event\GetResponseEvent; use Symfony\Component\HttpKernel\EventListener\LocaleListener; use Symfony\Component\HttpKernel\HttpKernelInterface; -use Symfony\Component\HttpKernel\Event\GetResponseEvent; class LocaleListenerTest extends TestCase { diff --git a/vendor/symfony/http-kernel/Tests/EventListener/ProfilerListenerTest.php b/vendor/symfony/http-kernel/Tests/EventListener/ProfilerListenerTest.php index 751aee86..526b3aa7 100644 --- a/vendor/symfony/http-kernel/Tests/EventListener/ProfilerListenerTest.php +++ b/vendor/symfony/http-kernel/Tests/EventListener/ProfilerListenerTest.php @@ -13,10 +13,10 @@ namespace Symfony\Component\HttpKernel\Tests\EventListener; use PHPUnit\Framework\TestCase; use Symfony\Component\HttpFoundation\RequestStack; -use Symfony\Component\HttpKernel\EventListener\ProfilerListener; use Symfony\Component\HttpKernel\Event\FilterResponseEvent; use Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent; use Symfony\Component\HttpKernel\Event\PostResponseEvent; +use Symfony\Component\HttpKernel\EventListener\ProfilerListener; use Symfony\Component\HttpKernel\Exception\HttpException; use Symfony\Component\HttpKernel\Kernel; diff --git a/vendor/symfony/http-kernel/Tests/EventListener/ResponseListenerTest.php b/vendor/symfony/http-kernel/Tests/EventListener/ResponseListenerTest.php index 12a31eb3..1d896026 100644 --- a/vendor/symfony/http-kernel/Tests/EventListener/ResponseListenerTest.php +++ b/vendor/symfony/http-kernel/Tests/EventListener/ResponseListenerTest.php @@ -12,13 +12,13 @@ namespace Symfony\Component\HttpKernel\Tests\EventListener; use PHPUnit\Framework\TestCase; -use Symfony\Component\HttpKernel\EventListener\ResponseListener; +use Symfony\Component\EventDispatcher\EventDispatcher; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\HttpKernelInterface; use Symfony\Component\HttpKernel\Event\FilterResponseEvent; +use Symfony\Component\HttpKernel\EventListener\ResponseListener; +use Symfony\Component\HttpKernel\HttpKernelInterface; use Symfony\Component\HttpKernel\KernelEvents; -use Symfony\Component\EventDispatcher\EventDispatcher; class ResponseListenerTest extends TestCase { diff --git a/vendor/symfony/http-kernel/Tests/EventListener/RouterListenerTest.php b/vendor/symfony/http-kernel/Tests/EventListener/RouterListenerTest.php index 2668ede8..92e72729 100644 --- a/vendor/symfony/http-kernel/Tests/EventListener/RouterListenerTest.php +++ b/vendor/symfony/http-kernel/Tests/EventListener/RouterListenerTest.php @@ -18,12 +18,12 @@ use Symfony\Component\HttpFoundation\RequestStack; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpKernel\Controller\ArgumentResolver; use Symfony\Component\HttpKernel\Controller\ControllerResolver; +use Symfony\Component\HttpKernel\Event\GetResponseEvent; use Symfony\Component\HttpKernel\EventListener\ExceptionListener; use Symfony\Component\HttpKernel\EventListener\RouterListener; use Symfony\Component\HttpKernel\EventListener\ValidateRequestListener; -use Symfony\Component\HttpKernel\HttpKernelInterface; use Symfony\Component\HttpKernel\HttpKernel; -use Symfony\Component\HttpKernel\Event\GetResponseEvent; +use Symfony\Component\HttpKernel\HttpKernelInterface; use Symfony\Component\Routing\Exception\NoConfigurationException; use Symfony\Component\Routing\RequestContext; diff --git a/vendor/symfony/http-kernel/Tests/EventListener/SessionListenerTest.php b/vendor/symfony/http-kernel/Tests/EventListener/SessionListenerTest.php index 3bf97b7f..03fb3763 100644 --- a/vendor/symfony/http-kernel/Tests/EventListener/SessionListenerTest.php +++ b/vendor/symfony/http-kernel/Tests/EventListener/SessionListenerTest.php @@ -17,9 +17,9 @@ use Symfony\Component\DependencyInjection\ServiceLocator; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\Session\Session; -use Symfony\Component\HttpKernel\Event\GetResponseEvent; use Symfony\Component\HttpKernel\Event\FilterResponseEvent; use Symfony\Component\HttpKernel\Event\FinishRequestEvent; +use Symfony\Component\HttpKernel\Event\GetResponseEvent; use Symfony\Component\HttpKernel\EventListener\AbstractSessionListener; use Symfony\Component\HttpKernel\EventListener\SessionListener; use Symfony\Component\HttpKernel\HttpKernelInterface; diff --git a/vendor/symfony/http-kernel/Tests/EventListener/SurrogateListenerTest.php b/vendor/symfony/http-kernel/Tests/EventListener/SurrogateListenerTest.php index 1e79ebe0..b955c07d 100644 --- a/vendor/symfony/http-kernel/Tests/EventListener/SurrogateListenerTest.php +++ b/vendor/symfony/http-kernel/Tests/EventListener/SurrogateListenerTest.php @@ -12,14 +12,14 @@ namespace Symfony\Component\HttpKernel\Tests\EventListener; use PHPUnit\Framework\TestCase; -use Symfony\Component\HttpKernel\HttpCache\Esi; -use Symfony\Component\HttpKernel\EventListener\SurrogateListener; -use Symfony\Component\HttpKernel\Event\FilterResponseEvent; -use Symfony\Component\HttpKernel\KernelEvents; -use Symfony\Component\HttpKernel\HttpKernelInterface; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpFoundation\Request; use Symfony\Component\EventDispatcher\EventDispatcher; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpKernel\Event\FilterResponseEvent; +use Symfony\Component\HttpKernel\EventListener\SurrogateListener; +use Symfony\Component\HttpKernel\HttpCache\Esi; +use Symfony\Component\HttpKernel\HttpKernelInterface; +use Symfony\Component\HttpKernel\KernelEvents; class SurrogateListenerTest extends TestCase { diff --git a/vendor/symfony/http-kernel/Tests/EventListener/TestSessionListenerTest.php b/vendor/symfony/http-kernel/Tests/EventListener/TestSessionListenerTest.php index 84ca04a6..b06dca3c 100644 --- a/vendor/symfony/http-kernel/Tests/EventListener/TestSessionListenerTest.php +++ b/vendor/symfony/http-kernel/Tests/EventListener/TestSessionListenerTest.php @@ -13,14 +13,14 @@ namespace Symfony\Component\HttpKernel\Tests\EventListener; use PHPUnit\Framework\TestCase; use Symfony\Component\DependencyInjection\ServiceSubscriberInterface; -use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpKernel\Event\GetResponseEvent; -use Symfony\Component\HttpKernel\HttpKernelInterface; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpFoundation\Session\SessionInterface; use Symfony\Component\HttpKernel\Event\FilterResponseEvent; +use Symfony\Component\HttpKernel\Event\GetResponseEvent; use Symfony\Component\HttpKernel\EventListener\SessionListener; use Symfony\Component\HttpKernel\EventListener\TestSessionListener; -use Symfony\Component\HttpFoundation\Session\SessionInterface; +use Symfony\Component\HttpKernel\HttpKernelInterface; /** * SessionListenerTest. @@ -106,6 +106,36 @@ class TestSessionListenerTest extends TestCase $this->assertNotEmpty($response->headers->getCookies()); } + /** + * @dataProvider anotherCookieProvider + */ + public function testSessionWithNewSessionIdAndNewCookieDoesNotSendAnotherCookie($existing, array $expected) + { + $this->sessionHasBeenStarted(); + $this->sessionIsEmpty(); + $this->fixSessionId('456'); + + $kernel = $this->getMockBuilder('Symfony\Component\HttpKernel\HttpKernelInterface')->getMock(); + $request = Request::create('/', 'GET', array(), array('MOCKSESSID' => '123')); + $event = new GetResponseEvent($kernel, $request, HttpKernelInterface::MASTER_REQUEST); + $this->listener->onKernelRequest($event); + + $response = new Response('', 200, array('Set-Cookie' => $existing)); + + $response = $this->filterResponse(new Request(), HttpKernelInterface::MASTER_REQUEST, $response); + + $this->assertSame($expected, $response->headers->get('Set-Cookie', null, false)); + } + + public function anotherCookieProvider() + { + return array( + 'same' => array('MOCKSESSID=789; path=/', array('MOCKSESSID=789; path=/')), + 'different domain' => array('MOCKSESSID=789; path=/; domain=example.com', array('MOCKSESSID=789; path=/; domain=example.com', 'MOCKSESSID=456; path=/')), + 'different path' => array('MOCKSESSID=789; path=/foo', array('MOCKSESSID=789; path=/foo', 'MOCKSESSID=456; path=/')), + ); + } + public function testUnstartedSessionIsNotSave() { $this->sessionHasNotBeenStarted(); @@ -133,10 +163,10 @@ class TestSessionListenerTest extends TestCase $this->assertTrue(true); } - private function filterResponse(Request $request, $type = HttpKernelInterface::MASTER_REQUEST) + private function filterResponse(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, Response $response = null) { $request->setSession($this->session); - $response = new Response(); + $response = $response ?: new Response(); $kernel = $this->getMockBuilder('Symfony\Component\HttpKernel\HttpKernelInterface')->getMock(); $event = new FilterResponseEvent($kernel, $request, $type, $response); diff --git a/vendor/symfony/http-kernel/Tests/EventListener/ValidateRequestListenerTest.php b/vendor/symfony/http-kernel/Tests/EventListener/ValidateRequestListenerTest.php index 80166031..bdab742c 100644 --- a/vendor/symfony/http-kernel/Tests/EventListener/ValidateRequestListenerTest.php +++ b/vendor/symfony/http-kernel/Tests/EventListener/ValidateRequestListenerTest.php @@ -14,8 +14,8 @@ namespace Symfony\Component\HttpKernel\Tests\EventListener; use PHPUnit\Framework\TestCase; use Symfony\Component\EventDispatcher\EventDispatcher; use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpKernel\EventListener\ValidateRequestListener; use Symfony\Component\HttpKernel\Event\GetResponseEvent; +use Symfony\Component\HttpKernel\EventListener\ValidateRequestListener; use Symfony\Component\HttpKernel\HttpKernelInterface; use Symfony\Component\HttpKernel\KernelEvents; diff --git a/vendor/symfony/http-kernel/Tests/Fixtures/123/Kernel123.php b/vendor/symfony/http-kernel/Tests/Fixtures/123/Kernel123.php index b6cf1cba..d3a76684 100644 --- a/vendor/symfony/http-kernel/Tests/Fixtures/123/Kernel123.php +++ b/vendor/symfony/http-kernel/Tests/Fixtures/123/Kernel123.php @@ -11,8 +11,8 @@ namespace Symfony\Component\HttpKernel\Tests\Fixtures\_123; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Config\Loader\LoaderInterface; +use Symfony\Component\HttpKernel\Kernel; class Kernel123 extends Kernel { diff --git a/vendor/symfony/http-kernel/Tests/Fixtures/KernelForOverrideName.php b/vendor/symfony/http-kernel/Tests/Fixtures/KernelForOverrideName.php index a1102ab7..f7baaa63 100644 --- a/vendor/symfony/http-kernel/Tests/Fixtures/KernelForOverrideName.php +++ b/vendor/symfony/http-kernel/Tests/Fixtures/KernelForOverrideName.php @@ -11,8 +11,8 @@ namespace Symfony\Component\HttpKernel\Tests\Fixtures; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Config\Loader\LoaderInterface; +use Symfony\Component\HttpKernel\Kernel; class KernelForOverrideName extends Kernel { diff --git a/vendor/symfony/http-kernel/Tests/Fixtures/KernelForTest.php b/vendor/symfony/http-kernel/Tests/Fixtures/KernelForTest.php index 5fd61bbc..9acee4ca 100644 --- a/vendor/symfony/http-kernel/Tests/Fixtures/KernelForTest.php +++ b/vendor/symfony/http-kernel/Tests/Fixtures/KernelForTest.php @@ -11,8 +11,8 @@ namespace Symfony\Component\HttpKernel\Tests\Fixtures; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Config\Loader\LoaderInterface; +use Symfony\Component\HttpKernel\Kernel; class KernelForTest extends Kernel { diff --git a/vendor/symfony/http-kernel/Tests/Fragment/EsiFragmentRendererTest.php b/vendor/symfony/http-kernel/Tests/Fragment/EsiFragmentRendererTest.php index 8a40dcd5..7ac1f4fa 100644 --- a/vendor/symfony/http-kernel/Tests/Fragment/EsiFragmentRendererTest.php +++ b/vendor/symfony/http-kernel/Tests/Fragment/EsiFragmentRendererTest.php @@ -12,10 +12,10 @@ namespace Symfony\Component\HttpKernel\Tests\Fragment; use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpKernel\Controller\ControllerReference; use Symfony\Component\HttpKernel\Fragment\EsiFragmentRenderer; use Symfony\Component\HttpKernel\HttpCache\Esi; -use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpKernel\UriSigner; class EsiFragmentRendererTest extends TestCase diff --git a/vendor/symfony/http-kernel/Tests/Fragment/FragmentHandlerTest.php b/vendor/symfony/http-kernel/Tests/Fragment/FragmentHandlerTest.php index 9c906b50..a296aa0e 100644 --- a/vendor/symfony/http-kernel/Tests/Fragment/FragmentHandlerTest.php +++ b/vendor/symfony/http-kernel/Tests/Fragment/FragmentHandlerTest.php @@ -12,9 +12,9 @@ namespace Symfony\Component\HttpKernel\Tests\Fragment; use PHPUnit\Framework\TestCase; -use Symfony\Component\HttpKernel\Fragment\FragmentHandler; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpKernel\Fragment\FragmentHandler; /** * @group time-sensitive @@ -88,7 +88,7 @@ class FragmentHandlerTest extends TestCase ; if ($arguments) { - call_user_func_array(array($e, 'with'), $arguments); + \call_user_func_array(array($e, 'with'), $arguments); } $handler = new FragmentHandler($this->requestStack); diff --git a/vendor/symfony/http-kernel/Tests/Fragment/HIncludeFragmentRendererTest.php b/vendor/symfony/http-kernel/Tests/Fragment/HIncludeFragmentRendererTest.php index 1be052e5..10fbccf0 100644 --- a/vendor/symfony/http-kernel/Tests/Fragment/HIncludeFragmentRendererTest.php +++ b/vendor/symfony/http-kernel/Tests/Fragment/HIncludeFragmentRendererTest.php @@ -12,10 +12,10 @@ namespace Symfony\Component\HttpKernel\Tests\Fragment; use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpKernel\Controller\ControllerReference; use Symfony\Component\HttpKernel\Fragment\HIncludeFragmentRenderer; use Symfony\Component\HttpKernel\UriSigner; -use Symfony\Component\HttpFoundation\Request; class HIncludeFragmentRendererTest extends TestCase { @@ -86,4 +86,17 @@ class HIncludeFragmentRendererTest extends TestCase $strategy = new HIncludeFragmentRenderer($engine); $this->assertEquals('default', $strategy->render('/foo', Request::create('/'), array('default' => 'default'))->getContent()); } + + public function testRenderWithEngineAndDefaultText() + { + $engine = $this->getMockBuilder('Symfony\\Component\\Templating\\EngineInterface')->getMock(); + $engine->expects($this->once()) + ->method('exists') + ->with('loading...') + ->will($this->throwException(new \RuntimeException())); + + // only default + $strategy = new HIncludeFragmentRenderer($engine); + $this->assertEquals('loading...', $strategy->render('/foo', Request::create('/'), array('default' => 'loading...'))->getContent()); + } } diff --git a/vendor/symfony/http-kernel/Tests/Fragment/InlineFragmentRendererTest.php b/vendor/symfony/http-kernel/Tests/Fragment/InlineFragmentRendererTest.php index 03a72e80..f633a4bf 100644 --- a/vendor/symfony/http-kernel/Tests/Fragment/InlineFragmentRendererTest.php +++ b/vendor/symfony/http-kernel/Tests/Fragment/InlineFragmentRendererTest.php @@ -12,14 +12,14 @@ namespace Symfony\Component\HttpKernel\Tests\Fragment; use PHPUnit\Framework\TestCase; -use Symfony\Component\HttpFoundation\RequestStack; -use Symfony\Component\HttpKernel\Controller\ControllerReference; -use Symfony\Component\HttpKernel\HttpKernel; -use Symfony\Component\HttpKernel\Fragment\InlineFragmentRenderer; -use Symfony\Component\HttpKernel\KernelEvents; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; use Symfony\Component\EventDispatcher\EventDispatcher; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\RequestStack; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpKernel\Controller\ControllerReference; +use Symfony\Component\HttpKernel\Fragment\InlineFragmentRenderer; +use Symfony\Component\HttpKernel\HttpKernel; +use Symfony\Component\HttpKernel\KernelEvents; class InlineFragmentRendererTest extends TestCase { @@ -44,7 +44,9 @@ class InlineFragmentRendererTest extends TestCase $subRequest = Request::create('/_fragment?_path=_format%3Dhtml%26_locale%3Den%26_controller%3Dmain_controller'); $subRequest->attributes->replace(array('object' => $object, '_format' => 'html', '_controller' => 'main_controller', '_locale' => 'en')); $subRequest->headers->set('x-forwarded-for', array('127.0.0.1')); + $subRequest->headers->set('forwarded', array('for="127.0.0.1";host="localhost";proto=http')); $subRequest->server->set('HTTP_X_FORWARDED_FOR', '127.0.0.1'); + $subRequest->server->set('HTTP_FORWARDED', 'for="127.0.0.1";host="localhost";proto=http'); $strategy = new InlineFragmentRenderer($this->getKernelExpectingRequest($subRequest)); @@ -55,7 +57,11 @@ class InlineFragmentRendererTest extends TestCase { Request::setTrustedProxies(array(), 0); - $strategy = new InlineFragmentRenderer($this->getKernelExpectingRequest(Request::create('/'))); + $expectedSubRequest = Request::create('/'); + $expectedSubRequest->headers->set('x-forwarded-for', array('127.0.0.1')); + $expectedSubRequest->server->set('HTTP_X_FORWARDED_FOR', '127.0.0.1'); + + $strategy = new InlineFragmentRenderer($this->getKernelExpectingRequest($expectedSubRequest)); $this->assertSame('foo', $strategy->render('/', Request::create('/'))->getContent()); Request::setTrustedProxies(array(), -1); @@ -148,6 +154,8 @@ class InlineFragmentRendererTest extends TestCase $expectedSubRequest->headers->set('x-forwarded-for', array('127.0.0.1')); $expectedSubRequest->server->set('HTTP_X_FORWARDED_FOR', '127.0.0.1'); } + $expectedSubRequest->headers->set('forwarded', array('for="127.0.0.1";host="localhost";proto=http')); + $expectedSubRequest->server->set('HTTP_FORWARDED', 'for="127.0.0.1";host="localhost";proto=http'); $strategy = new InlineFragmentRenderer($this->getKernelExpectingRequest($expectedSubRequest)); @@ -158,7 +166,7 @@ class InlineFragmentRendererTest extends TestCase public function testESIHeaderIsKeptInSubrequestWithTrustedHeaderDisabled() { - Request::setTrustedProxies(array(), 0); + Request::setTrustedProxies(array(), Request::HEADER_FORWARDED); $this->testESIHeaderIsKeptInSubrequest(); @@ -169,7 +177,9 @@ class InlineFragmentRendererTest extends TestCase { $expectedSubRequest = Request::create('/'); $expectedSubRequest->headers->set('x-forwarded-for', array('127.0.0.1')); + $expectedSubRequest->headers->set('forwarded', array('for="127.0.0.1";host="localhost";proto=http')); $expectedSubRequest->server->set('HTTP_X_FORWARDED_FOR', '127.0.0.1'); + $expectedSubRequest->server->set('HTTP_FORWARDED', 'for="127.0.0.1";host="localhost";proto=http'); $strategy = new InlineFragmentRenderer($this->getKernelExpectingRequest($expectedSubRequest)); $request = Request::create('/', 'GET', array(), array(), array(), array('HTTP_IF_MODIFIED_SINCE' => 'Fri, 01 Jan 2016 00:00:00 GMT', 'HTTP_IF_NONE_MATCH' => '*')); @@ -182,9 +192,32 @@ class InlineFragmentRendererTest extends TestCase $expectedSubRequest = Request::create('/'); $expectedSubRequest->headers->set('Surrogate-Capability', 'abc="ESI/1.0"'); - $expectedSubRequest->server->set('REMOTE_ADDR', '1.1.1.1'); + $expectedSubRequest->server->set('REMOTE_ADDR', '127.0.0.1'); $expectedSubRequest->headers->set('x-forwarded-for', array('127.0.0.1')); + $expectedSubRequest->headers->set('forwarded', array('for="127.0.0.1";host="localhost";proto=http')); $expectedSubRequest->server->set('HTTP_X_FORWARDED_FOR', '127.0.0.1'); + $expectedSubRequest->server->set('HTTP_FORWARDED', 'for="127.0.0.1";host="localhost";proto=http'); + + $strategy = new InlineFragmentRenderer($this->getKernelExpectingRequest($expectedSubRequest)); + + $request = Request::create('/'); + $request->headers->set('Surrogate-Capability', 'abc="ESI/1.0"'); + $strategy->render('/', $request); + + Request::setTrustedProxies(array(), -1); + } + + public function testIpAddressOfRangedTrustedProxyIsSetAsRemote() + { + $expectedSubRequest = Request::create('/'); + $expectedSubRequest->headers->set('Surrogate-Capability', 'abc="ESI/1.0"'); + $expectedSubRequest->server->set('REMOTE_ADDR', '127.0.0.1'); + $expectedSubRequest->headers->set('x-forwarded-for', array('127.0.0.1')); + $expectedSubRequest->headers->set('forwarded', array('for="127.0.0.1";host="localhost";proto=http')); + $expectedSubRequest->server->set('HTTP_X_FORWARDED_FOR', '127.0.0.1'); + $expectedSubRequest->server->set('HTTP_FORWARDED', 'for="127.0.0.1";host="localhost";proto=http'); + + Request::setTrustedProxies(array('1.1.1.1/24'), -1); $strategy = new InlineFragmentRenderer($this->getKernelExpectingRequest($expectedSubRequest)); diff --git a/vendor/symfony/http-kernel/Tests/Fragment/SsiFragmentRendererTest.php b/vendor/symfony/http-kernel/Tests/Fragment/SsiFragmentRendererTest.php index b537625f..f7258031 100644 --- a/vendor/symfony/http-kernel/Tests/Fragment/SsiFragmentRendererTest.php +++ b/vendor/symfony/http-kernel/Tests/Fragment/SsiFragmentRendererTest.php @@ -12,10 +12,10 @@ namespace Symfony\Component\HttpKernel\Tests\Fragment; use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpKernel\Controller\ControllerReference; use Symfony\Component\HttpKernel\Fragment\SsiFragmentRenderer; use Symfony\Component\HttpKernel\HttpCache\Ssi; -use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpKernel\UriSigner; class SsiFragmentRendererTest extends TestCase diff --git a/vendor/symfony/http-kernel/Tests/HttpCache/EsiTest.php b/vendor/symfony/http-kernel/Tests/HttpCache/EsiTest.php index a8662b2a..863ad761 100644 --- a/vendor/symfony/http-kernel/Tests/HttpCache/EsiTest.php +++ b/vendor/symfony/http-kernel/Tests/HttpCache/EsiTest.php @@ -12,9 +12,9 @@ namespace Symfony\Component\HttpKernel\Tests\HttpCache; use PHPUnit\Framework\TestCase; -use Symfony\Component\HttpKernel\HttpCache\Esi; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpKernel\HttpCache\Esi; class EsiTest extends TestCase { @@ -231,10 +231,10 @@ class EsiTest extends TestCase ->method('getRequest') ->will($this->returnValue($request)) ; - if (is_array($response)) { + if (\is_array($response)) { $cache->expects($this->any()) ->method('handle') - ->will(call_user_func_array(array($this, 'onConsecutiveCalls'), $response)) + ->will(\call_user_func_array(array($this, 'onConsecutiveCalls'), $response)) ; } else { $cache->expects($this->any()) diff --git a/vendor/symfony/http-kernel/Tests/HttpCache/HttpCacheTest.php b/vendor/symfony/http-kernel/Tests/HttpCache/HttpCacheTest.php index 0a776480..a41d8665 100644 --- a/vendor/symfony/http-kernel/Tests/HttpCache/HttpCacheTest.php +++ b/vendor/symfony/http-kernel/Tests/HttpCache/HttpCacheTest.php @@ -11,10 +11,10 @@ namespace Symfony\Component\HttpKernel\Tests\HttpCache; -use Symfony\Component\HttpKernel\HttpCache\Esi; -use Symfony\Component\HttpKernel\HttpCache\HttpCache; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpKernel\HttpCache\Esi; +use Symfony\Component\HttpKernel\HttpCache\HttpCache; use Symfony\Component\HttpKernel\HttpCache\Store; use Symfony\Component\HttpKernel\HttpKernelInterface; @@ -215,7 +215,7 @@ class HttpCacheTest extends HttpCacheTestCase if ($request->cookies->has('authenticated')) { $response->headers->set('Cache-Control', 'private, no-store'); $response->setETag('"private tag"'); - if (in_array('"private tag"', $etags)) { + if (\in_array('"private tag"', $etags)) { $response->setStatusCode(304); } else { $response->setStatusCode(200); @@ -225,7 +225,7 @@ class HttpCacheTest extends HttpCacheTestCase } else { $response->headers->set('Cache-Control', 'public'); $response->setETag('"public tag"'); - if (in_array('"public tag"', $etags)) { + if (\in_array('"public tag"', $etags)) { $response->setStatusCode(304); } else { $response->setStatusCode(200); @@ -566,7 +566,7 @@ class HttpCacheTest extends HttpCacheTestCase public function testDegradationWhenCacheLocked() { - if ('\\' === DIRECTORY_SEPARATOR) { + if ('\\' === \DIRECTORY_SEPARATOR) { $this->markTestSkipped('Skips on windows to avoid permissions issues.'); } @@ -994,7 +994,7 @@ class HttpCacheTest extends HttpCacheTestCase $this->assertHttpKernelIsNotCalled(); $this->assertEquals(200, $this->response->getStatusCode()); $this->assertEquals('', $this->response->getContent()); - $this->assertEquals(strlen('Hello World'), $this->response->headers->get('Content-Length')); + $this->assertEquals(\strlen('Hello World'), $this->response->headers->get('Content-Length')); } public function testSendsNoContentWhenFresh() @@ -1338,20 +1338,27 @@ class HttpCacheTest extends HttpCacheTestCase $this->setNextResponse(); $this->request('GET', '/', array('REMOTE_ADDR' => '10.0.0.1')); - $this->assertEquals('127.0.0.1', $this->kernel->getBackendRequest()->server->get('REMOTE_ADDR')); + $this->kernel->assert(function ($backendRequest) { + $this->assertSame('127.0.0.1', $backendRequest->server->get('REMOTE_ADDR')); + }); } /** * @dataProvider getTrustedProxyData */ - public function testHttpCacheIsSetAsATrustedProxy(array $existing, array $expected) + public function testHttpCacheIsSetAsATrustedProxy(array $existing) { Request::setTrustedProxies($existing, Request::HEADER_X_FORWARDED_ALL); $this->setNextResponse(); $this->request('GET', '/', array('REMOTE_ADDR' => '10.0.0.1')); + $this->assertSame($existing, Request::getTrustedProxies()); - $this->assertEquals($expected, Request::getTrustedProxies()); + $existing = array_unique(array_merge($existing, array('127.0.0.1'))); + $this->kernel->assert(function ($backendRequest) use ($existing) { + $this->assertSame($existing, Request::getTrustedProxies()); + $this->assertsame('10.0.0.1', $backendRequest->getClientIp()); + }); Request::setTrustedProxies(array(), -1); } @@ -1359,45 +1366,41 @@ class HttpCacheTest extends HttpCacheTestCase public function getTrustedProxyData() { return array( - array(array(), array('127.0.0.1')), - array(array('10.0.0.2'), array('10.0.0.2', '127.0.0.1')), - array(array('10.0.0.2', '127.0.0.1'), array('10.0.0.2', '127.0.0.1')), + array(array()), + array(array('10.0.0.2')), + array(array('10.0.0.2', '127.0.0.1')), ); } /** - * @dataProvider getXForwardedForData + * @dataProvider getForwardedData */ - public function testXForwarderForHeaderForForwardedRequests($xForwardedFor, $expected) + public function testForwarderHeaderForForwardedRequests($forwarded, $expected) { $this->setNextResponse(); $server = array('REMOTE_ADDR' => '10.0.0.1'); - if (false !== $xForwardedFor) { - $server['HTTP_X_FORWARDED_FOR'] = $xForwardedFor; + if (null !== $forwarded) { + Request::setTrustedProxies($server, -1); + $server['HTTP_FORWARDED'] = $forwarded; } $this->request('GET', '/', $server); - $this->assertEquals($expected, $this->kernel->getBackendRequest()->headers->get('X-Forwarded-For')); + $this->kernel->assert(function ($backendRequest) use ($expected) { + $this->assertSame($expected, $backendRequest->headers->get('Forwarded')); + }); + + Request::setTrustedProxies(array(), -1); } - public function getXForwardedForData() + public function getForwardedData() { return array( - array(false, '10.0.0.1'), - array('10.0.0.2', '10.0.0.2, 10.0.0.1'), - array('10.0.0.2, 10.0.0.3', '10.0.0.2, 10.0.0.3, 10.0.0.1'), + array(null, 'for="10.0.0.1";host="localhost";proto=http'), + array('for=10.0.0.2', 'for="10.0.0.2";host="localhost";proto=http, for="10.0.0.1"'), + array('for=10.0.0.2, for=10.0.0.3', 'for="10.0.0.2";host="localhost";proto=http, for="10.0.0.3", for="10.0.0.1"'), ); } - public function testXForwarderForHeaderForPassRequests() - { - $this->setNextResponse(); - $server = array('REMOTE_ADDR' => '10.0.0.1'); - $this->request('POST', '/', $server); - - $this->assertEquals('10.0.0.1', $this->kernel->getBackendRequest()->headers->get('X-Forwarded-For')); - } - public function testEsiCacheRemoveValidationHeadersIfEmbeddedResponses() { $time = \DateTime::createFromFormat('U', time()); diff --git a/vendor/symfony/http-kernel/Tests/HttpCache/HttpCacheTestCase.php b/vendor/symfony/http-kernel/Tests/HttpCache/HttpCacheTestCase.php index ed5c690d..b3aa2be2 100644 --- a/vendor/symfony/http-kernel/Tests/HttpCache/HttpCacheTestCase.php +++ b/vendor/symfony/http-kernel/Tests/HttpCache/HttpCacheTestCase.php @@ -168,7 +168,7 @@ class HttpCacheTestCase extends TestCase $fp = opendir($directory); while (false !== $file = readdir($fp)) { - if (!in_array($file, array('.', '..'))) { + if (!\in_array($file, array('.', '..'))) { if (is_link($directory.'/'.$file)) { unlink($directory.'/'.$file); } elseif (is_dir($directory.'/'.$file)) { diff --git a/vendor/symfony/http-kernel/Tests/HttpCache/SsiTest.php b/vendor/symfony/http-kernel/Tests/HttpCache/SsiTest.php index 1079d37a..26ef6cb2 100644 --- a/vendor/symfony/http-kernel/Tests/HttpCache/SsiTest.php +++ b/vendor/symfony/http-kernel/Tests/HttpCache/SsiTest.php @@ -198,10 +198,10 @@ class SsiTest extends TestCase ->method('getRequest') ->will($this->returnValue($request)) ; - if (is_array($response)) { + if (\is_array($response)) { $cache->expects($this->any()) ->method('handle') - ->will(call_user_func_array(array($this, 'onConsecutiveCalls'), $response)) + ->will(\call_user_func_array(array($this, 'onConsecutiveCalls'), $response)) ; } else { $cache->expects($this->any()) diff --git a/vendor/symfony/http-kernel/Tests/HttpCache/TestHttpKernel.php b/vendor/symfony/http-kernel/Tests/HttpCache/TestHttpKernel.php index 946c7a31..5dbf02c9 100644 --- a/vendor/symfony/http-kernel/Tests/HttpCache/TestHttpKernel.php +++ b/vendor/symfony/http-kernel/Tests/HttpCache/TestHttpKernel.php @@ -11,13 +11,13 @@ namespace Symfony\Component\HttpKernel\Tests\HttpCache; -use Symfony\Component\HttpKernel\Controller\ArgumentResolverInterface; -use Symfony\Component\HttpKernel\HttpKernel; -use Symfony\Component\HttpKernel\HttpKernelInterface; +use Symfony\Component\EventDispatcher\EventDispatcher; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpKernel\Controller\ArgumentResolverInterface; use Symfony\Component\HttpKernel\Controller\ControllerResolverInterface; -use Symfony\Component\EventDispatcher\EventDispatcher; +use Symfony\Component\HttpKernel\HttpKernel; +use Symfony\Component\HttpKernel\HttpKernelInterface; class TestHttpKernel extends HttpKernel implements ControllerResolverInterface, ArgumentResolverInterface { @@ -39,15 +39,25 @@ class TestHttpKernel extends HttpKernel implements ControllerResolverInterface, parent::__construct(new EventDispatcher(), $this, null, $this); } - public function getBackendRequest() + public function assert(\Closure $callback) { - return $this->backendRequest; + $trustedConfig = array(Request::getTrustedProxies(), Request::getTrustedHeaderSet()); + + list($trustedProxies, $trustedHeaderSet, $backendRequest) = $this->backendRequest; + Request::setTrustedProxies($trustedProxies, $trustedHeaderSet); + + try { + $callback($backendRequest); + } finally { + list($trustedProxies, $trustedHeaderSet) = $trustedConfig; + Request::setTrustedProxies($trustedProxies, $trustedHeaderSet); + } } public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = false) { $this->catch = $catch; - $this->backendRequest = $request; + $this->backendRequest = array(Request::getTrustedProxies(), Request::getTrustedHeaderSet(), $request); return parent::handle($request, $type, $catch); } diff --git a/vendor/symfony/http-kernel/Tests/HttpCache/TestMultipleHttpKernel.php b/vendor/symfony/http-kernel/Tests/HttpCache/TestMultipleHttpKernel.php index 926d8daf..712132bd 100644 --- a/vendor/symfony/http-kernel/Tests/HttpCache/TestMultipleHttpKernel.php +++ b/vendor/symfony/http-kernel/Tests/HttpCache/TestMultipleHttpKernel.php @@ -11,13 +11,13 @@ namespace Symfony\Component\HttpKernel\Tests\HttpCache; -use Symfony\Component\HttpKernel\Controller\ArgumentResolverInterface; -use Symfony\Component\HttpKernel\HttpKernel; -use Symfony\Component\HttpKernel\HttpKernelInterface; +use Symfony\Component\EventDispatcher\EventDispatcher; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpKernel\Controller\ArgumentResolverInterface; use Symfony\Component\HttpKernel\Controller\ControllerResolverInterface; -use Symfony\Component\EventDispatcher\EventDispatcher; +use Symfony\Component\HttpKernel\HttpKernel; +use Symfony\Component\HttpKernel\HttpKernelInterface; class TestMultipleHttpKernel extends HttpKernel implements ControllerResolverInterface, ArgumentResolverInterface { diff --git a/vendor/symfony/http-kernel/Tests/HttpKernelTest.php b/vendor/symfony/http-kernel/Tests/HttpKernelTest.php index c2ea04b3..c5326a33 100644 --- a/vendor/symfony/http-kernel/Tests/HttpKernelTest.php +++ b/vendor/symfony/http-kernel/Tests/HttpKernelTest.php @@ -12,21 +12,21 @@ namespace Symfony\Component\HttpKernel\Tests; use PHPUnit\Framework\TestCase; +use Symfony\Component\EventDispatcher\EventDispatcher; use Symfony\Component\EventDispatcher\EventDispatcherInterface; +use Symfony\Component\HttpFoundation\RedirectResponse; +use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\RequestStack; +use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpKernel\Controller\ArgumentResolverInterface; use Symfony\Component\HttpKernel\Controller\ControllerResolverInterface; use Symfony\Component\HttpKernel\Event\FilterControllerArgumentsEvent; use Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent; +use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException; +use Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException; use Symfony\Component\HttpKernel\HttpKernel; use Symfony\Component\HttpKernel\HttpKernelInterface; use Symfony\Component\HttpKernel\KernelEvents; -use Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException; -use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpFoundation\RedirectResponse; -use Symfony\Component\EventDispatcher\EventDispatcher; class HttpKernelTest extends TestCase { @@ -265,7 +265,7 @@ class HttpKernelTest extends TestCase $oldArguments = $event->getArguments(); $newController = function ($id) use ($oldController, $oldArguments) { - $response = call_user_func_array($oldController, $oldArguments); + $response = \call_user_func_array($oldController, $oldArguments); $response->headers->set('X-Id', $id); diff --git a/vendor/symfony/http-kernel/Tests/KernelTest.php b/vendor/symfony/http-kernel/Tests/KernelTest.php index 5a302d30..8926f208 100644 --- a/vendor/symfony/http-kernel/Tests/KernelTest.php +++ b/vendor/symfony/http-kernel/Tests/KernelTest.php @@ -16,15 +16,15 @@ use Symfony\Component\Config\Loader\LoaderInterface; use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\Filesystem\Filesystem; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpKernel\Bundle\BundleInterface; use Symfony\Component\HttpKernel\DependencyInjection\ResettableServicePass; use Symfony\Component\HttpKernel\DependencyInjection\ServicesResetter; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\HttpKernel\HttpKernelInterface; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\Tests\Fixtures\KernelForTest; +use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\HttpKernel\Tests\Fixtures\KernelForOverrideName; +use Symfony\Component\HttpKernel\Tests\Fixtures\KernelForTest; use Symfony\Component\HttpKernel\Tests\Fixtures\KernelWithoutBundles; use Symfony\Component\HttpKernel\Tests\Fixtures\ResettableService; @@ -74,7 +74,7 @@ class KernelTest extends TestCase $kernel = new CustomProjectDirKernel(); $kernel->boot(); - $containerDir = __DIR__.'/Fixtures/cache/custom/'.substr(get_class($kernel->getContainer()), 0, 16); + $containerDir = __DIR__.'/Fixtures/cache/custom/'.substr(\get_class($kernel->getContainer()), 0, 16); $this->assertTrue(unlink(__DIR__.'/Fixtures/cache/custom/FixturesCustomDebugProjectContainer.php.meta')); $this->assertFileExists($containerDir); $this->assertFileNotExists($containerDir.'.legacy'); @@ -287,7 +287,7 @@ EOF; // Heredocs are preserved, making the output mixing Unix and Windows line // endings, switching to "\n" everywhere on Windows to avoid failure. - if ('\\' === DIRECTORY_SEPARATOR) { + if ('\\' === \DIRECTORY_SEPARATOR) { $expected = str_replace("\r\n", "\n", $expected); $output = str_replace("\r\n", "\n", $output); } @@ -299,7 +299,7 @@ EOF; { $kernel = new KernelForTest('test', true); - $this->assertEquals(__DIR__.DIRECTORY_SEPARATOR.'Fixtures', realpath($kernel->getRootDir())); + $this->assertEquals(__DIR__.\DIRECTORY_SEPARATOR.'Fixtures', realpath($kernel->getRootDir())); } public function testGetName() @@ -530,7 +530,7 @@ EOF; $kernel = new CustomProjectDirKernel(); $kernel->boot(); - $containerClass = get_class($kernel->getContainer()); + $containerClass = \get_class($kernel->getContainer()); $containerFile = (new \ReflectionClass($kernel->getContainer()))->getFileName(); unlink(__DIR__.'/Fixtures/cache/custom/FixturesCustomDebugProjectContainer.php.meta'); @@ -546,7 +546,7 @@ EOF; $this->assertNotInstanceOf($containerClass, $kernel->getContainer()); $this->assertFileExists($containerFile); - $this->assertFileExists(dirname($containerFile).'.legacy'); + $this->assertFileExists(\dirname($containerFile).'.legacy'); } public function testKernelPass() @@ -626,7 +626,7 @@ EOF; $bundle ->expects($this->any()) ->method('getName') - ->will($this->returnValue(null === $bundleName ? get_class($bundle) : $bundleName)) + ->will($this->returnValue(null === $bundleName ? \get_class($bundle) : $bundleName)) ; $bundle diff --git a/vendor/symfony/http-kernel/Tests/Log/LoggerTest.php b/vendor/symfony/http-kernel/Tests/Log/LoggerTest.php index ecf67af7..a5d070c8 100644 --- a/vendor/symfony/http-kernel/Tests/Log/LoggerTest.php +++ b/vendor/symfony/http-kernel/Tests/Log/LoggerTest.php @@ -34,7 +34,7 @@ class LoggerTest extends TestCase protected function setUp() { - $this->tmpFile = sys_get_temp_dir().DIRECTORY_SEPARATOR.'log'; + $this->tmpFile = sys_get_temp_dir().\DIRECTORY_SEPARATOR.'log'; $this->logger = new Logger(LogLevel::DEBUG, $this->tmpFile); } diff --git a/vendor/symfony/http-kernel/Tests/Profiler/ProfilerTest.php b/vendor/symfony/http-kernel/Tests/Profiler/ProfilerTest.php index 2d5f0ca5..cff133c1 100644 --- a/vendor/symfony/http-kernel/Tests/Profiler/ProfilerTest.php +++ b/vendor/symfony/http-kernel/Tests/Profiler/ProfilerTest.php @@ -12,12 +12,12 @@ namespace Symfony\Component\HttpKernel\Tests\Profiler; use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpKernel\DataCollector\DataCollectorInterface; use Symfony\Component\HttpKernel\DataCollector\RequestDataCollector; use Symfony\Component\HttpKernel\Profiler\FileProfilerStorage; use Symfony\Component\HttpKernel\Profiler\Profiler; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; class ProfilerTest extends TestCase { diff --git a/vendor/symfony/http-kernel/Tests/TestHttpKernel.php b/vendor/symfony/http-kernel/Tests/TestHttpKernel.php index 3ec59272..fb95aa03 100644 --- a/vendor/symfony/http-kernel/Tests/TestHttpKernel.php +++ b/vendor/symfony/http-kernel/Tests/TestHttpKernel.php @@ -11,12 +11,12 @@ namespace Symfony\Component\HttpKernel\Tests; -use Symfony\Component\HttpKernel\Controller\ArgumentResolverInterface; -use Symfony\Component\HttpKernel\HttpKernel; +use Symfony\Component\EventDispatcher\EventDispatcher; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpKernel\Controller\ArgumentResolverInterface; use Symfony\Component\HttpKernel\Controller\ControllerResolverInterface; -use Symfony\Component\EventDispatcher\EventDispatcher; +use Symfony\Component\HttpKernel\HttpKernel; class TestHttpKernel extends HttpKernel implements ControllerResolverInterface, ArgumentResolverInterface { diff --git a/vendor/symfony/polyfill-ctype/composer.json b/vendor/symfony/polyfill-ctype/composer.json index 0504dda0..094f8d86 100644 --- a/vendor/symfony/polyfill-ctype/composer.json +++ b/vendor/symfony/polyfill-ctype/composer.json @@ -22,10 +22,13 @@ "psr-4": { "Symfony\\Polyfill\\Ctype\\": "" }, "files": [ "bootstrap.php" ] }, + "suggest": { + "ext-ctype": "For best performance" + }, "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "1.8-dev" + "dev-master": "1.9-dev" } } } diff --git a/vendor/symfony/polyfill-mbstring/Mbstring.php b/vendor/symfony/polyfill-mbstring/Mbstring.php index 4bd326e5..1f568b40 100644 --- a/vendor/symfony/polyfill-mbstring/Mbstring.php +++ b/vendor/symfony/polyfill-mbstring/Mbstring.php @@ -44,7 +44,7 @@ namespace Symfony\Polyfill\Mbstring; * - mb_strrchr - Finds the last occurrence of a character in a string within another * - mb_strrichr - Finds the last occurrence of a character in a string within another, case insensitive * - mb_strripos - Finds position of last occurrence of a string within another, case insensitive - * - mb_strstr - Finds first occurrence of a string within anothers + * - mb_strstr - Finds first occurrence of a string within another * - mb_strwidth - Return width of string * - mb_substr_count - Count the number of substring occurrences * @@ -281,8 +281,11 @@ final class Mbstring } if (MB_CASE_TITLE == $mode) { - $s = preg_replace_callback('/\b\p{Ll}/u', array(__CLASS__, 'title_case_upper'), $s); - $s = preg_replace_callback('/\B[\p{Lu}\p{Lt}]+/u', array(__CLASS__, 'title_case_lower'), $s); + static $titleRegexp = null; + if (null === $titleRegexp) { + $titleRegexp = self::getData('titleCaseRegexp'); + } + $s = preg_replace_callback($titleRegexp, array(__CLASS__, 'title_case'), $s); } else { if (MB_CASE_UPPER == $mode) { static $upper = null; @@ -752,14 +755,9 @@ final class Mbstring return $entities; } - private static function title_case_lower(array $s) + private static function title_case(array $s) { - return self::mb_convert_case($s[0], MB_CASE_LOWER, 'UTF-8'); - } - - private static function title_case_upper(array $s) - { - return self::mb_convert_case($s[0], MB_CASE_UPPER, 'UTF-8'); + return self::mb_convert_case($s[1], MB_CASE_UPPER, 'UTF-8').self::mb_convert_case($s[2], MB_CASE_LOWER, 'UTF-8'); } private static function getData($file) diff --git a/vendor/symfony/polyfill-mbstring/composer.json b/vendor/symfony/polyfill-mbstring/composer.json index 49b720dd..50ea12f1 100644 --- a/vendor/symfony/polyfill-mbstring/composer.json +++ b/vendor/symfony/polyfill-mbstring/composer.json @@ -28,7 +28,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "1.8-dev" + "dev-master": "1.9-dev" } } } diff --git a/vendor/symfony/polyfill-php72/Php72.php b/vendor/symfony/polyfill-php72/Php72.php index cf9943b4..5f122a24 100644 --- a/vendor/symfony/polyfill-php72/Php72.php +++ b/vendor/symfony/polyfill-php72/Php72.php @@ -121,7 +121,8 @@ final class Php72 return !$stdin && (false !== getenv('ANSICON') || 'ON' === getenv('ConEmuANSI') - || 'xterm' === getenv('TERM')); + || 'xterm' === getenv('TERM') + || 'Hyper' === getenv('TERM_PROGRAM')); } public static function stream_isatty($stream) diff --git a/vendor/symfony/polyfill-php72/composer.json b/vendor/symfony/polyfill-php72/composer.json index b499b1d0..5d66ef7e 100644 --- a/vendor/symfony/polyfill-php72/composer.json +++ b/vendor/symfony/polyfill-php72/composer.json @@ -25,7 +25,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "1.8-dev" + "dev-master": "1.9-dev" } } } diff --git a/vendor/symfony/process/ExecutableFinder.php b/vendor/symfony/process/ExecutableFinder.php index defa66de..ccfa4c09 100644 --- a/vendor/symfony/process/ExecutableFinder.php +++ b/vendor/symfony/process/ExecutableFinder.php @@ -71,13 +71,13 @@ class ExecutableFinder } $suffixes = array(''); - if ('\\' === DIRECTORY_SEPARATOR) { + if ('\\' === \DIRECTORY_SEPARATOR) { $pathExt = getenv('PATHEXT'); $suffixes = array_merge($pathExt ? explode(PATH_SEPARATOR, $pathExt) : $this->suffixes, $suffixes); } foreach ($suffixes as $suffix) { foreach ($dirs as $dir) { - if (@is_file($file = $dir.DIRECTORY_SEPARATOR.$name.$suffix) && ('\\' === DIRECTORY_SEPARATOR || @is_executable($file))) { + if (@is_file($file = $dir.\DIRECTORY_SEPARATOR.$name.$suffix) && ('\\' === \DIRECTORY_SEPARATOR || @is_executable($file))) { return $file; } } diff --git a/vendor/symfony/process/PhpExecutableFinder.php b/vendor/symfony/process/PhpExecutableFinder.php index abc41b66..ee7203c9 100644 --- a/vendor/symfony/process/PhpExecutableFinder.php +++ b/vendor/symfony/process/PhpExecutableFinder.php @@ -47,7 +47,7 @@ class PhpExecutableFinder $args = $includeArgs && $args ? ' '.implode(' ', $args) : ''; // PHP_BINARY return the current sapi executable - if (PHP_BINARY && \in_array(PHP_SAPI, array('cli', 'cli-server', 'phpdbg'), true)) { + if (PHP_BINARY && \in_array(\PHP_SAPI, array('cli', 'cli-server', 'phpdbg'), true)) { return PHP_BINARY.$args; } @@ -65,12 +65,12 @@ class PhpExecutableFinder } } - if (@is_executable($php = PHP_BINDIR.('\\' === DIRECTORY_SEPARATOR ? '\\php.exe' : '/php'))) { + if (@is_executable($php = PHP_BINDIR.('\\' === \DIRECTORY_SEPARATOR ? '\\php.exe' : '/php'))) { return $php; } $dirs = array(PHP_BINDIR); - if ('\\' === DIRECTORY_SEPARATOR) { + if ('\\' === \DIRECTORY_SEPARATOR) { $dirs[] = 'C:\xampp\php\\'; } @@ -85,7 +85,7 @@ class PhpExecutableFinder public function findArguments() { $arguments = array(); - if ('phpdbg' === PHP_SAPI) { + if ('phpdbg' === \PHP_SAPI) { $arguments[] = '-qrr'; } diff --git a/vendor/symfony/process/PhpProcess.php b/vendor/symfony/process/PhpProcess.php index 4c560ef9..7ac930e9 100644 --- a/vendor/symfony/process/PhpProcess.php +++ b/vendor/symfony/process/PhpProcess.php @@ -38,7 +38,7 @@ class PhpProcess extends Process } else { $php = array_merge(array($php), $executableFinder->findArguments()); } - if ('phpdbg' === PHP_SAPI) { + if ('phpdbg' === \PHP_SAPI) { $file = tempnam(sys_get_temp_dir(), 'dbg'); file_put_contents($file, $script); register_shutdown_function('unlink', $file); diff --git a/vendor/symfony/process/Pipes/AbstractPipes.php b/vendor/symfony/process/Pipes/AbstractPipes.php index 9a7d88be..e5e26866 100644 --- a/vendor/symfony/process/Pipes/AbstractPipes.php +++ b/vendor/symfony/process/Pipes/AbstractPipes.php @@ -32,9 +32,9 @@ abstract class AbstractPipes implements PipesInterface */ public function __construct($input) { - if (is_resource($input) || $input instanceof \Iterator) { + if (\is_resource($input) || $input instanceof \Iterator) { $this->input = $input; - } elseif (is_string($input)) { + } elseif (\is_string($input)) { $this->inputBuffer = $input; } else { $this->inputBuffer = (string) $input; @@ -78,7 +78,7 @@ abstract class AbstractPipes implements PipesInterface foreach ($this->pipes as $pipe) { stream_set_blocking($pipe, 0); } - if (is_resource($this->input)) { + if (\is_resource($this->input)) { stream_set_blocking($this->input, 0); } @@ -100,12 +100,12 @@ abstract class AbstractPipes implements PipesInterface if ($input instanceof \Iterator) { if (!$input->valid()) { $input = null; - } elseif (is_resource($input = $input->current())) { + } elseif (\is_resource($input = $input->current())) { stream_set_blocking($input, 0); } elseif (!isset($this->inputBuffer[0])) { - if (!is_string($input)) { + if (!\is_string($input)) { if (!is_scalar($input)) { - throw new InvalidArgumentException(sprintf('%s yielded a value of type "%s", but only scalars and stream resources are supported', get_class($this->input), gettype($input))); + throw new InvalidArgumentException(sprintf('%s yielded a value of type "%s", but only scalars and stream resources are supported', \get_class($this->input), \gettype($input))); } $input = (string) $input; } diff --git a/vendor/symfony/process/Pipes/WindowsPipes.php b/vendor/symfony/process/Pipes/WindowsPipes.php index 845d2bf7..9240102a 100644 --- a/vendor/symfony/process/Pipes/WindowsPipes.php +++ b/vendor/symfony/process/Pipes/WindowsPipes.php @@ -11,8 +11,8 @@ namespace Symfony\Component\Process\Pipes; -use Symfony\Component\Process\Process; use Symfony\Component\Process\Exception\RuntimeException; +use Symfony\Component\Process\Process; /** * WindowsPipes implementation uses temporary files as handles. @@ -141,7 +141,7 @@ class WindowsPipes extends AbstractPipes $data = stream_get_contents($fileHandle, -1, $this->readBytes[$type]); if (isset($data[0])) { - $this->readBytes[$type] += strlen($data); + $this->readBytes[$type] += \strlen($data); $read[$type] = $data; } if ($close) { diff --git a/vendor/symfony/process/Process.php b/vendor/symfony/process/Process.php index ed48b5f2..70514472 100644 --- a/vendor/symfony/process/Process.php +++ b/vendor/symfony/process/Process.php @@ -139,7 +139,7 @@ class Process implements \IteratorAggregate */ public function __construct($commandline, string $cwd = null, array $env = null, $input = null, ?float $timeout = 60) { - if (!function_exists('proc_open')) { + if (!\function_exists('proc_open')) { throw new RuntimeException('The Process class relies on proc_open, which is not available on your PHP installation.'); } @@ -150,7 +150,7 @@ class Process implements \IteratorAggregate // on Gnu/Linux, PHP builds with --enable-maintainer-zts are also affected // @see : https://bugs.php.net/bug.php?id=51800 // @see : https://bugs.php.net/bug.php?id=50524 - if (null === $this->cwd && (defined('ZEND_THREAD_SAFE') || '\\' === DIRECTORY_SEPARATOR)) { + if (null === $this->cwd && (\defined('ZEND_THREAD_SAFE') || '\\' === \DIRECTORY_SEPARATOR)) { $this->cwd = getcwd(); } if (null !== $env) { @@ -159,7 +159,7 @@ class Process implements \IteratorAggregate $this->setInput($input); $this->setTimeout($timeout); - $this->useFileHandles = '\\' === DIRECTORY_SEPARATOR; + $this->useFileHandles = '\\' === \DIRECTORY_SEPARATOR; $this->pty = false; } @@ -258,10 +258,10 @@ class Process implements \IteratorAggregate $this->hasCallback = null !== $callback; $descriptors = $this->getDescriptors(); - if (is_array($commandline = $this->commandline)) { + if (\is_array($commandline = $this->commandline)) { $commandline = implode(' ', array_map(array($this, 'escapeArgument'), $commandline)); - if ('\\' !== DIRECTORY_SEPARATOR) { + if ('\\' !== \DIRECTORY_SEPARATOR) { // exec is mandatory to deal with sending a signal to the process $commandline = 'exec '.$commandline; } @@ -274,7 +274,7 @@ class Process implements \IteratorAggregate $options = array('suppress_errors' => true); - if ('\\' === DIRECTORY_SEPARATOR) { + if ('\\' === \DIRECTORY_SEPARATOR) { $options['bypass_shell'] = true; $commandline = $this->prepareWindowsCommandLine($commandline, $env); } elseif (!$this->useFileHandles && $this->isSigchildEnabled()) { @@ -303,7 +303,7 @@ class Process implements \IteratorAggregate $this->process = proc_open($commandline, $descriptors, $this->processPipes->pipes, $this->cwd, $envPairs, $options); - if (!is_resource($this->process)) { + if (!\is_resource($this->process)) { throw new RuntimeException('Unable to launch a new process.'); } $this->status = self::STATUS_STARTED; @@ -381,8 +381,8 @@ class Process implements \IteratorAggregate do { $this->checkTimeout(); - $running = '\\' === DIRECTORY_SEPARATOR ? $this->isRunning() : $this->processPipes->areOpen(); - $this->readPipes($running, '\\' !== DIRECTORY_SEPARATOR || !$running); + $running = '\\' === \DIRECTORY_SEPARATOR ? $this->isRunning() : $this->processPipes->areOpen(); + $this->readPipes($running, '\\' !== \DIRECTORY_SEPARATOR || !$running); } while ($running); while ($this->isRunning()) { @@ -883,7 +883,7 @@ class Process implements \IteratorAggregate */ public function getCommandLine() { - return is_array($this->commandline) ? implode(' ', array_map(array($this, 'escapeArgument'), $this->commandline)) : $this->commandline; + return \is_array($this->commandline) ? implode(' ', array_map(array($this, 'escapeArgument'), $this->commandline)) : $this->commandline; } /** @@ -972,7 +972,7 @@ class Process implements \IteratorAggregate */ public function setTty($tty) { - if ('\\' === DIRECTORY_SEPARATOR && $tty) { + if ('\\' === \DIRECTORY_SEPARATOR && $tty) { throw new RuntimeException('TTY mode is not supported on Windows platform.'); } @@ -1078,7 +1078,7 @@ class Process implements \IteratorAggregate { // Process can not handle env values that are arrays $env = array_filter($env, function ($value) { - return !is_array($value); + return !\is_array($value); }); $this->env = $env; @@ -1188,7 +1188,7 @@ class Process implements \IteratorAggregate return $result; } - if ('\\' === DIRECTORY_SEPARATOR) { + if ('\\' === \DIRECTORY_SEPARATOR) { return $result = false; } @@ -1203,7 +1203,7 @@ class Process implements \IteratorAggregate if ($this->input instanceof \Iterator) { $this->input->rewind(); } - if ('\\' === DIRECTORY_SEPARATOR) { + if ('\\' === \DIRECTORY_SEPARATOR) { $this->processPipes = new WindowsPipes($this->input, !$this->outputDisabled || $this->hasCallback); } else { $this->processPipes = new UnixPipes($this->isTty(), $this->isPty(), $this->input, !$this->outputDisabled || $this->hasCallback); @@ -1227,7 +1227,7 @@ class Process implements \IteratorAggregate if ($this->outputDisabled) { return function ($type, $data) use ($callback) { if (null !== $callback) { - call_user_func($callback, $type, $data); + \call_user_func($callback, $type, $data); } }; } @@ -1242,7 +1242,7 @@ class Process implements \IteratorAggregate } if (null !== $callback) { - call_user_func($callback, $type, $data); + \call_user_func($callback, $type, $data); } }; } @@ -1261,7 +1261,7 @@ class Process implements \IteratorAggregate $this->processInformation = proc_get_status($this->process); $running = $this->processInformation['running']; - $this->readPipes($running && $blocking, '\\' !== DIRECTORY_SEPARATOR || !$running); + $this->readPipes($running && $blocking, '\\' !== \DIRECTORY_SEPARATOR || !$running); if ($this->fallbackStatus && $this->isSigchildEnabled()) { $this->processInformation = $this->fallbackStatus + $this->processInformation; @@ -1283,7 +1283,7 @@ class Process implements \IteratorAggregate return self::$sigchild; } - if (!function_exists('phpinfo')) { + if (!\function_exists('phpinfo')) { return self::$sigchild = false; } @@ -1358,7 +1358,7 @@ class Process implements \IteratorAggregate private function close(): int { $this->processPipes->close(); - if (is_resource($this->process)) { + if (\is_resource($this->process)) { proc_close($this->process); } $this->exitcode = $this->processInformation['exitcode']; @@ -1423,7 +1423,7 @@ class Process implements \IteratorAggregate return false; } - if ('\\' === DIRECTORY_SEPARATOR) { + if ('\\' === \DIRECTORY_SEPARATOR) { exec(sprintf('taskkill /F /T /PID %d 2>&1', $pid), $output, $exitCode); if ($exitCode && $this->isRunning()) { if ($throwException) { @@ -1435,7 +1435,7 @@ class Process implements \IteratorAggregate } else { if (!$this->isSigchildEnabled()) { $ok = @proc_terminate($this->process, $signal); - } elseif (function_exists('posix_kill')) { + } elseif (\function_exists('posix_kill')) { $ok = @posix_kill($pid, $signal); } elseif ($ok = proc_open(sprintf('kill -%d %d', $signal, $pid), array(2 => array('pipe', 'w')), $pipes)) { $ok = false === fgets($pipes[2]); @@ -1532,7 +1532,7 @@ class Process implements \IteratorAggregate */ private function escapeArgument(string $argument): string { - if ('\\' !== DIRECTORY_SEPARATOR) { + if ('\\' !== \DIRECTORY_SEPARATOR) { return "'".str_replace("'", "'\\''", $argument)."'"; } if ('' === $argument = (string) $argument) { @@ -1554,13 +1554,13 @@ class Process implements \IteratorAggregate $env = array(); foreach ($_SERVER as $k => $v) { - if (is_string($v) && false !== $v = getenv($k)) { + if (\is_string($v) && false !== $v = getenv($k)) { $env[$k] = $v; } } foreach ($_ENV as $k => $v) { - if (is_string($v)) { + if (\is_string($v)) { $env[$k] = $v; } } diff --git a/vendor/symfony/process/ProcessUtils.php b/vendor/symfony/process/ProcessUtils.php index e0d9c08a..2f9c4be4 100644 --- a/vendor/symfony/process/ProcessUtils.php +++ b/vendor/symfony/process/ProcessUtils.php @@ -42,10 +42,10 @@ class ProcessUtils public static function validateInput($caller, $input) { if (null !== $input) { - if (is_resource($input)) { + if (\is_resource($input)) { return $input; } - if (is_string($input)) { + if (\is_string($input)) { return $input; } if (is_scalar($input)) { diff --git a/vendor/symfony/process/Tests/ExecutableFinderTest.php b/vendor/symfony/process/Tests/ExecutableFinderTest.php index 3b2500b7..c6d063c0 100644 --- a/vendor/symfony/process/Tests/ExecutableFinderTest.php +++ b/vendor/symfony/process/Tests/ExecutableFinderTest.php @@ -41,7 +41,7 @@ class ExecutableFinderTest extends TestCase $this->markTestSkipped('Cannot test when open_basedir is set'); } - $this->setPath(dirname(PHP_BINARY)); + $this->setPath(\dirname(PHP_BINARY)); $finder = new ExecutableFinder(); $result = $finder->find($this->getPhpBinaryName()); @@ -73,7 +73,7 @@ class ExecutableFinderTest extends TestCase $this->setPath(''); - $extraDirs = array(dirname(PHP_BINARY)); + $extraDirs = array(\dirname(PHP_BINARY)); $finder = new ExecutableFinder(); $result = $finder->find($this->getPhpBinaryName(), null, $extraDirs); @@ -83,7 +83,7 @@ class ExecutableFinderTest extends TestCase public function testFindWithOpenBaseDir() { - if ('\\' === DIRECTORY_SEPARATOR) { + if ('\\' === \DIRECTORY_SEPARATOR) { $this->markTestSkipped('Cannot run test on windows'); } @@ -91,7 +91,7 @@ class ExecutableFinderTest extends TestCase $this->markTestSkipped('Cannot test when open_basedir is set'); } - $this->iniSet('open_basedir', dirname(PHP_BINARY).PATH_SEPARATOR.'/'); + $this->iniSet('open_basedir', \dirname(PHP_BINARY).PATH_SEPARATOR.'/'); $finder = new ExecutableFinder(); $result = $finder->find($this->getPhpBinaryName()); @@ -104,7 +104,7 @@ class ExecutableFinderTest extends TestCase if (ini_get('open_basedir')) { $this->markTestSkipped('Cannot test when open_basedir is set'); } - if ('\\' === DIRECTORY_SEPARATOR) { + if ('\\' === \DIRECTORY_SEPARATOR) { $this->markTestSkipped('Cannot run test on windows'); } @@ -125,7 +125,7 @@ class ExecutableFinderTest extends TestCase if (ini_get('open_basedir')) { $this->markTestSkipped('Cannot test when open_basedir is set'); } - if ('\\' !== DIRECTORY_SEPARATOR) { + if ('\\' !== \DIRECTORY_SEPARATOR) { $this->markTestSkipped('Can be only tested on windows'); } @@ -149,7 +149,7 @@ class ExecutableFinderTest extends TestCase private function assertSamePath($expected, $tested) { - if ('\\' === DIRECTORY_SEPARATOR) { + if ('\\' === \DIRECTORY_SEPARATOR) { $this->assertEquals(strtolower($expected), strtolower($tested)); } else { $this->assertEquals($expected, $tested); @@ -158,6 +158,6 @@ class ExecutableFinderTest extends TestCase private function getPhpBinaryName() { - return basename(PHP_BINARY, '\\' === DIRECTORY_SEPARATOR ? '.exe' : ''); + return basename(PHP_BINARY, '\\' === \DIRECTORY_SEPARATOR ? '.exe' : ''); } } diff --git a/vendor/symfony/process/Tests/PhpExecutableFinderTest.php b/vendor/symfony/process/Tests/PhpExecutableFinderTest.php index 1055384c..df2560df 100644 --- a/vendor/symfony/process/Tests/PhpExecutableFinderTest.php +++ b/vendor/symfony/process/Tests/PhpExecutableFinderTest.php @@ -27,7 +27,7 @@ class PhpExecutableFinderTest extends TestCase $f = new PhpExecutableFinder(); $current = PHP_BINARY; - $args = 'phpdbg' === PHP_SAPI ? ' -qrr' : ''; + $args = 'phpdbg' === \PHP_SAPI ? ' -qrr' : ''; $this->assertEquals($current.$args, $f->find(), '::find() returns the executable PHP'); $this->assertEquals($current, $f->find(false), '::find() returns the executable PHP'); @@ -40,7 +40,7 @@ class PhpExecutableFinderTest extends TestCase { $f = new PhpExecutableFinder(); - if ('phpdbg' === PHP_SAPI) { + if ('phpdbg' === \PHP_SAPI) { $this->assertEquals($f->findArguments(), array('-qrr'), '::findArguments() returns phpdbg arguments'); } else { $this->assertEquals($f->findArguments(), array(), '::findArguments() returns no arguments'); diff --git a/vendor/symfony/process/Tests/PhpProcessTest.php b/vendor/symfony/process/Tests/PhpProcessTest.php index f67368c7..b0f0a57a 100644 --- a/vendor/symfony/process/Tests/PhpProcessTest.php +++ b/vendor/symfony/process/Tests/PhpProcessTest.php @@ -43,6 +43,6 @@ PHP $process->wait(); $this->assertContains($commandLine, $process->getCommandLine(), '::getCommandLine() returns the command line of PHP after wait'); - $this->assertSame(PHP_VERSION.PHP_SAPI, $process->getOutput()); + $this->assertSame(PHP_VERSION.\PHP_SAPI, $process->getOutput()); } } diff --git a/vendor/symfony/process/Tests/PipeStdinInStdoutStdErrStreamSelect.php b/vendor/symfony/process/Tests/PipeStdinInStdoutStdErrStreamSelect.php index bbd7ddfe..1ea0e127 100644 --- a/vendor/symfony/process/Tests/PipeStdinInStdoutStdErrStreamSelect.php +++ b/vendor/symfony/process/Tests/PipeStdinInStdoutStdErrStreamSelect.php @@ -35,22 +35,22 @@ while ($read || $write) { } if (in_array(STDOUT, $w) && strlen($out) > 0) { - $written = fwrite(STDOUT, (binary) $out, 32768); + $written = fwrite(STDOUT, (string) $out, 32768); if (false === $written) { die(ERR_WRITE_FAILED); } - $out = (binary) substr($out, $written); + $out = (string) substr($out, $written); } if (null === $read && '' === $out) { $write = array_diff($write, array(STDOUT)); } if (in_array(STDERR, $w) && strlen($err) > 0) { - $written = fwrite(STDERR, (binary) $err, 32768); + $written = fwrite(STDERR, (string) $err, 32768); if (false === $written) { die(ERR_WRITE_FAILED); } - $err = (binary) substr($err, $written); + $err = (string) substr($err, $written); } if (null === $read && '' === $err) { $write = array_diff($write, array(STDERR)); diff --git a/vendor/symfony/process/Tests/ProcessTest.php b/vendor/symfony/process/Tests/ProcessTest.php index 9d36d247..0ed63fd3 100644 --- a/vendor/symfony/process/Tests/ProcessTest.php +++ b/vendor/symfony/process/Tests/ProcessTest.php @@ -32,7 +32,7 @@ class ProcessTest extends TestCase public static function setUpBeforeClass() { $phpBin = new PhpExecutableFinder(); - self::$phpBin = getenv('SYMFONY_PROCESS_PHP_TEST_BINARY') ?: ('phpdbg' === PHP_SAPI ? 'php' : $phpBin->find()); + self::$phpBin = getenv('SYMFONY_PROCESS_PHP_TEST_BINARY') ?: ('phpdbg' === \PHP_SAPI ? 'php' : $phpBin->find()); ob_start(); phpinfo(INFO_GENERAL); @@ -67,7 +67,7 @@ class ProcessTest extends TestCase public function testThatProcessDoesNotThrowWarningDuringRun() { - if ('\\' === DIRECTORY_SEPARATOR) { + if ('\\' === \DIRECTORY_SEPARATOR) { $this->markTestSkipped('This test is transient on Windows'); } @trigger_error('Test Error', E_USER_NOTICE); @@ -162,7 +162,7 @@ class ProcessTest extends TestCase $o = $p->getOutput(); - $this->assertEquals($expectedOutputSize, strlen($o)); + $this->assertEquals($expectedOutputSize, \strlen($o)); } public function testCallbacksAreExecutedWithStart() @@ -204,8 +204,8 @@ class ProcessTest extends TestCase $p->setInput($expected); $p->run(); - $this->assertEquals($expectedLength, strlen($p->getOutput())); - $this->assertEquals($expectedLength, strlen($p->getErrorOutput())); + $this->assertEquals($expectedLength, \strlen($p->getOutput())); + $this->assertEquals($expectedLength, \strlen($p->getErrorOutput())); } /** @@ -226,8 +226,8 @@ class ProcessTest extends TestCase fclose($stream); - $this->assertEquals($expectedLength, strlen($p->getOutput())); - $this->assertEquals($expectedLength, strlen($p->getErrorOutput())); + $this->assertEquals($expectedLength, \strlen($p->getOutput())); + $this->assertEquals($expectedLength, \strlen($p->getErrorOutput())); } public function testLiveStreamAsInput() @@ -307,7 +307,7 @@ class ProcessTest extends TestCase public function chainedCommandsOutputProvider() { - if ('\\' === DIRECTORY_SEPARATOR) { + if ('\\' === \DIRECTORY_SEPARATOR) { return array( array("2 \r\n2\r\n", '&&', '2'), ); @@ -426,7 +426,7 @@ class ProcessTest extends TestCase public function testZeroAsOutput() { - if ('\\' === DIRECTORY_SEPARATOR) { + if ('\\' === \DIRECTORY_SEPARATOR) { // see http://stackoverflow.com/questions/7105433/windows-batch-echo-without-new-line $p = $this->getProcess('echo | set /p dummyName=0'); } else { @@ -439,7 +439,7 @@ class ProcessTest extends TestCase public function testExitCodeCommandFailed() { - if ('\\' === DIRECTORY_SEPARATOR) { + if ('\\' === \DIRECTORY_SEPARATOR) { $this->markTestSkipped('Windows does not support POSIX exit code'); } @@ -450,12 +450,9 @@ class ProcessTest extends TestCase $this->assertGreaterThan(0, $process->getExitCode()); } - /** - * @group tty - */ public function testTTYCommand() { - if ('\\' === DIRECTORY_SEPARATOR) { + if ('\\' === \DIRECTORY_SEPARATOR) { $this->markTestSkipped('Windows does not have /dev/tty support'); } @@ -468,12 +465,9 @@ class ProcessTest extends TestCase $this->assertSame(Process::STATUS_TERMINATED, $process->getStatus()); } - /** - * @group tty - */ public function testTTYCommandExitCode() { - if ('\\' === DIRECTORY_SEPARATOR) { + if ('\\' === \DIRECTORY_SEPARATOR) { $this->markTestSkipped('Windows does have /dev/tty support'); } @@ -490,7 +484,7 @@ class ProcessTest extends TestCase */ public function testTTYInWindowsEnvironment() { - if ('\\' !== DIRECTORY_SEPARATOR) { + if ('\\' !== \DIRECTORY_SEPARATOR) { $this->markTestSkipped('This test is for Windows platform only'); } @@ -567,7 +561,7 @@ class ProcessTest extends TestCase { $process = $this->getProcess('echo foo'); $process->run(); - $this->assertGreaterThan(0, strlen($process->getOutput())); + $this->assertGreaterThan(0, \strlen($process->getOutput())); } public function testGetExitCodeIsNullOnStart() @@ -654,7 +648,7 @@ class ProcessTest extends TestCase public function testProcessIsNotSignaled() { - if ('\\' === DIRECTORY_SEPARATOR) { + if ('\\' === \DIRECTORY_SEPARATOR) { $this->markTestSkipped('Windows does not support POSIX signals'); } @@ -665,7 +659,7 @@ class ProcessTest extends TestCase public function testProcessWithoutTermSignal() { - if ('\\' === DIRECTORY_SEPARATOR) { + if ('\\' === \DIRECTORY_SEPARATOR) { $this->markTestSkipped('Windows does not support POSIX signals'); } @@ -676,7 +670,7 @@ class ProcessTest extends TestCase public function testProcessIsSignaledIfStopped() { - if ('\\' === DIRECTORY_SEPARATOR) { + if ('\\' === \DIRECTORY_SEPARATOR) { $this->markTestSkipped('Windows does not support POSIX signals'); } @@ -693,7 +687,7 @@ class ProcessTest extends TestCase */ public function testProcessThrowsExceptionWhenExternallySignaled() { - if (!function_exists('posix_kill')) { + if (!\function_exists('posix_kill')) { $this->markTestSkipped('Function posix_kill is required.'); } @@ -997,7 +991,7 @@ class ProcessTest extends TestCase */ public function testWrongSignal() { - if ('\\' === DIRECTORY_SEPARATOR) { + if ('\\' === \DIRECTORY_SEPARATOR) { $this->markTestSkipped('POSIX signals do not work on Windows'); } @@ -1152,7 +1146,7 @@ class ProcessTest extends TestCase 'include \''.__DIR__.'/PipeStdinInStdoutStdErrStreamSelect.php\';', ); - if ('\\' === DIRECTORY_SEPARATOR) { + if ('\\' === \DIRECTORY_SEPARATOR) { // Avoid XL buffers on Windows because of https://bugs.php.net/bug.php?id=65650 $sizes = array(1, 2, 4, 8); } else { @@ -1430,7 +1424,7 @@ class ProcessTest extends TestCase { $p = new Process(array('/usr/bin/php')); - $expected = '\\' === DIRECTORY_SEPARATOR ? '"/usr/bin/php"' : "'/usr/bin/php'"; + $expected = '\\' === \DIRECTORY_SEPARATOR ? '"/usr/bin/php"' : "'/usr/bin/php'"; $this->assertSame($expected, $p->getCommandLine()); } @@ -1477,7 +1471,7 @@ EOTXT; public function testEnvArgument() { $env = array('FOO' => 'Foo', 'BAR' => 'Bar'); - $cmd = '\\' === DIRECTORY_SEPARATOR ? 'echo !FOO! !BAR! !BAZ!' : 'echo $FOO $BAR $BAZ'; + $cmd = '\\' === \DIRECTORY_SEPARATOR ? 'echo !FOO! !BAR! !BAZ!' : 'echo $FOO $BAR $BAZ'; $p = new Process($cmd, null, $env); $p->run(null, array('BAR' => 'baR', 'BAZ' => 'baZ')); diff --git a/vendor/symfony/routing/Annotation/Route.php b/vendor/symfony/routing/Annotation/Route.php index 7924aa34..62ad8c8b 100644 --- a/vendor/symfony/routing/Annotation/Route.php +++ b/vendor/symfony/routing/Annotation/Route.php @@ -40,15 +40,15 @@ class Route public function __construct(array $data) { if (isset($data['localized_paths'])) { - throw new \BadMethodCallException(sprintf('Unknown property "localized_paths" on annotation "%s".', get_class($this))); + throw new \BadMethodCallException(sprintf('Unknown property "localized_paths" on annotation "%s".', \get_class($this))); } if (isset($data['value'])) { - $data[is_array($data['value']) ? 'localized_paths' : 'path'] = $data['value']; + $data[\is_array($data['value']) ? 'localized_paths' : 'path'] = $data['value']; unset($data['value']); } - if (isset($data['path']) && is_array($data['path'])) { + if (isset($data['path']) && \is_array($data['path'])) { $data['localized_paths'] = $data['path']; unset($data['path']); } @@ -56,7 +56,7 @@ class Route foreach ($data as $key => $value) { $method = 'set'.str_replace('_', '', $key); if (!method_exists($this, $method)) { - throw new \BadMethodCallException(sprintf('Unknown property "%s" on annotation "%s".', $key, get_class($this))); + throw new \BadMethodCallException(sprintf('Unknown property "%s" on annotation "%s".', $key, \get_class($this))); } $this->$method($value); } @@ -134,7 +134,7 @@ class Route public function setSchemes($schemes) { - $this->schemes = is_array($schemes) ? $schemes : array($schemes); + $this->schemes = \is_array($schemes) ? $schemes : array($schemes); } public function getSchemes() @@ -144,7 +144,7 @@ class Route public function setMethods($methods) { - $this->methods = is_array($methods) ? $methods : array($methods); + $this->methods = \is_array($methods) ? $methods : array($methods); } public function getMethods() diff --git a/vendor/symfony/routing/DependencyInjection/RoutingResolverPass.php b/vendor/symfony/routing/DependencyInjection/RoutingResolverPass.php index a5116c99..ab0b7d8e 100644 --- a/vendor/symfony/routing/DependencyInjection/RoutingResolverPass.php +++ b/vendor/symfony/routing/DependencyInjection/RoutingResolverPass.php @@ -11,10 +11,10 @@ namespace Symfony\Component\Routing\DependencyInjection; -use Symfony\Component\DependencyInjection\Reference; -use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; use Symfony\Component\DependencyInjection\Compiler\PriorityTaggedServiceTrait; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Reference; /** * Adds tagged routing.loader services to routing.resolver service. diff --git a/vendor/symfony/routing/Generator/UrlGenerator.php b/vendor/symfony/routing/Generator/UrlGenerator.php index 6bb82222..38dd1384 100644 --- a/vendor/symfony/routing/Generator/UrlGenerator.php +++ b/vendor/symfony/routing/Generator/UrlGenerator.php @@ -11,12 +11,12 @@ namespace Symfony\Component\Routing\Generator; -use Symfony\Component\Routing\RouteCollection; -use Symfony\Component\Routing\RequestContext; -use Symfony\Component\Routing\Exception\InvalidParameterException; -use Symfony\Component\Routing\Exception\RouteNotFoundException; -use Symfony\Component\Routing\Exception\MissingMandatoryParametersException; use Psr\Log\LoggerInterface; +use Symfony\Component\Routing\Exception\InvalidParameterException; +use Symfony\Component\Routing\Exception\MissingMandatoryParametersException; +use Symfony\Component\Routing\Exception\RouteNotFoundException; +use Symfony\Component\Routing\RequestContext; +use Symfony\Component\Routing\RouteCollection; /** * UrlGenerator can generate a URL or a path for any route in the RouteCollection @@ -194,7 +194,7 @@ class UrlGenerator implements UrlGeneratorInterface, ConfigurableRequirementsInt $scheme = $this->context->getScheme(); if ($requiredSchemes) { - if (!in_array($scheme, $requiredSchemes, true)) { + if (!\in_array($scheme, $requiredSchemes, true)) { $referenceType = self::ABSOLUTE_URL; $scheme = current($requiredSchemes); } @@ -317,7 +317,7 @@ class UrlGenerator implements UrlGeneratorInterface, ConfigurableRequirementsInt } $targetDirs[] = $targetFile; - $path = str_repeat('../', count($sourceDirs)).implode('/', $targetDirs); + $path = str_repeat('../', \count($sourceDirs)).implode('/', $targetDirs); // A reference to the same base directory or an empty subdirectory must be prefixed with "./". // This also applies to a segment with a colon character (e.g., "file:colon") that cannot be used diff --git a/vendor/symfony/routing/Loader/AnnotationClassLoader.php b/vendor/symfony/routing/Loader/AnnotationClassLoader.php index c909da17..958217fc 100644 --- a/vendor/symfony/routing/Loader/AnnotationClassLoader.php +++ b/vendor/symfony/routing/Loader/AnnotationClassLoader.php @@ -12,11 +12,11 @@ namespace Symfony\Component\Routing\Loader; use Doctrine\Common\Annotations\Reader; +use Symfony\Component\Config\Loader\LoaderInterface; +use Symfony\Component\Config\Loader\LoaderResolverInterface; use Symfony\Component\Config\Resource\FileResource; use Symfony\Component\Routing\Route; use Symfony\Component\Routing\RouteCollection; -use Symfony\Component\Config\Loader\LoaderInterface; -use Symfony\Component\Config\Loader\LoaderResolverInterface; /** * AnnotationClassLoader loads routing information from a PHP class and its methods. @@ -216,7 +216,7 @@ abstract class AnnotationClassLoader implements LoaderInterface */ public function supports($resource, $type = null) { - return is_string($resource) && preg_match('/^(?:\\\\?[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)+$/', $resource) && (!$type || 'annotation' === $type); + return \is_string($resource) && preg_match('/^(?:\\\\?[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)+$/', $resource) && (!$type || 'annotation' === $type); } /** diff --git a/vendor/symfony/routing/Loader/AnnotationDirectoryLoader.php b/vendor/symfony/routing/Loader/AnnotationDirectoryLoader.php index 4574a020..3fb70ea2 100644 --- a/vendor/symfony/routing/Loader/AnnotationDirectoryLoader.php +++ b/vendor/symfony/routing/Loader/AnnotationDirectoryLoader.php @@ -11,8 +11,8 @@ namespace Symfony\Component\Routing\Loader; -use Symfony\Component\Routing\RouteCollection; use Symfony\Component\Config\Resource\DirectoryResource; +use Symfony\Component\Routing\RouteCollection; /** * AnnotationDirectoryLoader loads routing information from annotations set @@ -80,7 +80,7 @@ class AnnotationDirectoryLoader extends AnnotationFileLoader return true; } - if ($type || !is_string($resource)) { + if ($type || !\is_string($resource)) { return false; } diff --git a/vendor/symfony/routing/Loader/AnnotationFileLoader.php b/vendor/symfony/routing/Loader/AnnotationFileLoader.php index b1cb104b..ecd68e04 100644 --- a/vendor/symfony/routing/Loader/AnnotationFileLoader.php +++ b/vendor/symfony/routing/Loader/AnnotationFileLoader.php @@ -11,10 +11,10 @@ namespace Symfony\Component\Routing\Loader; -use Symfony\Component\Routing\RouteCollection; -use Symfony\Component\Config\Resource\FileResource; -use Symfony\Component\Config\Loader\FileLoader; use Symfony\Component\Config\FileLocatorInterface; +use Symfony\Component\Config\Loader\FileLoader; +use Symfony\Component\Config\Resource\FileResource; +use Symfony\Component\Routing\RouteCollection; /** * AnnotationFileLoader loads routing information from annotations set @@ -31,7 +31,7 @@ class AnnotationFileLoader extends FileLoader */ public function __construct(FileLocatorInterface $locator, AnnotationClassLoader $loader) { - if (!function_exists('token_get_all')) { + if (!\function_exists('token_get_all')) { throw new \RuntimeException('The Tokenizer extension is required for the routing annotation loaders.'); } @@ -71,7 +71,7 @@ class AnnotationFileLoader extends FileLoader */ public function supports($resource, $type = null) { - return is_string($resource) && 'php' === pathinfo($resource, PATHINFO_EXTENSION) && (!$type || 'annotation' === $type); + return \is_string($resource) && 'php' === pathinfo($resource, PATHINFO_EXTENSION) && (!$type || 'annotation' === $type); } /** @@ -87,7 +87,7 @@ class AnnotationFileLoader extends FileLoader $namespace = false; $tokens = token_get_all(file_get_contents($file)); - if (1 === count($tokens) && T_INLINE_HTML === $tokens[0][0]) { + if (1 === \count($tokens) && T_INLINE_HTML === $tokens[0][0]) { throw new \InvalidArgumentException(sprintf('The file "%s" does not contain PHP code. Did you forgot to add the "loader->setCurrentDir(dirname($this->path)); + $this->loader->setCurrentDir(\dirname($this->path)); $imported = $this->loader->import($resource, $type, $ignoreErrors, $this->file); - if (!is_array($imported)) { + if (!\is_array($imported)) { return new ImportConfigurator($this->collection, $imported); } diff --git a/vendor/symfony/routing/Loader/DirectoryLoader.php b/vendor/symfony/routing/Loader/DirectoryLoader.php index 4bb5b31b..08e833e0 100644 --- a/vendor/symfony/routing/Loader/DirectoryLoader.php +++ b/vendor/symfony/routing/Loader/DirectoryLoader.php @@ -12,8 +12,8 @@ namespace Symfony\Component\Routing\Loader; use Symfony\Component\Config\Loader\FileLoader; -use Symfony\Component\Routing\RouteCollection; use Symfony\Component\Config\Resource\DirectoryResource; +use Symfony\Component\Routing\RouteCollection; class DirectoryLoader extends FileLoader { diff --git a/vendor/symfony/routing/Loader/ObjectRouteLoader.php b/vendor/symfony/routing/Loader/ObjectRouteLoader.php index 24925447..dd14487c 100644 --- a/vendor/symfony/routing/Loader/ObjectRouteLoader.php +++ b/vendor/symfony/routing/Loader/ObjectRouteLoader.php @@ -50,7 +50,7 @@ abstract class ObjectRouteLoader extends Loader } $parts = explode('::', $resource); - if (2 != count($parts)) { + if (2 != \count($parts)) { throw new \InvalidArgumentException(sprintf('Invalid resource "%s" passed to the "service" route loader: use the format "service::method"', $resource)); } @@ -59,20 +59,20 @@ abstract class ObjectRouteLoader extends Loader $loaderObject = $this->getServiceObject($serviceString); - if (!is_object($loaderObject)) { - throw new \LogicException(sprintf('%s:getServiceObject() must return an object: %s returned', get_class($this), gettype($loaderObject))); + if (!\is_object($loaderObject)) { + throw new \LogicException(sprintf('%s:getServiceObject() must return an object: %s returned', \get_class($this), \gettype($loaderObject))); } - if (!is_callable(array($loaderObject, $method))) { - throw new \BadMethodCallException(sprintf('Method "%s" not found on "%s" when importing routing resource "%s"', $method, get_class($loaderObject), $resource)); + if (!\is_callable(array($loaderObject, $method))) { + throw new \BadMethodCallException(sprintf('Method "%s" not found on "%s" when importing routing resource "%s"', $method, \get_class($loaderObject), $resource)); } - $routeCollection = call_user_func(array($loaderObject, $method), $this); + $routeCollection = \call_user_func(array($loaderObject, $method), $this); if (!$routeCollection instanceof RouteCollection) { - $type = is_object($routeCollection) ? get_class($routeCollection) : gettype($routeCollection); + $type = \is_object($routeCollection) ? \get_class($routeCollection) : \gettype($routeCollection); - throw new \LogicException(sprintf('The %s::%s method must return a RouteCollection: %s returned', get_class($loaderObject), $method, $type)); + throw new \LogicException(sprintf('The %s::%s method must return a RouteCollection: %s returned', \get_class($loaderObject), $method, $type)); } // make the service file tracked so that if it changes, the cache rebuilds diff --git a/vendor/symfony/routing/Loader/PhpFileLoader.php b/vendor/symfony/routing/Loader/PhpFileLoader.php index 106ef5f6..8d7b0cb3 100644 --- a/vendor/symfony/routing/Loader/PhpFileLoader.php +++ b/vendor/symfony/routing/Loader/PhpFileLoader.php @@ -36,7 +36,7 @@ class PhpFileLoader extends FileLoader public function load($file, $type = null) { $path = $this->locator->locate($file); - $this->setCurrentDir(dirname($path)); + $this->setCurrentDir(\dirname($path)); // the closure forbids access to the private scope in the included file $loader = $this; @@ -63,7 +63,7 @@ class PhpFileLoader extends FileLoader */ public function supports($resource, $type = null) { - return is_string($resource) && 'php' === pathinfo($resource, PATHINFO_EXTENSION) && (!$type || 'php' === $type); + return \is_string($resource) && 'php' === pathinfo($resource, PATHINFO_EXTENSION) && (!$type || 'php' === $type); } } diff --git a/vendor/symfony/routing/Loader/XmlFileLoader.php b/vendor/symfony/routing/Loader/XmlFileLoader.php index f32c5ba2..54b0c65c 100644 --- a/vendor/symfony/routing/Loader/XmlFileLoader.php +++ b/vendor/symfony/routing/Loader/XmlFileLoader.php @@ -11,11 +11,11 @@ namespace Symfony\Component\Routing\Loader; -use Symfony\Component\Routing\RouteCollection; -use Symfony\Component\Routing\Route; -use Symfony\Component\Config\Resource\FileResource; use Symfony\Component\Config\Loader\FileLoader; +use Symfony\Component\Config\Resource\FileResource; use Symfony\Component\Config\Util\XmlUtils; +use Symfony\Component\Routing\Route; +use Symfony\Component\Routing\RouteCollection; /** * XmlFileLoader loads XML routing files. @@ -93,7 +93,7 @@ class XmlFileLoader extends FileLoader */ public function supports($resource, $type = null) { - return is_string($resource) && 'xml' === pathinfo($resource, PATHINFO_EXTENSION) && (!$type || 'xml' === $type); + return \is_string($resource) && 'xml' === pathinfo($resource, PATHINFO_EXTENSION) && (!$type || 'xml' === $type); } /** @@ -166,11 +166,11 @@ class XmlFileLoader extends FileLoader throw new \InvalidArgumentException(sprintf('The element in file "%s" must not have both a "prefix" attribute and child nodes.', $path)); } - $this->setCurrentDir(dirname($path)); + $this->setCurrentDir(\dirname($path)); $imported = $this->import($resource, ('' !== $type ? $type : null), false, $file); - if (!is_array($imported)) { + if (!\is_array($imported)) { $imported = array($imported); } diff --git a/vendor/symfony/routing/Loader/YamlFileLoader.php b/vendor/symfony/routing/Loader/YamlFileLoader.php index b4017110..3188f130 100644 --- a/vendor/symfony/routing/Loader/YamlFileLoader.php +++ b/vendor/symfony/routing/Loader/YamlFileLoader.php @@ -11,13 +11,13 @@ namespace Symfony\Component\Routing\Loader; -use Symfony\Component\Routing\RouteCollection; -use Symfony\Component\Routing\Route; +use Symfony\Component\Config\Loader\FileLoader; use Symfony\Component\Config\Resource\FileResource; +use Symfony\Component\Routing\Route; +use Symfony\Component\Routing\RouteCollection; use Symfony\Component\Yaml\Exception\ParseException; use Symfony\Component\Yaml\Parser as YamlParser; use Symfony\Component\Yaml\Yaml; -use Symfony\Component\Config\Loader\FileLoader; /** * YamlFileLoader loads Yaml routing files. @@ -73,7 +73,7 @@ class YamlFileLoader extends FileLoader } // not an array - if (!is_array($parsedConfig)) { + if (!\is_array($parsedConfig)) { throw new \InvalidArgumentException(sprintf('The file "%s" must contain a YAML array.', $path)); } @@ -95,7 +95,7 @@ class YamlFileLoader extends FileLoader */ public function supports($resource, $type = null) { - return is_string($resource) && in_array(pathinfo($resource, PATHINFO_EXTENSION), array('yml', 'yaml'), true) && (!$type || 'yaml' === $type); + return \is_string($resource) && \in_array(pathinfo($resource, PATHINFO_EXTENSION), array('yml', 'yaml'), true) && (!$type || 'yaml' === $type); } /** @@ -120,7 +120,7 @@ class YamlFileLoader extends FileLoader $defaults['_controller'] = $config['controller']; } - if (is_array($config['path'])) { + if (\is_array($config['path'])) { $route = new Route('', $defaults, $requirements, $options, $host, $schemes, $methods, $condition); foreach ($config['path'] as $locale => $path) { @@ -161,11 +161,11 @@ class YamlFileLoader extends FileLoader $defaults['_controller'] = $config['controller']; } - $this->setCurrentDir(dirname($path)); + $this->setCurrentDir(\dirname($path)); $imported = $this->import($config['resource'], $type, false, $file); - if (!is_array($imported)) { + if (!\is_array($imported)) { $imported = array($imported); } @@ -240,7 +240,7 @@ class YamlFileLoader extends FileLoader */ protected function validate($config, $name, $path) { - if (!is_array($config)) { + if (!\is_array($config)) { throw new \InvalidArgumentException(sprintf('The definition of "%s" in "%s" must be a YAML array.', $name, $path)); } if ($extraKeys = array_diff(array_keys($config), self::$availableKeys)) { diff --git a/vendor/symfony/routing/Matcher/Dumper/PhpMatcherDumper.php b/vendor/symfony/routing/Matcher/Dumper/PhpMatcherDumper.php index adb2b0a1..14e5cc34 100644 --- a/vendor/symfony/routing/Matcher/Dumper/PhpMatcherDumper.php +++ b/vendor/symfony/routing/Matcher/Dumper/PhpMatcherDumper.php @@ -11,11 +11,11 @@ namespace Symfony\Component\Routing\Matcher\Dumper; +use Symfony\Component\ExpressionLanguage\ExpressionFunctionProviderInterface; +use Symfony\Component\ExpressionLanguage\ExpressionLanguage; use Symfony\Component\Routing\Matcher\RedirectableUrlMatcherInterface; use Symfony\Component\Routing\Route; use Symfony\Component\Routing\RouteCollection; -use Symfony\Component\ExpressionLanguage\ExpressionLanguage; -use Symfony\Component\ExpressionLanguage\ExpressionFunctionProviderInterface; /** * PhpMatcherDumper creates a PHP class able to match URLs for a given set of routes. @@ -177,7 +177,7 @@ EOF list($staticRoutes, $dynamicRoutes) = $this->groupStaticRoutes($routes); $code = $this->compileStaticRoutes($staticRoutes, $matchHost); - $chunkLimit = count($dynamicRoutes); + $chunkLimit = \count($dynamicRoutes); while (true) { try { @@ -194,7 +194,7 @@ EOF } // used to display the Welcome Page in apps that don't define a homepage - $code .= " if ('/' === \$pathinfo && !\$allow) {\n"; + $code .= " if ('/' === \$pathinfo && !\$allow && !\$allowSchemes) {\n"; $code .= " throw new Symfony\Component\Routing\Exception\NoConfigurationException();\n"; $code .= " }\n"; @@ -250,7 +250,7 @@ EOF $code = $default = ''; foreach ($staticRoutes as $url => $routes) { - if (1 === count($routes)) { + if (1 === \count($routes)) { foreach ($routes as $name => $route) { } @@ -368,7 +368,7 @@ EOF; $prev = false; $rx = '{^(?'; $code .= "\n {$state->mark} => ".self::export($rx); - $state->mark += strlen($rx); + $state->mark += \strlen($rx); $state->regex = $rx; foreach ($perHost as list($hostRegex, $routes)) { @@ -379,10 +379,10 @@ EOF; $hostRegex = '(?i:'.preg_replace_callback('#\?P<([^>]++)>#', $state->getVars, $rx[1]).')\.'; $state->hostVars = $state->vars; } else { - $hostRegex = '(?:(?:[^.]*+\.)++)'; + $hostRegex = '(?:(?:[^./]*+\.)++)'; $state->hostVars = array(); } - $state->mark += strlen($rx = ($prev ? ')' : '')."|{$hostRegex}(?"); + $state->mark += \strlen($rx = ($prev ? ')' : '')."|{$hostRegex}(?"); $code .= "\n .".self::export($rx); $state->regex .= $rx; $prev = true; @@ -468,10 +468,10 @@ EOF; if ($route instanceof StaticPrefixCollection) { $prevRegex = null; $prefix = substr($route->getPrefix(), $prefixLen); - $state->mark += strlen($rx = "|{$prefix}(?"); + $state->mark += \strlen($rx = "|{$prefix}(?"); $code .= "\n .".self::export($rx); $state->regex .= $rx; - $code .= $this->indent($this->compileStaticPrefixCollection($route, $state, $prefixLen + strlen($prefix))); + $code .= $this->indent($this->compileStaticPrefixCollection($route, $state, $prefixLen + \strlen($prefix))); $code .= "\n .')'"; $state->regex .= ')'; ++$state->markTail; @@ -486,14 +486,14 @@ EOF; continue; } - $state->mark += 3 + $state->markTail + strlen($regex) - $prefixLen; - $state->markTail = 2 + strlen($state->mark); + $state->mark += 3 + $state->markTail + \strlen($regex) - $prefixLen; + $state->markTail = 2 + \strlen($state->mark); $rx = sprintf('|%s(*:%s)', substr($regex, $prefixLen), $state->mark); $code .= "\n .".self::export($rx); $state->regex .= $rx; $vars = array_merge($state->hostVars, $vars); - if (!$route->getCondition() && (!is_array($next = $routes[1 + $i] ?? null) || $regex !== $next[1])) { + if (!$route->getCondition() && (!\is_array($next = $routes[1 + $i] ?? null) || $regex !== $next[1])) { $prevRegex = null; $defaults = $route->getDefaults(); if (isset($defaults['_canonical_route'])) { @@ -628,7 +628,7 @@ EOF; $gotoname = 'not_'.preg_replace('/[^A-Za-z0-9_]/', '', $name); // the offset where the return value is appended below, with indendation - $retOffset = 12 + strlen($code); + $retOffset = 12 + \strlen($code); $defaults = $route->getDefaults(); if (isset($defaults['_canonical_route'])) { $name = $defaults['_canonical_route']; @@ -746,6 +746,10 @@ EOF; return 'null'; } if (!\is_array($value)) { + if (\is_object($value)) { + throw new \InvalidArgumentException('Symfony\Component\Routing\Route cannot contain objects.'); + } + return str_replace("\n", '\'."\n".\'', var_export($value, true)); } if (!$value) { diff --git a/vendor/symfony/routing/Matcher/RequestMatcherInterface.php b/vendor/symfony/routing/Matcher/RequestMatcherInterface.php index 1eef778a..0c193ff2 100644 --- a/vendor/symfony/routing/Matcher/RequestMatcherInterface.php +++ b/vendor/symfony/routing/Matcher/RequestMatcherInterface.php @@ -12,9 +12,9 @@ namespace Symfony\Component\Routing\Matcher; use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\Routing\Exception\MethodNotAllowedException; use Symfony\Component\Routing\Exception\NoConfigurationException; use Symfony\Component\Routing\Exception\ResourceNotFoundException; -use Symfony\Component\Routing\Exception\MethodNotAllowedException; /** * RequestMatcherInterface is the interface that all request matcher classes must implement. diff --git a/vendor/symfony/routing/Matcher/TraceableUrlMatcher.php b/vendor/symfony/routing/Matcher/TraceableUrlMatcher.php index 9085be04..61cad8e6 100644 --- a/vendor/symfony/routing/Matcher/TraceableUrlMatcher.php +++ b/vendor/symfony/routing/Matcher/TraceableUrlMatcher.php @@ -69,7 +69,7 @@ class TraceableUrlMatcher extends UrlMatcher $r = new Route($route->getPath(), $route->getDefaults(), array($n => $regex), $route->getOptions()); $cr = $r->compile(); - if (in_array($n, $cr->getVariables()) && !preg_match($cr->getRegex(), $pathinfo)) { + if (\in_array($n, $cr->getVariables()) && !preg_match($cr->getRegex(), $pathinfo)) { $this->addTrace(sprintf('Requirement for "%s" does not match (%s)', $n, $regex), self::ROUTE_ALMOST_MATCHES, $name, $route); continue 2; @@ -94,7 +94,7 @@ class TraceableUrlMatcher extends UrlMatcher $method = 'GET'; } - if (!in_array($method, $requiredMethods)) { + if (!\in_array($method, $requiredMethods)) { $this->allow = array_merge($this->allow, $requiredMethods); $this->addTrace(sprintf('Method "%s" does not match any of the required methods (%s)', $this->context->getMethod(), implode(', ', $requiredMethods)), self::ROUTE_ALMOST_MATCHES, $name, $route); diff --git a/vendor/symfony/routing/Matcher/UrlMatcher.php b/vendor/symfony/routing/Matcher/UrlMatcher.php index 95e2f196..095e6dc2 100644 --- a/vendor/symfony/routing/Matcher/UrlMatcher.php +++ b/vendor/symfony/routing/Matcher/UrlMatcher.php @@ -11,15 +11,15 @@ namespace Symfony\Component\Routing\Matcher; +use Symfony\Component\ExpressionLanguage\ExpressionFunctionProviderInterface; +use Symfony\Component\ExpressionLanguage\ExpressionLanguage; +use Symfony\Component\HttpFoundation\Request; use Symfony\Component\Routing\Exception\MethodNotAllowedException; use Symfony\Component\Routing\Exception\NoConfigurationException; use Symfony\Component\Routing\Exception\ResourceNotFoundException; -use Symfony\Component\Routing\RouteCollection; use Symfony\Component\Routing\RequestContext; use Symfony\Component\Routing\Route; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\ExpressionLanguage\ExpressionLanguage; -use Symfony\Component\ExpressionLanguage\ExpressionFunctionProviderInterface; +use Symfony\Component\Routing\RouteCollection; /** * UrlMatcher matches URL based on a set of routes. @@ -92,7 +92,7 @@ class UrlMatcher implements UrlMatcherInterface, RequestMatcherInterface throw new NoConfigurationException(); } - throw 0 < count($this->allow) + throw 0 < \count($this->allow) ? new MethodNotAllowedException(array_unique($this->allow)) : new ResourceNotFoundException(sprintf('No routes found for "%s".', $pathinfo)); } @@ -160,7 +160,7 @@ class UrlMatcher implements UrlMatcherInterface, RequestMatcherInterface $method = 'GET'; } - if (!in_array($method, $requiredMethods)) { + if (!\in_array($method, $requiredMethods)) { if ($hasRequiredScheme) { $this->allow = array_merge($this->allow, $requiredMethods); } diff --git a/vendor/symfony/routing/Matcher/UrlMatcherInterface.php b/vendor/symfony/routing/Matcher/UrlMatcherInterface.php index 2c7c3135..17f1f97b 100644 --- a/vendor/symfony/routing/Matcher/UrlMatcherInterface.php +++ b/vendor/symfony/routing/Matcher/UrlMatcherInterface.php @@ -11,10 +11,10 @@ namespace Symfony\Component\Routing\Matcher; -use Symfony\Component\Routing\Exception\NoConfigurationException; -use Symfony\Component\Routing\RequestContextAwareInterface; -use Symfony\Component\Routing\Exception\ResourceNotFoundException; use Symfony\Component\Routing\Exception\MethodNotAllowedException; +use Symfony\Component\Routing\Exception\NoConfigurationException; +use Symfony\Component\Routing\Exception\ResourceNotFoundException; +use Symfony\Component\Routing\RequestContextAwareInterface; /** * UrlMatcherInterface is the interface that all URL matcher classes must implement. diff --git a/vendor/symfony/routing/Route.php b/vendor/symfony/routing/Route.php index 09ac13de..1b060a86 100644 --- a/vendor/symfony/routing/Route.php +++ b/vendor/symfony/routing/Route.php @@ -209,7 +209,7 @@ class Route implements \Serializable */ public function hasScheme($scheme) { - return in_array(strtolower($scheme), $this->schemes, true); + return \in_array(strtolower($scheme), $this->schemes, true); } /** @@ -550,7 +550,7 @@ class Route implements \Serializable private function sanitizeRequirement($key, $regex) { - if (!is_string($regex)) { + if (!\is_string($regex)) { throw new \InvalidArgumentException(sprintf('Routing requirement for "%s" must be a string.', $key)); } diff --git a/vendor/symfony/routing/RouteCollection.php b/vendor/symfony/routing/RouteCollection.php index 4d14ca96..4525404d 100644 --- a/vendor/symfony/routing/RouteCollection.php +++ b/vendor/symfony/routing/RouteCollection.php @@ -63,7 +63,7 @@ class RouteCollection implements \IteratorAggregate, \Countable */ public function count() { - return count($this->routes); + return \count($this->routes); } /** diff --git a/vendor/symfony/routing/RouteCollectionBuilder.php b/vendor/symfony/routing/RouteCollectionBuilder.php index c98d642a..d5ff578c 100644 --- a/vendor/symfony/routing/RouteCollectionBuilder.php +++ b/vendor/symfony/routing/RouteCollectionBuilder.php @@ -358,7 +358,7 @@ class RouteCollectionBuilder if ($this->loader->supports($resource, $type)) { $collections = $this->loader->load($resource, $type); - return is_array($collections) ? $collections : array($collections); + return \is_array($collections) ? $collections : array($collections); } if (null === $resolver = $this->loader->getResolver()) { @@ -371,6 +371,6 @@ class RouteCollectionBuilder $collections = $loader->load($resource, $type); - return is_array($collections) ? $collections : array($collections); + return \is_array($collections) ? $collections : array($collections); } } diff --git a/vendor/symfony/routing/RouteCompiler.php b/vendor/symfony/routing/RouteCompiler.php index 91b4a297..66b291b8 100644 --- a/vendor/symfony/routing/RouteCompiler.php +++ b/vendor/symfony/routing/RouteCompiler.php @@ -116,9 +116,9 @@ class RouteCompiler implements RouteCompilerInterface $varName = substr($match[0][0], 1, -1); // get all static text preceding the current variable $precedingText = substr($pattern, $pos, $match[0][1] - $pos); - $pos = $match[0][1] + strlen($match[0][0]); + $pos = $match[0][1] + \strlen($match[0][0]); - if (!strlen($precedingText)) { + if (!\strlen($precedingText)) { $precedingChar = ''; } elseif ($useUtf8) { preg_match('/.$/u', $precedingText, $precedingChar); @@ -133,17 +133,17 @@ class RouteCompiler implements RouteCompilerInterface if (preg_match('/^\d/', $varName)) { throw new \DomainException(sprintf('Variable name "%s" cannot start with a digit in route pattern "%s". Please use a different name.', $varName, $pattern)); } - if (in_array($varName, $variables)) { + if (\in_array($varName, $variables)) { throw new \LogicException(sprintf('Route pattern "%s" cannot reference variable name "%s" more than once.', $pattern, $varName)); } - if (strlen($varName) > self::VARIABLE_MAXIMUM_LENGTH) { + if (\strlen($varName) > self::VARIABLE_MAXIMUM_LENGTH) { throw new \DomainException(sprintf('Variable name "%s" cannot be longer than %s characters in route pattern "%s". Please use a shorter name.', $varName, self::VARIABLE_MAXIMUM_LENGTH, $pattern)); } if ($isSeparator && $precedingText !== $precedingChar) { - $tokens[] = array('text', substr($precedingText, 0, -strlen($precedingChar))); - } elseif (!$isSeparator && strlen($precedingText) > 0) { + $tokens[] = array('text', substr($precedingText, 0, -\strlen($precedingChar))); + } elseif (!$isSeparator && \strlen($precedingText) > 0) { $tokens[] = array('text', $precedingText); } @@ -187,14 +187,14 @@ class RouteCompiler implements RouteCompilerInterface $variables[] = $varName; } - if ($pos < strlen($pattern)) { + if ($pos < \strlen($pattern)) { $tokens[] = array('text', substr($pattern, $pos)); } // find the first optional token $firstOptional = PHP_INT_MAX; if (!$isHost) { - for ($i = count($tokens) - 1; $i >= 0; --$i) { + for ($i = \count($tokens) - 1; $i >= 0; --$i) { $token = $tokens[$i]; if ('variable' === $token[0] && $route->hasDefault($token[3])) { $firstOptional = $i; @@ -206,7 +206,7 @@ class RouteCompiler implements RouteCompilerInterface // compute the matching regexp $regexp = ''; - for ($i = 0, $nbToken = count($tokens); $i < $nbToken; ++$i) { + for ($i = 0, $nbToken = \count($tokens); $i < $nbToken; ++$i) { $regexp .= self::computeRegexp($tokens, $i, $firstOptional); } $regexp = self::REGEX_DELIMITER.'^'.$regexp.'$'.self::REGEX_DELIMITER.'sD'.($isHost ? 'i' : ''); @@ -214,7 +214,7 @@ class RouteCompiler implements RouteCompilerInterface // enable Utf8 matching if really required if ($needsUtf8) { $regexp .= 'u'; - for ($i = 0, $nbToken = count($tokens); $i < $nbToken; ++$i) { + for ($i = 0, $nbToken = \count($tokens); $i < $nbToken; ++$i) { if ('variable' === $tokens[$i][0]) { $tokens[$i][] = true; } @@ -294,7 +294,7 @@ class RouteCompiler implements RouteCompilerInterface // "?:" means it is non-capturing, i.e. the portion of the subject string that // matched the optional subpattern is not passed back. $regexp = "(?:$regexp"; - $nbTokens = count($tokens); + $nbTokens = \count($tokens); if ($nbTokens - 1 == $index) { // Close the optional subpatterns $regexp .= str_repeat(')?', $nbTokens - $firstOptional - (0 === $firstOptional ? 1 : 0)); diff --git a/vendor/symfony/routing/Router.php b/vendor/symfony/routing/Router.php index ed56332e..56842a4d 100644 --- a/vendor/symfony/routing/Router.php +++ b/vendor/symfony/routing/Router.php @@ -11,19 +11,19 @@ namespace Symfony\Component\Routing; -use Symfony\Component\Config\Loader\LoaderInterface; -use Symfony\Component\Config\ConfigCacheInterface; -use Symfony\Component\Config\ConfigCacheFactoryInterface; -use Symfony\Component\Config\ConfigCacheFactory; use Psr\Log\LoggerInterface; +use Symfony\Component\Config\ConfigCacheFactory; +use Symfony\Component\Config\ConfigCacheFactoryInterface; +use Symfony\Component\Config\ConfigCacheInterface; +use Symfony\Component\Config\Loader\LoaderInterface; +use Symfony\Component\ExpressionLanguage\ExpressionFunctionProviderInterface; +use Symfony\Component\HttpFoundation\Request; use Symfony\Component\Routing\Generator\ConfigurableRequirementsInterface; -use Symfony\Component\Routing\Generator\UrlGeneratorInterface; use Symfony\Component\Routing\Generator\Dumper\GeneratorDumperInterface; +use Symfony\Component\Routing\Generator\UrlGeneratorInterface; +use Symfony\Component\Routing\Matcher\Dumper\MatcherDumperInterface; use Symfony\Component\Routing\Matcher\RequestMatcherInterface; use Symfony\Component\Routing\Matcher\UrlMatcherInterface; -use Symfony\Component\Routing\Matcher\Dumper\MatcherDumperInterface; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\ExpressionLanguage\ExpressionFunctionProviderInterface; /** * The Router class is an example of the integration of all pieces of the diff --git a/vendor/symfony/routing/Tests/Fixtures/CustomXmlFileLoader.php b/vendor/symfony/routing/Tests/Fixtures/CustomXmlFileLoader.php index 9fd5754a..b7a02b60 100644 --- a/vendor/symfony/routing/Tests/Fixtures/CustomXmlFileLoader.php +++ b/vendor/symfony/routing/Tests/Fixtures/CustomXmlFileLoader.php @@ -11,8 +11,8 @@ namespace Symfony\Component\Routing\Tests\Fixtures; -use Symfony\Component\Routing\Loader\XmlFileLoader; use Symfony\Component\Config\Util\XmlUtils; +use Symfony\Component\Routing\Loader\XmlFileLoader; /** * XmlFileLoader with schema validation turned off. diff --git a/vendor/symfony/routing/Tests/Fixtures/RedirectableUrlMatcher.php b/vendor/symfony/routing/Tests/Fixtures/RedirectableUrlMatcher.php index 15937bcf..08b67a07 100644 --- a/vendor/symfony/routing/Tests/Fixtures/RedirectableUrlMatcher.php +++ b/vendor/symfony/routing/Tests/Fixtures/RedirectableUrlMatcher.php @@ -11,8 +11,8 @@ namespace Symfony\Component\Routing\Tests\Fixtures; -use Symfony\Component\Routing\Matcher\UrlMatcher; use Symfony\Component\Routing\Matcher\RedirectableUrlMatcherInterface; +use Symfony\Component\Routing\Matcher\UrlMatcher; /** * @author Fabien Potencier diff --git a/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher0.php b/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher0.php index 0a56bf17..e7c07650 100644 --- a/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher0.php +++ b/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher0.php @@ -26,7 +26,7 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Matcher\UrlMatcher $canonicalMethod = 'GET'; } - if ('/' === $pathinfo && !$allow) { + if ('/' === $pathinfo && !$allow && !$allowSchemes) { throw new Symfony\Component\Routing\Exception\NoConfigurationException(); } diff --git a/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher1.php b/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher1.php index b39bc7f2..68e7741b 100644 --- a/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher1.php +++ b/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher1.php @@ -82,47 +82,47 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Matcher\UrlMatcher $matchedPathinfo = $host.'.'.$pathinfo; $regexList = array( 0 => '{^(?' - .'|(?:(?:[^.]*+\\.)++)(?' - .'|/foo/(baz|symfony)(*:46)' + .'|(?:(?:[^./]*+\\.)++)(?' + .'|/foo/(baz|symfony)(*:47)' .'|/bar(?' - .'|/([^/]++)(*:69)' - .'|head/([^/]++)(*:89)' + .'|/([^/]++)(*:70)' + .'|head/([^/]++)(*:90)' .')' .'|/test/([^/]++)/(?' - .'|(*:115)' + .'|(*:116)' .')' - .'|/([\']+)(*:131)' + .'|/([\']+)(*:132)' .'|/a/(?' .'|b\'b/([^/]++)(?' - .'|(*:160)' - .'|(*:168)' + .'|(*:161)' + .'|(*:169)' .')' - .'|(.*)(*:181)' + .'|(.*)(*:182)' .'|b\'b/([^/]++)(?' - .'|(*:204)' - .'|(*:212)' + .'|(*:205)' + .'|(*:213)' .')' .')' - .'|/multi/hello(?:/([^/]++))?(*:248)' + .'|/multi/hello(?:/([^/]++))?(*:249)' .'|/([^/]++)/b/([^/]++)(?' - .'|(*:279)' - .'|(*:287)' + .'|(*:280)' + .'|(*:288)' .')' - .'|/aba/([^/]++)(*:309)' + .'|/aba/([^/]++)(*:310)' .')|(?i:([^\\.]++)\\.example\\.com)\\.(?' .'|/route1(?' - .'|3/([^/]++)(*:371)' - .'|4/([^/]++)(*:389)' + .'|3/([^/]++)(*:372)' + .'|4/([^/]++)(*:390)' .')' .')|(?i:c\\.example\\.com)\\.(?' - .'|/route15/([^/]++)(*:441)' - .')|(?:(?:[^.]*+\\.)++)(?' - .'|/route16/([^/]++)(*:488)' + .'|/route15/([^/]++)(*:442)' + .')|(?:(?:[^./]*+\\.)++)(?' + .'|/route16/([^/]++)(*:490)' .'|/a/(?' - .'|a\\.\\.\\.(*:509)' + .'|a\\.\\.\\.(*:511)' .'|b/(?' - .'|([^/]++)(*:530)' - .'|c/([^/]++)(*:548)' + .'|([^/]++)(*:532)' + .'|c/([^/]++)(*:550)' .')' .')' .')' @@ -132,7 +132,7 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Matcher\UrlMatcher foreach ($regexList as $offset => $regex) { while (preg_match($regex, $matchedPathinfo, $matches)) { switch ($m = (int) $matches['MARK']) { - case 115: + case 116: $matches = array('foo' => $matches[1] ?? null); // baz4 @@ -159,7 +159,7 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Matcher\UrlMatcher not_bazbaz6: break; - case 160: + case 161: $matches = array('foo' => $matches[1] ?? null); // foo1 @@ -173,14 +173,14 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Matcher\UrlMatcher not_foo1: break; - case 204: + case 205: $matches = array('foo1' => $matches[1] ?? null); // foo2 return $this->mergeDefaults(array('_route' => 'foo2') + $matches, array()); break; - case 279: + case 280: $matches = array('_locale' => $matches[1] ?? null, 'foo' => $matches[2] ?? null); // foo3 @@ -189,23 +189,23 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Matcher\UrlMatcher break; default: $routes = array( - 46 => array(array('_route' => 'foo', 'def' => 'test'), array('bar'), null, null), - 69 => array(array('_route' => 'bar'), array('foo'), array('GET' => 0, 'HEAD' => 1), null), - 89 => array(array('_route' => 'barhead'), array('foo'), array('GET' => 0), null), - 131 => array(array('_route' => 'quoter'), array('quoter'), null, null), - 168 => array(array('_route' => 'bar1'), array('bar'), null, null), - 181 => array(array('_route' => 'overridden'), array('var'), null, null), - 212 => array(array('_route' => 'bar2'), array('bar1'), null, null), - 248 => array(array('_route' => 'helloWorld', 'who' => 'World!'), array('who'), null, null), - 287 => array(array('_route' => 'bar3'), array('_locale', 'bar'), null, null), - 309 => array(array('_route' => 'foo4'), array('foo'), null, null), - 371 => array(array('_route' => 'route13'), array('var1', 'name'), null, null), - 389 => array(array('_route' => 'route14', 'var1' => 'val'), array('var1', 'name'), null, null), - 441 => array(array('_route' => 'route15'), array('name'), null, null), - 488 => array(array('_route' => 'route16', 'var1' => 'val'), array('name'), null, null), - 509 => array(array('_route' => 'a'), array(), null, null), - 530 => array(array('_route' => 'b'), array('var'), null, null), - 548 => array(array('_route' => 'c'), array('var'), null, null), + 47 => array(array('_route' => 'foo', 'def' => 'test'), array('bar'), null, null), + 70 => array(array('_route' => 'bar'), array('foo'), array('GET' => 0, 'HEAD' => 1), null), + 90 => array(array('_route' => 'barhead'), array('foo'), array('GET' => 0), null), + 132 => array(array('_route' => 'quoter'), array('quoter'), null, null), + 169 => array(array('_route' => 'bar1'), array('bar'), null, null), + 182 => array(array('_route' => 'overridden'), array('var'), null, null), + 213 => array(array('_route' => 'bar2'), array('bar1'), null, null), + 249 => array(array('_route' => 'helloWorld', 'who' => 'World!'), array('who'), null, null), + 288 => array(array('_route' => 'bar3'), array('_locale', 'bar'), null, null), + 310 => array(array('_route' => 'foo4'), array('foo'), null, null), + 372 => array(array('_route' => 'route13'), array('var1', 'name'), null, null), + 390 => array(array('_route' => 'route14', 'var1' => 'val'), array('var1', 'name'), null, null), + 442 => array(array('_route' => 'route15'), array('name'), null, null), + 490 => array(array('_route' => 'route16', 'var1' => 'val'), array('name'), null, null), + 511 => array(array('_route' => 'a'), array(), null, null), + 532 => array(array('_route' => 'b'), array('var'), null, null), + 550 => array(array('_route' => 'c'), array('var'), null, null), ); list($ret, $vars, $requiredMethods, $requiredSchemes) = $routes[$m]; @@ -231,14 +231,14 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Matcher\UrlMatcher return $ret; } - if (548 === $m) { + if (550 === $m) { break; } $regex = substr_replace($regex, 'F', $m - $offset, 1 + strlen($m)); $offset += strlen($m); } } - if ('/' === $pathinfo && !$allow) { + if ('/' === $pathinfo && !$allow && !$allowSchemes) { throw new Symfony\Component\Routing\Exception\NoConfigurationException(); } diff --git a/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher10.php b/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher10.php index 81ded341..2f5cc3fc 100644 --- a/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher10.php +++ b/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher10.php @@ -2821,7 +2821,7 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Matcher\UrlMatcher $offset += strlen($m); } } - if ('/' === $pathinfo && !$allow) { + if ('/' === $pathinfo && !$allow && !$allowSchemes) { throw new Symfony\Component\Routing\Exception\NoConfigurationException(); } diff --git a/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher11.php b/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher11.php index c0bbc582..173cc152 100644 --- a/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher11.php +++ b/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher11.php @@ -142,7 +142,7 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Tests\Fixtures\Redirec $offset += strlen($m); } } - if ('/' === $pathinfo && !$allow) { + if ('/' === $pathinfo && !$allow && !$allowSchemes) { throw new Symfony\Component\Routing\Exception\NoConfigurationException(); } diff --git a/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher12.php b/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher12.php index 02f6ac94..eba4c8ac 100644 --- a/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher12.php +++ b/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher12.php @@ -91,7 +91,7 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Matcher\UrlMatcher $offset += strlen($m); } } - if ('/' === $pathinfo && !$allow) { + if ('/' === $pathinfo && !$allow && !$allowSchemes) { throw new Symfony\Component\Routing\Exception\NoConfigurationException(); } diff --git a/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher13.php b/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher13.php index b4457d7c..5cda7753 100644 --- a/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher13.php +++ b/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher13.php @@ -60,7 +60,7 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Matcher\UrlMatcher $offset += strlen($m); } } - if ('/' === $pathinfo && !$allow) { + if ('/' === $pathinfo && !$allow && !$allowSchemes) { throw new Symfony\Component\Routing\Exception\NoConfigurationException(); } diff --git a/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher2.php b/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher2.php index 79b650eb..5aec5db0 100644 --- a/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher2.php +++ b/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher2.php @@ -119,47 +119,47 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Tests\Fixtures\Redirec $matchedPathinfo = $host.'.'.$pathinfo; $regexList = array( 0 => '{^(?' - .'|(?:(?:[^.]*+\\.)++)(?' - .'|/foo/(baz|symfony)(*:46)' + .'|(?:(?:[^./]*+\\.)++)(?' + .'|/foo/(baz|symfony)(*:47)' .'|/bar(?' - .'|/([^/]++)(*:69)' - .'|head/([^/]++)(*:89)' + .'|/([^/]++)(*:70)' + .'|head/([^/]++)(*:90)' .')' .'|/test/([^/]++)/(?' - .'|(*:115)' + .'|(*:116)' .')' - .'|/([\']+)(*:131)' + .'|/([\']+)(*:132)' .'|/a/(?' .'|b\'b/([^/]++)(?' - .'|(*:160)' - .'|(*:168)' + .'|(*:161)' + .'|(*:169)' .')' - .'|(.*)(*:181)' + .'|(.*)(*:182)' .'|b\'b/([^/]++)(?' - .'|(*:204)' - .'|(*:212)' + .'|(*:205)' + .'|(*:213)' .')' .')' - .'|/multi/hello(?:/([^/]++))?(*:248)' + .'|/multi/hello(?:/([^/]++))?(*:249)' .'|/([^/]++)/b/([^/]++)(?' - .'|(*:279)' - .'|(*:287)' + .'|(*:280)' + .'|(*:288)' .')' - .'|/aba/([^/]++)(*:309)' + .'|/aba/([^/]++)(*:310)' .')|(?i:([^\\.]++)\\.example\\.com)\\.(?' .'|/route1(?' - .'|3/([^/]++)(*:371)' - .'|4/([^/]++)(*:389)' + .'|3/([^/]++)(*:372)' + .'|4/([^/]++)(*:390)' .')' .')|(?i:c\\.example\\.com)\\.(?' - .'|/route15/([^/]++)(*:441)' - .')|(?:(?:[^.]*+\\.)++)(?' - .'|/route16/([^/]++)(*:488)' + .'|/route15/([^/]++)(*:442)' + .')|(?:(?:[^./]*+\\.)++)(?' + .'|/route16/([^/]++)(*:490)' .'|/a/(?' - .'|a\\.\\.\\.(*:509)' + .'|a\\.\\.\\.(*:511)' .'|b/(?' - .'|([^/]++)(*:530)' - .'|c/([^/]++)(*:548)' + .'|([^/]++)(*:532)' + .'|c/([^/]++)(*:550)' .')' .')' .')' @@ -169,7 +169,7 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Tests\Fixtures\Redirec foreach ($regexList as $offset => $regex) { while (preg_match($regex, $matchedPathinfo, $matches)) { switch ($m = (int) $matches['MARK']) { - case 115: + case 116: $matches = array('foo' => $matches[1] ?? null); // baz4 @@ -196,7 +196,7 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Tests\Fixtures\Redirec not_bazbaz6: break; - case 160: + case 161: $matches = array('foo' => $matches[1] ?? null); // foo1 @@ -210,14 +210,14 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Tests\Fixtures\Redirec not_foo1: break; - case 204: + case 205: $matches = array('foo1' => $matches[1] ?? null); // foo2 return $this->mergeDefaults(array('_route' => 'foo2') + $matches, array()); break; - case 279: + case 280: $matches = array('_locale' => $matches[1] ?? null, 'foo' => $matches[2] ?? null); // foo3 @@ -226,23 +226,23 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Tests\Fixtures\Redirec break; default: $routes = array( - 46 => array(array('_route' => 'foo', 'def' => 'test'), array('bar'), null, null), - 69 => array(array('_route' => 'bar'), array('foo'), array('GET' => 0, 'HEAD' => 1), null), - 89 => array(array('_route' => 'barhead'), array('foo'), array('GET' => 0), null), - 131 => array(array('_route' => 'quoter'), array('quoter'), null, null), - 168 => array(array('_route' => 'bar1'), array('bar'), null, null), - 181 => array(array('_route' => 'overridden'), array('var'), null, null), - 212 => array(array('_route' => 'bar2'), array('bar1'), null, null), - 248 => array(array('_route' => 'helloWorld', 'who' => 'World!'), array('who'), null, null), - 287 => array(array('_route' => 'bar3'), array('_locale', 'bar'), null, null), - 309 => array(array('_route' => 'foo4'), array('foo'), null, null), - 371 => array(array('_route' => 'route13'), array('var1', 'name'), null, null), - 389 => array(array('_route' => 'route14', 'var1' => 'val'), array('var1', 'name'), null, null), - 441 => array(array('_route' => 'route15'), array('name'), null, null), - 488 => array(array('_route' => 'route16', 'var1' => 'val'), array('name'), null, null), - 509 => array(array('_route' => 'a'), array(), null, null), - 530 => array(array('_route' => 'b'), array('var'), null, null), - 548 => array(array('_route' => 'c'), array('var'), null, null), + 47 => array(array('_route' => 'foo', 'def' => 'test'), array('bar'), null, null), + 70 => array(array('_route' => 'bar'), array('foo'), array('GET' => 0, 'HEAD' => 1), null), + 90 => array(array('_route' => 'barhead'), array('foo'), array('GET' => 0), null), + 132 => array(array('_route' => 'quoter'), array('quoter'), null, null), + 169 => array(array('_route' => 'bar1'), array('bar'), null, null), + 182 => array(array('_route' => 'overridden'), array('var'), null, null), + 213 => array(array('_route' => 'bar2'), array('bar1'), null, null), + 249 => array(array('_route' => 'helloWorld', 'who' => 'World!'), array('who'), null, null), + 288 => array(array('_route' => 'bar3'), array('_locale', 'bar'), null, null), + 310 => array(array('_route' => 'foo4'), array('foo'), null, null), + 372 => array(array('_route' => 'route13'), array('var1', 'name'), null, null), + 390 => array(array('_route' => 'route14', 'var1' => 'val'), array('var1', 'name'), null, null), + 442 => array(array('_route' => 'route15'), array('name'), null, null), + 490 => array(array('_route' => 'route16', 'var1' => 'val'), array('name'), null, null), + 511 => array(array('_route' => 'a'), array(), null, null), + 532 => array(array('_route' => 'b'), array('var'), null, null), + 550 => array(array('_route' => 'c'), array('var'), null, null), ); list($ret, $vars, $requiredMethods, $requiredSchemes) = $routes[$m]; @@ -268,14 +268,14 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Tests\Fixtures\Redirec return $ret; } - if (548 === $m) { + if (550 === $m) { break; } $regex = substr_replace($regex, 'F', $m - $offset, 1 + strlen($m)); $offset += strlen($m); } } - if ('/' === $pathinfo && !$allow) { + if ('/' === $pathinfo && !$allow && !$allowSchemes) { throw new Symfony\Component\Routing\Exception\NoConfigurationException(); } diff --git a/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher3.php b/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher3.php index df4e2208..6f1c45aa 100644 --- a/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher3.php +++ b/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher3.php @@ -103,7 +103,7 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Matcher\UrlMatcher $offset += strlen($m); } } - if ('/' === $pathinfo && !$allow) { + if ('/' === $pathinfo && !$allow && !$allowSchemes) { throw new Symfony\Component\Routing\Exception\NoConfigurationException(); } diff --git a/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher4.php b/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher4.php index 795feaf5..418f8e0b 100644 --- a/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher4.php +++ b/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher4.php @@ -75,7 +75,7 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Matcher\UrlMatcher return $ret; } - if ('/' === $pathinfo && !$allow) { + if ('/' === $pathinfo && !$allow && !$allowSchemes) { throw new Symfony\Component\Routing\Exception\NoConfigurationException(); } diff --git a/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher5.php b/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher5.php index f3f1fc16..976a25fb 100644 --- a/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher5.php +++ b/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher5.php @@ -145,7 +145,7 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Tests\Fixtures\Redirec $offset += strlen($m); } } - if ('/' === $pathinfo && !$allow) { + if ('/' === $pathinfo && !$allow && !$allowSchemes) { throw new Symfony\Component\Routing\Exception\NoConfigurationException(); } diff --git a/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher6.php b/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher6.php index 784c0fca..9cebf2d9 100644 --- a/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher6.php +++ b/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher6.php @@ -122,7 +122,7 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Matcher\UrlMatcher $offset += strlen($m); } } - if ('/' === $pathinfo && !$allow) { + if ('/' === $pathinfo && !$allow && !$allowSchemes) { throw new Symfony\Component\Routing\Exception\NoConfigurationException(); } diff --git a/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher7.php b/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher7.php index caf04cc3..b2b70721 100644 --- a/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher7.php +++ b/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher7.php @@ -157,7 +157,7 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Tests\Fixtures\Redirec $offset += strlen($m); } } - if ('/' === $pathinfo && !$allow) { + if ('/' === $pathinfo && !$allow && !$allowSchemes) { throw new Symfony\Component\Routing\Exception\NoConfigurationException(); } diff --git a/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher8.php b/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher8.php index 0f2ce53f..38bbfa22 100644 --- a/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher8.php +++ b/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher8.php @@ -79,7 +79,7 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Matcher\UrlMatcher $offset += strlen($m); } } - if ('/' === $pathinfo && !$allow) { + if ('/' === $pathinfo && !$allow && !$allowSchemes) { throw new Symfony\Component\Routing\Exception\NoConfigurationException(); } diff --git a/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher9.php b/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher9.php index d9035392..cfcd1d44 100644 --- a/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher9.php +++ b/vendor/symfony/routing/Tests/Fixtures/dumper/url_matcher9.php @@ -44,7 +44,7 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Matcher\UrlMatcher break; } - if ('/' === $pathinfo && !$allow) { + if ('/' === $pathinfo && !$allow && !$allowSchemes) { throw new Symfony\Component\Routing\Exception\NoConfigurationException(); } diff --git a/vendor/symfony/routing/Tests/Fixtures/validpattern.php b/vendor/symfony/routing/Tests/Fixtures/validpattern.php index edc16d8c..52ddfde0 100644 --- a/vendor/symfony/routing/Tests/Fixtures/validpattern.php +++ b/vendor/symfony/routing/Tests/Fixtures/validpattern.php @@ -1,7 +1,7 @@ add('blog_show', new Route( diff --git a/vendor/symfony/routing/Tests/Generator/Dumper/PhpGeneratorDumperTest.php b/vendor/symfony/routing/Tests/Generator/Dumper/PhpGeneratorDumperTest.php index dfcac06b..dcfb2304 100644 --- a/vendor/symfony/routing/Tests/Generator/Dumper/PhpGeneratorDumperTest.php +++ b/vendor/symfony/routing/Tests/Generator/Dumper/PhpGeneratorDumperTest.php @@ -12,11 +12,11 @@ namespace Symfony\Component\Routing\Tests\Generator\Dumper; use PHPUnit\Framework\TestCase; -use Symfony\Component\Routing\Generator\UrlGeneratorInterface; -use Symfony\Component\Routing\RouteCollection; -use Symfony\Component\Routing\Route; use Symfony\Component\Routing\Generator\Dumper\PhpGeneratorDumper; +use Symfony\Component\Routing\Generator\UrlGeneratorInterface; use Symfony\Component\Routing\RequestContext; +use Symfony\Component\Routing\Route; +use Symfony\Component\Routing\RouteCollection; class PhpGeneratorDumperTest extends TestCase { @@ -46,8 +46,8 @@ class PhpGeneratorDumperTest extends TestCase $this->routeCollection = new RouteCollection(); $this->generatorDumper = new PhpGeneratorDumper($this->routeCollection); - $this->testTmpFilepath = sys_get_temp_dir().DIRECTORY_SEPARATOR.'php_generator.'.$this->getName().'.php'; - $this->largeTestTmpFilepath = sys_get_temp_dir().DIRECTORY_SEPARATOR.'php_generator.'.$this->getName().'.large.php'; + $this->testTmpFilepath = sys_get_temp_dir().\DIRECTORY_SEPARATOR.'php_generator.'.$this->getName().'.php'; + $this->largeTestTmpFilepath = sys_get_temp_dir().\DIRECTORY_SEPARATOR.'php_generator.'.$this->getName().'.large.php'; @unlink($this->testTmpFilepath); @unlink($this->largeTestTmpFilepath); } diff --git a/vendor/symfony/routing/Tests/Generator/UrlGeneratorTest.php b/vendor/symfony/routing/Tests/Generator/UrlGeneratorTest.php index 68add771..d4bf18cc 100644 --- a/vendor/symfony/routing/Tests/Generator/UrlGeneratorTest.php +++ b/vendor/symfony/routing/Tests/Generator/UrlGeneratorTest.php @@ -12,11 +12,11 @@ namespace Symfony\Component\Routing\Tests\Generator; use PHPUnit\Framework\TestCase; -use Symfony\Component\Routing\RouteCollection; -use Symfony\Component\Routing\Route; use Symfony\Component\Routing\Generator\UrlGenerator; use Symfony\Component\Routing\Generator\UrlGeneratorInterface; use Symfony\Component\Routing\RequestContext; +use Symfony\Component\Routing\Route; +use Symfony\Component\Routing\RouteCollection; class UrlGeneratorTest extends TestCase { diff --git a/vendor/symfony/routing/Tests/Loader/AnnotationDirectoryLoaderTest.php b/vendor/symfony/routing/Tests/Loader/AnnotationDirectoryLoaderTest.php index 8a6668e0..901b858d 100644 --- a/vendor/symfony/routing/Tests/Loader/AnnotationDirectoryLoaderTest.php +++ b/vendor/symfony/routing/Tests/Loader/AnnotationDirectoryLoaderTest.php @@ -11,8 +11,8 @@ namespace Symfony\Component\Routing\Tests\Loader; -use Symfony\Component\Routing\Loader\AnnotationDirectoryLoader; use Symfony\Component\Config\FileLocator; +use Symfony\Component\Routing\Loader\AnnotationDirectoryLoader; class AnnotationDirectoryLoaderTest extends AbstractAnnotationLoaderTest { @@ -100,10 +100,10 @@ class AnnotationDirectoryLoaderTest extends AbstractAnnotationLoaderTest private function expectAnnotationsToBeReadFrom(array $classes) { - $this->reader->expects($this->exactly(count($classes))) + $this->reader->expects($this->exactly(\count($classes))) ->method('getClassAnnotation') ->with($this->callback(function (\ReflectionClass $class) use ($classes) { - return in_array($class->getName(), $classes); + return \in_array($class->getName(), $classes); })); } } diff --git a/vendor/symfony/routing/Tests/Loader/AnnotationFileLoaderTest.php b/vendor/symfony/routing/Tests/Loader/AnnotationFileLoaderTest.php index ad5d6ad4..50e212b3 100644 --- a/vendor/symfony/routing/Tests/Loader/AnnotationFileLoaderTest.php +++ b/vendor/symfony/routing/Tests/Loader/AnnotationFileLoaderTest.php @@ -11,9 +11,9 @@ namespace Symfony\Component\Routing\Tests\Loader; -use Symfony\Component\Routing\Loader\AnnotationFileLoader; use Symfony\Component\Config\FileLocator; use Symfony\Component\Routing\Annotation\Route; +use Symfony\Component\Routing\Loader\AnnotationFileLoader; class AnnotationFileLoaderTest extends AbstractAnnotationLoaderTest { diff --git a/vendor/symfony/routing/Tests/Loader/DirectoryLoaderTest.php b/vendor/symfony/routing/Tests/Loader/DirectoryLoaderTest.php index fc29d371..45968551 100644 --- a/vendor/symfony/routing/Tests/Loader/DirectoryLoaderTest.php +++ b/vendor/symfony/routing/Tests/Loader/DirectoryLoaderTest.php @@ -11,11 +11,11 @@ namespace Symfony\Component\Routing\Tests\Loader; +use Symfony\Component\Config\FileLocator; +use Symfony\Component\Config\Loader\LoaderResolver; +use Symfony\Component\Routing\Loader\AnnotationFileLoader; use Symfony\Component\Routing\Loader\DirectoryLoader; use Symfony\Component\Routing\Loader\YamlFileLoader; -use Symfony\Component\Routing\Loader\AnnotationFileLoader; -use Symfony\Component\Config\Loader\LoaderResolver; -use Symfony\Component\Config\FileLocator; use Symfony\Component\Routing\RouteCollection; class DirectoryLoaderTest extends AbstractAnnotationLoaderTest diff --git a/vendor/symfony/routing/Tests/Loader/GlobFileLoaderTest.php b/vendor/symfony/routing/Tests/Loader/GlobFileLoaderTest.php index 08d806a8..e4e12b88 100644 --- a/vendor/symfony/routing/Tests/Loader/GlobFileLoaderTest.php +++ b/vendor/symfony/routing/Tests/Loader/GlobFileLoaderTest.php @@ -12,8 +12,8 @@ namespace Symfony\Component\Routing\Tests\Loader; use PHPUnit\Framework\TestCase; -use Symfony\Component\Config\Resource\GlobResource; use Symfony\Component\Config\FileLocator; +use Symfony\Component\Config\Resource\GlobResource; use Symfony\Component\Routing\Loader\GlobFileLoader; use Symfony\Component\Routing\RouteCollection; diff --git a/vendor/symfony/routing/Tests/Loader/YamlFileLoaderTest.php b/vendor/symfony/routing/Tests/Loader/YamlFileLoaderTest.php index 4218eb22..41f87bb5 100644 --- a/vendor/symfony/routing/Tests/Loader/YamlFileLoaderTest.php +++ b/vendor/symfony/routing/Tests/Loader/YamlFileLoaderTest.php @@ -13,8 +13,8 @@ namespace Symfony\Component\Routing\Tests\Loader; use PHPUnit\Framework\TestCase; use Symfony\Component\Config\FileLocator; -use Symfony\Component\Routing\Loader\YamlFileLoader; use Symfony\Component\Config\Resource\FileResource; +use Symfony\Component\Routing\Loader\YamlFileLoader; class YamlFileLoaderTest extends TestCase { diff --git a/vendor/symfony/routing/Tests/Matcher/DumpedRedirectableUrlMatcherTest.php b/vendor/symfony/routing/Tests/Matcher/DumpedRedirectableUrlMatcherTest.php index cfbb524d..1785c3ad 100644 --- a/vendor/symfony/routing/Tests/Matcher/DumpedRedirectableUrlMatcherTest.php +++ b/vendor/symfony/routing/Tests/Matcher/DumpedRedirectableUrlMatcherTest.php @@ -14,8 +14,8 @@ namespace Symfony\Component\Routing\Tests\Matcher; use Symfony\Component\Routing\Matcher\Dumper\PhpMatcherDumper; use Symfony\Component\Routing\Matcher\RedirectableUrlMatcherInterface; use Symfony\Component\Routing\Matcher\UrlMatcher; -use Symfony\Component\Routing\RouteCollection; use Symfony\Component\Routing\RequestContext; +use Symfony\Component\Routing\RouteCollection; class DumpedRedirectableUrlMatcherTest extends RedirectableUrlMatcherTest { diff --git a/vendor/symfony/routing/Tests/Matcher/DumpedUrlMatcherTest.php b/vendor/symfony/routing/Tests/Matcher/DumpedUrlMatcherTest.php index a58c8ce0..47e32516 100644 --- a/vendor/symfony/routing/Tests/Matcher/DumpedUrlMatcherTest.php +++ b/vendor/symfony/routing/Tests/Matcher/DumpedUrlMatcherTest.php @@ -12,8 +12,8 @@ namespace Symfony\Component\Routing\Tests\Matcher; use Symfony\Component\Routing\Matcher\Dumper\PhpMatcherDumper; -use Symfony\Component\Routing\RouteCollection; use Symfony\Component\Routing\RequestContext; +use Symfony\Component\Routing\RouteCollection; class DumpedUrlMatcherTest extends UrlMatcherTest { diff --git a/vendor/symfony/routing/Tests/Matcher/Dumper/PhpMatcherDumperTest.php b/vendor/symfony/routing/Tests/Matcher/Dumper/PhpMatcherDumperTest.php index 4bbfe131..166129cc 100644 --- a/vendor/symfony/routing/Tests/Matcher/Dumper/PhpMatcherDumperTest.php +++ b/vendor/symfony/routing/Tests/Matcher/Dumper/PhpMatcherDumperTest.php @@ -36,7 +36,7 @@ class PhpMatcherDumperTest extends TestCase parent::setUp(); $this->matcherClass = uniqid('ProjectUrlMatcher'); - $this->dumpPath = sys_get_temp_dir().DIRECTORY_SEPARATOR.'php_matcher.'.$this->matcherClass.'.php'; + $this->dumpPath = sys_get_temp_dir().\DIRECTORY_SEPARATOR.'php_matcher.'.$this->matcherClass.'.php'; } protected function tearDown() @@ -491,6 +491,18 @@ class PhpMatcherDumperTest extends TestCase return $this->matcherClass; } + + /** + * @expectedException \InvalidArgumentException + * @expectedExceptionMessage Symfony\Component\Routing\Route cannot contain objects + */ + public function testGenerateDumperMatcherWithObject() + { + $routeCollection = new RouteCollection(); + $routeCollection->add('_', new Route('/', array(new \stdClass()))); + $dumper = new PhpMatcherDumper($routeCollection); + $dumper->dump(); + } } abstract class RedirectableUrlMatcherStub extends UrlMatcher implements RedirectableUrlMatcherInterface diff --git a/vendor/symfony/routing/Tests/Matcher/RedirectableUrlMatcherTest.php b/vendor/symfony/routing/Tests/Matcher/RedirectableUrlMatcherTest.php index f46641da..e3679622 100644 --- a/vendor/symfony/routing/Tests/Matcher/RedirectableUrlMatcherTest.php +++ b/vendor/symfony/routing/Tests/Matcher/RedirectableUrlMatcherTest.php @@ -11,9 +11,9 @@ namespace Symfony\Component\Routing\Tests\Matcher; +use Symfony\Component\Routing\RequestContext; use Symfony\Component\Routing\Route; use Symfony\Component\Routing\RouteCollection; -use Symfony\Component\Routing\RequestContext; class RedirectableUrlMatcherTest extends UrlMatcherTest { @@ -93,6 +93,20 @@ class RedirectableUrlMatcherTest extends UrlMatcherTest $this->assertEquals(array('_route' => 'foo', 'bar' => 'baz', 'redirect' => 'value'), $matcher->match('/foo/baz')); } + public function testSchemeRedirectForRoot() + { + $coll = new RouteCollection(); + $coll->add('foo', new Route('/', array(), array(), array(), '', array('https'))); + + $matcher = $this->getUrlMatcher($coll); + $matcher + ->expects($this->once()) + ->method('redirect') + ->with('/', 'foo', 'https') + ->will($this->returnValue(array('redirect' => 'value'))); + $this->assertEquals(array('_route' => 'foo', 'redirect' => 'value'), $matcher->match('/')); + } + public function testSlashRedirectWithParams() { $coll = new RouteCollection(); diff --git a/vendor/symfony/routing/Tests/Matcher/TraceableUrlMatcherTest.php b/vendor/symfony/routing/Tests/Matcher/TraceableUrlMatcherTest.php index 9f0529e2..1f026a6e 100644 --- a/vendor/symfony/routing/Tests/Matcher/TraceableUrlMatcherTest.php +++ b/vendor/symfony/routing/Tests/Matcher/TraceableUrlMatcherTest.php @@ -13,10 +13,10 @@ namespace Symfony\Component\Routing\Tests\Matcher; use PHPUnit\Framework\TestCase; use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\Routing\Matcher\TraceableUrlMatcher; +use Symfony\Component\Routing\RequestContext; use Symfony\Component\Routing\Route; use Symfony\Component\Routing\RouteCollection; -use Symfony\Component\Routing\RequestContext; -use Symfony\Component\Routing\Matcher\TraceableUrlMatcher; class TraceableUrlMatcherTest extends TestCase { diff --git a/vendor/symfony/routing/Tests/Matcher/UrlMatcherTest.php b/vendor/symfony/routing/Tests/Matcher/UrlMatcherTest.php index f0013d7b..c1add962 100644 --- a/vendor/symfony/routing/Tests/Matcher/UrlMatcherTest.php +++ b/vendor/symfony/routing/Tests/Matcher/UrlMatcherTest.php @@ -15,9 +15,9 @@ use PHPUnit\Framework\TestCase; use Symfony\Component\Routing\Exception\MethodNotAllowedException; use Symfony\Component\Routing\Exception\ResourceNotFoundException; use Symfony\Component\Routing\Matcher\UrlMatcher; +use Symfony\Component\Routing\RequestContext; use Symfony\Component\Routing\Route; use Symfony\Component\Routing\RouteCollection; -use Symfony\Component\Routing\RequestContext; class UrlMatcherTest extends TestCase { @@ -670,6 +670,16 @@ class UrlMatcherTest extends TestCase $this->assertEquals('c', $matcher->match('/admin/api/package.json')['_route']); } + public function testHostWithDot() + { + $coll = new RouteCollection(); + $coll->add('a', new Route('/foo', array(), array(), array(), 'foo.example.com')); + $coll->add('b', new Route('/bar/{baz}')); + + $matcher = $this->getUrlMatcher($coll); + $this->assertEquals('b', $matcher->match('/bar/abc.123')['_route']); + } + protected function getUrlMatcher(RouteCollection $routes, RequestContext $context = null) { return new UrlMatcher($routes, $context ?: new RequestContext()); diff --git a/vendor/symfony/routing/Tests/RouteCollectionTest.php b/vendor/symfony/routing/Tests/RouteCollectionTest.php index 0ea23f67..dd477326 100644 --- a/vendor/symfony/routing/Tests/RouteCollectionTest.php +++ b/vendor/symfony/routing/Tests/RouteCollectionTest.php @@ -12,9 +12,9 @@ namespace Symfony\Component\Routing\Tests; use PHPUnit\Framework\TestCase; -use Symfony\Component\Routing\RouteCollection; -use Symfony\Component\Routing\Route; use Symfony\Component\Config\Resource\FileResource; +use Symfony\Component\Routing\Route; +use Symfony\Component\Routing\RouteCollection; class RouteCollectionTest extends TestCase { diff --git a/vendor/symfony/routing/Tests/RouterTest.php b/vendor/symfony/routing/Tests/RouterTest.php index 3e3d43f8..e01bd9c6 100644 --- a/vendor/symfony/routing/Tests/RouterTest.php +++ b/vendor/symfony/routing/Tests/RouterTest.php @@ -12,9 +12,9 @@ namespace Symfony\Component\Routing\Tests; use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\Request; use Symfony\Component\Routing\RouteCollection; use Symfony\Component\Routing\Router; -use Symfony\Component\HttpFoundation\Request; class RouterTest extends TestCase { diff --git a/vendor/symfony/translation/Catalogue/AbstractOperation.php b/vendor/symfony/translation/Catalogue/AbstractOperation.php index 022bad48..c303a4f6 100644 --- a/vendor/symfony/translation/Catalogue/AbstractOperation.php +++ b/vendor/symfony/translation/Catalogue/AbstractOperation.php @@ -11,10 +11,10 @@ namespace Symfony\Component\Translation\Catalogue; -use Symfony\Component\Translation\MessageCatalogue; -use Symfony\Component\Translation\MessageCatalogueInterface; use Symfony\Component\Translation\Exception\InvalidArgumentException; use Symfony\Component\Translation\Exception\LogicException; +use Symfony\Component\Translation\MessageCatalogue; +use Symfony\Component\Translation\MessageCatalogueInterface; /** * Base catalogues binary operation class. @@ -91,7 +91,7 @@ abstract class AbstractOperation implements OperationInterface */ public function getMessages($domain) { - if (!in_array($domain, $this->getDomains())) { + if (!\in_array($domain, $this->getDomains())) { throw new InvalidArgumentException(sprintf('Invalid domain: %s.', $domain)); } @@ -107,7 +107,7 @@ abstract class AbstractOperation implements OperationInterface */ public function getNewMessages($domain) { - if (!in_array($domain, $this->getDomains())) { + if (!\in_array($domain, $this->getDomains())) { throw new InvalidArgumentException(sprintf('Invalid domain: %s.', $domain)); } @@ -123,7 +123,7 @@ abstract class AbstractOperation implements OperationInterface */ public function getObsoleteMessages($domain) { - if (!in_array($domain, $this->getDomains())) { + if (!\in_array($domain, $this->getDomains())) { throw new InvalidArgumentException(sprintf('Invalid domain: %s.', $domain)); } diff --git a/vendor/symfony/translation/Command/XliffLintCommand.php b/vendor/symfony/translation/Command/XliffLintCommand.php index 2caa6abe..378788f5 100644 --- a/vendor/symfony/translation/Command/XliffLintCommand.php +++ b/vendor/symfony/translation/Command/XliffLintCommand.php @@ -130,16 +130,16 @@ EOF $document->schemaValidate(__DIR__.'/../Resources/schemas/xliff-core-1.2-strict.xsd'); foreach (libxml_get_errors() as $xmlError) { $errors[] = array( - 'line' => $xmlError->line, - 'column' => $xmlError->column, - 'message' => trim($xmlError->message), - ); + 'line' => $xmlError->line, + 'column' => $xmlError->column, + 'message' => trim($xmlError->message), + ); } libxml_clear_errors(); libxml_use_internal_errors(false); - return array('file' => $file, 'valid' => 0 === count($errors), 'messages' => $errors); + return array('file' => $file, 'valid' => 0 === \count($errors), 'messages' => $errors); } private function display(SymfonyStyle $io, array $files) @@ -156,7 +156,7 @@ EOF private function displayTxt(SymfonyStyle $io, array $filesInfo) { - $countFiles = count($filesInfo); + $countFiles = \count($filesInfo); $erroredFiles = 0; foreach ($filesInfo as $info) { @@ -206,7 +206,7 @@ EOF } foreach ($this->getDirectoryIterator($fileOrDirectory) as $file) { - if (!in_array($file->getExtension(), array('xlf', 'xliff'))) { + if (!\in_array($file->getExtension(), array('xlf', 'xliff'))) { continue; } @@ -238,7 +238,7 @@ EOF }; if (null !== $this->directoryIteratorProvider) { - return call_user_func($this->directoryIteratorProvider, $directory, $default); + return \call_user_func($this->directoryIteratorProvider, $directory, $default); } return $default($directory); @@ -251,7 +251,7 @@ EOF }; if (null !== $this->isReadableProvider) { - return call_user_func($this->isReadableProvider, $fileOrDirectory, $default); + return \call_user_func($this->isReadableProvider, $fileOrDirectory, $default); } return $default($fileOrDirectory); diff --git a/vendor/symfony/translation/DataCollector/TranslationDataCollector.php b/vendor/symfony/translation/DataCollector/TranslationDataCollector.php index 5d97a670..edd712dd 100644 --- a/vendor/symfony/translation/DataCollector/TranslationDataCollector.php +++ b/vendor/symfony/translation/DataCollector/TranslationDataCollector.php @@ -99,7 +99,7 @@ class TranslationDataCollector extends DataCollector implements LateDataCollecto public function getFallbackLocales() { - return (isset($this->data['fallback_locales']) && count($this->data['fallback_locales']) > 0) ? $this->data['fallback_locales'] : array(); + return (isset($this->data['fallback_locales']) && \count($this->data['fallback_locales']) > 0) ? $this->data['fallback_locales'] : array(); } /** @@ -158,7 +158,7 @@ class TranslationDataCollector extends DataCollector implements LateDataCollecto if (mb_strlen($string, $encoding) > $length) { return mb_substr($string, 0, $length - 3, $encoding).'...'; } - } elseif (strlen($string) > $length) { + } elseif (\strlen($string) > $length) { return substr($string, 0, $length - 3).'...'; } diff --git a/vendor/symfony/translation/DataCollectorTranslator.php b/vendor/symfony/translation/DataCollectorTranslator.php index 715c390f..5d4d819e 100644 --- a/vendor/symfony/translation/DataCollectorTranslator.php +++ b/vendor/symfony/translation/DataCollectorTranslator.php @@ -35,7 +35,7 @@ class DataCollectorTranslator implements TranslatorInterface, TranslatorBagInter public function __construct(TranslatorInterface $translator) { if (!$translator instanceof TranslatorBagInterface) { - throw new InvalidArgumentException(sprintf('The Translator "%s" must implement TranslatorInterface and TranslatorBagInterface.', get_class($translator))); + throw new InvalidArgumentException(sprintf('The Translator "%s" must implement TranslatorInterface and TranslatorBagInterface.', \get_class($translator))); } $this->translator = $translator; @@ -106,7 +106,7 @@ class DataCollectorTranslator implements TranslatorInterface, TranslatorBagInter */ public function __call($method, $args) { - return call_user_func_array(array($this->translator, $method), $args); + return \call_user_func_array(array($this->translator, $method), $args); } /** diff --git a/vendor/symfony/translation/DependencyInjection/TranslationDumperPass.php b/vendor/symfony/translation/DependencyInjection/TranslationDumperPass.php index e620226e..31d791dc 100644 --- a/vendor/symfony/translation/DependencyInjection/TranslationDumperPass.php +++ b/vendor/symfony/translation/DependencyInjection/TranslationDumperPass.php @@ -11,9 +11,9 @@ namespace Symfony\Component\Translation\DependencyInjection; -use Symfony\Component\DependencyInjection\Reference; -use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Reference; /** * Adds tagged translation.formatter services to translation writer. diff --git a/vendor/symfony/translation/DependencyInjection/TranslationExtractorPass.php b/vendor/symfony/translation/DependencyInjection/TranslationExtractorPass.php index 18c67f68..b7e6f734 100644 --- a/vendor/symfony/translation/DependencyInjection/TranslationExtractorPass.php +++ b/vendor/symfony/translation/DependencyInjection/TranslationExtractorPass.php @@ -11,10 +11,10 @@ namespace Symfony\Component\Translation\DependencyInjection; -use Symfony\Component\DependencyInjection\Reference; -use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; +use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Exception\RuntimeException; +use Symfony\Component\DependencyInjection\Reference; /** * Adds tagged translation.extractor services to translation extractor. diff --git a/vendor/symfony/translation/DependencyInjection/TranslatorPass.php b/vendor/symfony/translation/DependencyInjection/TranslatorPass.php index 1f7839db..cbaa43db 100644 --- a/vendor/symfony/translation/DependencyInjection/TranslatorPass.php +++ b/vendor/symfony/translation/DependencyInjection/TranslatorPass.php @@ -11,10 +11,10 @@ namespace Symfony\Component\Translation\DependencyInjection; -use Symfony\Component\DependencyInjection\Reference; -use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; use Symfony\Component\DependencyInjection\Compiler\ServiceLocatorTagPass; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Reference; class TranslatorPass implements CompilerPassInterface { diff --git a/vendor/symfony/translation/Dumper/FileDumper.php b/vendor/symfony/translation/Dumper/FileDumper.php index 5a67b3a0..5b10e452 100644 --- a/vendor/symfony/translation/Dumper/FileDumper.php +++ b/vendor/symfony/translation/Dumper/FileDumper.php @@ -11,9 +11,9 @@ namespace Symfony\Component\Translation\Dumper; -use Symfony\Component\Translation\MessageCatalogue; use Symfony\Component\Translation\Exception\InvalidArgumentException; use Symfony\Component\Translation\Exception\RuntimeException; +use Symfony\Component\Translation\MessageCatalogue; /** * FileDumper is an implementation of DumperInterface that dump a message catalogue to file(s). @@ -51,7 +51,7 @@ abstract class FileDumper implements DumperInterface */ public function setBackup($backup) { - @trigger_error(sprintf('The %s() method is deprecated since Symfony 4.1.', __METHOD__), E_USER_DEPRECATED); + @trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.1.', __METHOD__), E_USER_DEPRECATED); if (false !== $backup) { throw new \LogicException('The backup feature is no longer supported.'); @@ -71,7 +71,7 @@ abstract class FileDumper implements DumperInterface foreach ($messages->getDomains() as $domain) { $fullpath = $options['path'].'/'.$this->getRelativePath($domain, $messages->getLocale()); if (!file_exists($fullpath)) { - $directory = dirname($fullpath); + $directory = \dirname($fullpath); if (!file_exists($directory) && !@mkdir($directory, 0777, true)) { throw new RuntimeException(sprintf('Unable to create directory "%s".', $directory)); } diff --git a/vendor/symfony/translation/Dumper/IcuResFileDumper.php b/vendor/symfony/translation/Dumper/IcuResFileDumper.php index 42f15950..efa9d7fe 100644 --- a/vendor/symfony/translation/Dumper/IcuResFileDumper.php +++ b/vendor/symfony/translation/Dumper/IcuResFileDumper.php @@ -33,7 +33,7 @@ class IcuResFileDumper extends FileDumper $data = $indexes = $resources = ''; foreach ($messages->all($domain) as $source => $target) { - $indexes .= pack('v', strlen($data) + 28); + $indexes .= pack('v', \strlen($data) + 28); $data .= $source."\0"; } @@ -44,7 +44,7 @@ class IcuResFileDumper extends FileDumper foreach ($messages->all($domain) as $source => $target) { $resources .= pack('V', $this->getPosition($data)); - $data .= pack('V', strlen($target)) + $data .= pack('V', \strlen($target)) .mb_convert_encoding($target."\0", 'UTF-16LE', 'UTF-8') .$this->writePadding($data) ; @@ -52,7 +52,7 @@ class IcuResFileDumper extends FileDumper $resOffset = $this->getPosition($data); - $data .= pack('v', count($messages->all($domain))) + $data .= pack('v', \count($messages->all($domain))) .$indexes .$this->writePadding($data) .$resources @@ -66,7 +66,7 @@ class IcuResFileDumper extends FileDumper $keyTop, // Index keys top $bundleTop, // Index resources top $bundleTop, // Index bundle top - count($messages->all($domain)), // Index max table length + \count($messages->all($domain)), // Index max table length 0 // Index attributes ); @@ -84,7 +84,7 @@ class IcuResFileDumper extends FileDumper private function writePadding($data) { - $padding = strlen($data) % 4; + $padding = \strlen($data) % 4; if ($padding) { return str_repeat("\xAA", 4 - $padding); @@ -93,7 +93,7 @@ class IcuResFileDumper extends FileDumper private function getPosition($data) { - return (strlen($data) + 28) / 4; + return (\strlen($data) + 28) / 4; } /** diff --git a/vendor/symfony/translation/Dumper/MoFileDumper.php b/vendor/symfony/translation/Dumper/MoFileDumper.php index 00a33d25..2022a421 100644 --- a/vendor/symfony/translation/Dumper/MoFileDumper.php +++ b/vendor/symfony/translation/Dumper/MoFileDumper.php @@ -11,8 +11,8 @@ namespace Symfony\Component\Translation\Dumper; -use Symfony\Component\Translation\MessageCatalogue; use Symfony\Component\Translation\Loader\MoFileLoader; +use Symfony\Component\Translation\MessageCatalogue; /** * MoFileDumper generates a gettext formatted string representation of a message catalogue. @@ -47,7 +47,7 @@ class MoFileDumper extends FileDumper 'offsetHashes' => MoFileLoader::MO_HEADER_SIZE + (16 * $size), ); - $sourcesSize = strlen($sources); + $sourcesSize = \strlen($sources); $sourcesStart = $header['offsetHashes'] + 1; foreach ($offsets as $offset) { diff --git a/vendor/symfony/translation/Dumper/XliffFileDumper.php b/vendor/symfony/translation/Dumper/XliffFileDumper.php index afeae3ac..c12454cd 100644 --- a/vendor/symfony/translation/Dumper/XliffFileDumper.php +++ b/vendor/symfony/translation/Dumper/XliffFileDumper.php @@ -11,8 +11,8 @@ namespace Symfony\Component\Translation\Dumper; -use Symfony\Component\Translation\MessageCatalogue; use Symfony\Component\Translation\Exception\InvalidArgumentException; +use Symfony\Component\Translation\MessageCatalogue; /** * XliffFileDumper generates xliff files from a message catalogue. @@ -147,7 +147,7 @@ class XliffFileDumper extends FileDumper $translation = $dom->createElement('unit'); $translation->setAttribute('id', strtr(substr(base64_encode(hash('sha256', $source, true)), 0, 7), '/+', '._')); $name = $source; - if (strlen($source) > 80) { + if (\strlen($source) > 80) { $name = substr(md5($source), -7); } $translation->setAttribute('name', $name); @@ -200,6 +200,6 @@ class XliffFileDumper extends FileDumper */ private function hasMetadataArrayInfo($key, $metadata = null) { - return null !== $metadata && array_key_exists($key, $metadata) && ($metadata[$key] instanceof \Traversable || is_array($metadata[$key])); + return null !== $metadata && array_key_exists($key, $metadata) && ($metadata[$key] instanceof \Traversable || \is_array($metadata[$key])); } } diff --git a/vendor/symfony/translation/Dumper/YamlFileDumper.php b/vendor/symfony/translation/Dumper/YamlFileDumper.php index db9e4b36..b19b9ae1 100644 --- a/vendor/symfony/translation/Dumper/YamlFileDumper.php +++ b/vendor/symfony/translation/Dumper/YamlFileDumper.php @@ -11,10 +11,10 @@ namespace Symfony\Component\Translation\Dumper; +use Symfony\Component\Translation\Exception\LogicException; use Symfony\Component\Translation\MessageCatalogue; use Symfony\Component\Translation\Util\ArrayConverter; use Symfony\Component\Yaml\Yaml; -use Symfony\Component\Translation\Exception\LogicException; /** * YamlFileDumper generates yaml files from a message catalogue. diff --git a/vendor/symfony/translation/Extractor/AbstractFileExtractor.php b/vendor/symfony/translation/Extractor/AbstractFileExtractor.php index bdfec1a9..bebd6d91 100644 --- a/vendor/symfony/translation/Extractor/AbstractFileExtractor.php +++ b/vendor/symfony/translation/Extractor/AbstractFileExtractor.php @@ -27,7 +27,7 @@ abstract class AbstractFileExtractor */ protected function extractFiles($resource) { - if (is_array($resource) || $resource instanceof \Traversable) { + if (\is_array($resource) || $resource instanceof \Traversable) { $files = array(); foreach ($resource as $file) { if ($this->canBeExtracted($file)) { diff --git a/vendor/symfony/translation/Extractor/PhpExtractor.php b/vendor/symfony/translation/Extractor/PhpExtractor.php index f364bdec..b4b32361 100644 --- a/vendor/symfony/translation/Extractor/PhpExtractor.php +++ b/vendor/symfony/translation/Extractor/PhpExtractor.php @@ -208,7 +208,7 @@ class PhpExtractor extends AbstractFileExtractor implements ExtractorInterface } elseif (self::MESSAGE_TOKEN === $item) { $message = $this->getValue($tokenIterator); - if (count($sequence) === ($sequenceKey + 1)) { + if (\count($sequence) === ($sequenceKey + 1)) { break; } } elseif (self::METHOD_ARGUMENTS_TOKEN === $item) { diff --git a/vendor/symfony/translation/Extractor/PhpStringTokenParser.php b/vendor/symfony/translation/Extractor/PhpStringTokenParser.php index bab4ce0c..6ed39d46 100644 --- a/vendor/symfony/translation/Extractor/PhpStringTokenParser.php +++ b/vendor/symfony/translation/Extractor/PhpStringTokenParser.php @@ -113,9 +113,9 @@ class PhpStringTokenParser if (isset(self::$replacements[$str])) { return self::$replacements[$str]; } elseif ('x' === $str[0] || 'X' === $str[0]) { - return chr(hexdec($str)); + return \chr(hexdec($str)); } else { - return chr(octdec($str)); + return \chr(octdec($str)); } } diff --git a/vendor/symfony/translation/Loader/ArrayLoader.php b/vendor/symfony/translation/Loader/ArrayLoader.php index 9a595b7d..7bbfca68 100644 --- a/vendor/symfony/translation/Loader/ArrayLoader.php +++ b/vendor/symfony/translation/Loader/ArrayLoader.php @@ -52,7 +52,7 @@ class ArrayLoader implements LoaderInterface $subnode = &$messages; } foreach ($subnode as $key => $value) { - if (is_array($value)) { + if (\is_array($value)) { $nodePath = $path ? $path.'.'.$key : $key; $this->flatten($messages, $value, $nodePath); if (null === $path) { diff --git a/vendor/symfony/translation/Loader/CsvFileLoader.php b/vendor/symfony/translation/Loader/CsvFileLoader.php index e454d169..8a763e72 100644 --- a/vendor/symfony/translation/Loader/CsvFileLoader.php +++ b/vendor/symfony/translation/Loader/CsvFileLoader.php @@ -41,7 +41,7 @@ class CsvFileLoader extends FileLoader $file->setCsvControl($this->delimiter, $this->enclosure, $this->escape); foreach ($file as $data) { - if ('#' !== substr($data[0], 0, 1) && isset($data[1]) && 2 === count($data)) { + if ('#' !== substr($data[0], 0, 1) && isset($data[1]) && 2 === \count($data)) { $messages[$data[0]] = $data[1]; } } diff --git a/vendor/symfony/translation/Loader/FileLoader.php b/vendor/symfony/translation/Loader/FileLoader.php index 322679d2..9a02f525 100644 --- a/vendor/symfony/translation/Loader/FileLoader.php +++ b/vendor/symfony/translation/Loader/FileLoader.php @@ -11,9 +11,9 @@ namespace Symfony\Component\Translation\Loader; +use Symfony\Component\Config\Resource\FileResource; use Symfony\Component\Translation\Exception\InvalidResourceException; use Symfony\Component\Translation\Exception\NotFoundResourceException; -use Symfony\Component\Config\Resource\FileResource; /** * @author Abdellatif Ait boudad @@ -41,7 +41,7 @@ abstract class FileLoader extends ArrayLoader } // not an array - if (!is_array($messages)) { + if (!\is_array($messages)) { throw new InvalidResourceException(sprintf('Unable to load file "%s".', $resource)); } diff --git a/vendor/symfony/translation/Loader/IcuDatFileLoader.php b/vendor/symfony/translation/Loader/IcuDatFileLoader.php index 822bc362..7bbf4c20 100644 --- a/vendor/symfony/translation/Loader/IcuDatFileLoader.php +++ b/vendor/symfony/translation/Loader/IcuDatFileLoader.php @@ -11,10 +11,10 @@ namespace Symfony\Component\Translation\Loader; -use Symfony\Component\Translation\MessageCatalogue; +use Symfony\Component\Config\Resource\FileResource; use Symfony\Component\Translation\Exception\InvalidResourceException; use Symfony\Component\Translation\Exception\NotFoundResourceException; -use Symfony\Component\Config\Resource\FileResource; +use Symfony\Component\Translation\MessageCatalogue; /** * IcuResFileLoader loads translations from a resource bundle. diff --git a/vendor/symfony/translation/Loader/IcuResFileLoader.php b/vendor/symfony/translation/Loader/IcuResFileLoader.php index 927cae16..28ace297 100644 --- a/vendor/symfony/translation/Loader/IcuResFileLoader.php +++ b/vendor/symfony/translation/Loader/IcuResFileLoader.php @@ -11,10 +11,10 @@ namespace Symfony\Component\Translation\Loader; -use Symfony\Component\Translation\MessageCatalogue; +use Symfony\Component\Config\Resource\DirectoryResource; use Symfony\Component\Translation\Exception\InvalidResourceException; use Symfony\Component\Translation\Exception\NotFoundResourceException; -use Symfony\Component\Config\Resource\DirectoryResource; +use Symfony\Component\Translation\MessageCatalogue; /** * IcuResFileLoader loads translations from a resource bundle. diff --git a/vendor/symfony/translation/Loader/LoaderInterface.php b/vendor/symfony/translation/Loader/LoaderInterface.php index 6b65fe38..1785402d 100644 --- a/vendor/symfony/translation/Loader/LoaderInterface.php +++ b/vendor/symfony/translation/Loader/LoaderInterface.php @@ -11,9 +11,9 @@ namespace Symfony\Component\Translation\Loader; -use Symfony\Component\Translation\MessageCatalogue; use Symfony\Component\Translation\Exception\InvalidResourceException; use Symfony\Component\Translation\Exception\NotFoundResourceException; +use Symfony\Component\Translation\MessageCatalogue; /** * LoaderInterface is the interface implemented by all translation loaders. diff --git a/vendor/symfony/translation/Loader/MoFileLoader.php b/vendor/symfony/translation/Loader/MoFileLoader.php index 918bf94a..a1d7c4ae 100644 --- a/vendor/symfony/translation/Loader/MoFileLoader.php +++ b/vendor/symfony/translation/Loader/MoFileLoader.php @@ -111,7 +111,7 @@ class MoFileLoader extends FileLoader $ids = array('singular' => $singularId, 'plural' => $pluralId); $item = compact('ids', 'translated'); - if (is_array($item['translated'])) { + if (\is_array($item['translated'])) { $messages[$item['ids']['singular']] = stripcslashes($item['translated'][0]); if (isset($item['ids']['plural'])) { $plurals = array(); diff --git a/vendor/symfony/translation/Loader/PoFileLoader.php b/vendor/symfony/translation/Loader/PoFileLoader.php index 7ce7d2df..066168dc 100644 --- a/vendor/symfony/translation/Loader/PoFileLoader.php +++ b/vendor/symfony/translation/Loader/PoFileLoader.php @@ -78,7 +78,7 @@ class PoFileLoader extends FileLoader if ('' === $line) { // Whitespace indicated current item is done - if (!in_array('fuzzy', $flags)) { + if (!\in_array('fuzzy', $flags)) { $this->addMessage($messages, $item); } $item = $defaults; @@ -96,7 +96,7 @@ class PoFileLoader extends FileLoader } elseif ('"' === $line[0]) { $continues = isset($item['translated']) ? 'translated' : 'ids'; - if (is_array($item[$continues])) { + if (\is_array($item[$continues])) { end($item[$continues]); $item[$continues][key($item[$continues])] .= substr($line, 1, -1); } else { @@ -110,7 +110,7 @@ class PoFileLoader extends FileLoader } } // save last item - if (!in_array('fuzzy', $flags)) { + if (!\in_array('fuzzy', $flags)) { $this->addMessage($messages, $item); } fclose($stream); @@ -126,7 +126,7 @@ class PoFileLoader extends FileLoader */ private function addMessage(array &$messages, array $item) { - if (is_array($item['translated'])) { + if (\is_array($item['translated'])) { $messages[stripcslashes($item['ids']['singular'])] = stripcslashes($item['translated'][0]); if (isset($item['ids']['plural'])) { $plurals = $item['translated']; diff --git a/vendor/symfony/translation/Loader/QtFileLoader.php b/vendor/symfony/translation/Loader/QtFileLoader.php index 22536aa8..2d4a4c08 100644 --- a/vendor/symfony/translation/Loader/QtFileLoader.php +++ b/vendor/symfony/translation/Loader/QtFileLoader.php @@ -11,11 +11,11 @@ namespace Symfony\Component\Translation\Loader; +use Symfony\Component\Config\Resource\FileResource; use Symfony\Component\Config\Util\XmlUtils; -use Symfony\Component\Translation\MessageCatalogue; use Symfony\Component\Translation\Exception\InvalidResourceException; use Symfony\Component\Translation\Exception\NotFoundResourceException; -use Symfony\Component\Config\Resource\FileResource; +use Symfony\Component\Translation\MessageCatalogue; /** * QtFileLoader loads translations from QT Translations XML files. diff --git a/vendor/symfony/translation/Loader/XliffFileLoader.php b/vendor/symfony/translation/Loader/XliffFileLoader.php index b20d4909..9c6b8c9f 100644 --- a/vendor/symfony/translation/Loader/XliffFileLoader.php +++ b/vendor/symfony/translation/Loader/XliffFileLoader.php @@ -11,12 +11,12 @@ namespace Symfony\Component\Translation\Loader; +use Symfony\Component\Config\Resource\FileResource; use Symfony\Component\Config\Util\XmlUtils; -use Symfony\Component\Translation\MessageCatalogue; +use Symfony\Component\Translation\Exception\InvalidArgumentException; use Symfony\Component\Translation\Exception\InvalidResourceException; use Symfony\Component\Translation\Exception\NotFoundResourceException; -use Symfony\Component\Translation\Exception\InvalidArgumentException; -use Symfony\Component\Config\Resource\FileResource; +use Symfony\Component\Translation\MessageCatalogue; /** * XliffFileLoader loads translations from XLIFF files. @@ -228,7 +228,7 @@ class XliffFileLoader implements LoaderInterface } } - $drive = '\\' === DIRECTORY_SEPARATOR ? array_shift($parts).'/' : ''; + $drive = '\\' === \DIRECTORY_SEPARATOR ? array_shift($parts).'/' : ''; $newPath = $locationstart.$drive.implode('/', array_map('rawurlencode', $parts)); return str_replace($xmlUri, $newPath, $schemaSource); diff --git a/vendor/symfony/translation/Loader/YamlFileLoader.php b/vendor/symfony/translation/Loader/YamlFileLoader.php index ef84c32f..584a055c 100644 --- a/vendor/symfony/translation/Loader/YamlFileLoader.php +++ b/vendor/symfony/translation/Loader/YamlFileLoader.php @@ -13,8 +13,8 @@ namespace Symfony\Component\Translation\Loader; use Symfony\Component\Translation\Exception\InvalidResourceException; use Symfony\Component\Translation\Exception\LogicException; -use Symfony\Component\Yaml\Parser as YamlParser; use Symfony\Component\Yaml\Exception\ParseException; +use Symfony\Component\Yaml\Parser as YamlParser; use Symfony\Component\Yaml\Yaml; /** diff --git a/vendor/symfony/translation/LoggingTranslator.php b/vendor/symfony/translation/LoggingTranslator.php index 337c1143..01456708 100644 --- a/vendor/symfony/translation/LoggingTranslator.php +++ b/vendor/symfony/translation/LoggingTranslator.php @@ -33,7 +33,7 @@ class LoggingTranslator implements TranslatorInterface, TranslatorBagInterface public function __construct(TranslatorInterface $translator, LoggerInterface $logger) { if (!$translator instanceof TranslatorBagInterface) { - throw new InvalidArgumentException(sprintf('The Translator "%s" must implement TranslatorInterface and TranslatorBagInterface.', get_class($translator))); + throw new InvalidArgumentException(sprintf('The Translator "%s" must implement TranslatorInterface and TranslatorBagInterface.', \get_class($translator))); } $this->translator = $translator; @@ -105,7 +105,7 @@ class LoggingTranslator implements TranslatorInterface, TranslatorBagInterface */ public function __call($method, $args) { - return call_user_func_array(array($this->translator, $method), $args); + return \call_user_func_array(array($this->translator, $method), $args); } /** diff --git a/vendor/symfony/translation/MessageSelector.php b/vendor/symfony/translation/MessageSelector.php index 31304cd0..5de171c5 100644 --- a/vendor/symfony/translation/MessageSelector.php +++ b/vendor/symfony/translation/MessageSelector.php @@ -82,7 +82,7 @@ class MessageSelector if (!isset($standardRules[$position])) { // when there's exactly one rule given, and that rule is a standard // rule, use this rule - if (1 === count($parts) && isset($standardRules[0])) { + if (1 === \count($parts) && isset($standardRules[0])) { return $standardRules[0]; } diff --git a/vendor/symfony/translation/PluralizationRules.php b/vendor/symfony/translation/PluralizationRules.php index 48a6c608..3aca0ba9 100644 --- a/vendor/symfony/translation/PluralizationRules.php +++ b/vendor/symfony/translation/PluralizationRules.php @@ -35,14 +35,14 @@ class PluralizationRules $locale = 'xbr'; } - if (strlen($locale) > 3) { - $locale = substr($locale, 0, -strlen(strrchr($locale, '_'))); + if (\strlen($locale) > 3) { + $locale = substr($locale, 0, -\strlen(strrchr($locale, '_'))); } if (isset(self::$rules[$locale])) { - $return = call_user_func(self::$rules[$locale], $number); + $return = \call_user_func(self::$rules[$locale], $number); - if (!is_int($return) || $return < 0) { + if (!\is_int($return) || $return < 0) { return 0; } @@ -144,6 +144,7 @@ class PluralizationRules case 'bs': case 'hr': case 'ru': + case 'sh': case 'sr': case 'uk': return ((1 == $number % 10) && (11 != $number % 100)) ? 0 : ((($number % 10 >= 2) && ($number % 10 <= 4) && (($number % 100 < 10) || ($number % 100 >= 20))) ? 1 : 2); @@ -200,8 +201,8 @@ class PluralizationRules $locale = 'xbr'; } - if (strlen($locale) > 3) { - $locale = substr($locale, 0, -strlen(strrchr($locale, '_'))); + if (\strlen($locale) > 3) { + $locale = substr($locale, 0, -\strlen(strrchr($locale, '_'))); } self::$rules[$locale] = $rule; diff --git a/vendor/symfony/translation/Reader/TranslationReader.php b/vendor/symfony/translation/Reader/TranslationReader.php index d2ad774e..948edec4 100644 --- a/vendor/symfony/translation/Reader/TranslationReader.php +++ b/vendor/symfony/translation/Reader/TranslationReader.php @@ -55,7 +55,7 @@ class TranslationReader implements TranslationReaderInterface $extension = $catalogue->getLocale().'.'.$format; $files = $finder->files()->name('*.'.$extension)->in($directory); foreach ($files as $file) { - $domain = substr($file->getFilename(), 0, -1 * strlen($extension) - 1); + $domain = substr($file->getFilename(), 0, -1 * \strlen($extension) - 1); $catalogue->addCatalogue($loader->load($file->getPathname(), $catalogue->getLocale(), $domain)); } } diff --git a/vendor/symfony/translation/Resources/schemas/xliff-core-1.2-strict.xsd b/vendor/symfony/translation/Resources/schemas/xliff-core-1.2-strict.xsd index dface628..4102d647 100644 --- a/vendor/symfony/translation/Resources/schemas/xliff-core-1.2-strict.xsd +++ b/vendor/symfony/translation/Resources/schemas/xliff-core-1.2-strict.xsd @@ -30,7 +30,7 @@ Jan-10-2006 --> - + diff --git a/vendor/symfony/translation/Tests/DataCollector/TranslationDataCollectorTest.php b/vendor/symfony/translation/Tests/DataCollector/TranslationDataCollectorTest.php index 5611c877..504a69e6 100644 --- a/vendor/symfony/translation/Tests/DataCollector/TranslationDataCollectorTest.php +++ b/vendor/symfony/translation/Tests/DataCollector/TranslationDataCollectorTest.php @@ -12,8 +12,8 @@ namespace Symfony\Component\Translation\Tests\DataCollector; use PHPUnit\Framework\TestCase; -use Symfony\Component\Translation\DataCollectorTranslator; use Symfony\Component\Translation\DataCollector\TranslationDataCollector; +use Symfony\Component\Translation\DataCollectorTranslator; class TranslationDataCollectorTest extends TestCase { diff --git a/vendor/symfony/translation/Tests/DataCollectorTranslatorTest.php b/vendor/symfony/translation/Tests/DataCollectorTranslatorTest.php index 1b417379..cc196223 100644 --- a/vendor/symfony/translation/Tests/DataCollectorTranslatorTest.php +++ b/vendor/symfony/translation/Tests/DataCollectorTranslatorTest.php @@ -12,9 +12,9 @@ namespace Symfony\Component\Translation\Tests; use PHPUnit\Framework\TestCase; -use Symfony\Component\Translation\Translator; use Symfony\Component\Translation\DataCollectorTranslator; use Symfony\Component\Translation\Loader\ArrayLoader; +use Symfony\Component\Translation\Translator; class DataCollectorTranslatorTest extends TestCase { diff --git a/vendor/symfony/translation/Tests/DependencyInjection/TranslationDumperPassTest.php b/vendor/symfony/translation/Tests/DependencyInjection/TranslationDumperPassTest.php index 3e02cb43..759bb0e9 100644 --- a/vendor/symfony/translation/Tests/DependencyInjection/TranslationDumperPassTest.php +++ b/vendor/symfony/translation/Tests/DependencyInjection/TranslationDumperPassTest.php @@ -35,8 +35,8 @@ class TranslationDumperPassTest extends TestCase { $container = new ContainerBuilder(); - $definitionsBefore = count($container->getDefinitions()); - $aliasesBefore = count($container->getAliases()); + $definitionsBefore = \count($container->getDefinitions()); + $aliasesBefore = \count($container->getAliases()); $translationDumperPass = new TranslationDumperPass(); $translationDumperPass->process($container); diff --git a/vendor/symfony/translation/Tests/DependencyInjection/TranslationExtractorPassTest.php b/vendor/symfony/translation/Tests/DependencyInjection/TranslationExtractorPassTest.php index b3313e63..14d164d0 100644 --- a/vendor/symfony/translation/Tests/DependencyInjection/TranslationExtractorPassTest.php +++ b/vendor/symfony/translation/Tests/DependencyInjection/TranslationExtractorPassTest.php @@ -35,8 +35,8 @@ class TranslationExtractorPassTest extends TestCase { $container = new ContainerBuilder(); - $definitionsBefore = count($container->getDefinitions()); - $aliasesBefore = count($container->getAliases()); + $definitionsBefore = \count($container->getDefinitions()); + $aliasesBefore = \count($container->getAliases()); $translationDumperPass = new TranslationExtractorPass(); $translationDumperPass->process($container); diff --git a/vendor/symfony/translation/Tests/Dumper/CsvFileDumperTest.php b/vendor/symfony/translation/Tests/Dumper/CsvFileDumperTest.php index 73fe922d..9a7a059a 100644 --- a/vendor/symfony/translation/Tests/Dumper/CsvFileDumperTest.php +++ b/vendor/symfony/translation/Tests/Dumper/CsvFileDumperTest.php @@ -12,8 +12,8 @@ namespace Symfony\Component\Translation\Tests\Dumper; use PHPUnit\Framework\TestCase; -use Symfony\Component\Translation\MessageCatalogue; use Symfony\Component\Translation\Dumper\CsvFileDumper; +use Symfony\Component\Translation\MessageCatalogue; class CsvFileDumperTest extends TestCase { diff --git a/vendor/symfony/translation/Tests/Dumper/FileDumperTest.php b/vendor/symfony/translation/Tests/Dumper/FileDumperTest.php index 25b85610..d1524d6e 100644 --- a/vendor/symfony/translation/Tests/Dumper/FileDumperTest.php +++ b/vendor/symfony/translation/Tests/Dumper/FileDumperTest.php @@ -12,8 +12,8 @@ namespace Symfony\Component\Translation\Tests\Dumper; use PHPUnit\Framework\TestCase; -use Symfony\Component\Translation\MessageCatalogue; use Symfony\Component\Translation\Dumper\FileDumper; +use Symfony\Component\Translation\MessageCatalogue; class FileDumperTest extends TestCase { diff --git a/vendor/symfony/translation/Tests/Dumper/IcuResFileDumperTest.php b/vendor/symfony/translation/Tests/Dumper/IcuResFileDumperTest.php index 2f19d08d..78d0abb6 100644 --- a/vendor/symfony/translation/Tests/Dumper/IcuResFileDumperTest.php +++ b/vendor/symfony/translation/Tests/Dumper/IcuResFileDumperTest.php @@ -12,8 +12,8 @@ namespace Symfony\Component\Translation\Tests\Dumper; use PHPUnit\Framework\TestCase; -use Symfony\Component\Translation\MessageCatalogue; use Symfony\Component\Translation\Dumper\IcuResFileDumper; +use Symfony\Component\Translation\MessageCatalogue; class IcuResFileDumperTest extends TestCase { diff --git a/vendor/symfony/translation/Tests/Dumper/IniFileDumperTest.php b/vendor/symfony/translation/Tests/Dumper/IniFileDumperTest.php index 72bd9166..5f3c1236 100644 --- a/vendor/symfony/translation/Tests/Dumper/IniFileDumperTest.php +++ b/vendor/symfony/translation/Tests/Dumper/IniFileDumperTest.php @@ -12,8 +12,8 @@ namespace Symfony\Component\Translation\Tests\Dumper; use PHPUnit\Framework\TestCase; -use Symfony\Component\Translation\MessageCatalogue; use Symfony\Component\Translation\Dumper\IniFileDumper; +use Symfony\Component\Translation\MessageCatalogue; class IniFileDumperTest extends TestCase { diff --git a/vendor/symfony/translation/Tests/Dumper/JsonFileDumperTest.php b/vendor/symfony/translation/Tests/Dumper/JsonFileDumperTest.php index 5e66f718..b134ce4f 100644 --- a/vendor/symfony/translation/Tests/Dumper/JsonFileDumperTest.php +++ b/vendor/symfony/translation/Tests/Dumper/JsonFileDumperTest.php @@ -12,8 +12,8 @@ namespace Symfony\Component\Translation\Tests\Dumper; use PHPUnit\Framework\TestCase; -use Symfony\Component\Translation\MessageCatalogue; use Symfony\Component\Translation\Dumper\JsonFileDumper; +use Symfony\Component\Translation\MessageCatalogue; class JsonFileDumperTest extends TestCase { diff --git a/vendor/symfony/translation/Tests/Dumper/MoFileDumperTest.php b/vendor/symfony/translation/Tests/Dumper/MoFileDumperTest.php index 3a2054f3..d0519675 100644 --- a/vendor/symfony/translation/Tests/Dumper/MoFileDumperTest.php +++ b/vendor/symfony/translation/Tests/Dumper/MoFileDumperTest.php @@ -12,8 +12,8 @@ namespace Symfony\Component\Translation\Tests\Dumper; use PHPUnit\Framework\TestCase; -use Symfony\Component\Translation\MessageCatalogue; use Symfony\Component\Translation\Dumper\MoFileDumper; +use Symfony\Component\Translation\MessageCatalogue; class MoFileDumperTest extends TestCase { diff --git a/vendor/symfony/translation/Tests/Dumper/PhpFileDumperTest.php b/vendor/symfony/translation/Tests/Dumper/PhpFileDumperTest.php index c2f70354..22a39dd4 100644 --- a/vendor/symfony/translation/Tests/Dumper/PhpFileDumperTest.php +++ b/vendor/symfony/translation/Tests/Dumper/PhpFileDumperTest.php @@ -12,8 +12,8 @@ namespace Symfony\Component\Translation\Tests\Dumper; use PHPUnit\Framework\TestCase; -use Symfony\Component\Translation\MessageCatalogue; use Symfony\Component\Translation\Dumper\PhpFileDumper; +use Symfony\Component\Translation\MessageCatalogue; class PhpFileDumperTest extends TestCase { diff --git a/vendor/symfony/translation/Tests/Dumper/PoFileDumperTest.php b/vendor/symfony/translation/Tests/Dumper/PoFileDumperTest.php index b00c5d13..5d752471 100644 --- a/vendor/symfony/translation/Tests/Dumper/PoFileDumperTest.php +++ b/vendor/symfony/translation/Tests/Dumper/PoFileDumperTest.php @@ -12,8 +12,8 @@ namespace Symfony\Component\Translation\Tests\Dumper; use PHPUnit\Framework\TestCase; -use Symfony\Component\Translation\MessageCatalogue; use Symfony\Component\Translation\Dumper\PoFileDumper; +use Symfony\Component\Translation\MessageCatalogue; class PoFileDumperTest extends TestCase { diff --git a/vendor/symfony/translation/Tests/Dumper/QtFileDumperTest.php b/vendor/symfony/translation/Tests/Dumper/QtFileDumperTest.php index 9213bbae..8e4a6f43 100644 --- a/vendor/symfony/translation/Tests/Dumper/QtFileDumperTest.php +++ b/vendor/symfony/translation/Tests/Dumper/QtFileDumperTest.php @@ -12,8 +12,8 @@ namespace Symfony\Component\Translation\Tests\Dumper; use PHPUnit\Framework\TestCase; -use Symfony\Component\Translation\MessageCatalogue; use Symfony\Component\Translation\Dumper\QtFileDumper; +use Symfony\Component\Translation\MessageCatalogue; class QtFileDumperTest extends TestCase { diff --git a/vendor/symfony/translation/Tests/Dumper/XliffFileDumperTest.php b/vendor/symfony/translation/Tests/Dumper/XliffFileDumperTest.php index 738d4b3b..443dccf2 100644 --- a/vendor/symfony/translation/Tests/Dumper/XliffFileDumperTest.php +++ b/vendor/symfony/translation/Tests/Dumper/XliffFileDumperTest.php @@ -12,8 +12,8 @@ namespace Symfony\Component\Translation\Tests\Dumper; use PHPUnit\Framework\TestCase; -use Symfony\Component\Translation\MessageCatalogue; use Symfony\Component\Translation\Dumper\XliffFileDumper; +use Symfony\Component\Translation\MessageCatalogue; class XliffFileDumperTest extends TestCase { diff --git a/vendor/symfony/translation/Tests/Dumper/YamlFileDumperTest.php b/vendor/symfony/translation/Tests/Dumper/YamlFileDumperTest.php index 0541ac10..a5549a2e 100644 --- a/vendor/symfony/translation/Tests/Dumper/YamlFileDumperTest.php +++ b/vendor/symfony/translation/Tests/Dumper/YamlFileDumperTest.php @@ -12,8 +12,8 @@ namespace Symfony\Component\Translation\Tests\Dumper; use PHPUnit\Framework\TestCase; -use Symfony\Component\Translation\MessageCatalogue; use Symfony\Component\Translation\Dumper\YamlFileDumper; +use Symfony\Component\Translation\MessageCatalogue; class YamlFileDumperTest extends TestCase { diff --git a/vendor/symfony/translation/Tests/Loader/CsvFileLoaderTest.php b/vendor/symfony/translation/Tests/Loader/CsvFileLoaderTest.php index 27a4456e..29efdef0 100644 --- a/vendor/symfony/translation/Tests/Loader/CsvFileLoaderTest.php +++ b/vendor/symfony/translation/Tests/Loader/CsvFileLoaderTest.php @@ -12,8 +12,8 @@ namespace Symfony\Component\Translation\Tests\Loader; use PHPUnit\Framework\TestCase; -use Symfony\Component\Translation\Loader\CsvFileLoader; use Symfony\Component\Config\Resource\FileResource; +use Symfony\Component\Translation\Loader\CsvFileLoader; class CsvFileLoaderTest extends TestCase { diff --git a/vendor/symfony/translation/Tests/Loader/IcuDatFileLoaderTest.php b/vendor/symfony/translation/Tests/Loader/IcuDatFileLoaderTest.php index 888fb615..e28db601 100644 --- a/vendor/symfony/translation/Tests/Loader/IcuDatFileLoaderTest.php +++ b/vendor/symfony/translation/Tests/Loader/IcuDatFileLoaderTest.php @@ -11,8 +11,8 @@ namespace Symfony\Component\Translation\Tests\Loader; -use Symfony\Component\Translation\Loader\IcuDatFileLoader; use Symfony\Component\Config\Resource\FileResource; +use Symfony\Component\Translation\Loader\IcuDatFileLoader; /** * @requires extension intl diff --git a/vendor/symfony/translation/Tests/Loader/IcuResFileLoaderTest.php b/vendor/symfony/translation/Tests/Loader/IcuResFileLoaderTest.php index 8d9ed199..92d8933c 100644 --- a/vendor/symfony/translation/Tests/Loader/IcuResFileLoaderTest.php +++ b/vendor/symfony/translation/Tests/Loader/IcuResFileLoaderTest.php @@ -11,8 +11,8 @@ namespace Symfony\Component\Translation\Tests\Loader; -use Symfony\Component\Translation\Loader\IcuResFileLoader; use Symfony\Component\Config\Resource\DirectoryResource; +use Symfony\Component\Translation\Loader\IcuResFileLoader; /** * @requires extension intl diff --git a/vendor/symfony/translation/Tests/Loader/IniFileLoaderTest.php b/vendor/symfony/translation/Tests/Loader/IniFileLoaderTest.php index dbf22d10..d9dcc5e8 100644 --- a/vendor/symfony/translation/Tests/Loader/IniFileLoaderTest.php +++ b/vendor/symfony/translation/Tests/Loader/IniFileLoaderTest.php @@ -12,8 +12,8 @@ namespace Symfony\Component\Translation\Tests\Loader; use PHPUnit\Framework\TestCase; -use Symfony\Component\Translation\Loader\IniFileLoader; use Symfony\Component\Config\Resource\FileResource; +use Symfony\Component\Translation\Loader\IniFileLoader; class IniFileLoaderTest extends TestCase { diff --git a/vendor/symfony/translation/Tests/Loader/JsonFileLoaderTest.php b/vendor/symfony/translation/Tests/Loader/JsonFileLoaderTest.php index 46261b66..cea0aef4 100644 --- a/vendor/symfony/translation/Tests/Loader/JsonFileLoaderTest.php +++ b/vendor/symfony/translation/Tests/Loader/JsonFileLoaderTest.php @@ -12,8 +12,8 @@ namespace Symfony\Component\Translation\Tests\Loader; use PHPUnit\Framework\TestCase; -use Symfony\Component\Translation\Loader\JsonFileLoader; use Symfony\Component\Config\Resource\FileResource; +use Symfony\Component\Translation\Loader\JsonFileLoader; class JsonFileLoaderTest extends TestCase { diff --git a/vendor/symfony/translation/Tests/Loader/LocalizedTestCase.php b/vendor/symfony/translation/Tests/Loader/LocalizedTestCase.php index a655c69d..279e9fde 100644 --- a/vendor/symfony/translation/Tests/Loader/LocalizedTestCase.php +++ b/vendor/symfony/translation/Tests/Loader/LocalizedTestCase.php @@ -17,7 +17,7 @@ abstract class LocalizedTestCase extends TestCase { protected function setUp() { - if (!extension_loaded('intl')) { + if (!\extension_loaded('intl')) { $this->markTestSkipped('Extension intl is required.'); } } diff --git a/vendor/symfony/translation/Tests/Loader/MoFileLoaderTest.php b/vendor/symfony/translation/Tests/Loader/MoFileLoaderTest.php index b9f754fc..6ad3d44d 100644 --- a/vendor/symfony/translation/Tests/Loader/MoFileLoaderTest.php +++ b/vendor/symfony/translation/Tests/Loader/MoFileLoaderTest.php @@ -12,8 +12,8 @@ namespace Symfony\Component\Translation\Tests\Loader; use PHPUnit\Framework\TestCase; -use Symfony\Component\Translation\Loader\MoFileLoader; use Symfony\Component\Config\Resource\FileResource; +use Symfony\Component\Translation\Loader\MoFileLoader; class MoFileLoaderTest extends TestCase { diff --git a/vendor/symfony/translation/Tests/Loader/PhpFileLoaderTest.php b/vendor/symfony/translation/Tests/Loader/PhpFileLoaderTest.php index 9fc83e34..01b7a5fe 100644 --- a/vendor/symfony/translation/Tests/Loader/PhpFileLoaderTest.php +++ b/vendor/symfony/translation/Tests/Loader/PhpFileLoaderTest.php @@ -12,8 +12,8 @@ namespace Symfony\Component\Translation\Tests\Loader; use PHPUnit\Framework\TestCase; -use Symfony\Component\Translation\Loader\PhpFileLoader; use Symfony\Component\Config\Resource\FileResource; +use Symfony\Component\Translation\Loader\PhpFileLoader; class PhpFileLoaderTest extends TestCase { diff --git a/vendor/symfony/translation/Tests/Loader/PoFileLoaderTest.php b/vendor/symfony/translation/Tests/Loader/PoFileLoaderTest.php index 884dec9a..4176cb7f 100644 --- a/vendor/symfony/translation/Tests/Loader/PoFileLoaderTest.php +++ b/vendor/symfony/translation/Tests/Loader/PoFileLoaderTest.php @@ -12,8 +12,8 @@ namespace Symfony\Component\Translation\Tests\Loader; use PHPUnit\Framework\TestCase; -use Symfony\Component\Translation\Loader\PoFileLoader; use Symfony\Component\Config\Resource\FileResource; +use Symfony\Component\Translation\Loader\PoFileLoader; class PoFileLoaderTest extends TestCase { diff --git a/vendor/symfony/translation/Tests/Loader/QtFileLoaderTest.php b/vendor/symfony/translation/Tests/Loader/QtFileLoaderTest.php index 7ee62b06..8a00fded 100644 --- a/vendor/symfony/translation/Tests/Loader/QtFileLoaderTest.php +++ b/vendor/symfony/translation/Tests/Loader/QtFileLoaderTest.php @@ -12,8 +12,8 @@ namespace Symfony\Component\Translation\Tests\Loader; use PHPUnit\Framework\TestCase; -use Symfony\Component\Translation\Loader\QtFileLoader; use Symfony\Component\Config\Resource\FileResource; +use Symfony\Component\Translation\Loader\QtFileLoader; class QtFileLoaderTest extends TestCase { diff --git a/vendor/symfony/translation/Tests/Loader/XliffFileLoaderTest.php b/vendor/symfony/translation/Tests/Loader/XliffFileLoaderTest.php index a8182895..94406fd5 100644 --- a/vendor/symfony/translation/Tests/Loader/XliffFileLoaderTest.php +++ b/vendor/symfony/translation/Tests/Loader/XliffFileLoaderTest.php @@ -12,8 +12,8 @@ namespace Symfony\Component\Translation\Tests\Loader; use PHPUnit\Framework\TestCase; -use Symfony\Component\Translation\Loader\XliffFileLoader; use Symfony\Component\Config\Resource\FileResource; +use Symfony\Component\Translation\Loader\XliffFileLoader; class XliffFileLoaderTest extends TestCase { diff --git a/vendor/symfony/translation/Tests/Loader/YamlFileLoaderTest.php b/vendor/symfony/translation/Tests/Loader/YamlFileLoaderTest.php index e1ba514b..bb3c1a99 100644 --- a/vendor/symfony/translation/Tests/Loader/YamlFileLoaderTest.php +++ b/vendor/symfony/translation/Tests/Loader/YamlFileLoaderTest.php @@ -12,8 +12,8 @@ namespace Symfony\Component\Translation\Tests\Loader; use PHPUnit\Framework\TestCase; -use Symfony\Component\Translation\Loader\YamlFileLoader; use Symfony\Component\Config\Resource\FileResource; +use Symfony\Component\Translation\Loader\YamlFileLoader; class YamlFileLoaderTest extends TestCase { diff --git a/vendor/symfony/translation/Tests/LoggingTranslatorTest.php b/vendor/symfony/translation/Tests/LoggingTranslatorTest.php index 891230a2..022379e9 100644 --- a/vendor/symfony/translation/Tests/LoggingTranslatorTest.php +++ b/vendor/symfony/translation/Tests/LoggingTranslatorTest.php @@ -12,9 +12,9 @@ namespace Symfony\Component\Translation\Tests; use PHPUnit\Framework\TestCase; -use Symfony\Component\Translation\Translator; -use Symfony\Component\Translation\LoggingTranslator; use Symfony\Component\Translation\Loader\ArrayLoader; +use Symfony\Component\Translation\LoggingTranslator; +use Symfony\Component\Translation\Translator; class LoggingTranslatorTest extends TestCase { diff --git a/vendor/symfony/translation/Tests/PluralizationRulesTest.php b/vendor/symfony/translation/Tests/PluralizationRulesTest.php index a0624e29..5eb6c01f 100644 --- a/vendor/symfony/translation/Tests/PluralizationRulesTest.php +++ b/vendor/symfony/translation/Tests/PluralizationRulesTest.php @@ -100,9 +100,9 @@ class PluralizationRulesTest extends TestCase foreach ($matrix as $langCode => $data) { $indexes = array_flip($data); if ($expectSuccess) { - $this->assertEquals($nplural, count($indexes), "Langcode '$langCode' has '$nplural' plural forms."); + $this->assertEquals($nplural, \count($indexes), "Langcode '$langCode' has '$nplural' plural forms."); } else { - $this->assertNotEquals((int) $nplural, count($indexes), "Langcode '$langCode' has '$nplural' plural forms."); + $this->assertNotEquals((int) $nplural, \count($indexes), "Langcode '$langCode' has '$nplural' plural forms."); } } } diff --git a/vendor/symfony/translation/Tests/TranslatorCacheTest.php b/vendor/symfony/translation/Tests/TranslatorCacheTest.php index a60690f8..3e71ae74 100644 --- a/vendor/symfony/translation/Tests/TranslatorCacheTest.php +++ b/vendor/symfony/translation/Tests/TranslatorCacheTest.php @@ -15,8 +15,8 @@ use PHPUnit\Framework\TestCase; use Symfony\Component\Config\Resource\SelfCheckingResourceInterface; use Symfony\Component\Translation\Loader\ArrayLoader; use Symfony\Component\Translation\Loader\LoaderInterface; -use Symfony\Component\Translation\Translator; use Symfony\Component\Translation\MessageCatalogue; +use Symfony\Component\Translation\Translator; class TranslatorCacheTest extends TestCase { diff --git a/vendor/symfony/translation/Tests/TranslatorTest.php b/vendor/symfony/translation/Tests/TranslatorTest.php index d30ea587..3e54839f 100644 --- a/vendor/symfony/translation/Tests/TranslatorTest.php +++ b/vendor/symfony/translation/Tests/TranslatorTest.php @@ -12,9 +12,9 @@ namespace Symfony\Component\Translation\Tests; use PHPUnit\Framework\TestCase; -use Symfony\Component\Translation\Translator; use Symfony\Component\Translation\Loader\ArrayLoader; use Symfony\Component\Translation\MessageCatalogue; +use Symfony\Component\Translation\Translator; class TranslatorTest extends TestCase { @@ -297,12 +297,12 @@ class TranslatorTest extends TestCase $resources = $translator->getCatalogue('en')->getResources(); $this->assertCount(1, $resources); - $this->assertContains(__DIR__.DIRECTORY_SEPARATOR.'fixtures'.DIRECTORY_SEPARATOR.'resources.yml', $resources); + $this->assertContains(__DIR__.\DIRECTORY_SEPARATOR.'fixtures'.\DIRECTORY_SEPARATOR.'resources.yml', $resources); $resources = $translator->getCatalogue('en_GB')->getResources(); $this->assertCount(2, $resources); - $this->assertContains(__DIR__.DIRECTORY_SEPARATOR.'fixtures'.DIRECTORY_SEPARATOR.'empty.yml', $resources); - $this->assertContains(__DIR__.DIRECTORY_SEPARATOR.'fixtures'.DIRECTORY_SEPARATOR.'resources.yml', $resources); + $this->assertContains(__DIR__.\DIRECTORY_SEPARATOR.'fixtures'.\DIRECTORY_SEPARATOR.'empty.yml', $resources); + $this->assertContains(__DIR__.\DIRECTORY_SEPARATOR.'fixtures'.\DIRECTORY_SEPARATOR.'resources.yml', $resources); } /** diff --git a/vendor/symfony/translation/Translator.php b/vendor/symfony/translation/Translator.php index 2899db01..97690410 100644 --- a/vendor/symfony/translation/Translator.php +++ b/vendor/symfony/translation/Translator.php @@ -11,17 +11,17 @@ namespace Symfony\Component\Translation; -use Symfony\Component\Translation\Loader\LoaderInterface; -use Symfony\Component\Translation\Exception\NotFoundResourceException; +use Symfony\Component\Config\ConfigCacheFactory; +use Symfony\Component\Config\ConfigCacheFactoryInterface; +use Symfony\Component\Config\ConfigCacheInterface; use Symfony\Component\Translation\Exception\InvalidArgumentException; use Symfony\Component\Translation\Exception\LogicException; +use Symfony\Component\Translation\Exception\NotFoundResourceException; use Symfony\Component\Translation\Exception\RuntimeException; -use Symfony\Component\Config\ConfigCacheInterface; -use Symfony\Component\Config\ConfigCacheFactoryInterface; -use Symfony\Component\Config\ConfigCacheFactory; -use Symfony\Component\Translation\Formatter\MessageFormatterInterface; use Symfony\Component\Translation\Formatter\ChoiceMessageFormatterInterface; use Symfony\Component\Translation\Formatter\MessageFormatter; +use Symfony\Component\Translation\Formatter\MessageFormatterInterface; +use Symfony\Component\Translation\Loader\LoaderInterface; /** * @author Fabien Potencier @@ -125,7 +125,7 @@ class Translator implements TranslatorInterface, TranslatorBagInterface $this->resources[$locale][] = array($format, $resource, $domain); - if (in_array($locale, $this->fallbackLocales)) { + if (\in_array($locale, $this->fallbackLocales)) { $this->catalogues = array(); } else { unset($this->catalogues[$locale]); @@ -196,7 +196,7 @@ class Translator implements TranslatorInterface, TranslatorBagInterface public function transChoice($id, $number, array $parameters = array(), $domain = null, $locale = null) { if (!$this->formatter instanceof ChoiceMessageFormatterInterface) { - throw new LogicException(sprintf('The formatter "%s" does not support plural translations.', get_class($this->formatter))); + throw new LogicException(sprintf('The formatter "%s" does not support plural translations.', \get_class($this->formatter))); } if (null === $domain) { @@ -402,7 +402,7 @@ EOF } if (false !== strrchr($locale, '_')) { - array_unshift($locales, substr($locale, 0, -strlen(strrchr($locale, '_')))); + array_unshift($locales, substr($locale, 0, -\strlen(strrchr($locale, '_')))); } return array_unique($locales); diff --git a/vendor/symfony/translation/Util/ArrayConverter.php b/vendor/symfony/translation/Util/ArrayConverter.php index 9c0a420a..b98e7ce8 100644 --- a/vendor/symfony/translation/Util/ArrayConverter.php +++ b/vendor/symfony/translation/Util/ArrayConverter.php @@ -54,7 +54,7 @@ class ArrayConverter $parentOfElem = null; foreach ($parts as $i => $part) { - if (isset($elem[$part]) && is_string($elem[$part])) { + if (isset($elem[$part]) && \is_string($elem[$part])) { /* Process next case: * 'foo': 'test1', * 'foo.bar': 'test2' @@ -62,14 +62,14 @@ class ArrayConverter * $tree['foo'] was string before we found array {bar: test2}. * Treat new element as string too, e.g. add $tree['foo.bar'] = 'test2'; */ - $elem = &$elem[implode('.', array_slice($parts, $i))]; + $elem = &$elem[implode('.', \array_slice($parts, $i))]; break; } $parentOfElem = &$elem; $elem = &$elem[$part]; } - if (is_array($elem) && count($elem) > 0 && $parentOfElem) { + if (\is_array($elem) && \count($elem) > 0 && $parentOfElem) { /* Process next case: * 'foo.bar': 'test1' * 'foo': 'test2' @@ -89,7 +89,7 @@ class ArrayConverter $prefix .= '.'; foreach ($node as $id => $value) { - if (is_string($value)) { + if (\is_string($value)) { $tree[$prefix.$id] = $value; } else { self::cancelExpand($tree, $prefix.$id, $value); diff --git a/vendor/symfony/translation/Writer/TranslationWriter.php b/vendor/symfony/translation/Writer/TranslationWriter.php index c03ded3c..762733b4 100644 --- a/vendor/symfony/translation/Writer/TranslationWriter.php +++ b/vendor/symfony/translation/Writer/TranslationWriter.php @@ -11,10 +11,10 @@ namespace Symfony\Component\Translation\Writer; -use Symfony\Component\Translation\MessageCatalogue; use Symfony\Component\Translation\Dumper\DumperInterface; use Symfony\Component\Translation\Exception\InvalidArgumentException; use Symfony\Component\Translation\Exception\RuntimeException; +use Symfony\Component\Translation\MessageCatalogue; /** * TranslationWriter writes translation messages. @@ -43,7 +43,7 @@ class TranslationWriter implements TranslationWriterInterface */ public function disableBackup() { - @trigger_error(sprintf('The %s() method is deprecated since Symfony 4.1.', __METHOD__), E_USER_DEPRECATED); + @trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.1.', __METHOD__), E_USER_DEPRECATED); foreach ($this->dumpers as $dumper) { if (method_exists($dumper, 'setBackup')) { diff --git a/vendor/symfony/var-dumper/Caster/ArgsStub.php b/vendor/symfony/var-dumper/Caster/ArgsStub.php index 0c53a7bf..582d15e2 100644 --- a/vendor/symfony/var-dumper/Caster/ArgsStub.php +++ b/vendor/symfony/var-dumper/Caster/ArgsStub.php @@ -35,10 +35,10 @@ class ArgsStub extends EnumStub return; } - if (count($values) < count($params)) { - $params = array_slice($params, 0, count($values)); - } elseif (count($values) > count($params)) { - $values[] = new EnumStub(array_splice($values, count($params)), false); + if (\count($values) < \count($params)) { + $params = \array_slice($params, 0, \count($values)); + } elseif (\count($values) > \count($params)) { + $values[] = new EnumStub(array_splice($values, \count($params)), false); $params[] = $variadic; } if (array('...') === $params) { diff --git a/vendor/symfony/var-dumper/Caster/Caster.php b/vendor/symfony/var-dumper/Caster/Caster.php index 7f4e0228..c82ce827 100644 --- a/vendor/symfony/var-dumper/Caster/Caster.php +++ b/vendor/symfony/var-dumper/Caster/Caster.php @@ -117,10 +117,10 @@ class Caster } elseif (false === $v || '' === $v || '0' === $v || 0 === $v || 0.0 === $v || array() === $v) { $type |= self::EXCLUDE_EMPTY & $filter; } - if ((self::EXCLUDE_NOT_IMPORTANT & $filter) && !in_array($k, $listedProperties, true)) { + if ((self::EXCLUDE_NOT_IMPORTANT & $filter) && !\in_array($k, $listedProperties, true)) { $type |= self::EXCLUDE_NOT_IMPORTANT; } - if ((self::EXCLUDE_VERBOSE & $filter) && in_array($k, $listedProperties, true)) { + if ((self::EXCLUDE_VERBOSE & $filter) && \in_array($k, $listedProperties, true)) { $type |= self::EXCLUDE_VERBOSE; } diff --git a/vendor/symfony/var-dumper/Caster/ClassStub.php b/vendor/symfony/var-dumper/Caster/ClassStub.php index 9eebae08..b609a6ed 100644 --- a/vendor/symfony/var-dumper/Caster/ClassStub.php +++ b/vendor/symfony/var-dumper/Caster/ClassStub.php @@ -27,7 +27,7 @@ class ClassStub extends ConstStub $this->value = $identifier; if (0 < $i = strrpos($identifier, '\\')) { - $this->attr['ellipsis'] = strlen($identifier) - $i; + $this->attr['ellipsis'] = \strlen($identifier) - $i; $this->attr['ellipsis-type'] = 'class'; $this->attr['ellipsis-tail'] = 1; } @@ -36,9 +36,9 @@ class ClassStub extends ConstStub if (null !== $callable) { if ($callable instanceof \Closure) { $r = new \ReflectionFunction($callable); - } elseif (is_object($callable)) { + } elseif (\is_object($callable)) { $r = array($callable, '__invoke'); - } elseif (is_array($callable)) { + } elseif (\is_array($callable)) { $r = $callable; } elseif (false !== $i = strpos($callable, '::')) { $r = array(substr($callable, 0, $i), substr($callable, 2 + $i)); @@ -51,7 +51,7 @@ class ClassStub extends ConstStub $r = new \ReflectionClass($identifier); } - if (is_array($r)) { + if (\is_array($r)) { try { $r = new \ReflectionMethod($r[0], $r[1]); } catch (\ReflectionException $e) { @@ -70,13 +70,13 @@ class ClassStub extends ConstStub public static function wrapCallable($callable) { - if (is_object($callable) || !is_callable($callable)) { + if (\is_object($callable) || !\is_callable($callable)) { return $callable; } - if (!is_array($callable)) { + if (!\is_array($callable)) { $callable = new static($callable); - } elseif (is_string($callable[0])) { + } elseif (\is_string($callable[0])) { $callable[0] = new static($callable[0]); } else { $callable[1] = new static($callable[1], $callable); diff --git a/vendor/symfony/var-dumper/Caster/CutArrayStub.php b/vendor/symfony/var-dumper/Caster/CutArrayStub.php index f2a80305..0e4fb363 100644 --- a/vendor/symfony/var-dumper/Caster/CutArrayStub.php +++ b/vendor/symfony/var-dumper/Caster/CutArrayStub.php @@ -25,6 +25,6 @@ class CutArrayStub extends CutStub parent::__construct($value); $this->preservedSubset = array_intersect_key($value, array_flip($preservedKeys)); - $this->cut -= count($this->preservedSubset); + $this->cut -= \count($this->preservedSubset); } } diff --git a/vendor/symfony/var-dumper/Caster/CutStub.php b/vendor/symfony/var-dumper/Caster/CutStub.php index 61140eb3..690338f5 100644 --- a/vendor/symfony/var-dumper/Caster/CutStub.php +++ b/vendor/symfony/var-dumper/Caster/CutStub.php @@ -24,17 +24,17 @@ class CutStub extends Stub { $this->value = $value; - switch (gettype($value)) { + switch (\gettype($value)) { case 'object': $this->type = self::TYPE_OBJECT; - $this->class = get_class($value); + $this->class = \get_class($value); $this->cut = -1; break; case 'array': $this->type = self::TYPE_ARRAY; $this->class = self::ARRAY_ASSOC; - $this->cut = $this->value = count($value); + $this->cut = $this->value = \count($value); break; case 'resource': @@ -51,7 +51,7 @@ class CutStub extends Stub case 'string': $this->type = self::TYPE_STRING; $this->class = preg_match('//u', $value) ? self::STRING_UTF8 : self::STRING_BINARY; - $this->cut = self::STRING_BINARY === $this->class ? strlen($value) : mb_strlen($value, 'UTF-8'); + $this->cut = self::STRING_BINARY === $this->class ? \strlen($value) : mb_strlen($value, 'UTF-8'); $this->value = ''; break; } diff --git a/vendor/symfony/var-dumper/Caster/DateCaster.php b/vendor/symfony/var-dumper/Caster/DateCaster.php index af9ce960..da6a5a70 100644 --- a/vendor/symfony/var-dumper/Caster/DateCaster.php +++ b/vendor/symfony/var-dumper/Caster/DateCaster.php @@ -73,7 +73,7 @@ class DateCaster { $location = $timeZone->getLocation(); $formatted = (new \DateTime('now', $timeZone))->format($location ? 'e (P)' : 'P'); - $title = $location && extension_loaded('intl') ? \Locale::getDisplayRegion('-'.$location['country_code']) : ''; + $title = $location && \extension_loaded('intl') ? \Locale::getDisplayRegion('-'.$location['country_code']) : ''; $z = array(Caster::PREFIX_VIRTUAL.'timezone' => new ConstStub($formatted, $title)); @@ -117,6 +117,6 @@ class DateCaster private static function formatSeconds($s, $us) { - return sprintf('%02d.%s', $s, 0 === ($len = strlen($t = rtrim($us, '0'))) ? '0' : ($len <= 3 ? str_pad($t, 3, '0') : $us)); + return sprintf('%02d.%s', $s, 0 === ($len = \strlen($t = rtrim($us, '0'))) ? '0' : ($len <= 3 ? str_pad($t, 3, '0') : $us)); } } diff --git a/vendor/symfony/var-dumper/Caster/DoctrineCaster.php b/vendor/symfony/var-dumper/Caster/DoctrineCaster.php index f6573b34..785d0270 100644 --- a/vendor/symfony/var-dumper/Caster/DoctrineCaster.php +++ b/vendor/symfony/var-dumper/Caster/DoctrineCaster.php @@ -12,8 +12,8 @@ namespace Symfony\Component\VarDumper\Caster; use Doctrine\Common\Proxy\Proxy as CommonProxy; -use Doctrine\ORM\Proxy\Proxy as OrmProxy; use Doctrine\ORM\PersistentCollection; +use Doctrine\ORM\Proxy\Proxy as OrmProxy; use Symfony\Component\VarDumper\Cloner\Stub; /** diff --git a/vendor/symfony/var-dumper/Caster/ExceptionCaster.php b/vendor/symfony/var-dumper/Caster/ExceptionCaster.php index df61aefb..49df71da 100644 --- a/vendor/symfony/var-dumper/Caster/ExceptionCaster.php +++ b/vendor/symfony/var-dumper/Caster/ExceptionCaster.php @@ -12,8 +12,8 @@ namespace Symfony\Component\VarDumper\Caster; use Symfony\Component\Debug\Exception\SilencedErrorContext; -use Symfony\Component\VarDumper\Exception\ThrowingCasterException; use Symfony\Component\VarDumper\Cloner\Stub; +use Symfony\Component\VarDumper\Exception\ThrowingCasterException; /** * Casts common Exception classes to array representation. @@ -71,8 +71,8 @@ class ExceptionCaster if (isset($a[$xPrefix.'previous'], $a[$trace]) && $a[$xPrefix.'previous'] instanceof \Exception) { $b = (array) $a[$xPrefix.'previous']; - self::traceUnshift($b[$xPrefix.'trace'], get_class($a[$xPrefix.'previous']), $b[$prefix.'file'], $b[$prefix.'line']); - $a[$trace] = new TraceStub($b[$xPrefix.'trace'], false, 0, -count($a[$trace]->value)); + self::traceUnshift($b[$xPrefix.'trace'], \get_class($a[$xPrefix.'previous']), $b[$prefix.'file'], $b[$prefix.'line']); + $a[$trace] = new TraceStub($b[$xPrefix.'trace'], false, 0, -\count($a[$trace]->value)); } unset($a[$xPrefix.'previous'], $a[$prefix.'code'], $a[$prefix.'file'], $a[$prefix.'line']); @@ -118,7 +118,7 @@ class ExceptionCaster $prefix = Caster::PREFIX_VIRTUAL; $a = array(); - $j = count($frames); + $j = \count($frames); if (0 > $i = $trace->sliceOffset) { $i = max(0, $j + $i); } @@ -175,7 +175,7 @@ class ExceptionCaster $lastCall = $call; } if (null !== $trace->sliceLength) { - $a = array_slice($a, 0, $trace->sliceLength, true); + $a = \array_slice($a, 0, $trace->sliceLength, true); } return $a; @@ -199,7 +199,7 @@ class ExceptionCaster $a[$prefix.'src'] = self::$framesCache[$cacheKey]; } else { if (preg_match('/\((\d+)\)(?:\([\da-f]{32}\))? : (?:eval\(\)\'d code|runtime-created function)$/', $f['file'], $match)) { - $f['file'] = substr($f['file'], 0, -strlen($match[0])); + $f['file'] = substr($f['file'], 0, -\strlen($match[0])); $f['line'] = (int) $match[1]; } $caller = isset($f['function']) ? sprintf('in %s() on line %d', (isset($f['class']) ? $f['class'].$f['type'] : '').$f['function'], $f['line']) : null; @@ -212,7 +212,7 @@ class ExceptionCaster if (file_exists($f['file']) && 0 <= self::$srcContext) { if (!empty($f['class']) && (is_subclass_of($f['class'], 'Twig\Template') || is_subclass_of($f['class'], 'Twig_Template')) && method_exists($f['class'], 'getDebugInfo')) { - $template = isset($f['object']) ? $f['object'] : unserialize(sprintf('O:%d:"%s":0:{}', strlen($f['class']), $f['class'])); + $template = isset($f['object']) ? $f['object'] : unserialize(sprintf('O:%d:"%s":0:{}', \strlen($f['class']), $f['class'])); $ellipsis = 0; $templateSrc = method_exists($template, 'getSourceContext') ? $template->getSourceContext()->getCode() : (method_exists($template, 'getSource') ? $template->getSource() : ''); @@ -231,7 +231,7 @@ class ExceptionCaster $src = self::extractSource(file_get_contents($f['file']), $f['line'], self::$srcContext, $caller, 'php', $f['file']); $srcKey .= ':'.$f['line']; if ($ellipsis) { - $ellipsis += 1 + strlen($f['line']); + $ellipsis += 1 + \strlen($f['line']); } } $srcAttr .= '&separator= '; diff --git a/vendor/symfony/var-dumper/Caster/LinkStub.php b/vendor/symfony/var-dumper/Caster/LinkStub.php index d709e262..5511404a 100644 --- a/vendor/symfony/var-dumper/Caster/LinkStub.php +++ b/vendor/symfony/var-dumper/Caster/LinkStub.php @@ -30,7 +30,7 @@ class LinkStub extends ConstStub if (null === $href) { $href = $label; } - if (!is_string($href)) { + if (!\is_string($href)) { return; } if (0 === strpos($href, 'file://')) { @@ -53,11 +53,11 @@ class LinkStub extends ConstStub return; } if ($composerRoot = $this->getComposerRoot($href, $this->inVendor)) { - $this->attr['ellipsis'] = strlen($href) - strlen($composerRoot) + 1; + $this->attr['ellipsis'] = \strlen($href) - \strlen($composerRoot) + 1; $this->attr['ellipsis-type'] = 'path'; - $this->attr['ellipsis-tail'] = 1 + ($this->inVendor ? 2 + strlen(implode(array_slice(explode(DIRECTORY_SEPARATOR, substr($href, 1 - $this->attr['ellipsis'])), 0, 2))) : 0); - } elseif (3 < count($ellipsis = explode(DIRECTORY_SEPARATOR, $href))) { - $this->attr['ellipsis'] = 2 + strlen(implode(array_slice($ellipsis, -2))); + $this->attr['ellipsis-tail'] = 1 + ($this->inVendor ? 2 + \strlen(implode(\array_slice(explode(\DIRECTORY_SEPARATOR, substr($href, 1 - $this->attr['ellipsis'])), 0, 2))) : 0); + } elseif (3 < \count($ellipsis = explode(\DIRECTORY_SEPARATOR, $href))) { + $this->attr['ellipsis'] = 2 + \strlen(implode(\array_slice($ellipsis, -2))); $this->attr['ellipsis-type'] = 'path'; $this->attr['ellipsis-tail'] = 1; } @@ -71,16 +71,16 @@ class LinkStub extends ConstStub foreach (get_declared_classes() as $class) { if ('C' === $class[0] && 0 === strpos($class, 'ComposerAutoloaderInit')) { $r = new \ReflectionClass($class); - $v = dirname(dirname($r->getFileName())); + $v = \dirname(\dirname($r->getFileName())); if (file_exists($v.'/composer/installed.json')) { - self::$vendorRoots[] = $v.DIRECTORY_SEPARATOR; + self::$vendorRoots[] = $v.\DIRECTORY_SEPARATOR; } } } } $inVendor = false; - if (isset(self::$composerRoots[$dir = dirname($file)])) { + if (isset(self::$composerRoots[$dir = \dirname($file)])) { return self::$composerRoots[$dir]; } @@ -96,13 +96,13 @@ class LinkStub extends ConstStub // open_basedir restriction in effect break; } - if ($parent === dirname($parent)) { + if ($parent === \dirname($parent)) { return self::$composerRoots[$dir] = false; } - $parent = dirname($parent); + $parent = \dirname($parent); } - return self::$composerRoots[$dir] = $parent.DIRECTORY_SEPARATOR; + return self::$composerRoots[$dir] = $parent.\DIRECTORY_SEPARATOR; } } diff --git a/vendor/symfony/var-dumper/Caster/PdoCaster.php b/vendor/symfony/var-dumper/Caster/PdoCaster.php index b8667824..83a001d9 100644 --- a/vendor/symfony/var-dumper/Caster/PdoCaster.php +++ b/vendor/symfony/var-dumper/Caster/PdoCaster.php @@ -70,7 +70,7 @@ class PdoCaster } try { - $attr[$k] = 'ERRMODE' === $k ? $errmode : $c->getAttribute(constant('PDO::ATTR_'.$k)); + $attr[$k] = 'ERRMODE' === $k ? $errmode : $c->getAttribute(\constant('PDO::ATTR_'.$k)); if ($v && isset($v[$attr[$k]])) { $attr[$k] = new ConstStub($v[$attr[$k]], $attr[$k]); } diff --git a/vendor/symfony/var-dumper/Caster/RedisCaster.php b/vendor/symfony/var-dumper/Caster/RedisCaster.php index 3d7063f4..112097fd 100644 --- a/vendor/symfony/var-dumper/Caster/RedisCaster.php +++ b/vendor/symfony/var-dumper/Caster/RedisCaster.php @@ -37,7 +37,7 @@ class RedisCaster } $ser = $c->getOption(\Redis::OPT_SERIALIZER); - $retry = defined('Redis::OPT_SCAN') ? $c->getOption(\Redis::OPT_SCAN) : 0; + $retry = \defined('Redis::OPT_SCAN') ? $c->getOption(\Redis::OPT_SCAN) : 0; return $a + array( $prefix.'isConnected' => $connected, diff --git a/vendor/symfony/var-dumper/Caster/ReflectionCaster.php b/vendor/symfony/var-dumper/Caster/ReflectionCaster.php index b7aee321..c625e787 100644 --- a/vendor/symfony/var-dumper/Caster/ReflectionCaster.php +++ b/vendor/symfony/var-dumper/Caster/ReflectionCaster.php @@ -198,7 +198,7 @@ class ReflectionCaster if ($v = $c->getStaticVariables()) { foreach ($v as $k => &$v) { - if (is_object($v)) { + if (\is_object($v)) { $a[$prefix.'use']['$'.$k] = new CutStub($v); } else { $a[$prefix.'use']['$'.$k] = &$v; diff --git a/vendor/symfony/var-dumper/Caster/StubCaster.php b/vendor/symfony/var-dumper/Caster/StubCaster.php index 2ec096c5..b0bf5dc8 100644 --- a/vendor/symfony/var-dumper/Caster/StubCaster.php +++ b/vendor/symfony/var-dumper/Caster/StubCaster.php @@ -30,7 +30,7 @@ class StubCaster $stub->cut = $c->cut; $stub->attr = $c->attr; - if (Stub::TYPE_REF === $c->type && !$c->class && is_string($c->value) && !preg_match('//u', $c->value)) { + if (Stub::TYPE_REF === $c->type && !$c->class && \is_string($c->value) && !preg_match('//u', $c->value)) { $stub->type = Stub::TYPE_STRING; $stub->class = Stub::STRING_BINARY; } @@ -49,7 +49,7 @@ class StubCaster public static function cutInternals($obj, array $a, Stub $stub, $isNested) { if ($isNested) { - $stub->cut += count($a); + $stub->cut += \count($a); return array(); } diff --git a/vendor/symfony/var-dumper/Cloner/AbstractCloner.php b/vendor/symfony/var-dumper/Cloner/AbstractCloner.php index bf6755d3..f8dfa97c 100644 --- a/vendor/symfony/var-dumper/Cloner/AbstractCloner.php +++ b/vendor/symfony/var-dumper/Cloner/AbstractCloner.php @@ -166,7 +166,7 @@ abstract class AbstractCloner implements ClonerInterface public function addCasters(array $casters) { foreach ($casters as $type => $callback) { - $this->casters[strtolower($type)][] = is_string($callback) && false !== strpos($callback, '::') ? explode('::', $callback, 2) : $callback; + $this->casters[strtolower($type)][] = \is_string($callback) && false !== strpos($callback, '::') ? explode('::', $callback, 2) : $callback; } } @@ -218,7 +218,7 @@ abstract class AbstractCloner implements ClonerInterface } if ($this->prevErrorHandler) { - return call_user_func($this->prevErrorHandler, $type, $msg, $file, $line, $context); + return \call_user_func($this->prevErrorHandler, $type, $msg, $file, $line, $context); } return false; diff --git a/vendor/symfony/var-dumper/Cloner/Data.php b/vendor/symfony/var-dumper/Cloner/Data.php index f3253212..cf5f204c 100644 --- a/vendor/symfony/var-dumper/Cloner/Data.php +++ b/vendor/symfony/var-dumper/Cloner/Data.php @@ -44,7 +44,7 @@ class Data implements \ArrayAccess, \Countable, \IteratorAggregate $item = $item->value; } if (!$item instanceof Stub) { - return gettype($item); + return \gettype($item); } if (Stub::TYPE_STRING === $item->type) { return 'string'; @@ -106,13 +106,13 @@ class Data implements \ArrayAccess, \Countable, \IteratorAggregate public function count() { - return count($this->getValue()); + return \count($this->getValue()); } public function getIterator() { - if (!is_array($value = $this->getValue())) { - throw new \LogicException(sprintf('%s object holds non-iterable type "%s".', self::class, gettype($value))); + if (!\is_array($value = $this->getValue())) { + throw new \LogicException(sprintf('%s object holds non-iterable type "%s".', self::class, \gettype($value))); } foreach ($value as $k => $v) { @@ -158,11 +158,11 @@ class Data implements \ArrayAccess, \Countable, \IteratorAggregate { $value = $this->getValue(); - if (!is_array($value)) { + if (!\is_array($value)) { return (string) $value; } - return sprintf('%s (count=%d)', $this->getType(), count($value)); + return sprintf('%s (count=%d)', $this->getType(), \count($value)); } /** @@ -300,7 +300,7 @@ class Data implements \ArrayAccess, \Countable, \IteratorAggregate $cursor->hardRefCount = $item->refCount; } $cursor->attr = $item->attr; - $type = $item->class ?: gettype($item->value); + $type = $item->class ?: \gettype($item->value); $item = $this->getStub($item->value); } if ($item instanceof Stub) { @@ -322,7 +322,7 @@ class Data implements \ArrayAccess, \Countable, \IteratorAggregate if ($cursor->stop) { if ($cut >= 0) { - $cut += count($children); + $cut += \count($children); } $children = array(); } @@ -351,7 +351,7 @@ class Data implements \ArrayAccess, \Countable, \IteratorAggregate $cut = $this->dumpChildren($dumper, $cursor, $refs, $children, $cut, $item->type, null !== $item->class); } } elseif ($children && 0 <= $cut) { - $cut += count($children); + $cut += \count($children); } $cursor->skipChildren = false; $dumper->leaveHash($cursor, $item->type, $item->class, $withChildren, $cut); @@ -389,7 +389,7 @@ class Data implements \ArrayAccess, \Countable, \IteratorAggregate ++$cursor->depth; $cursor->hashType = $hashType; $cursor->hashIndex = 0; - $cursor->hashLength = count($children); + $cursor->hashLength = \count($children); $cursor->hashCut = $hashCut; foreach ($children as $key => $child) { $cursor->hashKeyIsBinary = isset($key[0]) && !preg_match('//u', $key); diff --git a/vendor/symfony/var-dumper/Dumper/AbstractDumper.php b/vendor/symfony/var-dumper/Dumper/AbstractDumper.php index 01437d94..abcda1af 100644 --- a/vendor/symfony/var-dumper/Dumper/AbstractDumper.php +++ b/vendor/symfony/var-dumper/Dumper/AbstractDumper.php @@ -49,7 +49,7 @@ abstract class AbstractDumper implements DataDumperInterface, DumperInterface $this->decimalPoint = localeconv(); $this->decimalPoint = $this->decimalPoint['decimal_point']; $this->setOutput($output ?: static::$defaultOutput); - if (!$output && is_string(static::$defaultOutput)) { + if (!$output && \is_string(static::$defaultOutput)) { static::$defaultOutput = $this->outputStream; } } @@ -65,11 +65,11 @@ abstract class AbstractDumper implements DataDumperInterface, DumperInterface { $prev = null !== $this->outputStream ? $this->outputStream : $this->lineDumper; - if (is_callable($output)) { + if (\is_callable($output)) { $this->outputStream = null; $this->lineDumper = $output; } else { - if (is_string($output)) { + if (\is_string($output)) { $output = fopen($output, 'wb'); } $this->outputStream = $output; @@ -195,7 +195,7 @@ abstract class AbstractDumper implements DataDumperInterface, DumperInterface return $s; } - if (!function_exists('iconv')) { + if (!\function_exists('iconv')) { throw new \RuntimeException('Unable to convert a non-UTF-8 string to UTF-8: required function iconv() does not exist. You should install ext-iconv or symfony/polyfill-iconv.'); } diff --git a/vendor/symfony/var-dumper/Dumper/CliDumper.php b/vendor/symfony/var-dumper/Dumper/CliDumper.php index 947b9c00..9fcd6c41 100644 --- a/vendor/symfony/var-dumper/Dumper/CliDumper.php +++ b/vendor/symfony/var-dumper/Dumper/CliDumper.php @@ -62,7 +62,7 @@ class CliDumper extends AbstractDumper { parent::__construct($output, $charset, $flags); - if ('\\' === DIRECTORY_SEPARATOR && !$this->isWindowsTrueColor()) { + if ('\\' === \DIRECTORY_SEPARATOR && !$this->isWindowsTrueColor()) { // Use only the base 16 xterm colors when using ANSICON or standard Windows 10 CLI $this->setStyles(array( 'default' => '31', @@ -186,7 +186,7 @@ class CliDumper extends AbstractDumper unset($str[1]); $str[0] .= "\n"; } - $m = count($str) - 1; + $m = \count($str) - 1; $i = $lineCut = 0; if (self::DUMP_STRING_LENGTH & $this->flags) { @@ -339,7 +339,7 @@ class CliDumper extends AbstractDumper $style = 'index'; // no break case Cursor::HASH_ASSOC: - if (is_int($key)) { + if (\is_int($key)) { $this->line .= $this->style($style, $key).' => '; } else { $this->line .= $bin.'"'.$this->style($style, $key).'" => '; @@ -417,8 +417,8 @@ class CliDumper extends AbstractDumper if (isset($attr['ellipsis'], $attr['ellipsis-type'])) { $prefix = substr($value, 0, -$attr['ellipsis']); - if ('cli' === PHP_SAPI && 'path' === $attr['ellipsis-type'] && isset($_SERVER[$pwd = '\\' === DIRECTORY_SEPARATOR ? 'CD' : 'PWD']) && 0 === strpos($prefix, $_SERVER[$pwd])) { - $prefix = '.'.substr($prefix, strlen($_SERVER[$pwd])); + if ('cli' === \PHP_SAPI && 'path' === $attr['ellipsis-type'] && isset($_SERVER[$pwd = '\\' === \DIRECTORY_SEPARATOR ? 'CD' : 'PWD']) && 0 === strpos($prefix, $_SERVER[$pwd])) { + $prefix = '.'.substr($prefix, \strlen($_SERVER[$pwd])); } if (!empty($attr['ellipsis-tail'])) { $prefix .= substr($value, -$attr['ellipsis'], $attr['ellipsis-tail']); @@ -439,7 +439,7 @@ class CliDumper extends AbstractDumper $s = $startCchr; $c = $c[$i = 0]; do { - $s .= isset($map[$c[$i]]) ? $map[$c[$i]] : sprintf('\x%02X', ord($c[$i])); + $s .= isset($map[$c[$i]]) ? $map[$c[$i]] : sprintf('\x%02X', \ord($c[$i])); } while (isset($c[++$i])); return $s.$endCchr; @@ -447,12 +447,12 @@ class CliDumper extends AbstractDumper if ($this->colors) { if ($cchrCount && "\033" === $value[0]) { - $value = substr($value, strlen($startCchr)); + $value = substr($value, \strlen($startCchr)); } else { $value = "\033[{$style}m".$value; } - if ($cchrCount && $endCchr === substr($value, -strlen($endCchr))) { - $value = substr($value, 0, -strlen($endCchr)); + if ($cchrCount && $endCchr === substr($value, -\strlen($endCchr))) { + $value = substr($value, 0, -\strlen($endCchr)); } else { $value .= "\033[{$this->styles['default']}m"; } @@ -474,7 +474,7 @@ class CliDumper extends AbstractDumper } if (isset($_SERVER['argv'][1])) { $colors = $_SERVER['argv']; - $i = count($colors); + $i = \count($colors); while (--$i > 0) { if (isset($colors[$i][5])) { switch ($colors[$i]) { @@ -537,23 +537,27 @@ class CliDumper extends AbstractDumper */ private function hasColorSupport($stream) { - if (!is_resource($stream) || 'stream' !== get_resource_type($stream)) { + if (!\is_resource($stream) || 'stream' !== get_resource_type($stream)) { return false; } - if (DIRECTORY_SEPARATOR === '\\') { - return (function_exists('sapi_windows_vt100_support') + if ('Hyper' === getenv('TERM_PROGRAM')) { + return true; + } + + if (\DIRECTORY_SEPARATOR === '\\') { + return (\function_exists('sapi_windows_vt100_support') && @sapi_windows_vt100_support($stream)) || false !== getenv('ANSICON') || 'ON' === getenv('ConEmuANSI') || 'xterm' === getenv('TERM'); } - if (function_exists('stream_isatty')) { + if (\function_exists('stream_isatty')) { return @stream_isatty($stream); } - if (function_exists('posix_isatty')) { + if (\function_exists('posix_isatty')) { return @posix_isatty($stream); } @@ -575,9 +579,10 @@ class CliDumper extends AbstractDumper { $result = 183 <= getenv('ANSICON_VER') || 'ON' === getenv('ConEmuANSI') - || 'xterm' === getenv('TERM'); + || 'xterm' === getenv('TERM') + || 'Hyper' === getenv('TERM_PROGRAM'); - if (!$result && PHP_VERSION_ID >= 70200) { + if (!$result && \PHP_VERSION_ID >= 70200) { $version = sprintf( '%s.%s.%s', PHP_WINDOWS_VERSION_MAJOR, diff --git a/vendor/symfony/var-dumper/Dumper/ContextProvider/CliContextProvider.php b/vendor/symfony/var-dumper/Dumper/ContextProvider/CliContextProvider.php index be73f795..1f8c0c84 100644 --- a/vendor/symfony/var-dumper/Dumper/ContextProvider/CliContextProvider.php +++ b/vendor/symfony/var-dumper/Dumper/ContextProvider/CliContextProvider.php @@ -20,7 +20,7 @@ final class CliContextProvider implements ContextProviderInterface { public function getContext(): ?array { - if ('cli' !== PHP_SAPI) { + if ('cli' !== \PHP_SAPI) { return null; } diff --git a/vendor/symfony/var-dumper/Dumper/ContextProvider/SourceContextProvider.php b/vendor/symfony/var-dumper/Dumper/ContextProvider/SourceContextProvider.php index 0c96db52..0c091041 100644 --- a/vendor/symfony/var-dumper/Dumper/ContextProvider/SourceContextProvider.php +++ b/vendor/symfony/var-dumper/Dumper/ContextProvider/SourceContextProvider.php @@ -74,7 +74,7 @@ final class SourceContextProvider implements ContextProviderInterface $src = explode("\n", $src); $fileExcerpt = array(); - for ($i = max($line - 3, 1), $max = min($line + 3, count($src)); $i <= $max; ++$i) { + for ($i = max($line - 3, 1), $max = min($line + 3, \count($src)); $i <= $max; ++$i) { $fileExcerpt[] = ''.$this->htmlEncode($src[$i - 1]).''; } @@ -99,7 +99,7 @@ final class SourceContextProvider implements ContextProviderInterface if (null !== $this->projectDir) { $context['project_dir'] = $this->projectDir; if (0 === strpos($file, $this->projectDir)) { - $context['file_relative'] = ltrim(substr($file, strlen($this->projectDir)), DIRECTORY_SEPARATOR); + $context['file_relative'] = ltrim(substr($file, \strlen($this->projectDir)), \DIRECTORY_SEPARATOR); } } diff --git a/vendor/symfony/var-dumper/Dumper/HtmlDumper.php b/vendor/symfony/var-dumper/Dumper/HtmlDumper.php index 28cf6699..0edb97cd 100644 --- a/vendor/symfony/var-dumper/Dumper/HtmlDumper.php +++ b/vendor/symfony/var-dumper/Dumper/HtmlDumper.php @@ -826,10 +826,10 @@ EOHTML } $label = esc(substr($value, -$attr['ellipsis'])); $style = str_replace(' title="', " title=\"$v\n", $style); - $v = sprintf('%s', $class, substr($v, 0, -strlen($label))); + $v = sprintf('%s', $class, substr($v, 0, -\strlen($label))); if (!empty($attr['ellipsis-tail'])) { - $tail = strlen(esc(substr($value, -$attr['ellipsis'], $attr['ellipsis-tail']))); + $tail = \strlen(esc(substr($value, -$attr['ellipsis'], $attr['ellipsis-tail']))); $v .= sprintf('%s%s', substr($label, 0, $tail), substr($label, $tail)); } else { $v .= $label; @@ -840,7 +840,7 @@ EOHTML $s = ''; $c = $c[$i = 0]; do { - $s .= isset($map[$c[$i]]) ? $map[$c[$i]] : sprintf('\x%02X', ord($c[$i])); + $s .= isset($map[$c[$i]]) ? $map[$c[$i]] : sprintf('\x%02X', \ord($c[$i])); } while (isset($c[++$i])); return $s.''; @@ -895,7 +895,7 @@ EOHTML $options = $this->extraDisplayOptions + $this->displayOptions; if ($fmt = $options['fileLinkFormat']) { - return is_string($fmt) ? strtr($fmt, array('%f' => $file, '%l' => $line)) : $fmt->format($file, $line); + return \is_string($fmt) ? strtr($fmt, array('%f' => $file, '%l' => $line)) : $fmt->format($file, $line); } return false; diff --git a/vendor/symfony/var-dumper/Exception/ThrowingCasterException.php b/vendor/symfony/var-dumper/Exception/ThrowingCasterException.php index 976f4439..af47753a 100644 --- a/vendor/symfony/var-dumper/Exception/ThrowingCasterException.php +++ b/vendor/symfony/var-dumper/Exception/ThrowingCasterException.php @@ -21,6 +21,6 @@ class ThrowingCasterException extends \Exception */ public function __construct(\Exception $prev) { - parent::__construct('Unexpected '.get_class($prev).' thrown from a caster: '.$prev->getMessage(), 0, $prev); + parent::__construct('Unexpected '.\get_class($prev).' thrown from a caster: '.$prev->getMessage(), 0, $prev); } } diff --git a/vendor/symfony/var-dumper/Resources/css/htmlDescriptor.css b/vendor/symfony/var-dumper/Resources/css/htmlDescriptor.css index 4277c680..65da8137 100644 --- a/vendor/symfony/var-dumper/Resources/css/htmlDescriptor.css +++ b/vendor/symfony/var-dumper/Resources/css/htmlDescriptor.css @@ -102,7 +102,7 @@ pre.sf-dump { margin-bottom: 0; } .hidden { - display: none; !important + display: none !important; } .dumped-tag > .sf-dump { display: inline-block; diff --git a/vendor/symfony/var-dumper/Server/DumpServer.php b/vendor/symfony/var-dumper/Server/DumpServer.php index dd66afa3..6f79ca4c 100644 --- a/vendor/symfony/var-dumper/Server/DumpServer.php +++ b/vendor/symfony/var-dumper/Server/DumpServer.php @@ -63,7 +63,7 @@ class DumpServer continue; } - if (!is_array($payload) || count($payload) < 2 || !$payload[0] instanceof Data || !is_array($payload[1])) { + if (!\is_array($payload) || \count($payload) < 2 || !$payload[0] instanceof Data || !\is_array($payload[1])) { if ($this->logger) { $this->logger->warning('Invalid payload from {clientId} client. Expected an array of two elements (Data $data, array $context)', array('clientId' => $clientId)); } diff --git a/vendor/symfony/var-dumper/Test/VarDumperTestTrait.php b/vendor/symfony/var-dumper/Test/VarDumperTestTrait.php index 3946b2eb..bcf55dee 100644 --- a/vendor/symfony/var-dumper/Test/VarDumperTestTrait.php +++ b/vendor/symfony/var-dumper/Test/VarDumperTestTrait.php @@ -48,7 +48,7 @@ trait VarDumperTestTrait private function prepareExpectation($expected, $filter) { - if (!is_string($expected)) { + if (!\is_string($expected)) { $expected = $this->getDump($expected, null, $filter); } diff --git a/vendor/symfony/var-dumper/Tests/Caster/DateCasterTest.php b/vendor/symfony/var-dumper/Tests/Caster/DateCasterTest.php index f6d03792..d2796866 100644 --- a/vendor/symfony/var-dumper/Tests/Caster/DateCasterTest.php +++ b/vendor/symfony/var-dumper/Tests/Caster/DateCasterTest.php @@ -94,7 +94,7 @@ EODUMP; */ public function testDumpInterval($intervalSpec, $ms, $invert, $expected) { - if ($ms && PHP_VERSION_ID >= 70200 && version_compare(PHP_VERSION, '7.2.0rc3', '<=')) { + if ($ms && \PHP_VERSION_ID >= 70200 && version_compare(PHP_VERSION, '7.2.0rc3', '<=')) { $this->markTestSkipped('Skipped on 7.2 before rc4 because of php bug #75354.'); } @@ -114,7 +114,7 @@ EODUMP; */ public function testDumpIntervalExcludingVerbosity($intervalSpec, $ms, $invert, $expected) { - if ($ms && PHP_VERSION_ID >= 70200 && version_compare(PHP_VERSION, '7.2.0rc3', '<=')) { + if ($ms && \PHP_VERSION_ID >= 70200 && version_compare(PHP_VERSION, '7.2.0rc3', '<=')) { $this->markTestSkipped('Skipped on 7.2 before rc4 because of php bug #75354.'); } @@ -134,7 +134,7 @@ EODUMP; */ public function testCastInterval($intervalSpec, $ms, $invert, $xInterval, $xSeconds) { - if ($ms && PHP_VERSION_ID >= 70200 && version_compare(PHP_VERSION, '7.2.0rc3', '<=')) { + if ($ms && \PHP_VERSION_ID >= 70200 && version_compare(PHP_VERSION, '7.2.0rc3', '<=')) { $this->markTestSkipped('Skipped on 7.2 before rc4 because of php bug #75354.'); } @@ -272,7 +272,7 @@ EODUMP; public function provideTimeZones() { - $xRegion = extension_loaded('intl') ? '%s' : ''; + $xRegion = \extension_loaded('intl') ? '%s' : ''; return array( // type 1 (UTC offset) @@ -302,7 +302,7 @@ EODUMP; */ public function testDumpPeriod($start, $interval, $end, $options, $expected) { - $p = new \DatePeriod(new \DateTime($start), new \DateInterval($interval), is_int($end) ? $end : new \DateTime($end), $options); + $p = new \DatePeriod(new \DateTime($start), new \DateInterval($interval), \is_int($end) ? $end : new \DateTime($end), $options); $xDump = << dirname(__DIR__).'/Fixtures/Twig.php', + 'file' => \dirname(__DIR__).'/Fixtures/Twig.php', 'line' => 20, 'class' => '__TwigTemplate_VarDumperFixture_u75a09', )), new FrameStub(array( - 'file' => dirname(__DIR__).'/Fixtures/Twig.php', + 'file' => \dirname(__DIR__).'/Fixtures/Twig.php', 'line' => 21, 'class' => '__TwigTemplate_VarDumperFixture_u75a09', 'object' => new \__TwigTemplate_VarDumperFixture_u75a09(null, __FILE__), diff --git a/vendor/symfony/var-dumper/Tests/Caster/ReflectionCasterTest.php b/vendor/symfony/var-dumper/Tests/Caster/ReflectionCasterTest.php index 3eaf958d..828fc30b 100644 --- a/vendor/symfony/var-dumper/Tests/Caster/ReflectionCasterTest.php +++ b/vendor/symfony/var-dumper/Tests/Caster/ReflectionCasterTest.php @@ -154,7 +154,7 @@ EOTXT public function testGenerator() { - if (extension_loaded('xdebug')) { + if (\extension_loaded('xdebug')) { $this->markTestSkipped('xdebug is active'); } diff --git a/vendor/symfony/var-dumper/Tests/Cloner/DataTest.php b/vendor/symfony/var-dumper/Tests/Cloner/DataTest.php index 83f6b600..d10951be 100644 --- a/vendor/symfony/var-dumper/Tests/Cloner/DataTest.php +++ b/vendor/symfony/var-dumper/Tests/Cloner/DataTest.php @@ -26,14 +26,14 @@ class DataTest extends TestCase $clonedValues = array(); $this->assertInstanceOf(Data::class, $data); - $this->assertCount(count($values), $data); + $this->assertCount(\count($values), $data); $this->assertFalse(isset($data->{0})); $this->assertFalse(isset($data[0])); foreach ($data as $k => $v) { $this->assertTrue(isset($data->{$k})); $this->assertTrue(isset($data[$k])); - $this->assertSame(gettype($values[$k]), $data->seek($k)->getType()); + $this->assertSame(\gettype($values[$k]), $data->seek($k)->getType()); $this->assertSame($values[$k], $data->seek($k)->getValue()); $this->assertSame($values[$k], $data->{$k}); $this->assertSame($values[$k], $data[$k]); diff --git a/vendor/symfony/var-dumper/VarDumper.php b/vendor/symfony/var-dumper/VarDumper.php index 137c4747..a9ed05b3 100644 --- a/vendor/symfony/var-dumper/VarDumper.php +++ b/vendor/symfony/var-dumper/VarDumper.php @@ -29,13 +29,13 @@ class VarDumper { if (null === self::$handler) { $cloner = new VarCloner(); - $dumper = \in_array(PHP_SAPI, array('cli', 'phpdbg'), true) ? new CliDumper() : new HtmlDumper(); + $dumper = \in_array(\PHP_SAPI, array('cli', 'phpdbg'), true) ? new CliDumper() : new HtmlDumper(); self::$handler = function ($var) use ($cloner, $dumper) { $dumper->dump($cloner->cloneVar($var)); }; } - return call_user_func(self::$handler, $var); + return \call_user_func(self::$handler, $var); } public static function setHandler(callable $callable = null) diff --git a/vendor/vlucas/phpdotenv/src/Loader.php b/vendor/vlucas/phpdotenv/src/Loader.php index 327302db..cb3508fa 100644 --- a/vendor/vlucas/phpdotenv/src/Loader.php +++ b/vendor/vlucas/phpdotenv/src/Loader.php @@ -253,14 +253,14 @@ class Loader $parts = explode(' #', $value, 2); $value = trim($parts[0]); - // Check if value is a comment (usually triggered when empty value with comment) - if (preg_match('/^#/', $value) > 0) { - $value = ''; - } - // Unquoted values cannot contain whitespace if (preg_match('/\s+/', $value) > 0) { - throw new InvalidFileException('Dotenv values containing spaces must be surrounded by quotes.'); + // Check if value is a comment (usually triggered when empty value with comment) + if (preg_match('/^#/', $value) > 0) { + $value = ''; + } else { + throw new InvalidFileException('Dotenv values containing spaces must be surrounded by quotes.'); + } } } From e536ef7e0ab0167f1412d69584d1bd3d37de718a Mon Sep 17 00:00:00 2001 From: TheGamecraft Date: Mon, 10 Sep 2018 09:13:10 -0400 Subject: [PATCH 2/2] ALPHA 3.0.2b --- .env.example | 20 ++++--- .gitignore | 1 + config/app.php | 11 ++++ config/squadron.php | 12 +---- install.sh | 3 +- .../{welcome.blade.php => default.blade.php} | 53 ++----------------- routes/web.php | 5 +- 7 files changed, 33 insertions(+), 72 deletions(-) rename resources/views/{welcome.blade.php => default.blade.php} (55%) diff --git a/.env.example b/.env.example index ec44a125..16230c68 100644 --- a/.env.example +++ b/.env.example @@ -1,17 +1,20 @@ -APP_NAME=Laravel +APP_NAME=C-CMS APP_ENV=local -APP_KEY= +APP_KEY=base64:FQH+yWnhFyB+2gpByIg2Rybmqn5EXkL7VeFawzSJ/Lc= APP_DEBUG=true -APP_URL=http://localhost +APP_URL=https://dev.c-cms.cf/ + +SQN_NUMBER=000 +SQN_FULLNAME="Escadron 000 Exemple" LOG_CHANNEL=stack DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 -DB_DATABASE=homestead -DB_USERNAME=homestead -DB_PASSWORD=secret +DB_DATABASE=ddb_dev +DB_USERNAME=root +DB_PASSWORD=nHpz39lp BROADCAST_DRIVER=log CACHE_DRIVER=file @@ -23,13 +26,16 @@ REDIS_HOST=127.0.0.1 REDIS_PASSWORD=null REDIS_PORT=6379 -MAIL_DRIVER=smtp +MAIL_DRIVER=mailgun MAIL_HOST=smtp.mailtrap.io MAIL_PORT=2525 MAIL_USERNAME=null MAIL_PASSWORD=null MAIL_ENCRYPTION=null +NEXMO_KEY=f52074e0 +NEXMO_SECRET=lXK9GasDUdotWqL3 + PUSHER_APP_ID= PUSHER_APP_KEY= PUSHER_APP_SECRET= diff --git a/.gitignore b/.gitignore index 554dce54..4c192857 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ npm-debug.log yarn-error.log .env /public/assets/public +/resources/views/public.blade.php diff --git a/config/app.php b/config/app.php index 642649e6..13b36021 100644 --- a/config/app.php +++ b/config/app.php @@ -54,6 +54,17 @@ return [ 'url' => env('APP_URL', 'http://localhost'), + /* + |-------------------------------------------------------------------------- + | Application Version + |-------------------------------------------------------------------------- + | + | This the current version of the application. + | + */ + + 'version' => "3.0.2b", + /* |-------------------------------------------------------------------------- | Application Timezone diff --git a/config/squadron.php b/config/squadron.php index b4b3e2dc..b88937b4 100644 --- a/config/squadron.php +++ b/config/squadron.php @@ -7,24 +7,16 @@ return [ | Squadron Number |-------------------------------------------------------------------------- | - | This option controls the default authentication "guard" and password - | reset options for your application. You may change these defaults - | as required, but they're a perfect start for most applications. - | */ - 'number' => '697', + 'number' => env('SQN_NUMBER', "000"), /* |-------------------------------------------------------------------------- | Squadron FullName |-------------------------------------------------------------------------- | - | This option controls the default authentication "guard" and password - | reset options for your application. You may change these defaults - | as required, but they're a perfect start for most applications. - | */ - 'fullname' => 'Escadron 697 Rotary Rimouski', + 'fullname' => env('SQN_FULLNAME', "Escadron 000 Exemple"), ]; diff --git a/install.sh b/install.sh index 9cd68e31..ad666323 100644 --- a/install.sh +++ b/install.sh @@ -3,4 +3,5 @@ sudo composer update sudo chmod -R 777 storage/ sudo chmod -R 777 bootstrap/ php artisan migrate -php artisan db:seed \ No newline at end of file +php artisan db:seed +cp resources/views/default.blade.php resources/views/index.blade.php \ No newline at end of file diff --git a/resources/views/welcome.blade.php b/resources/views/default.blade.php similarity index 55% rename from resources/views/welcome.blade.php rename to resources/views/default.blade.php index 353af8b8..2b3feebb 100644 --- a/resources/views/welcome.blade.php +++ b/resources/views/default.blade.php @@ -5,7 +5,7 @@ - Escadron 697 + Escadron {{config('squadron.number')}} @@ -80,59 +80,12 @@
- Escadron 697 - Rotary Rimouski -
-

- Le site de l'escadron sera de retour en septembre pour commencer la nouvelle année d'instruction ! -

-
-

-
-
-
-
25%
-
- body; - } - - ?> + {{config('squadron.fullname')}}
- diff --git a/routes/web.php b/routes/web.php index 15ecc70f..4d8a44c1 100644 --- a/routes/web.php +++ b/routes/web.php @@ -76,10 +76,7 @@ Route::middleware(['auth','admin'])->group(function () { /* Other Route */ Route::get('/test', function () { - $users = \App\User::all()->whereNotIn('telephone','null'); - foreach ($users as $user) { - $user->notify(new sms($user,"Il y a une une modification a l'horaire vous concernant le 25 octobre")); - } + return view('welcome'); });